fix
This commit is contained in:
		| @@ -233,6 +233,7 @@ | ||||
|       handleNodeClick (e) { | ||||
|         this.girdLevel = e.girdLevel | ||||
|         this.isLoading = true | ||||
|         console.log(e) | ||||
|         this.getGirdInfo(e.id, e.girdLevel) | ||||
|         this.getStatisticsInfo(e.id) | ||||
|       }, | ||||
| @@ -341,43 +342,16 @@ | ||||
|         this.y = '50%' | ||||
|       }, | ||||
|  | ||||
|       getGirdInfo (id, level) { | ||||
|       getGirdInfo (id) { | ||||
|         this.instance.post(`/app/appgirdinfo/listAllGirdAndMemberByTop?id=${id || ''}`).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|             const chartData = this.formatList(res.data) | ||||
|             if (res.data && res.data[0] && res.data[0].parentGirdInfo) { | ||||
|               const parentGirdInfo = res.data[0].parentGirdInfo | ||||
|               const girdMemberList = parentGirdInfo.girdMemberManageList ? parentGirdInfo.girdMemberManageList.map(v => { | ||||
|                 return { | ||||
|                   ...v, | ||||
|                   label: v.name, | ||||
|                   id: v.id, | ||||
|                   checkType: '2', | ||||
|                   girdName: parentGirdInfo.girdName, | ||||
|                   girdLevel: parentGirdInfo.girdLevel, | ||||
|                   isUser: true | ||||
|                 } | ||||
|               }) : [{ | ||||
|                 label: '-', | ||||
|                 id: parentGirdInfo.id, | ||||
|                 girdLevel: parentGirdInfo.girdLevel, | ||||
|                 girdName: parentGirdInfo.girdName | ||||
|               }] | ||||
|               this.chartData = [{ | ||||
|                 label: parentGirdInfo.girdName, | ||||
|                 id: parentGirdInfo.id, | ||||
|                 girdLevel: parentGirdInfo.girdLevel, | ||||
|                 isUser: false, | ||||
|                 children: chartData, | ||||
|                 userList: girdMemberList | ||||
|               }] | ||||
|             } else { | ||||
|               this.chartData = chartData | ||||
|             } | ||||
|             const chartData = this.formatList([res.data]) | ||||
|             console.log(chartData) | ||||
|             this.chartData = chartData | ||||
|  | ||||
|             this.$nextTick(() => { | ||||
|               if (level === '2') { | ||||
|                 this.getUserList(id) | ||||
|               if (id) { | ||||
|                 this.getUserList(id, chartData[0].id) | ||||
|               } else { | ||||
|                 this.isLoading = false | ||||
|                 this.autoScale() | ||||
| @@ -387,7 +361,7 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       getUserList (id) { | ||||
|       getUserList (id, parentId) { | ||||
|         this.instance.post(`/app/appgirdmemberresident/listByGirdMember`, null, { | ||||
|           params: { | ||||
|             size: 1000, | ||||
| @@ -402,7 +376,7 @@ | ||||
|                 label: v.name | ||||
|               } | ||||
|             }) | ||||
|              | ||||
|  | ||||
|             this.isLoading = false | ||||
|  | ||||
|             if (!userList.length) { | ||||
| @@ -410,7 +384,7 @@ | ||||
|               return false | ||||
|             } | ||||
|  | ||||
|             const node = this.$refs.VueOkrTree.getNode(id) | ||||
|             const node = this.$refs.VueOkrTree.getNode(parentId) | ||||
|             this.$refs.VueOkrTree.append({ | ||||
|               id: new Date().getTime(), | ||||
|               label: '子节点', | ||||
| @@ -546,7 +520,7 @@ | ||||
|       .el-table { | ||||
|         background-color: transparent; | ||||
|       } | ||||
|        | ||||
|  | ||||
|       .el-table__body tr td:first-child .cell, .ai-table .el-table__header tr th:first-child .cell { | ||||
|         padding-left: 0!important; | ||||
|       } | ||||
| @@ -690,7 +664,7 @@ | ||||
|             text-overflow:ellipsis; | ||||
|             white-space: nowrap; | ||||
|             margin-bottom: 10px; | ||||
|            | ||||
|  | ||||
|             &:nth-of-type(2n) { | ||||
|               margin-right: 0; | ||||
|             } | ||||
| @@ -875,4 +849,4 @@ | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </style> | ||||
| </style> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user