diff --git a/src/views/modules/plugins/power/poweraxis.vue b/src/views/modules/plugins/power/poweraxis.vue
index 2e94bc62..54708e4a 100644
--- a/src/views/modules/plugins/power/poweraxis.vue
+++ b/src/views/modules/plugins/power/poweraxis.vue
@@ -35,14 +35,14 @@
>
-
+
-
修改
删除
+ 负责人
@@ -59,7 +59,7 @@
@@ -71,14 +71,12 @@
-
-
-
-
+
@@ -167,10 +165,10 @@ export default {
},
// 树状结构列表
powerAxisTreeList: [],
- // 查询动力主轴机构标签
- listSimple:[],
+ // 查询动力主轴标签类别
+ tagCategoryArr: [],
// 绑定组织列表
- agencytree:[],
+ agencytree: [],
// 上级网格党支部列表
GridPartyBranchList:[],
// 党委列表
@@ -195,6 +193,8 @@ export default {
created(){
// this.getTreeList()
this.initTreeData()
+ this.getTagCategoryArr()
+ this.getAgencyTree()
},
mounted(){
this.customerId = localStorage.getItem('customerId')
@@ -231,15 +231,15 @@ export default {
}
},
// 获取动力主轴标签
- async getListSimple(){
+ async getTagCategoryArr(){
const url = '/pli/power/axisTag/listSimple/struct'
let params = {}
- const { data, code, msg } = await requestPost(url,params)
+ const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
- this.listSimple = data
+ this.tagCategoryArr = data
} else {
this.$message.error(msg)
}
@@ -256,9 +256,7 @@ export default {
const { data, code, msg } = await requestPost(url,params)
if (code === 0) {
- console.log(data)
- this.agencytree = data[0].subOrgList
-
+ this.agencytree = this.removeEmptySubOrgList(data)
} else {
this.$message.error(msg)
}
@@ -331,7 +329,7 @@ export default {
addNewOrg(){
this.addDialogBox = true
this.addOrgForm.pid = ''
- this.getListSimple()
+ this.getTagCategoryArr()
this.getAgencyTree()
},
@@ -435,8 +433,28 @@ export default {
},
handelGridParty(val){
console.log(val)
+ },
+ categoryCodeFormatter (row, column) {
+ let ca = ''
+ this.tagCategoryArr.forEach((tagCategory) => {
+ if (tagCategory.categoryCode === row.categoryCode) {
+ ca = tagCategory.categoryName
+ }
+ })
+ return ca
+ },
+ removeEmptySubOrgList (orgArray) {
+ orgArray.forEach((orgInfo) => {
+ if (orgInfo && orgInfo.subOrgList) {
+ if (orgInfo.subOrgList.length === 0) {
+ orgInfo.subOrgList = undefined
+ } else {
+ this.removeEmptySubOrgList(orgInfo.subOrgList)
+ }
+ }
+ })
+ return orgArray;
}
-
}
}