|
@@ -82,41 +82,35 @@ const DepartmentMenu = props => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <div
|
|
|
|
|
- className="w-12rem rounded-4px flex flex-col"
|
|
|
|
|
- style={{
|
|
|
|
|
- height: `calc(100vh - 96px)`
|
|
|
|
|
- }}>
|
|
|
|
|
- <div className="p-4 border-b-1 border-solid border-black border-opacity-10 bg-[#f7f9fa] flex justify-around items-center">
|
|
|
|
|
- <span className="text-[0.9375rem]">组织架构</span>
|
|
|
|
|
- {hasPerm && (
|
|
|
|
|
- <ModalForm
|
|
|
|
|
- title="创建部门"
|
|
|
|
|
- width="500px"
|
|
|
|
|
- trigger={
|
|
|
|
|
- <Button size="small" type="primary" ghost>
|
|
|
|
|
- <PlusOutlined />
|
|
|
|
|
- 创建部门
|
|
|
|
|
- </Button>
|
|
|
|
|
- }
|
|
|
|
|
- onFinish={async values => {
|
|
|
|
|
- await handleAddDepartment(values)
|
|
|
|
|
- message.success('添加成功')
|
|
|
|
|
- return true
|
|
|
|
|
- }}>
|
|
|
|
|
- <ProFormText name="backstageMenuId" hidden />
|
|
|
|
|
- <ProFormText name="name" label="新增部门" rules={[{ message: '请输入部门名称' }]} />
|
|
|
|
|
- <Form.Item label="上级部门" name="parentId">
|
|
|
|
|
- <TreeSelect
|
|
|
|
|
- style={{ width: '100%' }}
|
|
|
|
|
- placeholder="请选择上司"
|
|
|
|
|
- treeDefaultExpandAll
|
|
|
|
|
- treeData={departments}
|
|
|
|
|
- allowClear
|
|
|
|
|
- />
|
|
|
|
|
- </Form.Item>
|
|
|
|
|
- </ModalForm>
|
|
|
|
|
- )}
|
|
|
|
|
|
|
+ <div className="min-w-12rem rounded-4px flex flex-col">
|
|
|
|
|
+ <div className="w-full p-4 border-b-1 border-solid border-black border-opacity-10 bg-hex-f7f9fa flex justify-around items-center flex-row">
|
|
|
|
|
+ <div className="text-[0.9375rem]">组织架构</div>
|
|
|
|
|
+ <ModalForm
|
|
|
|
|
+ title="创建部门"
|
|
|
|
|
+ width="500px"
|
|
|
|
|
+ trigger={
|
|
|
|
|
+ <Button size="small" type="primary" ghost disabled={!hasPerm}>
|
|
|
|
|
+ <PlusOutlined />
|
|
|
|
|
+ 创建部门
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ }
|
|
|
|
|
+ onFinish={async values => {
|
|
|
|
|
+ await handleAddDepartment(values)
|
|
|
|
|
+ message.success('添加成功')
|
|
|
|
|
+ return true
|
|
|
|
|
+ }}>
|
|
|
|
|
+ <ProFormText name="backstageMenuId" hidden />
|
|
|
|
|
+ <ProFormText name="name" label="新增部门" rules={[{ message: '请输入部门名称' }]} />
|
|
|
|
|
+ <Form.Item label="上级部门" name="parentId">
|
|
|
|
|
+ <TreeSelect
|
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
|
+ placeholder="请选择上司"
|
|
|
|
|
+ treeDefaultExpandAll
|
|
|
|
|
+ treeData={departments}
|
|
|
|
|
+ allowClear
|
|
|
|
|
+ />
|
|
|
|
|
+ </Form.Item>
|
|
|
|
|
+ </ModalForm>
|
|
|
</div>
|
|
</div>
|
|
|
<div className="py-4 bg-white flex-1">
|
|
<div className="py-4 bg-white flex-1">
|
|
|
{departments.length ? (
|
|
{departments.length ? (
|