This commit is contained in:
sjl
2024-12-23 14:05:53 +08:00
parent 5f0b36b3bb
commit fdf91965d9
6 changed files with 138 additions and 105 deletions

View File

@@ -45,6 +45,7 @@
import preTest from './preTest.vue'
import timeTest from './timeTest.vue'
import channelsTest from './channelsTest.vue'
import { Device } from '@/api/device/interface/device';
//import SvgIcon from '@/components/SvgIcon.vue';
// import preTestIcon from '@/assets/icons/preTest.svg'
@@ -129,7 +130,23 @@ const detectionOptions = ref([
const isTimeCheck = ref(false)
// 打开弹窗,可能是新增,也可能是编辑
const open = (title: string,time:boolean) => {
const open = (selection: Device.ResPqDev[],title: string,time:boolean) => {
const checkStates = selection.map(item => item.checkState);
const allCheckStatesEqual = new Set(checkStates).size <= 1;
if (!allCheckStatesEqual) {
ElMessageBox.confirm(
'所勾选设备检测状态不一致,请重新选择',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
return
}
dialogTitle.value = title;
dialogVisible.value = true;
isTimeCheck.value = time