修改技术监督bug

This commit is contained in:
GGJ
2024-06-18 16:38:33 +08:00
parent 16f0a9fa5a
commit 75b3e9992d
25 changed files with 435 additions and 366 deletions

View File

@@ -10,7 +10,7 @@
class="form-one"
>
<el-form-item for="-" label="计划负责单位:">
<Area v-model="form.deptId" />
<Area v-model="form.deptId" @change="changeArea" />
</el-form-item>
<el-form-item for="-" label="计划名称:" prop="planName">
<el-input v-model="form.planName" placeholder="请输入计划名称"></el-input>
@@ -73,7 +73,7 @@
>
<el-cascader
v-model="form.substation"
:options="treeList"
:options="treeData"
:props="defaultProps"
clearable
filterable
@@ -180,7 +180,7 @@ const disableStartDate = (time: any) => {
//结束时间不能小于开始时间
const disableEndDate = (time: any) => {
if (time && form.value.planStartTime) {
return time.getTime() <= new Date(form.value.planStartTime).getTime()- 8.64e7
return time.getTime() <= new Date(form.value.planStartTime).getTime() - 8.64e7
} else {
return false
}
@@ -230,9 +230,13 @@ const cancelFn = () => {
planAddition.value = false
}
const treeList = ref()
const treeData = ref()
const loadData = () => {
initDetpStataionTree({ orgId: dictData.state.area[0].id }).then(res => {
treeList.value = res.data
setTimeout(() => {
changeArea()
}, 10)
})
}
@@ -251,6 +255,18 @@ const submitFn = () => {
}
})
}
// 修改关联电站
const changeArea = () => {
let list: any = []
treeList.value.forEach((item: any) => {
if (item.id == form.value.deptId) {
list.push(item)
} else {
list.push(item.children.filter((v: any) => v.id == form.value.deptId)[0])
}
})
treeData.value = list
}
const audit = (filePath: any) => {
//选择系统变电站
const addForm = JSON.parse(JSON.stringify(form.value))