引入store存放检测设备的相关信息

This commit is contained in:
caozehui
2024-12-20 18:19:18 +08:00
parent bbe23e1b14
commit 9b8765f001
5 changed files with 214 additions and 164 deletions

View File

@@ -255,8 +255,11 @@ import { onMounted, reactive, ref, watch } from "vue";
import { useDictStore } from '@/stores/modules/dict'
import ChannelsTest from './channelsTest.vue'
import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store
import {useCheckStore} from '@/stores/modules/check'
const dictStore = useDictStore()
const checkStore = useCheckStore()
let devNum = 0;//当前选取的被检设备数量
let devChannelsNum = 0;//当前选择的被检设备通道总数
let devTestedNum = 0;//当前选择的已完成检测的被检设备数量
@@ -555,6 +558,16 @@ const handleSelectionChange = (selection: any[]) => {
{
testType= "reTest";
}
let devices: Check.Device[] = selection.map((item: any) => {
return {
deviceId: item.id,
deviceName: item.name,
deviceType: item.devType,
chnNum: item.devChns,
}
});
checkStore.clearDevices()
checkStore.addDevices(devices)
}
//查询