|
@@ -0,0 +1,187 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="organization-container">
|
|
|
|
|
+ <div class="left">
|
|
|
|
|
+ <TreeParts :treeData="org_tree_data" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="right">
|
|
|
|
|
+ <a-card title="详情" style="height: 100%;">
|
|
|
|
|
+ <OrgForm :dept_form="dept_form" @save="orgFromSave" @reset="orgFromReset"></OrgForm>
|
|
|
|
|
+ </a-card>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script setup>
|
|
|
|
|
+import { ref, reactive, toRefs } from 'vue';
|
|
|
|
|
+import TreeParts from '../TreeParts.vue';
|
|
|
|
|
+import OrgForm from './OrgForm.vue';
|
|
|
|
|
+
|
|
|
|
|
+const org_tree_data = ref([
|
|
|
|
|
+ {
|
|
|
|
|
+ "address": null,
|
|
|
|
|
+ "children": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "address": "",
|
|
|
|
|
+ "children": [],
|
|
|
|
|
+ "code": null,
|
|
|
|
|
+ "createTime": "Thu, 12 Sep 2024 14:56:43 GMT",
|
|
|
|
|
+ "deptId": "2af7cb5e-1178-4adc-8abb-9780f7543081",
|
|
|
|
|
+ "deptName": "成都",
|
|
|
|
|
+ "email": "",
|
|
|
|
|
+ "iconCls": null,
|
|
|
|
|
+ "leader": "成都",
|
|
|
|
|
+ "orderNum": 0,
|
|
|
|
|
+ "parentId": "0",
|
|
|
|
|
+ "parentName": "总部",
|
|
|
|
|
+ "phone": "成都",
|
|
|
|
|
+ "roles": [],
|
|
|
|
|
+ "status": "",
|
|
|
|
|
+ "updateTime": "Thu, 12 Sep 2024 14:56:43 GMT"
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "address": null,
|
|
|
|
|
+ "children": [],
|
|
|
|
|
+ "code": null,
|
|
|
|
|
+ "createTime": "Sun, 22 May 2022 09:59:33 GMT",
|
|
|
|
|
+ "deptId": "5477d9a9-e41e-485f-bb08-697e8facef88",
|
|
|
|
|
+ "deptName": "南京分公司",
|
|
|
|
|
+ "email": "ss@ada.com",
|
|
|
|
|
+ "iconCls": null,
|
|
|
|
|
+ "leader": "dd",
|
|
|
|
|
+ "orderNum": 0,
|
|
|
|
|
+ "parentId": "0",
|
|
|
|
|
+ "parentName": "总部",
|
|
|
|
|
+ "phone": "18905189016",
|
|
|
|
|
+ "roles": [],
|
|
|
|
|
+ "status": "0",
|
|
|
|
|
+ "updateTime": "Tue, 12 Nov 2024 03:05:10 GMT"
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "address": null,
|
|
|
|
|
+ "children": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "address": "",
|
|
|
|
|
+ "children": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "address": "",
|
|
|
|
|
+ "children": [],
|
|
|
|
|
+ "code": null,
|
|
|
|
|
+ "createTime": "Tue, 12 Nov 2024 03:09:57 GMT",
|
|
|
|
|
+ "deptId": "c6ae93de-2436-4090-b567-ec4835c74112",
|
|
|
|
|
+ "deptName": "成都",
|
|
|
|
|
+ "email": "",
|
|
|
|
|
+ "iconCls": null,
|
|
|
|
|
+ "leader": "柔柔弱弱",
|
|
|
|
|
+ "orderNum": 0,
|
|
|
|
|
+ "parentId": "f86724f0-94d9-445c-9d95-3ec2540da0f8",
|
|
|
|
|
+ "parentName": "太平洋派出所",
|
|
|
|
|
+ "phone": "1234242342",
|
|
|
|
|
+ "roles": [],
|
|
|
|
|
+ "status": "",
|
|
|
|
|
+ "updateTime": "Tue, 12 Nov 2024 06:58:15 GMT"
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ "code": null,
|
|
|
|
|
+ "createTime": "Thu, 05 Sep 2024 03:15:13 GMT",
|
|
|
|
|
+ "deptId": "f86724f0-94d9-445c-9d95-3ec2540da0f8",
|
|
|
|
|
+ "deptName": "太平洋派出所",
|
|
|
|
|
+ "email": "",
|
|
|
|
|
+ "iconCls": null,
|
|
|
|
|
+ "leader": "12",
|
|
|
|
|
+ "orderNum": 0,
|
|
|
|
|
+ "parentId": "ce627e90-57d6-4ed4-a789-1f3dd467ae7d",
|
|
|
|
|
+ "parentName": "上海分公司",
|
|
|
|
|
+ "phone": "12",
|
|
|
|
|
+ "roles": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "deptId": "f86724f0-94d9-445c-9d95-3ec2540da0f8",
|
|
|
|
|
+ "roleId": "19f00d46-8f1b-45b5-b7b7-6197d7b8cb33",
|
|
|
|
|
+ "roleName": "管理员1"
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ "status": "0",
|
|
|
|
|
+ "updateTime": "Tue, 12 Nov 2024 06:58:07 GMT"
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ "code": null,
|
|
|
|
|
+ "createTime": "Tue, 24 May 2022 23:54:10 GMT",
|
|
|
|
|
+ "deptId": "ce627e90-57d6-4ed4-a789-1f3dd467ae7d",
|
|
|
|
|
+ "deptName": "上海分公司",
|
|
|
|
|
+ "email": null,
|
|
|
|
|
+ "iconCls": null,
|
|
|
|
|
+ "leader": "jack",
|
|
|
|
|
+ "orderNum": 0,
|
|
|
|
|
+ "parentId": "0",
|
|
|
|
|
+ "parentName": "总部",
|
|
|
|
|
+ "phone": null,
|
|
|
|
|
+ "roles": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "deptId": "ce627e90-57d6-4ed4-a789-1f3dd467ae7d",
|
|
|
|
|
+ "roleId": "301ca518-2ed0-4092-a2ee-e46c24a42c8a",
|
|
|
|
|
+ "roleName": "普通"
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ "status": "0",
|
|
|
|
|
+ "updateTime": "Wed, 18 Sep 2024 09:58:16 GMT"
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ "code": null,
|
|
|
|
|
+ "createTime": "Mon, 28 Nov 2016 10:34:54 GMT",
|
|
|
|
|
+ "deptId": "0",
|
|
|
|
|
+ "deptName": "总部",
|
|
|
|
|
+ "email": null,
|
|
|
|
|
+ "iconCls": "ext-icon-bricks",
|
|
|
|
|
+ "leader": null,
|
|
|
|
|
+ "orderNum": 100,
|
|
|
|
|
+ "parentId": "",
|
|
|
|
|
+ "parentName": "",
|
|
|
|
|
+ "phone": null,
|
|
|
|
|
+ "roles": [],
|
|
|
|
|
+ "status": "0",
|
|
|
|
|
+ "updateTime": "Mon, 28 Nov 2016 10:35:12 GMT"
|
|
|
|
|
+ }
|
|
|
|
|
+]);
|
|
|
|
|
+
|
|
|
|
|
+const dept_form = reactive({
|
|
|
|
|
+ parentName: '',
|
|
|
|
|
+ status: 0,
|
|
|
|
|
+ deptName: '',
|
|
|
|
|
+ leader: '',
|
|
|
|
|
+ phone: '',
|
|
|
|
|
+ address: ''
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+const orgFromSave = (data) => {
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const orgFromReset = () => {
|
|
|
|
|
+ dept_form.parentName = '';
|
|
|
|
|
+ dept_form.status = 0;
|
|
|
|
|
+ dept_form.deptName = '';
|
|
|
|
|
+ dept_form.leader = '';
|
|
|
|
|
+ dept_form.phone = '';
|
|
|
|
|
+ dept_form.address = '';
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style lang="css" scoped>
|
|
|
|
|
+.organization-container {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ height: calc(100% - 40px);
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.left {
|
|
|
|
|
+ width: 30%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.right {
|
|
|
|
|
+ width: 69%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|