|
@@ -523,6 +523,7 @@ export default {
|
|
|
this.dealWithBusinessDate = JSON.parse(JSON.stringify(this.businessData)) // 深拷贝
|
|
|
this.dealWithBusinessDate = processFunc(this.dealWithBusinessDate)
|
|
|
this.pauseTreeNode = this.businessData[0] ? this.businessData[0] : ''
|
|
|
+ this.treeGuide(this.businessData, this.pauseTreeNode.id)
|
|
|
this.pauseKey = 0
|
|
|
})
|
|
|
this.allCountAndProlemGet()
|
|
@@ -621,6 +622,23 @@ export default {
|
|
|
})
|
|
|
window.open(href, '_blank')
|
|
|
},
|
|
|
+ // 树形结构导航
|
|
|
+ treeGuide(myArr, id) {
|
|
|
+ let res
|
|
|
+ // path,存储路径
|
|
|
+ const getPath = (arr, id, path = []) => {
|
|
|
+ return arr.reduce((a, c) => {
|
|
|
+ if (c.id === id) {
|
|
|
+ res = [...path, c.name]
|
|
|
+ }
|
|
|
+ if (c.children) {
|
|
|
+ return getPath(c.children, id, [...path, c.name])
|
|
|
+ }
|
|
|
+ }, [])
|
|
|
+ }
|
|
|
+ getPath(myArr, id)
|
|
|
+ console.log(res)
|
|
|
+ },
|
|
|
// 业务树
|
|
|
handleNodeClick(data) {
|
|
|
this.loadingOnlineProcess = true
|