diff --git a/frontend/src/views/home/components/deviceConnectionPopup.vue b/frontend/src/views/home/components/deviceConnectionPopup.vue index 0f596e8..747480d 100644 --- a/frontend/src/views/home/components/deviceConnectionPopup.vue +++ b/frontend/src/views/home/components/deviceConnectionPopup.vue @@ -32,7 +32,7 @@ /> - + diff --git a/frontend/src/views/machine/device/components/devicePopup.vue b/frontend/src/views/machine/device/components/devicePopup.vue index 8724f2a..6f724b4 100644 --- a/frontend/src/views/machine/device/components/devicePopup.vue +++ b/frontend/src/views/machine/device/components/devicePopup.vue @@ -213,6 +213,7 @@ import MonitorTable from '@/views/machine/device/components/monitorTab.vue'; import {useAppSceneStore} from "@/stores/modules/mode"; import { generateUUID } from '@/utils' import { Monitor } from '@/api/device/interface/monitor' +import { el } from 'element-plus/es/locale' const AppSceneStore = useAppSceneStore() @@ -458,6 +459,8 @@ const getParameter = (data: Monitor.ResPqMon[]) => { .map(String) // 恢复为字符串用于保存 .join(','); } + }else{ + formContent.inspectChannel = null; } diff --git a/frontend/src/views/machine/device/components/monitorPopup.vue b/frontend/src/views/machine/device/components/monitorPopup.vue index dd38166..b3f2cf3 100644 --- a/frontend/src/views/machine/device/components/monitorPopup.vue +++ b/frontend/src/views/machine/device/components/monitorPopup.vue @@ -175,7 +175,6 @@ const resetFormContent = () => { const isNameDuplicate = monitorTable.value.some( item => item.name === formContent.value.name && item.id !== formContent.value.id ) - if (isNameDuplicate) { ElMessage.error({ message: '监测点名称已存在,请重新输入!' }) return @@ -186,7 +185,7 @@ const resetFormContent = () => { formContent.value.id = generateUUID().replaceAll("-","") } emit('get-parameter', formContent.value) - ElMessage.success({ message: `${dialogTitle.value}成功!` }) + //ElMessage.success({ message: `${dialogTitle.value}成功!` }) close() } }) diff --git a/frontend/src/views/machine/device/components/monitorTab.vue b/frontend/src/views/machine/device/components/monitorTab.vue index 4ff1b49..b43800f 100644 --- a/frontend/src/views/machine/device/components/monitorTab.vue +++ b/frontend/src/views/machine/device/components/monitorTab.vue @@ -104,6 +104,7 @@ const columns = reactive[]>([ const emit = defineEmits(['get-parameter']) const getParameter = (data: Monitor.ResPqMon) => { + console.log('data', data) if (title_Type.value === 'edit') { // 编辑:替换已有的数据 const index = tableData.value.findIndex(item => item.id === data.id) @@ -119,7 +120,6 @@ const getParameter = (data: Monitor.ResPqMon) => { tableData.value = [...tableData.value, data] } - emit('get-parameter', tableData.value) } @@ -152,7 +152,7 @@ const getParameter = (data: Monitor.ResPqMon) => { }).then(async () => { tableData.value = tableData.value.filter(item => !ids.includes(item.id)); proTable.value?.clearSelection() - + emit('get-parameter', tableData.value) ElMessage({ type: "success", message: `批量删除监测点成功!` @@ -170,6 +170,7 @@ const handleDelete = (id: string) => { }).then(async () => { tableData.value = tableData.value.filter(item => item.id !== id) proTable.value?.clearSelection() + emit('get-parameter', tableData.value) ElMessage({ type: "success", message: `删除监测点成功!`