@@ -26,30 +26,18 @@ const CreateForm = (props) => { | |||||
<Form.Item name="id" hidden={true}> | <Form.Item name="id" hidden={true}> | ||||
<Input /> | <Input /> | ||||
</Form.Item> | </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 }]}> | <Form.Item name="name" label="角色名称" rules={[{ required: true, max: 64 }]}> | ||||
<Input placeholder="请输入角色名称" /> | <Input placeholder="请输入角色名称" /> | ||||
</Form.Item> | </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 }]}> | <Form.Item name="remark" label="备注" rules={[{ max: 500 }]}> | ||||
<Input.TextArea placeholder="请输入备注" /> | <Input.TextArea placeholder="请输入备注" /> | ||||
</Form.Item> | </Form.Item> | ||||
</Col> | |||||
<Col span={12}> | |||||
<Form.Item name="sort" label="排序"> | |||||
<InputNumber min={1} decimalSeparator="0"/> | |||||
</Form.Item> | |||||
</Col> | |||||
</Row> | |||||
<Form.Item> | <Form.Item> | ||||
<Button htmlType="button" style={{float:'right',left:10}} onClick={props.onCancel} > | <Button htmlType="button" style={{float:'right',left:10}} onClick={props.onCancel} > | ||||
取消 | 取消 | ||||
@@ -142,33 +142,6 @@ const roleManager = () => { | |||||
> | > | ||||
更新 | 更新 | ||||
</a>); | </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( | arr.push( | ||||
<Popconfirm | <Popconfirm | ||||
title="确认删除吗?" | title="确认删除吗?" | ||||
@@ -225,10 +198,10 @@ const roleManager = () => { | |||||
hideInTable: true, | hideInTable: true, | ||||
hideInSearch: true, | hideInSearch: true, | ||||
}, | }, | ||||
{ | |||||
title: '角色编码', | |||||
dataIndex: 'code', | |||||
}, | |||||
// { | |||||
// title: '角色编码', | |||||
// dataIndex: 'code', | |||||
// }, | |||||
{ | { | ||||
title: '角色名称', | title: '角色名称', | ||||
dataIndex: 'name', | dataIndex: 'name', | ||||
@@ -238,15 +211,6 @@ const roleManager = () => { | |||||
dataIndex: 'remark', | dataIndex: 'remark', | ||||
hideInSearch: true, | hideInSearch: true, | ||||
}, | }, | ||||
{ | |||||
title: '状态', | |||||
dataIndex: 'status', | |||||
hideInSearch: true, | |||||
valueEnum: { | |||||
0: { text: '启用', status: 'Success' }, | |||||
1: { text: '禁用', status: 'Warning' }, | |||||
}, | |||||
}, | |||||
{ | { | ||||
title: '创建时间', | title: '创建时间', | ||||
search: false, | search: false, | ||||
@@ -45,7 +45,7 @@ export async function removeRole(params) { | |||||
//设置菜单 | //设置菜单 | ||||
export async function setMenu(params) { | export async function setMenu(params) { | ||||
return request('/kitchen/api/roles/addorupdatemenurole',{ | |||||
return request('/saasbase/api/roles/addorupdatemenurole',{ | |||||
method:'post', | method:'post', | ||||
data:params | data:params | ||||
}); | }); | ||||