[fix 86964] 一级项目限制勾选删除

This commit is contained in:
danshihao
2024-07-08 20:03:28 +08:00
parent eb0df1c89f
commit 95bd343b3d
@@ -48,7 +48,7 @@
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, getCheckboxProps: getCheckboxProps}"
@change="handleTableChange"
class="j-table-force-nowrap">
@@ -159,6 +159,14 @@ export default {
this.loadData()
},
methods: {
getCheckboxProps (record) {
return {
props: {
// 一级禁用,防止勾选删除
disabled: record.projectType + '' === SafetyCenterProjectTypeEnums.safetyCenter.value
}
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error('请设置url.list属性!')