diff --git a/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue b/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue index b2d4af7..cff8838 100644 --- a/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue +++ b/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue @@ -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属性!')