From e2f8c060a6af10c81340524a66e6cd6c3fba3c06 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Wed, 1 Jun 2022 17:18:40 +0800 Subject: [PATCH] =?UTF-8?q?check=E5=8F=8A=E6=93=8D=E4=BD=9C=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/company/company.js | 31 ++++++------------- pc4mobx/organization/components/job/Job.js | 13 +++++--- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/pc4mobx/organization/components/company/company.js b/pc4mobx/organization/components/company/company.js index 9b07041..fcc0034 100644 --- a/pc4mobx/organization/components/company/company.js +++ b/pc4mobx/organization/components/company/company.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-05-18 16:23:32 - * @LastEditTime: 2022-06-01 11:51:20 + * @LastEditTime: 2022-06-01 17:15:50 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js */ @@ -252,16 +252,6 @@ export default class Company extends React.Component { // ) // } // }); - const menu = ( - - - { _this.doDel(record.id) }}>删除 - - - { _this.select(record.id) }}>联查部门 - - - ) columns.forEach((c, index) => { if (c.dataIndex == 'forbiddenTag') { c.render = function (text, record) { @@ -281,9 +271,11 @@ export default class Company extends React.Component { c.render = function (text, record) { const menu = ( - - { _this.doDel(record.id) }}>删除 - + { + record.isUsed === 0 ? + { _this.doDel(record.id) }}>删除 + : '' + } { _this.select(record.id) }}>联查部门 @@ -413,6 +405,9 @@ export default class Company extends React.Component { onChange(selectedRowKeys, selectedRows) { company.setSelectedRowKeys(selectedRowKeys); }, + getCheckboxProps: record => ({ + disabled: record.isUsed === 1, // 配置无法勾选的列 + }), }; const pagination = { @@ -481,14 +476,6 @@ export default class Company extends React.Component { }} indentSize={15} /> - // } diff --git a/pc4mobx/organization/components/job/Job.js b/pc4mobx/organization/components/job/Job.js index cebcf15..ad7a849 100644 --- a/pc4mobx/organization/components/job/Job.js +++ b/pc4mobx/organization/components/job/Job.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-05-26 14:05:59 - * @LastEditTime: 2022-06-01 16:18:15 + * @LastEditTime: 2022-06-01 17:16:00 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/job/job.js */ @@ -309,9 +309,11 @@ export default class Job extends React.Component { c.render = function (text, record) { const menu = ( - - { _this.doDel(record.id) }}>删除 - + { + record.isUsed === 0 ? + { _this.doDel(record.id) }}>删除 + : '' + } { _this.select(record.id) }}>联查人员 @@ -491,6 +493,9 @@ export default class Job extends React.Component { onChange(selectedRowKeys, selectedRows) { job.setSelectedRowKeys(selectedRowKeys); }, + getCheckboxProps: record => ({ + disabled: record.isUsed === 1, // 配置无法勾选的列 + }), }; const pagination = {