fix
parent
ae8137b045
commit
bb5ec8bb67
|
|
@ -55,6 +55,8 @@ function toSelectedDept(node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function DepartmentPositionPage(props) {
|
function DepartmentPositionPage(props) {
|
||||||
|
const {orgPosition}=props;
|
||||||
|
const {orgPositionLoading}=orgPosition;
|
||||||
const [selectedDept, setSelectedDept] = useState(null);
|
const [selectedDept, setSelectedDept] = useState(null);
|
||||||
const [treeData, setTreeData] = useState([]);
|
const [treeData, setTreeData] = useState([]);
|
||||||
const [deptModalOpen, setDeptModalOpen] = useState(false);
|
const [deptModalOpen, setDeptModalOpen] = useState(false);
|
||||||
|
|
@ -180,7 +182,7 @@ function DepartmentPositionPage(props) {
|
||||||
okText: "是",
|
okText: "是",
|
||||||
cancelText: "否",
|
cancelText: "否",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
const res = await props.orgPositionRemove({ id });
|
const res = await props.orgPositionRemove({ data: id });
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
fetchPositionData(1, 10);
|
fetchPositionData(1, 10);
|
||||||
|
|
@ -398,6 +400,7 @@ function DepartmentPositionPage(props) {
|
||||||
destroyOnHidden
|
destroyOnHidden
|
||||||
title={currentId ? "编辑岗位" : "添加岗位"}
|
title={currentId ? "编辑岗位" : "添加岗位"}
|
||||||
width={560}
|
width={560}
|
||||||
|
confirmLoading={orgPositionLoading}
|
||||||
onCancel={closePositionModal}
|
onCancel={closePositionModal}
|
||||||
onOk={modalForm.submit}
|
onOk={modalForm.submit}
|
||||||
>
|
>
|
||||||
|
|
@ -544,7 +547,6 @@ function DeptFormModal({
|
||||||
setSubmitting(false);
|
setSubmitting(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
console.log(treeData);
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
open={open}
|
open={open}
|
||||||
|
|
@ -557,7 +559,11 @@ function DeptFormModal({
|
||||||
onOk={form.submit}
|
onOk={form.submit}
|
||||||
>
|
>
|
||||||
<Form form={form} layout="vertical" onFinish={handleSubmit}>
|
<Form form={form} layout="vertical" onFinish={handleSubmit}>
|
||||||
<Form.Item name="parentId" label="上级部门" initialValue={selectedDeptId}>
|
<Form.Item
|
||||||
|
name="parentId"
|
||||||
|
label="上级部门"
|
||||||
|
initialValue={selectedDeptId}
|
||||||
|
>
|
||||||
<TreeSelect
|
<TreeSelect
|
||||||
treeData={treeData}
|
treeData={treeData}
|
||||||
allowClear
|
allowClear
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import { useEffect, useState } from "react";
|
||||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||||
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
||||||
|
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||||
import { isOrgAccountEnabled } from "~/utils/enterpriseInfo/adapter";
|
import { isOrgAccountEnabled } from "~/utils/enterpriseInfo/adapter";
|
||||||
import {
|
import {
|
||||||
CHONGQING_DISTRICTS,
|
CHONGQING_DISTRICTS,
|
||||||
|
|
@ -374,4 +375,4 @@ function OrgAccountPage(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_ORG_INFO], true)(OrgAccountPage);
|
export default Connect([NS_ORG_INFO], true)(AntdTableFuncControl(OrgAccountPage));
|
||||||
Loading…
Reference in New Issue