监测点

This commit is contained in:
sjl
2025-10-23 09:26:57 +08:00
parent 211b367db7
commit a1f241bbfe

View File

@@ -103,7 +103,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ElMessage, type FormItemRule } from 'element-plus' import { ElMessage, ElMessageBox, type FormItemRule } from 'element-plus'
import { computed, ref, type Ref } from 'vue' import { computed, ref, type Ref } from 'vue'
import { type Monitor } from '@/api/device/interface/monitor' import { type Monitor } from '@/api/device/interface/monitor'
import { dialogMiddle } from '@/utils/elementBind' import { dialogMiddle } from '@/utils/elementBind'
@@ -355,6 +355,8 @@ const sendParameter = () => {
} }
// 打开弹窗,可能是新增,也可能是编辑 // 打开弹窗,可能是新增,也可能是编辑
const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDev, table: any[], options: any) => { const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDev, table: any[], options: any) => {
selectOptions.value = options selectOptions.value = options
titleType.value = sign titleType.value = sign
dialogVisible.value = true dialogVisible.value = true
@@ -397,13 +399,17 @@ const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDe
} else { } else {
// 重置表单 // 重置表单
dialogFormRef.value?.resetFields() dialogFormRef.value?.resetFields()
resetFormContent()
originalNum.value = null
// 清空PT和CT的临时变量 // 清空PT和CT的临时变量
ptPrimary.value = '' ptPrimary.value = ''
ptSecondary.value = '' ptSecondary.value = ''
ctPrimary.value = '' ctPrimary.value = ''
ctSecondary.value = '' ctSecondary.value = ''
// 重置表单内容但保留devId
const devId = formContent.value.devId
resetFormContent()
formContent.value.devId = devId
originalNum.value = null
// 设置默认选中第一个线路号 // 设置默认选中第一个线路号
if (lineNum.value.length > 0) { if (lineNum.value.length > 0) {
formContent.value.num = lineNum.value[0].id formContent.value.num = lineNum.value[0].id