测试1
This commit is contained in:
@@ -30,6 +30,7 @@ import {dialogSmall} from "@/utils/elementBind";
|
||||
import {ref} from "vue";
|
||||
import {useCheckStore} from "@/stores/modules/check";
|
||||
import type {CheckData} from "@/api/check/interface";
|
||||
import {ElMessageBox} from "element-plus";
|
||||
|
||||
const emit = defineEmits(['openTestDialog'])
|
||||
const checkStore = useCheckStore();
|
||||
@@ -61,6 +62,28 @@ const handleStart = () => {
|
||||
if (count === 0) {
|
||||
ElMessage.warning('请选择测试内容!')
|
||||
} else {
|
||||
if(formContent.channelsTest){
|
||||
const factorFlagArray = ref<string[]>([]) // 初始化为空数组
|
||||
for (let i = 0; i < checkStore.devices.length; i++) {
|
||||
const factorFlag = checkStore.devices[i].factorFlag
|
||||
if (factorFlag !== undefined && factorFlag !== null && factorFlag === 0) {
|
||||
factorFlagArray.value.push(checkStore.devices[i].deviceName.toString())
|
||||
}
|
||||
}
|
||||
if (factorFlagArray.value.length > 0) {
|
||||
const factorFlags = factorFlagArray.value.join(', ')
|
||||
ElMessageBox.confirm(
|
||||
factorFlags + '设备不支持系数校准,请重新选择',
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
},
|
||||
)
|
||||
return
|
||||
}
|
||||
}
|
||||
checkStore.setCheckType(0)
|
||||
checkStore.setSelectTestItems({...formContent})
|
||||
handleClose()
|
||||
|
||||
Reference in New Issue
Block a user