省级平台在正式检测时增加温度、相对湿度参数
This commit is contained in:
@@ -234,6 +234,9 @@
|
||||
<ChannelsTest ref='channelsTest' :webMsgSend='webMsgSend' @quitClicked='handleQuitClicked' @submitClicked='handleSubmitClicked'></ChannelsTest>
|
||||
<!-- 手动检测-勾选检测项弹窗 -->
|
||||
<SelectTestItemPopup ref="selectTestItemPopupRef" @openTestDialog="openTestDialog"></SelectTestItemPopup>
|
||||
<!-- 省平台-填写温度湿度弹窗 -->
|
||||
<WriteTHPopup ref="writeTHPopupRef" @openTestDialog2="openTestDialog2"></WriteTHPopup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -284,6 +287,8 @@ import {documentedPqDev} from '@/api/device/device'
|
||||
import {getPqDev} from '@/api/device/device/index.ts'
|
||||
import {ResultEnum} from '@/enums/httpEnum'
|
||||
import SelectTestItemPopup from "@/views/home/components/selectTestItemPopup.vue";
|
||||
import WriteTHPopup from "@/views/home/components/writeTHPopup.vue";
|
||||
import { fa } from 'element-plus/es/locale'
|
||||
|
||||
const dictStore = useDictStore()
|
||||
const checkStore = useCheckStore()
|
||||
@@ -300,6 +305,7 @@ const reportDialogVisible = ref(false)
|
||||
|
||||
const dataCheckPopupRef = ref<InstanceType<typeof dataCheckPopup>>()
|
||||
const selectTestItemPopupRef = ref<InstanceType<typeof SelectTestItemPopup>>()
|
||||
const writeTHPopupRef = ref<InstanceType<typeof WriteTHPopup>>()
|
||||
|
||||
const matchDialogVisible = ref(false)
|
||||
const dialogTitle = ref('手动检测')
|
||||
@@ -952,12 +958,11 @@ const handleTest = async (val: string) => {
|
||||
})
|
||||
.then(() => {
|
||||
ElMessage.success('不合格项复检')
|
||||
// if (checkStore.devices.length > 1) {
|
||||
// checkStore.setReCheckType(1)
|
||||
// } else {
|
||||
// checkStore.setReCheckType(0)
|
||||
// }
|
||||
checkStore.setReCheckType(0)
|
||||
if (checkStore.devices.length > 1) {
|
||||
checkStore.setReCheckType(1)
|
||||
} else {
|
||||
checkStore.setReCheckType(0)
|
||||
}
|
||||
selectTestItemPopupRef.value?.open()
|
||||
})
|
||||
.catch((action: Action) => {
|
||||
@@ -968,9 +973,11 @@ const handleTest = async (val: string) => {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
checkStore.setReCheckType(1)
|
||||
selectTestItemPopupRef.value?.open()
|
||||
}
|
||||
|
||||
} else if (val === '系数校准') {
|
||||
// 检查 socketClient.Instance 是否存在
|
||||
if (!socketClient.Instance) {
|
||||
@@ -1014,16 +1021,27 @@ const handleTest = async (val: string) => {
|
||||
} else {
|
||||
checkStore.setReCheckType(0)
|
||||
}
|
||||
openTestDialog()
|
||||
//openTestDialog(false)
|
||||
if(appSceneStore.currentScene === '0'){
|
||||
writeTHPopupRef.value?.open()
|
||||
}else{
|
||||
openTestDialog(false)
|
||||
}
|
||||
})
|
||||
.catch((action: Action) => {
|
||||
ElMessage.success('全部复检')
|
||||
checkStore.setReCheckType(1)
|
||||
openTestDialog()
|
||||
//openTestDialog(false)
|
||||
if(appSceneStore.currentScene === '0'){
|
||||
writeTHPopupRef.value?.open()
|
||||
}else{
|
||||
openTestDialog(false)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
openTestDialog()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if (val === '批量下载') {
|
||||
@@ -1053,8 +1071,19 @@ const handleTest = async (val: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
const openTestDialog = () => {
|
||||
testPopup.value?.open(dialogTitle.value)
|
||||
const openTestDialog = (test:boolean) => {
|
||||
console.log('openTestDialog',test)
|
||||
if(dialogTitle.value === '手动检测' && appSceneStore.currentScene === '0' && test == true){
|
||||
writeTHPopupRef.value?.open()
|
||||
}else{
|
||||
testPopup.value?.open(dialogTitle.value)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
const openTestDialog2 = () => {
|
||||
testPopup.value?.open(dialogTitle.value)
|
||||
}
|
||||
|
||||
// 打开 drawer(新增、查看、编辑)
|
||||
@@ -1134,6 +1163,7 @@ watch(
|
||||
)
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
||||
const response = await getPqDev()
|
||||
devTypeOptions.value = response.data.map(item => ({
|
||||
id: item.id,
|
||||
|
||||
Reference in New Issue
Block a user