From 95bd343b3d5d102114e94a554f40cfbc85a3eb60 Mon Sep 17 00:00:00 2001 From: danshihao Date: Mon, 8 Jul 2024 20:03:28 +0800 Subject: [PATCH] =?UTF-8?q?[fix=2086964]=20=E4=B8=80=E7=BA=A7=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=99=90=E5=88=B6=E5=8B=BE=E9=80=89=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functionalSafetyCenter/FunctionalSafetyCenter.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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属性!')