微调
This commit is contained in:
@@ -97,10 +97,10 @@
|
|||||||
<!-- <el-button type="primary" :icon="CirclePlus" @click="addDevice('设备新增')" v-if="form.activeTabs === 0"
|
<!-- <el-button type="primary" :icon="CirclePlus" @click="addDevice('设备新增')" v-if="form.activeTabs === 0"
|
||||||
>设备新增</el-button> -->
|
>设备新增</el-button> -->
|
||||||
|
|
||||||
<el-button type='primary' v-auth.role="'channelsTest'" :icon='Odometer' @click="handleTest('系数校准')"
|
<!-- <el-button type='primary' v-auth.role="'channelsTest'" :icon='Odometer' @click="handleTest('系数校准')"-->
|
||||||
v-if='form.activeTabs === 0 && appSceneStore.currentScene === "1" '
|
<!-- v-if='form.activeTabs === 0 && appSceneStore.currentScene === "1" '-->
|
||||||
>系数校准
|
<!-- >系数校准-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -12,64 +12,6 @@
|
|||||||
style="width: 82%; margin-right: 3%;"
|
style="width: 82%; margin-right: 3%;"
|
||||||
:percentage="percentage"
|
:percentage="percentage"
|
||||||
:color="customColors"/>
|
:color="customColors"/>
|
||||||
|
|
||||||
<!-- <div style="width: 15%">-->
|
|
||||||
<!-- <el-button type="primary" v-if="testStatus=='test_init'" disabled @click="handlePause()">-->
|
|
||||||
<!-- <el-icon class="loading-box" style="color: #fff;margin-right: 8px;">-->
|
|
||||||
<!-- <component :is="Refresh"/>-->
|
|
||||||
<!-- </el-icon>-->
|
|
||||||
<!-- 初始化中-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- type="primary"-->
|
|
||||||
<!-- v-if="testStatus=='process' && percentage < 100"-->
|
|
||||||
<!-- :icon="VideoPause"-->
|
|
||||||
<!-- @click="handlePause()">停止检测-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<!-- <el-button type="warning" v-if="testStatus === 'paused_ing' && percentage < 100" disabled>-->
|
|
||||||
<!-- <el-icon class="loading-box" style="margin-right: 8px;">-->
|
|
||||||
<!-- <component :is="Refresh"/>-->
|
|
||||||
<!-- </el-icon>-->
|
|
||||||
<!-- 暂停中-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<!-- <!– <el-button–>-->
|
|
||||||
<!-- <!– type="primary"–>-->
|
|
||||||
<!-- <!– v-if="testStatus=='test_init'"–>-->
|
|
||||||
<!-- <!– :icon="VideoPause"–>-->
|
|
||||||
<!-- <!– disabled>初始化中–>-->
|
|
||||||
<!-- <!– </el-button>–>-->
|
|
||||||
<!-- <!– <el-button–>-->
|
|
||||||
<!-- <!– type="danger"–>-->
|
|
||||||
<!-- <!– v-if="testStatus=='test_init_fail'"–>-->
|
|
||||||
<!-- <!– :icon="Failed"–>-->
|
|
||||||
<!-- <!– disabled>初始化失败–>-->
|
|
||||||
<!-- <!– </el-button>–>-->
|
|
||||||
<!-- <!– <el-button–>-->
|
|
||||||
<!-- <!– type="danger"–>-->
|
|
||||||
<!-- <!– v-if="testStatus=='connect_timeout'"–>-->
|
|
||||||
<!-- <!– :icon="Failed"–>-->
|
|
||||||
<!-- <!– disabled>连接超时–>-->
|
|
||||||
<!-- <!– </el-button>–>-->
|
|
||||||
<!-- <!– <el-button–>-->
|
|
||||||
<!-- <!– type="primary"–>-->
|
|
||||||
<!-- <!– :icon="RefreshLeft"–>-->
|
|
||||||
<!-- <!– v-if="testStatus === 'recheck'"–>-->
|
|
||||||
<!-- <!– @click="emit('sendReCheck')">重新检测–>-->
|
|
||||||
<!-- <!– </el-button>–>-->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <el-button type="success" v-if="percentage >= 100" :icon="Check" disabled>检测完成</el-button>-->
|
|
||||||
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- type="warning"-->
|
|
||||||
<!-- v-if="(testStatus=='paused' || testStatus === 'pause_timeout') && percentage < 100"-->
|
|
||||||
<!-- :icon="VideoPlay"-->
|
|
||||||
<!-- :disabled="testStatus === 'pause_timeout'"-->
|
|
||||||
<!-- @click="emit('sendResume')"-->
|
|
||||||
<!-- >继续检测-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<el-button style="width: 10%" type="text" :icon="InfoFilled" @click="showTestLog">检测项进度</el-button>
|
<el-button style="width: 10%" type="text" :icon="InfoFilled" @click="showTestLog">检测项进度</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,10 @@
|
|||||||
<div class="steps-container">
|
<div class="steps-container">
|
||||||
<el-steps class="test-head-steps" simple :active="stepsActiveIndex" process-status="finish" finish-status="success">
|
<el-steps class="test-head-steps" simple :active="stepsActiveIndex" process-status="finish" finish-status="success">
|
||||||
<el-step v-if="preTestSelected" title="预检测" :icon="stepsActive > 1 || stepsActiveIndex > stepsTotalNum-1? SuccessFilled :Edit" @click="handleStepClick(1)"/>
|
<el-step v-if="preTestSelected" title="预检测" :icon="stepsActive > 1 || stepsActiveIndex > stepsTotalNum-1? SuccessFilled :Edit" @click="handleStepClick(1)"/>
|
||||||
<el-step v-if="timeTestSelected" title="守时检测" :icon="stepsActive > 2 || stepsActiveIndex > stepsTotalNum-1? SuccessFilled :UploadFilled" @click="handleStepClick(2)"/>
|
<el-step v-if="timeTestSelected" title="守时检测" :icon="stepsActive > 2 || stepsActiveIndex > stepsTotalNum-1? SuccessFilled :UploadFilled"
|
||||||
<el-step v-if="channelsTestSelected" title="系数校准" :icon="stepsActive > 3 || stepsActiveIndex > stepsTotalNum-1? SuccessFilled :Odometer" @click="handleStepClick(3)"/>
|
@click="handleStepClick(2)"/>
|
||||||
|
<el-step v-if="channelsTestSelected" title="系数校准" :icon="stepsActive > 3 || stepsActiveIndex > stepsTotalNum-1? SuccessFilled :Odometer"
|
||||||
|
@click="handleStepClick(3)"/>
|
||||||
<el-step v-if="testSelected" title="正式检测" :icon="stepsActive > 4 || stepsActiveIndex > stepsTotalNum-1? SuccessFilled :Coin" @click="handleStepClick(4)"/>
|
<el-step v-if="testSelected" title="正式检测" :icon="stepsActive > 4 || stepsActiveIndex > stepsTotalNum-1? SuccessFilled :Coin" @click="handleStepClick(4)"/>
|
||||||
<el-step title="检测完成" :icon="stepsActiveIndex > stepsTotalNum-1 ? SuccessFilled :Key"/>
|
<el-step title="检测完成" :icon="stepsActiveIndex > stepsTotalNum-1 ? SuccessFilled :Key"/>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
@@ -15,33 +17,16 @@
|
|||||||
:webMsgSend="webMsgSend"/>
|
:webMsgSend="webMsgSend"/>
|
||||||
<timeTest v-if="showComponent&&timeTestSelected" v-show="timeTestSelected && stepsActiveView==2" v-model:testStatus="timeTestStatus"/>
|
<timeTest v-if="showComponent&&timeTestSelected" v-show="timeTestSelected && stepsActiveView==2" v-model:testStatus="timeTestStatus"/>
|
||||||
<!-- <channelsTest v-if="stepsActiveIndex === 3" v-model:testStatus="channelsTestStatus"></channelsTest>-->
|
<!-- <channelsTest v-if="stepsActiveIndex === 3" v-model:testStatus="channelsTestStatus"></channelsTest>-->
|
||||||
<factorTest v-if="showComponent&&channelsTestSelected" v-show="channelsTestSelected && stepsActiveView==3" v-model:testStatus="channelsTestStatus" :webMsgSend="webMsgSend"/>
|
<factorTest v-if="showComponent&&channelsTestSelected" v-show="channelsTestSelected && stepsActiveView==3" v-model:testStatus="channelsTestStatus"
|
||||||
|
:webMsgSend="webMsgSend"/>
|
||||||
<test v-if="showComponent&&testSelected" ref="testRef" v-show="testSelected && stepsActiveView==4" v-model:testStatus="TestStatus" :webMsgSend="webMsgSend"
|
<test v-if="showComponent&&testSelected" ref="testRef" v-show="testSelected && stepsActiveView==4" v-model:testStatus="TestStatus" :webMsgSend="webMsgSend"
|
||||||
@update:webMsgSend="webMsgSend=$event" @sendPause="sendPause" @sendResume="sendResume" @sendReCheck="sendReCheck" @closeWebSocket="closeWebSocket" :stepsActive="stepsActive"/>
|
@update:webMsgSend="webMsgSend=$event" @sendPause="sendPause" @sendResume="sendResume" @sendReCheck="sendReCheck" @closeWebSocket="closeWebSocket"
|
||||||
|
:stepsActive="stepsActive"/>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div>
|
<div>
|
||||||
<!-- <el-button type="primary" :icon="DArrowRight" v-if="stepsActiveIndex < stepsTotalNum && ActiveStatue != 'success'" @click="nextStep">跳过</el-button>-->
|
<!-- <el-button type="primary" :icon="DArrowRight" v-if="stepsActiveIndex < stepsTotalNum && ActiveStatue != 'success'" @click="nextStep">跳过</el-button>-->
|
||||||
<el-button type="primary" :icon="VideoPlay" v-if="ActiveStatue === 'waiting'" @click="handleSubmitFast">一键检测开始</el-button>
|
<el-button type="primary" :icon="VideoPlay" v-if="ActiveStatue === 'waiting'" @click="handleSubmitFast">一键检测开始</el-button>
|
||||||
<el-button type="primary" :icon="VideoPlay" v-if="ActiveStatue === 'waiting'" @click="handleSubmit">开始检测</el-button>
|
|
||||||
<!-- <el-button type="primary"-->
|
|
||||||
<!-- v-if="(stepsActiveIndex <= stepsTotalNum - 1) && (ActiveStatue !== 'success' &&ActiveStatue !== 'test_init' && ActiveStatue !=='paused_ing' && ActiveStatue !=='paused' && ActiveStatue !== 'waiting' && ActiveStatue !== 'error' && ActiveStatue !== 'test_init_fail' && ActiveStatue !== 'connect_timeout' && ActiveStatue!=='pause_timeout')"-->
|
|
||||||
<!-- disabled>-->
|
|
||||||
<!-- <el-icon class="loading-box" style="color: #fff;margin-right: 8px;">-->
|
|
||||||
<!-- <component :is="Refresh"/>-->
|
|
||||||
<!-- </el-icon>-->
|
|
||||||
<!-- 检测中-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <el-button type="primary" v-if="ActiveStatue === 'process'" disabled>-->
|
|
||||||
<!-- <el-icon class="loading-box" style="color: #fff;margin-right: 8px;">-->
|
|
||||||
<!-- <component :is="Refresh"/>-->
|
|
||||||
<!-- </el-icon>-->
|
|
||||||
<!-- 检测中-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<!-- <el-button type="warning" :icon="VideoPlay" v-if="TestStatus === 'paused'" @click="handleSubmit">继续检测</el-button>-->
|
|
||||||
<!-- <el-button type="primary" :icon="RefreshLeft" v-if="ActiveStatue === 'recheck' || ActiveStatue ==='error' || ActiveStatue ==='test_init_fail' || ActiveStatue === 'pause_timeout' || ActiveStatue === 'connect_timeout'" @click="handleSubmit">重新检测</el-button>-->
|
|
||||||
<el-button type="primary" v-if="TestStatus === 'test_init'" disabled>
|
<el-button type="primary" v-if="TestStatus === 'test_init'" disabled>
|
||||||
<el-icon class="loading-box" style="color: #fff;margin-right: 8px;">
|
<el-icon class="loading-box" style="color: #fff;margin-right: 8px;">
|
||||||
<component :is="Refresh"/>
|
<component :is="Refresh"/>
|
||||||
@@ -95,7 +80,6 @@ import socketClient from '@/utils/webSocketClient';
|
|||||||
import {useCheckStore} from "@/stores/modules/check";
|
import {useCheckStore} from "@/stores/modules/check";
|
||||||
import {pauseTest, resumeTest, startPreTest} from '@/api/socket/socket'
|
import {pauseTest, resumeTest, startPreTest} from '@/api/socket/socket'
|
||||||
import {useUserStore} from "@/stores/modules/user";
|
import {useUserStore} from "@/stores/modules/user";
|
||||||
import { Device } from '@/api/device/interface/device';
|
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const checkStore = useCheckStore();
|
const checkStore = useCheckStore();
|
||||||
@@ -241,7 +225,8 @@ const handleSubmitFast = () => {
|
|||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (TestStatus.value == "waiting") {
|
if (TestStatus.value == "waiting") {
|
||||||
/* startPreTest({
|
if (!checkStore.selectTestItems.preTest && !checkStore.selectTestItems.timeTest && !checkStore.selectTestItems.channelsTest && checkStore.selectTestItems.test) {
|
||||||
|
startPreTest({
|
||||||
userPageId: "cdf",
|
userPageId: "cdf",
|
||||||
devIds: deviceIds,
|
devIds: deviceIds,
|
||||||
planId: planId,
|
planId: planId,
|
||||||
@@ -258,7 +243,8 @@ const handleSubmitFast = () => {
|
|||||||
})
|
})
|
||||||
TestStatus.value = 'test_init_fail'
|
TestStatus.value = 'test_init_fail'
|
||||||
}
|
}
|
||||||
})*/
|
})
|
||||||
|
}
|
||||||
TestStatus.value = 'start'
|
TestStatus.value = 'start'
|
||||||
} else if (TestStatus.value == 'paused') {
|
} else if (TestStatus.value == 'paused') {
|
||||||
// 发送继续指令
|
// 发送继续指令
|
||||||
@@ -279,83 +265,83 @@ const handleSubmitFast = () => {
|
|||||||
|
|
||||||
|
|
||||||
// let loading;
|
// let loading;
|
||||||
const handleSubmit = () => {
|
// const handleSubmit = () => {
|
||||||
let deviceIds = checkStore.devices.map((item) => item.deviceId)
|
// let deviceIds = checkStore.devices.map((item) => item.deviceId)
|
||||||
let planId = checkStore.plan.id
|
// let planId = checkStore.plan.id
|
||||||
|
//
|
||||||
if (!dataSocket.socketServe.connected) {
|
// if (!dataSocket.socketServe.connected) {
|
||||||
ElMessage.error('webSocket连接中断!')
|
// ElMessage.error('webSocket连接中断!')
|
||||||
return
|
// return
|
||||||
}
|
|
||||||
console.log("handleSubmit",stepsActive.value,TestStatus.value)
|
|
||||||
switch (stepsActive.value) {
|
|
||||||
case 1:
|
|
||||||
startPreTest({
|
|
||||||
userPageId: "cdf",
|
|
||||||
devIds: deviceIds,
|
|
||||||
planId: planId,
|
|
||||||
operateType: '1', // '1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
|
||||||
userId:userStore.userInfo.id,
|
|
||||||
temperature:checkStore.temperature,
|
|
||||||
humidity:checkStore.humidity
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code === 'A001014') {
|
|
||||||
ElMessageBox.alert('装置配置异常', '检测失败', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
type: 'error',
|
|
||||||
})
|
|
||||||
preTestStatus.value = 'error'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
preTestStatus.value = 'start'
|
|
||||||
// setTimeout(() => {
|
|
||||||
// preTestStatus.value = 'success'
|
|
||||||
// }, 5000)
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
timeTestStatus.value = 'start'
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
// 调用系数校准组件的handleSubmit方法
|
|
||||||
channelsTestStatus.value = 'start'
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
if (TestStatus.value == "waiting") {
|
|
||||||
startPreTest({
|
|
||||||
userPageId: "cdf",
|
|
||||||
devIds: deviceIds,
|
|
||||||
planId: planId,
|
|
||||||
operateType: checkStore.reCheckType ==1 ?'2':'8', // '1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
|
||||||
userId:userStore.userInfo.id,
|
|
||||||
temperature:checkStore.temperature,
|
|
||||||
humidity:checkStore.humidity
|
|
||||||
}).then(res => {
|
|
||||||
console.log(res)
|
|
||||||
if (res.code === 'A001014') {
|
|
||||||
ElMessageBox.alert('装置配置异常', '初始化失败', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
type: 'error',
|
|
||||||
})
|
|
||||||
TestStatus.value = 'test_init_fail'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
TestStatus.value = 'start'
|
|
||||||
} else if (TestStatus.value == 'paused') {
|
|
||||||
// 发送继续指令
|
|
||||||
sendResume()
|
|
||||||
}
|
|
||||||
// else if (TestStatus.value == 'recheck') {
|
|
||||||
// // 发送重新检测指令
|
|
||||||
// sendReCheck()
|
|
||||||
// }
|
// }
|
||||||
// else if (TestStatus.value == 'success') {
|
// console.log("handleSubmit", stepsActive.value, TestStatus.value)
|
||||||
// handleClose()
|
// switch (stepsActive.value) {
|
||||||
|
// case 1:
|
||||||
|
// startPreTest({
|
||||||
|
// userPageId: "cdf",
|
||||||
|
// devIds: deviceIds,
|
||||||
|
// planId: planId,
|
||||||
|
// operateType: '1', // '1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
||||||
|
// userId: userStore.userInfo.id,
|
||||||
|
// temperature: checkStore.temperature,
|
||||||
|
// humidity: checkStore.humidity
|
||||||
|
// }).then(res => {
|
||||||
|
// if (res.code === 'A001014') {
|
||||||
|
// ElMessageBox.alert('装置配置异常', '检测失败', {
|
||||||
|
// confirmButtonText: '确定',
|
||||||
|
// type: 'error',
|
||||||
|
// })
|
||||||
|
// preTestStatus.value = 'error'
|
||||||
// }
|
// }
|
||||||
break;
|
// })
|
||||||
default:
|
// preTestStatus.value = 'start'
|
||||||
break;
|
// // setTimeout(() => {
|
||||||
}
|
// // preTestStatus.value = 'success'
|
||||||
};
|
// // }, 5000)
|
||||||
|
// break;
|
||||||
|
// case 2:
|
||||||
|
// timeTestStatus.value = 'start'
|
||||||
|
// break;
|
||||||
|
// case 3:
|
||||||
|
// // 调用系数校准组件的handleSubmit方法
|
||||||
|
// channelsTestStatus.value = 'start'
|
||||||
|
// break;
|
||||||
|
// case 4:
|
||||||
|
// if (TestStatus.value == "waiting") {
|
||||||
|
// startPreTest({
|
||||||
|
// userPageId: "cdf",
|
||||||
|
// devIds: deviceIds,
|
||||||
|
// planId: planId,
|
||||||
|
// operateType: checkStore.reCheckType == 1 ? '2' : '8', // '1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
||||||
|
// userId: userStore.userInfo.id,
|
||||||
|
// temperature: checkStore.temperature,
|
||||||
|
// humidity: checkStore.humidity
|
||||||
|
// }).then(res => {
|
||||||
|
// console.log(res)
|
||||||
|
// if (res.code === 'A001014') {
|
||||||
|
// ElMessageBox.alert('装置配置异常', '初始化失败', {
|
||||||
|
// confirmButtonText: '确定',
|
||||||
|
// type: 'error',
|
||||||
|
// })
|
||||||
|
// TestStatus.value = 'test_init_fail'
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// TestStatus.value = 'start'
|
||||||
|
// } else if (TestStatus.value == 'paused') {
|
||||||
|
// // 发送继续指令
|
||||||
|
// sendResume()
|
||||||
|
// }
|
||||||
|
// // else if (TestStatus.value == 'recheck') {
|
||||||
|
// // // 发送重新检测指令
|
||||||
|
// // sendReCheck()
|
||||||
|
// // }
|
||||||
|
// // else if (TestStatus.value == 'success') {
|
||||||
|
// // handleClose()
|
||||||
|
// // }
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
@@ -416,7 +402,8 @@ watch(ActiveStatue, function (newValue, oldValue) {
|
|||||||
const handleQuit = () => {
|
const handleQuit = () => {
|
||||||
console.log('handleQuit', ActiveStatue.value)
|
console.log('handleQuit', ActiveStatue.value)
|
||||||
if (ActiveStatue.value !== 'success' && ActiveStatue.value !== 'waiting' && ActiveStatue.value !== 'paused' && ActiveStatue.value !== 'test_init_fail' && ActiveStatue.value !== 'connect_timeout' && ActiveStatue.value !== 'pause_timeout') {
|
if (ActiveStatue.value !== 'success' && ActiveStatue.value !== 'waiting' && ActiveStatue.value !== 'paused' && ActiveStatue.value !== 'test_init_fail' && ActiveStatue.value !== 'connect_timeout' && ActiveStatue.value !== 'pause_timeout') {
|
||||||
beforeClose(() => {})
|
beforeClose(() => {
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
handleClose()
|
handleClose()
|
||||||
}
|
}
|
||||||
@@ -575,6 +562,7 @@ defineExpose({open})
|
|||||||
.el-step__head.is-success {
|
.el-step__head.is-success {
|
||||||
color: #91cc75;
|
color: #91cc75;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-step__title.is-success {
|
.el-step__title.is-success {
|
||||||
color: #91cc75;
|
color: #91cc75;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user