微调
This commit is contained in:
@@ -356,7 +356,6 @@ const sendParameter = () => {
|
||||
// 打开弹窗,可能是新增,也可能是编辑
|
||||
const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDev, table: any[], options: any) => {
|
||||
|
||||
|
||||
selectOptions.value = options
|
||||
titleType.value = sign
|
||||
dialogVisible.value = true
|
||||
@@ -378,7 +377,6 @@ const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDe
|
||||
name: id.toString()
|
||||
}
|
||||
}).filter(item => !usedNums.has(item.id)) // 过滤掉已被使用的线路号
|
||||
|
||||
if (sign == 'edit') {
|
||||
formContent.value = { ...data }
|
||||
originalNum.value = data.num // 记录原始线路号
|
||||
@@ -397,18 +395,18 @@ const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDe
|
||||
ctSecondary.value = secondary
|
||||
}
|
||||
} else {
|
||||
// 重置表单
|
||||
dialogFormRef.value?.resetFields()
|
||||
// 清空PT和CT的临时变量
|
||||
ptPrimary.value = ''
|
||||
ptSecondary.value = ''
|
||||
ctPrimary.value = ''
|
||||
ctSecondary.value = ''
|
||||
// 重置表单内容,但保留devId
|
||||
ptPrimary.value = ''
|
||||
ptSecondary.value = ''
|
||||
ctPrimary.value = ''
|
||||
ctSecondary.value = ''
|
||||
// 重置表单内容,但保留devId
|
||||
const devId = formContent.value.devId
|
||||
resetFormContent()
|
||||
formContent.value.devId = devId
|
||||
originalNum.value = null
|
||||
|
||||
|
||||
// 设置默认选中第一个线路号
|
||||
if (lineNum.value.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user