微调
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) => {
|
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
|
||||||
@@ -378,7 +377,6 @@ const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDe
|
|||||||
name: id.toString()
|
name: id.toString()
|
||||||
}
|
}
|
||||||
}).filter(item => !usedNums.has(item.id)) // 过滤掉已被使用的线路号
|
}).filter(item => !usedNums.has(item.id)) // 过滤掉已被使用的线路号
|
||||||
|
|
||||||
if (sign == 'edit') {
|
if (sign == 'edit') {
|
||||||
formContent.value = { ...data }
|
formContent.value = { ...data }
|
||||||
originalNum.value = data.num // 记录原始线路号
|
originalNum.value = data.num // 记录原始线路号
|
||||||
@@ -397,7 +395,6 @@ const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDe
|
|||||||
ctSecondary.value = secondary
|
ctSecondary.value = secondary
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 重置表单
|
|
||||||
dialogFormRef.value?.resetFields()
|
dialogFormRef.value?.resetFields()
|
||||||
// 清空PT和CT的临时变量
|
// 清空PT和CT的临时变量
|
||||||
ptPrimary.value = ''
|
ptPrimary.value = ''
|
||||||
@@ -410,6 +407,7 @@ const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDe
|
|||||||
formContent.value.devId = devId
|
formContent.value.devId = devId
|
||||||
originalNum.value = null
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user