设计辽宁页面 修改冀北技术监督问题

This commit is contained in:
GGJ
2024-08-14 11:34:13 +08:00
parent 13432b351d
commit fd5458105e
17 changed files with 4300 additions and 36479 deletions

View File

@@ -78,6 +78,7 @@
clearable
filterable
collapse-tags
collapse-tags-tooltip
placeholder="请选择关联电站"
/>
<!-- <el-tree-select
@@ -247,13 +248,17 @@ const cancelFn = () => {
planAddition.value = false
}
const treeList = ref()
const treeListCgy = ref()
const treeData = ref()
const loadData = () => {
initDetpStataionTree({ orgId: dictData.state.area[0].id }).then(res => {
treeList.value = res.data
setTimeout(() => {
changeArea()
}, 10)
initDetpStataionTree({ orgId: 'a3069759b0b6072c99cf9a7af6c162e9' }).then(res => {
treeListCgy.value = res.data
setTimeout(() => {
changeArea()
}, 10)
})
})
}
@@ -310,11 +315,18 @@ const submitFn = (flag: boolean) => {
// 修改关联电站
const changeArea = () => {
let list: any = []
treeList.value.forEach((item: any) => {
if (item.id == form.value.deptId) {
list.push(item)
if (item.id != treeListCgy.value[0].id && item.name != '冀北电力有限公司' && item.name != '超高压') {
list.push(...treeListCgy.value)
}
} else {
list.push(item.children.filter((v: any) => v.id == form.value.deptId)[0])
if (form.value.deptId != treeListCgy.value[0].id) {
list.push(...treeListCgy.value)
}
}
})
treeData.value = list