bug
This commit is contained in:
@@ -233,6 +233,7 @@
|
|||||||
handleNodeClick (e) {
|
handleNodeClick (e) {
|
||||||
this.girdLevel = e.girdLevel
|
this.girdLevel = e.girdLevel
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
|
console.log(e)
|
||||||
this.getGirdInfo(e.id, e.girdLevel)
|
this.getGirdInfo(e.id, e.girdLevel)
|
||||||
this.getStatisticsInfo(e.id)
|
this.getStatisticsInfo(e.id)
|
||||||
},
|
},
|
||||||
@@ -341,43 +342,16 @@
|
|||||||
this.y = '50%'
|
this.y = '50%'
|
||||||
},
|
},
|
||||||
|
|
||||||
getGirdInfo (id, level) {
|
getGirdInfo (id) {
|
||||||
this.instance.post(`/app/appgirdinfo/listAllGirdAndMemberByTop?id=${id || ''}`).then((res) => {
|
this.instance.post(`/app/appgirdinfo/listAllGirdAndMemberByTop?id=${id || ''}`).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
const chartData = this.formatList([res.data])
|
const chartData = this.formatList([res.data])
|
||||||
if (res.data) {
|
console.log(chartData)
|
||||||
const parentGirdInfo = res.data
|
|
||||||
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
|
this.chartData = chartData
|
||||||
}
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (id) {
|
if (id) {
|
||||||
this.getUserList(id)
|
this.getUserList(id, chartData[0].id)
|
||||||
} else {
|
} else {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
this.autoScale()
|
this.autoScale()
|
||||||
@@ -387,7 +361,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getUserList (id) {
|
getUserList (id, parentId) {
|
||||||
this.instance.post(`/app/appgirdmemberresident/listByGirdMember`, null, {
|
this.instance.post(`/app/appgirdmemberresident/listByGirdMember`, null, {
|
||||||
params: {
|
params: {
|
||||||
size: 1000,
|
size: 1000,
|
||||||
@@ -410,7 +384,7 @@
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
const node = this.$refs.VueOkrTree.getNode(id)
|
const node = this.$refs.VueOkrTree.getNode(parentId)
|
||||||
this.$refs.VueOkrTree.append({
|
this.$refs.VueOkrTree.append({
|
||||||
id: new Date().getTime(),
|
id: new Date().getTime(),
|
||||||
label: '子节点',
|
label: '子节点',
|
||||||
|
|||||||
Reference in New Issue
Block a user