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