From 1b5e1392014a27c71bca140042a6f9458cbc0316 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Tue, 16 Jul 2024 13:58:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=91=E6=B5=8B=E7=82=B9=E4=BF=A1=E6=81=AF-?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=9B=9E=E6=98=BE-=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=98=AF=E7=BC=96=E8=BE=91=E5=88=99=E4=B8=8D=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=85=B3=E8=81=94=E5=B9=B2=E6=89=B0=E6=BA=90?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=E5=9B=9B=E4=B8=AA=E5=AE=B9=E9=87=8F=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/monitorpoint/addForm.vue | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/addForm.vue b/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/addForm.vue index 0644f30a..0199f0e8 100644 --- a/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/addForm.vue +++ b/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/addForm.vue @@ -497,19 +497,19 @@ const numList = [ //测量间隔数据 const timeIntervalList = [ { - id: '1', + id: 1, name: '一分钟' }, { - id: '3', + id: 3, name: '三分钟' }, { - id: '5', + id: 5, name: '五分钟' }, { - id: '10', + id: 10, name: '十分钟' } ] @@ -541,7 +541,7 @@ const changeDevice = () => { //定义切换form类型 const selectFormType = ref('') selectFormType.value = '0' -const resetForm = () => { +const resetForm = async () => { form.value = { // reporter: '', //填报人 // reporterName: '', //填报人名称 @@ -562,9 +562,9 @@ const resetForm = () => { ct2: 5, //CT变比2 pt1: 1, // PT变比1 pt2: 1, // PT变比2 - shortCapacity: '10', // 短路容量 - dealCapacity: '10', //协议容量 - devCapacity: '10', //终端容量 + shortCapacity: 10, // 短路容量 + dealCapacity: 10, //协议容量 + devCapacity: 10, //终端容量 standardCapacity: 10, //基准容量 isGridConnectionPoint: 0, //是否并网点 isStatistical: 0, // 是否参与统计 @@ -583,12 +583,12 @@ const resetForm = () => { ptType: ptTypeList[0].id, //接线方式 num: numList[0].id //线路号 } - getList({}).then(res => { + await getList({}).then(res => { projectList.value = res.data userNameList.value = res.data //初始化 let obj = res.data[0] - if (title.value != '重新发起') { + if (title.value != '重新发起' && title.value != '编辑') { form.value = { ...form.value, // city: obj.city, @@ -605,7 +605,9 @@ const resetForm = () => { changeUserName() } }) - changevoltageDeviationLimit() + if(title.value != '编辑'){ + changevoltageDeviationLimit() + } } //根据检测点电压等级切换电压偏差上限/下限 const changevoltageDeviationLimit = async () => { @@ -1018,7 +1020,6 @@ const close = () => { ruleFormRef.value && ruleFormRef.value.resetFields() dialogFormVisible.value = false emits('onSubmit') - resetForm() } onMounted(() => {})