通道配对,预检测界面
This commit is contained in:
@@ -267,14 +267,13 @@ import {
|
||||
CirclePlus,
|
||||
Odometer,
|
||||
} from '@element-plus/icons-vue'
|
||||
import {getPlanList} from '@/api/plan/planList'
|
||||
import deviceDataList from '@/api/device/device/deviceData'
|
||||
import TestPopup from './testPopup.vue'
|
||||
import reportPopup from './reportPopup.vue'
|
||||
import dataCheckPopup from './dataCheckSingleChannelSingleTestPopup.vue'
|
||||
import dataCheckChangeErrSysPopup from './dataCheckChangeErrSysPopup.vue'
|
||||
import {generateDevReport, getBoundPqDevList} from '@/api/plan/plan.ts'
|
||||
import {onBeforeMount, onMounted, PropType, reactive, ref, watch} from 'vue'
|
||||
import {onBeforeMount, onMounted, PropType, provide, reactive, ref, watch} from 'vue'
|
||||
import {useDictStore} from '@/stores/modules/dict'
|
||||
import ChannelsTest from './channelsTest.vue'
|
||||
import {useModeStore,useAppSceneStore} from '@/stores/modules/mode' // 引入模式 store
|
||||
@@ -293,7 +292,8 @@ import WriteTHPopup from "@/views/home/components/writeTHPopup.vue";
|
||||
import DeviceConnectionPopup from '@/views/home/components/deviceConnectionPopup.vue'
|
||||
import { Plan } from '@/api/plan/interface'
|
||||
import { StandardDevice } from '@/api/device/interface/standardDevice'
|
||||
import { s } from 'vite/dist/node/types.d-aGj9QkWt'
|
||||
import {getPlanList } from '@/api/plan/plan.ts'
|
||||
import { mount } from 'sortablejs'
|
||||
|
||||
const dictStore = useDictStore()
|
||||
const checkStore = useCheckStore()
|
||||
@@ -372,6 +372,8 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
const appSceneStore = useAppSceneStore()
|
||||
const planTable = ref<any[]>([])
|
||||
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'batchGenerateClicked'): void;
|
||||
@@ -951,7 +953,13 @@ const handleTest2 = () => {
|
||||
)
|
||||
return
|
||||
}
|
||||
deviceConnectionPopupRef.value?.open(channelsSelection.value,pqStandardDevList.value)
|
||||
//选中计划的数据源
|
||||
const dataSources = ref([])
|
||||
const matchedItem = planTable.value.data.find(item => item.name === props.plan.name)
|
||||
if (matchedItem) {
|
||||
dataSources.value = matchedItem.datasourceIds
|
||||
}
|
||||
deviceConnectionPopupRef.value?.open(channelsSelection.value,pqStandardDevList.value,dataSources.value)
|
||||
}
|
||||
|
||||
const handleTest = async (val: string) => {
|
||||
@@ -1074,7 +1082,7 @@ const handleTest = async (val: string) => {
|
||||
if(appSceneStore.currentScene === '0'){
|
||||
writeTHPopupRef.value?.open()
|
||||
}else{
|
||||
selectTestItemPopupRef.value?.open()
|
||||
selectTestItemPopupRef.value?.open([])
|
||||
//openTestDialog(true)
|
||||
}
|
||||
})
|
||||
@@ -1086,7 +1094,7 @@ const handleTest = async (val: string) => {
|
||||
if(appSceneStore.currentScene === '0'){
|
||||
writeTHPopupRef.value?.open()
|
||||
}else{
|
||||
selectTestItemPopupRef.value?.open()
|
||||
selectTestItemPopupRef.value?.open([])
|
||||
//openTestDialog(true)
|
||||
}
|
||||
}
|
||||
@@ -1094,7 +1102,7 @@ const handleTest = async (val: string) => {
|
||||
|
||||
checkStore.setSelectTestItems({preTest: false, timeTest: false, channelsTest: false, test: true})
|
||||
} else {
|
||||
selectTestItemPopupRef.value?.open()
|
||||
selectTestItemPopupRef.value?.open([])
|
||||
checkStore.setReCheckType(1)
|
||||
}
|
||||
} else if (val === '系数校准') {
|
||||
@@ -1301,7 +1309,6 @@ watch(
|
||||
)
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
||||
const response = await getPqDev()
|
||||
devTypeOptions.value = response.data.map(item => ({
|
||||
id: item.id,
|
||||
@@ -1314,6 +1321,16 @@ onBeforeMount(async () => {
|
||||
}))
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
if(modeStore.currentMode != '比对式')
|
||||
return;
|
||||
const patternId2 = dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id;
|
||||
|
||||
if (patternId2 !== undefined) {
|
||||
planTable.value = await getPlanList({ 'patternId': patternId2 });
|
||||
}
|
||||
})
|
||||
|
||||
const handleQuitClicked = () => {
|
||||
//console.log('handleQuitClicked')
|
||||
dataSocket.socketServe.closeWs()
|
||||
|
||||
Reference in New Issue
Block a user