check及操作按钮权限

This commit is contained in:
Chengliang 2022-06-01 17:18:40 +08:00
parent 064c40d299
commit e2f8c060a6
2 changed files with 18 additions and 26 deletions

View File

@ -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 = (
<Menu>
<Menu.Item>
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
</Menu.Item>
<Menu.Item>
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查部门</a>
</Menu.Item>
</Menu>
)
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 = (
<Menu>
<Menu.Item>
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
</Menu.Item>
{
record.isUsed === 0 ? <Menu.Item>
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
</Menu.Item> : ''
}
<Menu.Item>
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查部门</a>
</Menu.Item>
@ -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}
/>
// <NewWeaTable ecId={`${this && this.props && this.props.ecId || ''}_NewWeaTable@q4rrwm`}
// dataSource={dataSource}
// columns={this.reRenderColumns(columns)}
// rowSelection={rowSelection}
// pagination={pagination}
// loading={loading}
// indentSize={15}
// />
}
</WeaTop>

View File

@ -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 = (
<Menu>
<Menu.Item>
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
</Menu.Item>
{
record.isUsed === 0 ? <Menu.Item>
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
</Menu.Item> : ''
}
<Menu.Item>
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查人员</a>
</Menu.Item>
@ -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 = {