不合格项复检

This commit is contained in:
caozehui
2025-03-03 11:35:12 +08:00
parent bf5f4eab77
commit faa0bc54a6
5 changed files with 41 additions and 12 deletions

View File

@@ -954,10 +954,12 @@ const handleTest = async (val: string) => {
})
.then(() => {
ElMessage.success('不合格项复检')
checkStore.setReCheckType(0)
selectTestItemPopupRef.value?.open()
})
.catch((action: Action) => {
ElMessage.success('全部复检')
checkStore.setReCheckType(1)
selectTestItemPopupRef.value?.open()
})
} else {
@@ -987,10 +989,30 @@ const handleTest = async (val: string) => {
channelsTest.value?.open(channelsSelection.value, props.plan)
return
} else {
// 一键检测
checkStore.setCheckType(1)
checkStore.initSelectTestItems()
openTestDialog()
// 一键检测
if (testType === 'reTest') {
ElMessageBox.confirm('请选择复检检测方式', '设备复检',
{
distinguishCancelAndClose: true,
confirmButtonText: '不合格项复检',
cancelButtonText: '全部复检',
type: 'warning',
})
.then(() => {
ElMessage.success('不合格项复检')
checkStore.setReCheckType(0)
openTestDialog()
})
.catch((action: Action) => {
ElMessage.success('全部复检')
checkStore.setReCheckType(1)
openTestDialog()
})
} else {
openTestDialog()
}
}
}
if (val === '批量下载') {

View File

@@ -160,8 +160,7 @@
</div>
</template>
<script lang="tsx" setup name="test">
import {Check, Failed, InfoFilled, Loading, Timer, Refresh, RefreshLeft, VideoPause, VideoPlay} from '@element-plus/icons-vue'
import resultPopup from './resultPopup.vue'
import {Check, InfoFilled, Loading, Refresh, VideoPause, VideoPlay} from '@element-plus/icons-vue'
import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue'
import {computed, reactive, ref, toRef, watch} from "vue";
import {dialogBig} from "@/utils/elementBind";
@@ -727,7 +726,7 @@ const showTestLog = () => {
// 初始化检测脚本数据
const initScriptData = async () => {
let response: any = await getBigTestItem(checkStore.plan.id)
let response: any = await getBigTestItem({reCheckType:checkStore.reCheckType, planId:checkStore.plan.id,devId:checkStore.devices[0].deviceId})
let temp = response.data.map(item => {
return {

View File

@@ -190,7 +190,7 @@ const handleSubmit = () => {
userPageId: "cdf",
devIds: deviceIds,
planId: planId,
operateType: '1' // '1'为预检测、2为正式检测
operateType: '1' // '1'为预检测、2为正式检测、'8'为不合格项复检
}).then(res => {
if (res.code === 'A001014') {
ElMessageBox.alert('装置配置异常', '检测失败', {
@@ -218,7 +218,7 @@ const handleSubmit = () => {
userPageId: "cdf",
devIds: deviceIds,
planId: planId,
operateType: '2' // '1'为预检测、2为正式检测
operateType: checkStore.reCheckType ==1 ?'2':'8' // '1'为预检测、2为正式检测、'8'为不合格项复检
}).then(res => {
console.log(res)
if (res.code === 'A001014') {
@@ -326,7 +326,7 @@ const sendResume = () => {
userPageId: "cdf",
devIds: checkStore.devices.map((item) => item.deviceId),
planId: checkStore.plan.id,
operateType: '2' // 0:'系数校验''1'为预检测、2为正式检测
operateType: '2' // 0:'系数校验''1'为预检测、2为正式检测、'8'为不合格项复检
})
Object.assign(webMsgSend.value, {
requestId: 'Resume_Success'
@@ -339,7 +339,7 @@ const sendReCheck = () => {
userPageId: "cdf",
devIds: checkStore.devices.map((item) => item.deviceId),
planId: checkStore.plan.id,
operateType: '2' // 0:'系数校验''1'为预检测、2为正式检测
operateType: '2' // 0:'系数校验''1'为预检测、2为正式检测、'8'为不合格项复检
}).then(res => {
console.log(res)
if (res.code === 'A001014') {