|
|
@ -109,6 +109,7 @@ export default { |
|
|
|
agencyId:'', |
|
|
|
agencyName:'', |
|
|
|
agencyType:'', |
|
|
|
structLevel: null, |
|
|
|
pid:'', |
|
|
|
categoryCode:'', |
|
|
|
sort:'', |
|
|
@ -249,17 +250,16 @@ export default { |
|
|
|
...this.dataForm, |
|
|
|
...res.data |
|
|
|
} |
|
|
|
let selectedLevel |
|
|
|
this.structCategoryArr.forEach((item) => { |
|
|
|
if(item.categoryCode === this.dataForm.categoryCode){ |
|
|
|
selectedLevel = item.structLevel |
|
|
|
this.dataForm.structLevel = item.structLevel |
|
|
|
} |
|
|
|
}) |
|
|
|
if(selectedLevel === 0) { |
|
|
|
if(this.dataForm.structLevel === 0) { |
|
|
|
this.orgListSwitch = true |
|
|
|
} else { |
|
|
|
this.orgListSwitch = false |
|
|
|
this.getParentStructTree(selectedLevel) |
|
|
|
this.getParentStructTree(this.dataForm.structLevel) |
|
|
|
} |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
@ -277,19 +277,18 @@ export default { |
|
|
|
// 动力主轴选中后的操作 |
|
|
|
handelChange(val){ |
|
|
|
this.dataForm.categoryCode = val |
|
|
|
let selectedLevel |
|
|
|
this.structCategoryArr.forEach((item) => { |
|
|
|
if(item.categoryCode === val){ |
|
|
|
selectedLevel = item.structLevel |
|
|
|
this.dataForm.structLevel = item.structLevel |
|
|
|
} |
|
|
|
}) |
|
|
|
if (selectedLevel === 0) { |
|
|
|
if (this.dataForm.structLevel === 0) { |
|
|
|
this.orgListSwitch = true |
|
|
|
this.dataForm.pid = '0' |
|
|
|
} else { |
|
|
|
this.orgListSwitch = false |
|
|
|
this.dataForm.pid = '' |
|
|
|
this.getParentStructTree(selectedLevel) |
|
|
|
this.getParentStructTree(this.dataForm.structLevel) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|
|
|