diff --git a/dist.zip b/dist.zip
new file mode 100644
index 0000000..a35ae0b
Binary files /dev/null and b/dist.zip differ
diff --git a/src/components/dialog/copyDialog.jsx b/src/components/dialog/copyDialog.jsx
index e69de29..3e3d296 100644
--- a/src/components/dialog/copyDialog.jsx
+++ b/src/components/dialog/copyDialog.jsx
@@ -0,0 +1,99 @@
+import { Form, Input, Modal, TreeSelect, message } from 'antd';
+import React, { useState, useEffect } from 'react';
+import * as d3 from 'd3';
+import './index.less';
+
+const layout = {
+ labelCol: { span: 6 },
+ wrapperCol: { span: 14 },
+};
+
+const CopyDialog = ({ open, onCreate, onCancel }) => {
+ const [form] = Form.useForm();
+
+ const [treeData, setData] = useState([]);
+ console.log(treeData);
+ useEffect(() => {
+ d3.json('/api/bs/hrmorganization/orgchart/getSubCompanyTree').then(
+ (data) => {
+ setData(data.companyTree);
+ },
+ );
+ }, [true]);
+
+ /**
+ * 根节点树异步加载
+ * @param {} parentId
+ * @returns
+ */
+ const onRootLoadData = (treeNode) =>
+ new Promise((resolve) => {
+ const { id } = treeNode.props;
+ setTimeout(() => {
+ d3.json(
+ `/api/bs/hrmorganization/orgchart/getSubCompanyTree?subcompany=${id}`,
+ ).then((data) => {
+ debugger;
+ let arr = [...treeData, ...data.companyTree];
+ setData(arr);
+ });
+ resolve(undefined);
+ }, 200);
+ });
+
+ return (
+ {
+ form
+ .validateFields()
+ .then((values) => {
+ onCreate(values);
+ })
+ .catch((info) => {
+ console.log('Validate Failed:', info);
+ });
+ }}
+ >
+
+
+
+
+
+
+
+
+
+ );
+};
+export default CopyDialog;
diff --git a/src/components/dialog/index.less b/src/components/dialog/index.less
new file mode 100644
index 0000000..b286550
--- /dev/null
+++ b/src/components/dialog/index.less
@@ -0,0 +1,3 @@
+.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper {
+ color: #222526;
+}
diff --git a/src/components/dialog/mergeDialog.jsx b/src/components/dialog/mergeDialog.jsx
index e69de29..7c9cb59 100644
--- a/src/components/dialog/mergeDialog.jsx
+++ b/src/components/dialog/mergeDialog.jsx
@@ -0,0 +1,107 @@
+import { Form, Input, Modal, TreeSelect, message } from 'antd';
+import React, {
+ useState,
+ useEffect,
+ useRef,
+ forwardRef,
+ useImperativeHandle,
+} from 'react';
+import * as d3 from 'd3';
+import './index.less';
+
+const layout = {
+ labelCol: { span: 6 },
+ wrapperCol: { span: 14 },
+};
+
+const MergeDialog = forwardRef(({ open, onCreate, onCancel }, ref) => {
+ const [treeData, setData] = useState([]);
+ const [form] = Form.useForm();
+ const formRef = useRef(null);
+
+ useImperativeHandle(ref, () => ({
+ getTreeData() {
+ form.resetFields();
+ d3.json('/api/bs/hrmorganization/orgchart/getDepartmentTree').then(
+ (data) => {
+ setData(data.departmentTree);
+ },
+ );
+ },
+ }));
+
+ /**
+ * 根节点树异步加载
+ * @param {} parentId
+ * @returns
+ */
+ const onRootLoadData = (treeNode) =>
+ new Promise((resolve) => {
+ const { id } = treeNode.props;
+ setTimeout(() => {
+ d3.json(
+ `/api/bs/hrmorganization/orgchart/getDepartmentTree?subcompany=${id}`,
+ ).then((data) => {
+ let arr = [...treeData, ...data.departmentTree];
+ setData(arr);
+ });
+ resolve(undefined);
+ }, 200);
+ });
+
+ return (
+ {
+ form
+ .validateFields()
+ .then((values) => {
+ onCreate(values);
+ })
+ .catch((info) => {
+ console.log('Validate Failed:', info);
+ });
+ }}
+ >
+
+
+
+
+
+
+
+
+
+ );
+});
+export default MergeDialog;
diff --git a/src/pages/company.jsx b/src/pages/company.jsx
index 1885fcf..4700f79 100644
--- a/src/pages/company.jsx
+++ b/src/pages/company.jsx
@@ -141,10 +141,7 @@ export default function companyPage() {
const nodeContentRender = (d, i, arr, state) => {
if (d.data.ftype == 0) {
- return `
-
-

-
+ return `
-
- window.open(
- `/spa/organization/static/index.html#/main/organization/${extend}/${nodeData.id}`,
- '_blank',
- )
- }
- >
- 查看
+ <>
+ {nodeData.type == 0 ? (
+
+ {' '}
+
+ {nodeData.title}
- onDelete(nodeData)}>
- 删除
-
- 封存
-
- 合并
-
-
- 复制
-
-
-
+ ) : (
+ <>
+
+ {icon}
+ {nodeData.title}
+
+
+ >
+ )}
+ >
);
};
return (
-
+ <>
+
{
+ const value = showCanceled == 0 ? 1 : 0;
+ setShowCanceled(value);
+ getMoveTree(value);
+ }}
+ />
+
+
+ {
+ setOpen(false);
+ }}
+ />
+ {/* {
+ setCopyOpen(false);
+ }}/> */}
+
+ >
);
};
export default DragTree;
diff --git a/src/pages/index.less b/src/pages/index.less
index de053ab..59cd9b4 100644
--- a/src/pages/index.less
+++ b/src/pages/index.less
@@ -18,6 +18,10 @@
display: inline-block;
}
+.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper {
+ color: rgba(0, 0, 0, 0.85);
+}
+
#drag-button-ops {
display: none;
width: 500px;
diff --git a/src/pages/user.jsx b/src/pages/user.jsx
index 4114a1a..ea21bb6 100644
--- a/src/pages/user.jsx
+++ b/src/pages/user.jsx
@@ -99,7 +99,7 @@ export default function userPage() {
// 获取数据
useEffect(() => {
document.cookie =
- 'ecology_JSessionid=aaaqxkKrIiwa59VyYrwMy; JSESSIONID=aaaqxkKrIiwa59VyYrwMy; loginidweaver=1; languageidweaver=7; loginuuids=1; __randcode__=61884b51-d206-4953-8fd2-78cfc6cc7044';
+ 'ecology_JSessionid=aaaUMPsdM5DKIgXzYrwMy; JSESSIONID=aaaUMPsdM5DKIgXzYrwMy; __randcode__=f5b6cc86-28ff-416b-bc87-569246714d54; loginidweaver=1; languageidweaver=7; loginuuids=1';
d3.json(
// "/user/data"
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',