Browse Source

Merge branch 'master' into groupmealweb

groupmealweb
zhaoy 11 months ago
parent
commit
a01724449b
3 changed files with 11 additions and 59 deletions
  1. +6
    -18
      src/pages/org/roles/components/CreateForm.jsx
  2. +4
    -40
      src/pages/org/roles/index.jsx
  3. +1
    -1
      src/pages/org/roles/service.js

+ 6
- 18
src/pages/org/roles/components/CreateForm.jsx View File

@@ -26,30 +26,18 @@ const CreateForm = (props) => {
<Form.Item name="id" hidden={true}>
<Input />
</Form.Item>
<Row>
<Col span={12}>
<Form.Item name="code" label="角色编码" rules={[{ required: true, max: 20 }]}>
<Input disabled={props.values.id ? true : false} placeholder="请输入角色编码" />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="name" label="角色名称" rules={[{ required: true, max: 64 }]}>
<Input placeholder="请输入角色名称" />
</Form.Item>
</Col>
</Row>
<Row>
<Col span={12}>
<Form.Item name="sort" label="排序">
<InputNumber style={{width:'100%'}} min={1} decimalSeparator="0"/>
</Form.Item>
<Form.Item name="remark" label="备注" rules={[{ max: 500 }]}>
<Input.TextArea placeholder="请输入备注" />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="sort" label="排序">
<InputNumber min={1} decimalSeparator="0"/>
</Form.Item>
</Col>
</Row>
<Form.Item>
<Button htmlType="button" style={{float:'right',left:10}} onClick={props.onCancel} >
取消


+ 4
- 40
src/pages/org/roles/index.jsx View File

@@ -142,33 +142,6 @@ const roleManager = () => {
>
更新
</a>);
if (record.status == 1) {
arr.push(<a
disabled={record.code == 'sys_manager_role'}
style={{ pointerEvents: record.code == 'sys_manager_role' ? 'none' : 'auto' }}
onClick={() => {
Enable(record.id).then(r => {
actionRef.current.reload();
})
}}
>
启用
</a>);
}
if (record.status == 0) {
arr.push(<a
disabled={record.code == 'sys_manager_role'}
style={{ pointerEvents: record.code == 'sys_manager_role' ? 'none' : 'auto' }}
onClick={() => {
Disable(record.id).then(r => {
actionRef.current.reload();
})
}}
>
禁用
</a>);
}

arr.push(
<Popconfirm
title="确认删除吗?"
@@ -225,10 +198,10 @@ const roleManager = () => {
hideInTable: true,
hideInSearch: true,
},
{
title: '角色编码',
dataIndex: 'code',
},
// {
// title: '角色编码',
// dataIndex: 'code',
// },
{
title: '角色名称',
dataIndex: 'name',
@@ -238,15 +211,6 @@ const roleManager = () => {
dataIndex: 'remark',
hideInSearch: true,
},
{
title: '状态',
dataIndex: 'status',
hideInSearch: true,
valueEnum: {
0: { text: '启用', status: 'Success' },
1: { text: '禁用', status: 'Warning' },
},
},
{
title: '创建时间',
search: false,


+ 1
- 1
src/pages/org/roles/service.js View File

@@ -45,7 +45,7 @@ export async function removeRole(params) {

//设置菜单
export async function setMenu(params) {
return request('​/kitchen/api/roles/addorupdatemenurole',{
return request('​/saasbase/api/roles/addorupdatemenurole',{
method:'post',
data:params
});


Loading…
Cancel
Save