引入store存放检测设备的相关信息
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
//查询
|
||||
|
||||
Reference in New Issue
Block a user