已发布、已下线的培训文档默认不可多选
continuous-integration/drone/push Build is passing Details

uat
wangxiaoshuang 2025-04-21 11:28:41 +08:00
parent fb671defb5
commit 38c31af137
1 changed files with 6 additions and 3 deletions

View File

@ -75,7 +75,7 @@
<el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" stripe height="100" <el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" stripe height="100"
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange"> @sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
<!-- <el-table-column type="index" width="40" /> --> <!-- <el-table-column type="index" width="40" /> -->
<el-table-column type="selection" width="55"> <el-table-column type="selection" width="55" :selectable="handleSelectable">
</el-table-column> </el-table-column>
<el-table-column prop="FileType" :label="$t('dictionary:signature:table:FileType')" show-overflow-tooltip <el-table-column prop="FileType" :label="$t('dictionary:signature:table:FileType')" show-overflow-tooltip
sortable="custom" min-width="120px" /> sortable="custom" min-width="120px" />
@ -238,6 +238,9 @@ export default {
this.getUserType() this.getUserType()
}, },
methods: { methods: {
handleSelectable(row) {
return !row.IsDeleted || !row.IsPublish
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
@ -250,7 +253,7 @@ export default {
}) })
if (!confirm) return false if (!confirm) return false
let arr = list.filter(item => !item.IsPublish) let arr = list.filter(item => !item.IsPublish)
if (arr.length <= 0) return false if (arr.length <= 0) return this.getList()
let data = { let data = {
ids: arr.map(item => item.Id) ids: arr.map(item => item.Id)
} }
@ -339,7 +342,7 @@ export default {
}) })
.then(() => { .then(() => {
let arr = row.filter(item => !item.IsDeleted) let arr = row.filter(item => !item.IsDeleted)
if (arr.length <= 0) return false if (arr.length <= 0) return this.getList()
let data = { let data = {
Ids: arr.map(item => item.Id) Ids: arr.map(item => item.Id)
} }