|
@ -6,7 +6,7 @@ import SealInstrumentSvg from 'assets/images/seal/seal-instrument.svg' |
|
|
import SoftKeyboard from 'components/common/SoftKeyboard/index.vue' |
|
|
import SoftKeyboard from 'components/common/SoftKeyboard/index.vue' |
|
|
import DashboardChart from 'components/seal/DashboardChart.vue' |
|
|
import DashboardChart from 'components/seal/DashboardChart.vue' |
|
|
import { roundNumber } from 'libs/utils' |
|
|
import { roundNumber } from 'libs/utils' |
|
|
import { computed, onMounted, ref } from 'vue' |
|
|
|
|
|
|
|
|
import { computed, onMounted, ref, watch } from 'vue' |
|
|
|
|
|
|
|
|
import { getDeviceStatus } from '@/libs/deviceComm' |
|
|
import { getDeviceStatus } from '@/libs/deviceComm' |
|
|
import { FtMessage } from '@/libs/message' |
|
|
import { FtMessage } from '@/libs/message' |
|
@ -17,13 +17,18 @@ defineOptions({ name: 'Seal' }) |
|
|
|
|
|
|
|
|
const sealStore = useSealStore() |
|
|
const sealStore = useSealStore() |
|
|
|
|
|
|
|
|
|
|
|
const initialPressure = ref<string>('0') |
|
|
const sealInfo = computed(() => sealStore.sealInfo) |
|
|
const sealInfo = computed(() => sealStore.sealInfo) |
|
|
const leakRemainingTime = computed(() => sealStore.leakRemainingTime) |
|
|
const leakRemainingTime = computed(() => sealStore.leakRemainingTime) |
|
|
const currentPressure = computed(() => sealStore.currentPressure) |
|
|
const currentPressure = computed(() => sealStore.currentPressure) |
|
|
const diffPressure = computed(() => |
|
|
|
|
|
Number(sealStore.currentPressure) - Number(sealStore.sealInfo.pressure), |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const diffPressure = computed<number>(() => { |
|
|
|
|
|
if (sealInfo.value.workState === 'leakTesting') { |
|
|
|
|
|
return Math.abs( |
|
|
|
|
|
Number(currentPressure.value) - Number(initialPressure.value), |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
}) |
|
|
const inputValue = ref('') |
|
|
const inputValue = ref('') |
|
|
const keyboardVisible = ref(false) |
|
|
const keyboardVisible = ref(false) |
|
|
const keyboardType = ref<'text' | 'number'>('number') |
|
|
const keyboardType = ref<'text' | 'number'>('number') |
|
@ -31,6 +36,15 @@ const softKeyboardRef = ref() |
|
|
const inflationTime = ref<number>() |
|
|
const inflationTime = ref<number>() |
|
|
const loading = ref(false) |
|
|
const loading = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
|
() => sealInfo.value.workState, |
|
|
|
|
|
(newState, oldState) => { |
|
|
|
|
|
if (oldState === 'stabilizingPressure' && newState === 'leakTesting') { |
|
|
|
|
|
initialPressure.value = sealInfo.value.pressure |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
const res = await sendCmd({ className: 'AirLeakDetectTest', fnName: 'getServiceConfig' }) |
|
|
const res = await sendCmd({ className: 'AirLeakDetectTest', fnName: 'getServiceConfig' }) |
|
|
inflationTime.value = res.inflationTimeMs |
|
|
inflationTime.value = res.inflationTimeMs |
|
@ -105,11 +119,17 @@ function handleConfirm(value: string) { |
|
|
<div class="seal-diff-text"> |
|
|
<div class="seal-diff-text"> |
|
|
测试前气压: |
|
|
测试前气压: |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="sealInfo.workState === 'idle'" class="seal-diff-statue seal-diff-text"> |
|
|
|
|
|
未开始 |
|
|
|
|
|
|
|
|
<div v-if="sealInfo.workState === 'inflating'" class="seal-diff-statue seal-diff-text"> |
|
|
|
|
|
打压中 |
|
|
</div> |
|
|
</div> |
|
|
<div v-else class="seal-test-time"> |
|
|
|
|
|
{{ currentPressure }} |
|
|
|
|
|
|
|
|
<div v-else-if="sealInfo.workState === 'stabilizingPressure'" class="seal-diff-statue seal-diff-text"> |
|
|
|
|
|
稳压中 |
|
|
|
|
|
</div> |
|
|
|
|
|
<div v-else-if="sealInfo.workState === 'leakTesting'" class="seal-test-time"> |
|
|
|
|
|
{{ initialPressure }}Kp |
|
|
|
|
|
</div> |
|
|
|
|
|
<div v-else class="seal-diff-statue seal-diff-text"> |
|
|
|
|
|
未开始 |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|