diff --git a/frontend/src/views/machine/device/components/monitorTab.vue b/frontend/src/views/machine/device/components/monitorTab.vue index 9afc43e..63138d0 100644 --- a/frontend/src/views/machine/device/components/monitorTab.vue +++ b/frontend/src/views/machine/device/components/monitorTab.vue @@ -162,6 +162,18 @@ const openDialog = (titleType: string, row: Partial = {}) => { }) return } + // 新增时检查线路号是否全部被占用 + if (titleType === 'add') { + if(props.DevFormContent.devChns == tableData.value.length){ + ElMessageBox.confirm(`线路号已全部被占用,无法新增监测点`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + return + } + + } title_Type.value = titleType monitorPopup.value?.open(titleType, row, props.DevFormContent, tableData.value, props.selectOptions) }