是否系统电站赋初始值

This commit is contained in:
zhujiyan
2024-05-31 10:38:33 +08:00
parent f3cda3259a
commit 4512601ca3

View File

@@ -731,11 +731,25 @@ const changeSubstationFlag = () => {
return form.value.substation == item.id
})?.name
} else {
form.value.substation=''
form.value.substation = ''
form.value.substationName = ''
form.value.substationVoltageLevel = voltageLevelList[0].id
}
}
watch(
() => form.value.substation,
(val, oldVal) => {
if (val) {
form.value.substationName = substationList.value.find(item => {
return form.value.substation == item.id
})?.name
}
},
{
immediate: true,
deep: true
}
)
getFrontEndMachineList()
//定义所属供电公司数据
const powerCompanyList = ref([])
@@ -822,6 +836,7 @@ const resetForm = async () => {
}
form.value.reporter = adminInfo.$state.name
form.value.orgId = adminInfo.$state.deptName
changeSubstationFlag()
}
//初始化数据
resetForm()
@@ -1245,9 +1260,6 @@ watch(
dataUpdateTime: window.XEUtils.toDateString(val.dataUpdateTime, 'yyyy-MM-dd HH:mm:ss')
}
}
//监测点信息
else {
}
},
{
deep: true,