|
@@ -189,7 +189,8 @@ export default {
|
|
|
bizName: '业务线', // 业务线名字
|
|
|
optionData: [],
|
|
|
bizCode: 0,
|
|
|
- isFirstDate: true
|
|
|
+ isFirstDate: true,
|
|
|
+ depyResetList: []
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -341,6 +342,15 @@ export default {
|
|
|
children: t.children && t.children.length > 0 ? this.resetDepartmentList(t.children) : null
|
|
|
}))
|
|
|
},
|
|
|
+ resetdepyPath(path, data) {
|
|
|
+ data.map(t => {
|
|
|
+ if (t.children && t.children.length > 0) {
|
|
|
+ this.resetdepyPath([...path, t.value], t.children)
|
|
|
+ } else {
|
|
|
+ this.depyResetList.push([...path, t.value])
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getProvence(hot = true) { // 获取组织架构
|
|
|
this.efficiencyLoading = true
|
|
|
this.throughputLoading = true
|
|
@@ -359,12 +369,20 @@ export default {
|
|
|
// 获取id在list中的位置
|
|
|
const idPos = depyList.indexOf(deptId.toString())
|
|
|
// 截取当前部门的path
|
|
|
- const nowdepyList = depyList.slice(idPos, depyList.length)
|
|
|
+ let nowdepyList = []
|
|
|
+ const defaultPath = depyList.slice(idPos, depyList.length)
|
|
|
+ // 判断是否有子层级
|
|
|
+ if (res1.data.deptArch.children && res1.data.deptArch.children.length > 0) {
|
|
|
+ this.resetdepyPath(defaultPath, res1.data.deptArch.children)
|
|
|
+ nowdepyList = this.depyResetList
|
|
|
+ } else {
|
|
|
+ nowdepyList = [defaultPath]
|
|
|
+ }
|
|
|
this.params = {
|
|
|
...this.params,
|
|
|
- deptCodes: [nowdepyList]
|
|
|
+ deptCodes: nowdepyList
|
|
|
}
|
|
|
- this.changeArchitecture([nowdepyList])
|
|
|
+ this.changeArchitecture(nowdepyList)
|
|
|
}
|
|
|
})
|
|
|
} else {
|