被检设备监测点
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -104,6 +104,7 @@ const columns = reactive<ColumnProps<Monitor.ResPqMon>[]>([
|
||||
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: `删除监测点成功!`
|
||||
|
||||
Reference in New Issue
Block a user