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 = {