Compare commits
3 Commits
f772568400
...
a1f241bbfe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1f241bbfe | ||
|
|
211b367db7 | ||
|
|
e3649a4933 |
@@ -103,7 +103,7 @@
|
||||
</template>
|
||||
|
||||
<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 { type Monitor } from '@/api/device/interface/monitor'
|
||||
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) => {
|
||||
|
||||
|
||||
selectOptions.value = options
|
||||
titleType.value = sign
|
||||
dialogVisible.value = true
|
||||
@@ -397,13 +399,17 @@ const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDe
|
||||
} else {
|
||||
// 重置表单
|
||||
dialogFormRef.value?.resetFields()
|
||||
resetFormContent()
|
||||
originalNum.value = null
|
||||
// 清空PT和CT的临时变量
|
||||
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) {
|
||||
formContent.value.num = lineNum.value[0].id
|
||||
|
||||
Reference in New Issue
Block a user