diff --git a/src/assets/css/workflow.scss b/src/assets/css/workflow.scss index c86784239..364aee87c 100644 --- a/src/assets/css/workflow.scss +++ b/src/assets/css/workflow.scss @@ -1423,11 +1423,11 @@ html { .flowLevel-7 { @include flowLevwlCommon; height: 126px; - line-height: 126px; } .flowLevel-2 { top: 181px; + line-height: 110px; div { padding-left: 80px; @@ -1445,6 +1445,7 @@ html { .flowLevel-3 { top: 329px; + line-height: 120px; div { padding-left: 80px; @@ -1462,6 +1463,7 @@ html { .flowLevel-4 { top: 475px; + line-height: 128px; div { padding-left: 80px; @@ -1479,6 +1481,7 @@ html { .flowLevel-5 { top: 623px; + line-height: 130px; div { padding-left: 80px; @@ -1496,6 +1499,7 @@ html { .flowLevel-6 { top: 771px; + line-height: 130px; div { padding-left: 80px; @@ -1513,6 +1517,7 @@ html { .flowLevel-7 { top: 922px; + line-height: 130px; div { padding-left: 80px; diff --git a/src/components/GridTree/addNode.vue b/src/components/GridTree/addNode.vue new file mode 100644 index 000000000..5f8582e38 --- /dev/null +++ b/src/components/GridTree/addNode.vue @@ -0,0 +1,237 @@ + + + + + + + + + + 审批人 + + + + + + 抄送人 + + + + + + 条件分支 + + + + + + + + + + diff --git a/src/components/GridTree/nodeWrap.vue b/src/components/GridTree/nodeWrap.vue new file mode 100644 index 000000000..dbf05f2f4 --- /dev/null +++ b/src/components/GridTree/nodeWrap.vue @@ -0,0 +1,202 @@ + + + + + + {{ spliceNameFun(nodeConfig, 18) }} + + + + + + + + + + + + {{ spliceNameFun(item, 18) }} + + + + {{ spliceNameFun(item, 18) }} + + + + + {{ spliceNameFun(item, 3) }} + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/JwTree/addNode.vue b/src/components/JwTree/addNode.vue new file mode 100644 index 000000000..5f8582e38 --- /dev/null +++ b/src/components/JwTree/addNode.vue @@ -0,0 +1,237 @@ + + + + + + + + + + 审批人 + + + + + + 抄送人 + + + + + + 条件分支 + + + + + + + + + + diff --git a/src/components/JwTree/nodeWrap.vue b/src/components/JwTree/nodeWrap.vue new file mode 100644 index 000000000..760bddfc5 --- /dev/null +++ b/src/components/JwTree/nodeWrap.vue @@ -0,0 +1,201 @@ + + + + + + {{ spliceNameFun(nodeConfig, 18) }} + + + + + + + + + + + + {{ spliceNameFun(item, 18) }} + + + + {{ spliceNameFun(item, 18) }} + + + + + {{ spliceNameFun(item, 3) }} + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/Tree/nodeWrap.vue b/src/components/Tree/nodeWrap.vue index 9f56afa5e..53d1ca53a 100644 --- a/src/components/Tree/nodeWrap.vue +++ b/src/components/Tree/nodeWrap.vue @@ -83,18 +83,12 @@ export default { computed: {}, watch: {}, methods: { - getIncludes(name) { - if (name.includes("街道党工委") || name.includes("街道党总支")) { - return true; - } - }, - getAllName(item) { return item.partyOrgName + item.principalName; }, spliceNameFun(row, num) { - let allName = row.principalName; + let allName = row.principalName ? row.principalNam : ""; if (num === 18) { allName = row.partyOrgName + row.principalName; } diff --git a/src/js/store/modules/chooseArea.js b/src/js/store/modules/chooseArea.js index 471c3069b..b16cba630 100644 --- a/src/js/store/modules/chooseArea.js +++ b/src/js/store/modules/chooseArea.js @@ -1,5 +1,5 @@ const state = { - chooseName: "金湖路社区", + chooseName: "", }; const mutations = { diff --git a/src/main.js b/src/main.js index d69976dca..f27ee6174 100644 --- a/src/main.js +++ b/src/main.js @@ -35,10 +35,16 @@ import util from "@js/util"; import Moment from "moment"; import getQueryPara from "dai-js/modules/getQueryPara"; import NodeWrap from "@/components/Tree/nodeWrap.vue"; -import AddNode from "@/components/Tree/addNode.vue"; +// import AddNode from "@/components/Tree/addNode.vue"; +import NodeWrapJw from "@/components/JwTree/nodeWrap.vue"; +import NodeWrapGrid from "@/components/GridTree/nodeWrap.vue"; +// import AddNodeJw from "@/components/JwTree/addNode.vue"; //按钮 Vue.component("nodeWrap", NodeWrap); -Vue.component("addNode", AddNode); +// Vue.component("addNode", AddNode); +Vue.component("nodeWrapJw", NodeWrapJw); +Vue.component("nodeWrapGrid", NodeWrapGrid); +// Vue.component("addNodeJw", AddNodeJw); // 兼容token传参登录 if (getQueryPara("token")) { diff --git a/src/views/dataBoard/organizational/dangTree/index.vue b/src/views/dataBoard/organizational/dangTree/index.vue index 2fb677319..9b68ed332 100644 --- a/src/views/dataBoard/organizational/dangTree/index.vue +++ b/src/views/dataBoard/organizational/dangTree/index.vue @@ -26,25 +26,7 @@ export default { return { loading: false, levelArr: [], - navList: [ - { - name: "党委组织架构", - key: "1", - ifActive: true, - }, - { - name: "居委组织架构", - key: "2", - ifActive: false, - }, - { - name: "网格架构", - key: "3", - ifActive: false, - }, - ], nowVal: 100, - nodeConfig: {}, }; }, @@ -55,31 +37,34 @@ export default { }, computed: {}, mounted() { - console.log(this.$store.state.chooseArea.chooseName); + // console.log(this.$store.state.chooseArea.chooseName); this.getTreeData(); }, methods: { //获取背景层级 - getDataPLevel(item) { - let arr = [...this.levelArr]; - arr.push(item.partyOrgLevel); - this.levelArr = [...arr]; - if (item.children) { - this.getDataPLevel(item.children[0]); + getDataPLevel(data) { + for (let i = 0; i < data.length; i++) { + if (data[i].children) { + this.levelArr.push(data[i].partyOrgLevel); + this.getDataPLevel(data[i].children); + } else { + this.levelArr.push(data[i].partyOrgLevel); + } } + this.levelArr = new Set(this.levelArr); }, //获取树状结构 getTreeData() { this.loading = true; this.$http - .get("/actual/base/organizational/structure/partyCommitteeOrg") + .get(`/actual/base/organizational/structure/partyCommitteeOrg?agencyId=${this.$store.state.chooseArea.chooseName}`) .then((res) => { const { data: { code, data }, } = res; if (code === 0) { this.nodeConfig = data[0]; - this.getDataPLevel(data[0]); + this.getDataPLevel(data); this.loading = false; } }) diff --git a/src/views/dataBoard/organizational/gridTree/index.vue b/src/views/dataBoard/organizational/gridTree/index.vue index 8b73c4d67..5e7b9bd08 100644 --- a/src/views/dataBoard/organizational/gridTree/index.vue +++ b/src/views/dataBoard/organizational/gridTree/index.vue @@ -11,7 +11,7 @@ - + @@ -25,465 +25,40 @@ export default { data() { return { loading: false, - levelArr: [1, 2, 3], - navList: [ - { - name: "党委组织架构", - key: "1", - ifActive: true, - }, - { - name: "居委组织架构", - key: "2", - ifActive: false, - }, - { - name: "网格架构", - key: "3", - ifActive: false, - }, - ], - cardList: [ - { - title: "社区党委", - key: "1", - name: "南昌路社区党委 (党委书记:解书记)", - children: [ - { - title: "网格党支部", - name: "第一网格党支部(支部书记:王艺发)", - key: "1", - children: [ - { - title: "楼院党小组", - name: "第一楼院党小组 (组长:韩文国)", - key: "1", - }, - { - title: "楼院党小组", - name: "第二楼院党小组 (组长:褚丽兰)", - key: "2", - }, - ], - }, - { - title: "网格党支部", - name: "第二网格党支部 (支部书记:尤芬紫)", - key: "2", - children: [ - { - title: "楼院党小组", - name: "第一楼院党小组 (组长:韩文国)", - key: "1", - }, - { - title: "楼院党小组", - name: "第二楼院党小组 (组长:褚丽兰)", - key: "2", - }, - ], - }, - { - title: "网格党支部", - name: "第三网格党支部 (支部书记:凤桥强)", - key: "3", - children: [ - { - title: "楼院党小组", - name: "第一楼院党小组 (组长:韩文国)", - key: "1", - }, - { - title: "楼院党小组", - name: "第二楼院党小组 (组长:褚丽兰)", - key: "2", - }, - { - title: "楼院党小组", - name: "第三楼院党小组 (组长:王丽丽)", - key: "3", - }, - ], - }, - ], - }, - ], + levelArr: [], nowVal: 100, - - nodeConfig: { - partyOrgName: "市北区委", - partyOrgLevel: 1, - partyOrgPid: "0", - principalName: "栾秀杰", - laneLevel: 1, - children: [ - { - partyOrgName: "市北区委", - partyOrgLevel: 2, - partyOrgPid: "0", - principalName: "栾秀杰", - laneLevel: 2, - children: [ - { - partyOrgName: "市北区委", - partyOrgLevel: 3, - partyOrgPid: "0", - principalName: "栾秀杰", - laneLevel: 3, - // children: [ - // { - // partyOrgName: "市北区委", - // partyOrgLevel: 4, - // partyOrgPid: "0", - // principalName: "栾秀杰", - // laneLevel: 4, - // children: [ - // { - // partyOrgName: "市北区委", - // partyOrgLevel: 5, - // partyOrgPid: "0", - // principalName: "栾秀杰", - // laneLevel: 5, - // children: [ - // { - // partyOrgName: "市北区委", - // partyOrgLevel: 6, - // partyOrgPid: "0", - // principalName: "栾秀杰", - // laneLevel: 6, - // children: [ - // { - // partyOrgName: "市北区委", - // partyOrgLevel: 7, - // partyOrgPid: "0", - // principalName: "栾秀杰", - // laneLevel: 7, - // // children: [ - // // { - // // partyOrgName: "市北区委", - // // partyOrgLevel: 8, - // // partyOrgPid: "0", - // // principalName: "栾秀杰", - // // laneLevel: 8, - // // children: [ - // // { - // // partyOrgName: "市北区委", - // // partyOrgLevel: 9, - // // partyOrgPid: "0", - // // principalName: "栾秀杰", - // // laneLevel: 9, - // // children: [ - // // { - // // partyOrgName: "市北区委", - // // partyOrgLevel: 10, - // // partyOrgPid: "0", - // // principalName: "栾秀杰", - // // laneLevel: 10, - // // }, - // // ], - // // }, - // // ], - // // }, - // // ], - // }, - // ], - // }, - // ], - // }, - // ], - // }, - // ], - }, - ], - }, - ], - - // title: "社区党委", - // name: "南昌路社区党委(党委书记:解书记)", - // key: "1", - // children: [ - // { - // title: "网格党支部", - // name: "第一网格党支部 (支部书记:王艺发)", - // type: 2, - // children: [ - // { - // title: "楼院党小组", - // type: 3, - // name: "第一楼院党小组 (组长:韩文国)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "杨军", - // }, - // ], - // }, - // { - // title: "楼院党小组", - // type: 3, - // name: "第二楼院党小组 (组长:褚丽兰)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "杨军", - // }, - // ], - // }, - // ], - // }, - // { - // title: "网格党支部", - // name: "第二网格党支部 (支部书记:尤芬紫)", - // type: 3, - // children: [ - // { - // title: "楼院党小组", - // type: 3, - // name: "第一楼院党小组 (组长:韩文国)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // children: [ - // { - // title: "联系家庭", - // type: 5, - // name: "王宇", - // }, - // { - // title: "联系家庭", - // type: 5, - // name: "刘冰冰", - // }, - // { - // title: "联系家庭", - // type: 5, - // name: "杨飞宇", - // }, - // { - // title: "联系家庭", - // type: 5, - // name: "齐天", - // }, - // ], - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // ], - // }, - // { - // title: "楼院党小组", - // type: 3, - // name: "第二楼院党小组 (组长:褚丽兰)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // ], - // }, - // ], - // }, - // { - // title: "网格党支部", - // name: "第三网格党支部 (支部书记:凤桥强)", - // type: 3, - // children: [ - // { - // title: "楼院党小组", - // type: 3, - // name: "第一楼院党小组 (组长:韩文国)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "杨军", - // }, - // ], - // }, - // { - // title: "楼院党小组", - // type: 3, - // name: "第二楼院党小组 (组长:褚丽兰)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "杨军", - // }, - // ], - // }, - // { - // title: "楼院党小组", - // type: 3, - // name: "第三楼院党小组 (组长:王丽丽)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // ], - // }, - // ], - // }, - // ], - }, + nodeConfig: {}, }; }, computed: {}, mounted() { - // this.getTreeData(); + this.getTreeData(); }, methods: { //获取背景层级 - getDataPLevel(item) { - let arr = [...this.levelArr]; - arr.push(item.partyOrgLevel); - this.levelArr = [...arr]; - if (item.children) { - this.getDataPLevel(item.children[0]); + getDataPLevel(data) { + for (let i = 0; i < data.length; i++) { + if (data[i].children) { + this.levelArr.push(data[i].level); + this.getDataPLevel(data[i].children); + } else { + this.levelArr.push(data[i].level); + } } + this.levelArr = new Set(this.levelArr); }, //获取树状结构 getTreeData() { this.loading = true; this.$http - .get("/actual/base/organizational/structure/partyCommitteeOrg") + .get(`/gov/org/organizational/neighborhood/getGridCommitteeOrgTreeList?agencyId=${this.$store.state.chooseArea.chooseName}`) .then((res) => { const { data: { code, data }, } = res; if (code === 0) { this.nodeConfig = data[0]; - this.getDataPLevel(data[0]); + this.getDataPLevel(data); this.loading = false; } }) @@ -494,16 +69,14 @@ export default { getTitleNameMapFun(i) { let titleNameMap = new Map([ - [1, "省委"], - [2, "市委"], - [3, "区委"], - [4, "党工委"], - [5, "党委"], - [6, "党总支"], - [7, "党支部"], - [8, "楼院党小组"], - [9, "党员中心户"], - [10, "联系家庭"], + ["province", "省委"], + ["city", "市委"], + ["district", "区委"], + ["street", "乡(镇、街道)"], + ["community", "社区"], + ["grid_manager", "网格"], + ["building_chief", "楼院"], + ["unit_chief", "微网格"], ]); return titleNameMap.get(i); }, diff --git a/src/views/dataBoard/organizational/jwTree/index.vue b/src/views/dataBoard/organizational/jwTree/index.vue index b44d7267a..8943b6d8e 100644 --- a/src/views/dataBoard/organizational/jwTree/index.vue +++ b/src/views/dataBoard/organizational/jwTree/index.vue @@ -11,7 +11,7 @@ - + @@ -25,465 +25,40 @@ export default { data() { return { loading: false, - levelArr: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], - navList: [ - { - name: "党委组织架构", - key: "1", - ifActive: true, - }, - { - name: "居委组织架构", - key: "2", - ifActive: false, - }, - { - name: "网格架构", - key: "3", - ifActive: false, - }, - ], - cardList: [ - { - title: "社区党委", - key: "1", - name: "南昌路社区党委 (党委书记:解书记)", - children: [ - { - title: "网格党支部", - name: "第一网格党支部(支部书记:王艺发)", - key: "1", - children: [ - { - title: "楼院党小组", - name: "第一楼院党小组 (组长:韩文国)", - key: "1", - }, - { - title: "楼院党小组", - name: "第二楼院党小组 (组长:褚丽兰)", - key: "2", - }, - ], - }, - { - title: "网格党支部", - name: "第二网格党支部 (支部书记:尤芬紫)", - key: "2", - children: [ - { - title: "楼院党小组", - name: "第一楼院党小组 (组长:韩文国)", - key: "1", - }, - { - title: "楼院党小组", - name: "第二楼院党小组 (组长:褚丽兰)", - key: "2", - }, - ], - }, - { - title: "网格党支部", - name: "第三网格党支部 (支部书记:凤桥强)", - key: "3", - children: [ - { - title: "楼院党小组", - name: "第一楼院党小组 (组长:韩文国)", - key: "1", - }, - { - title: "楼院党小组", - name: "第二楼院党小组 (组长:褚丽兰)", - key: "2", - }, - { - title: "楼院党小组", - name: "第三楼院党小组 (组长:王丽丽)", - key: "3", - }, - ], - }, - ], - }, - ], + levelArr: [], nowVal: 100, - - nodeConfig: { - partyOrgName: "市北区委", - partyOrgLevel: 1, - partyOrgPid: "0", - principalName: "栾秀杰", - laneLevel: 1, - children: [ - { - partyOrgName: "市北区委", - partyOrgLevel: 2, - partyOrgPid: "0", - principalName: "栾秀杰", - laneLevel: 2, - children: [ - { - partyOrgName: "市北区委", - partyOrgLevel: 3, - partyOrgPid: "0", - principalName: "栾秀杰", - laneLevel: 3, - children: [ - { - partyOrgName: "市北区委", - partyOrgLevel: 4, - partyOrgPid: "0", - principalName: "栾秀杰", - laneLevel: 4, - children: [ - // { - // partyOrgName: "市北区委", - // partyOrgLevel: 5, - // partyOrgPid: "0", - // principalName: "栾秀杰", - // laneLevel: 5, - // children: [ - // { - // partyOrgName: "市北区委", - // partyOrgLevel: 6, - // partyOrgPid: "0", - // principalName: "栾秀杰", - // laneLevel: 6, - // children: [ - // { - // partyOrgName: "市北区委", - // partyOrgLevel: 7, - // partyOrgPid: "0", - // principalName: "栾秀杰", - // laneLevel: 7, - // children: [ - // { - // partyOrgName: "市北区委", - // partyOrgLevel: 8, - // partyOrgPid: "0", - // principalName: "栾秀杰", - // laneLevel: 8, - // children: [ - // { - // partyOrgName: "市北区委", - // partyOrgLevel: 9, - // partyOrgPid: "0", - // principalName: "栾秀杰", - // laneLevel: 9, - // children: [ - // { - // partyOrgName: "市北区委", - // partyOrgLevel: 10, - // partyOrgPid: "0", - // principalName: "栾秀杰", - // laneLevel: 10, - // }, - // ], - // }, - // ], - // }, - // ], - // }, - // ], - // }, - // ], - // }, - ], - }, - ], - }, - ], - }, - ], - - // title: "社区党委", - // name: "南昌路社区党委(党委书记:解书记)", - // key: "1", - // children: [ - // { - // title: "网格党支部", - // name: "第一网格党支部 (支部书记:王艺发)", - // type: 2, - // children: [ - // { - // title: "楼院党小组", - // type: 3, - // name: "第一楼院党小组 (组长:韩文国)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "杨军", - // }, - // ], - // }, - // { - // title: "楼院党小组", - // type: 3, - // name: "第二楼院党小组 (组长:褚丽兰)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "杨军", - // }, - // ], - // }, - // ], - // }, - // { - // title: "网格党支部", - // name: "第二网格党支部 (支部书记:尤芬紫)", - // type: 3, - // children: [ - // { - // title: "楼院党小组", - // type: 3, - // name: "第一楼院党小组 (组长:韩文国)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // children: [ - // { - // title: "联系家庭", - // type: 5, - // name: "王宇", - // }, - // { - // title: "联系家庭", - // type: 5, - // name: "刘冰冰", - // }, - // { - // title: "联系家庭", - // type: 5, - // name: "杨飞宇", - // }, - // { - // title: "联系家庭", - // type: 5, - // name: "齐天", - // }, - // ], - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // ], - // }, - // { - // title: "楼院党小组", - // type: 3, - // name: "第二楼院党小组 (组长:褚丽兰)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // ], - // }, - // ], - // }, - // { - // title: "网格党支部", - // name: "第三网格党支部 (支部书记:凤桥强)", - // type: 3, - // children: [ - // { - // title: "楼院党小组", - // type: 3, - // name: "第一楼院党小组 (组长:韩文国)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "杨军", - // }, - // ], - // }, - // { - // title: "楼院党小组", - // type: 3, - // name: "第二楼院党小组 (组长:褚丽兰)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "杨军", - // }, - // ], - // }, - // { - // title: "楼院党小组", - // type: 3, - // name: "第三楼院党小组 (组长:王丽丽)", - // children: [ - // { - // title: "党员中心户", - // type: 4, - // name: "周游", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "王阳明", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "刘艳萍", - // }, - // { - // title: "党员中心户", - // type: 4, - // name: "谢苗苗", - // }, - // ], - // }, - // ], - // }, - // ], - }, + nodeConfig: {}, }; }, computed: {}, mounted() { - // this.getTreeData(); + this.getTreeData(); }, methods: { //获取背景层级 - getDataPLevel(item) { - let arr = [...this.levelArr]; - arr.push(item.partyOrgLevel); - this.levelArr = [...arr]; - if (item.children) { - this.getDataPLevel(item.children[0]); + getDataPLevel(data) { + for (let i = 0; i < data.length; i++) { + if (data[i].children) { + this.levelArr.push(data[i].level); + this.getDataPLevel(data[i].children); + } else { + this.levelArr.push(data[i].level); + } } + this.levelArr = new Set(this.levelArr); }, //获取树状结构 getTreeData() { this.loading = true; this.$http - .get("/actual/base/organizational/structure/partyCommitteeOrg") + .get(`/gov/org/organizational/neighborhood/getNeighborhoodCommitteeOrgTreeList?agencyId=${this.$store.state.chooseArea.chooseName}`) .then((res) => { const { data: { code, data }, } = res; if (code === 0) { this.nodeConfig = data[0]; - this.getDataPLevel(data[0]); + this.getDataPLevel(data); this.loading = false; } }) @@ -494,16 +69,15 @@ export default { getTitleNameMapFun(i) { let titleNameMap = new Map([ - [1, "省委"], - [2, "市委"], - [3, "区委"], - [4, "党工委"], - [5, "党委"], - [6, "党总支"], - [7, "党支部"], - [8, "楼院党小组"], - [9, "党员中心户"], - [10, "联系家庭"], + ["province", "省委"], + ["city", "市委"], + ["district", "区委"], + ["street", "乡(镇、街道)"], + ["community", "社区"], + ["grid_manager", "网格长"], + ["building_chief", "楼组长"], + ["unit_chief", "单元长"], + ["public_welfare_post", "志愿者"], ]); return titleNameMap.get(i); },
审批人
抄送人
条件分支