|
|
@ -6,7 +6,7 @@ import SealInstrumentSvg from 'assets/images/seal/seal-instrument.svg' |
|
|
|
import SoftKeyboard from 'components/common/SoftKeyboard/index.vue' |
|
|
|
import DashboardChart from 'components/seal/DashboardChart.vue' |
|
|
|
import { roundNumber } from 'libs/utils' |
|
|
|
import { computed, onMounted, ref, watch } from 'vue' |
|
|
|
import { computed, onMounted, onUnmounted, ref, watch } from 'vue' |
|
|
|
|
|
|
|
import { getDeviceStatus } from '@/libs/deviceComm' |
|
|
|
import { FtMessage } from '@/libs/message' |
|
|
@ -50,11 +50,21 @@ onMounted(async () => { |
|
|
|
params: { inflationTimeMs: 0.3 }, |
|
|
|
}) |
|
|
|
inflationTime.value = res.inflationTimeMs |
|
|
|
poll = setInterval(() => { |
|
|
|
if (sealInfo.value.workState === 'leakTesting') { |
|
|
|
sealStore.startLeakTimer() |
|
|
|
clearInterval(poll) |
|
|
|
} |
|
|
|
}, 100) |
|
|
|
}) |
|
|
|
onUnmounted(() => { |
|
|
|
clearInterval(poll) |
|
|
|
}) |
|
|
|
|
|
|
|
const stopText = computed(() => (sealInfo.value.workState === 'stopping' ? '停止中...' : '停止测试')) |
|
|
|
const stopDisabled = computed(() => sealInfo.value.workState === 'stopping' || sealInfo.value.workState === 'idle') |
|
|
|
|
|
|
|
let poll: any = 0 |
|
|
|
function onStartTest() { |
|
|
|
const statusName = getDeviceStatus() |
|
|
|
if (statusName) { |
|
|
@ -65,7 +75,12 @@ function onStartTest() { |
|
|
|
syncSendCmd({ className: 'AirLeakDetectTest', fnName: 'start', params: { inflationTimeMs: 0 } }) |
|
|
|
.then((res) => { |
|
|
|
if (res.ackcode === 0) { |
|
|
|
poll = setInterval(() => { |
|
|
|
if (sealInfo.value.workState === 'leakTesting') { |
|
|
|
sealStore.startLeakTimer() |
|
|
|
clearInterval(poll) |
|
|
|
} |
|
|
|
}, 100) |
|
|
|
FtMessage.success('开始执行密封测试') |
|
|
|
} |
|
|
|
else { |
|
|
@ -110,7 +125,7 @@ function handleConfirm(value: string) { |
|
|
|
<div class="seal-time-text"> |
|
|
|
测试时间: |
|
|
|
</div> |
|
|
|
<div v-if="sealInfo.workState === 'idle'" class="seal-time-statue seal-time-text"> |
|
|
|
<div v-if="sealInfo.workState !== 'leakTesting'" class="seal-time-statue seal-time-text"> |
|
|
|
未开始 |
|
|
|
</div> |
|
|
|
<div v-else class="seal-test-time"> |
|
|
@ -127,6 +142,10 @@ function handleConfirm(value: string) { |
|
|
|
<div v-else-if="sealInfo.workState === 'stabilizingPressure'" class="seal-diff-statue seal-diff-text"> |
|
|
|
稳压中 |
|
|
|
</div> |
|
|
|
<div v-else-if="sealInfo.workState === 'stopping'" class="seal-diff-statue seal-diff-text"> |
|
|
|
停止中 |
|
|
|
</div> |
|
|
|
<!-- 捡漏中 --> |
|
|
|
<div v-else-if="sealInfo.workState === 'leakTesting'" class="seal-test-time"> |
|
|
|
{{ initialPressure }}Kpa |
|
|
|
</div> |
|
|
@ -227,7 +246,7 @@ function handleConfirm(value: string) { |
|
|
|
//width: 16rem; |
|
|
|
height: 5rem; |
|
|
|
border-radius: 15px; |
|
|
|
padding: 0 2px 0; |
|
|
|
padding: 0 20px; |
|
|
|
} |
|
|
|
.seal-time-text { |
|
|
|
font-size: 1.5rem; |
|
|
|