|
@ -94,7 +94,11 @@ import TestIcon from '@/assets/img/seal/test.png' |
|
|
import StartTest from '@/assets/img/seal/starttest.png' |
|
|
import StartTest from '@/assets/img/seal/starttest.png' |
|
|
import StopTest from '@/assets/img/seal/stoptest.png' |
|
|
import StopTest from '@/assets/img/seal/stoptest.png' |
|
|
import StopAir from '@/assets/img/seal/stop.png' |
|
|
import StopAir from '@/assets/img/seal/stop.png' |
|
|
import { someAirSwitchJSON } from '@/mock/command' |
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
someAirSwitchJSON, |
|
|
|
|
|
airCompressor_setStateJSON, |
|
|
|
|
|
airCompressor_channelCtrlJSON, |
|
|
|
|
|
} from '@/mock/command' |
|
|
import { useSealStore, useTestStore, useWebSocketStore } from '@/store' |
|
|
import { useSealStore, useTestStore, useWebSocketStore } from '@/store' |
|
|
|
|
|
|
|
|
const sealStore = useSealStore() |
|
|
const sealStore = useSealStore() |
|
@ -220,6 +224,8 @@ const stopTimer = () => { |
|
|
n_min.value = 0 |
|
|
n_min.value = 0 |
|
|
n_hour.value = 0 |
|
|
n_hour.value = 0 |
|
|
sealStore.updateIsStartTest(false) |
|
|
sealStore.updateIsStartTest(false) |
|
|
|
|
|
// 结束测试时打开空压机通道 |
|
|
|
|
|
websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([1])) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const timerFunc = () => { |
|
|
const timerFunc = () => { |
|
@ -231,17 +237,15 @@ const timerFunc = () => { |
|
|
|
|
|
|
|
|
const changeAirStatus = flag => { |
|
|
const changeAirStatus = flag => { |
|
|
if (flag == 1) { |
|
|
if (flag == 1) { |
|
|
if (!testStore.airCompressor) { |
|
|
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(0, 1)) |
|
|
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(1, 1)) |
|
|
|
|
|
testStore.updateAirCompressor(true) |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
if (testStore.airCompressor) { |
|
|
if (testStore.airCompressor) { |
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(0, 0)) |
|
|
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(1, 0)) |
|
|
|
|
|
|
|
|
websocketStore.sendCommandMsg(airCompressor_setStateJSON([0])) |
|
|
testStore.updateAirCompressor(false) |
|
|
testStore.updateAirCompressor(false) |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
if (!testStore.airCompressor) { |
|
|
|
|
|
websocketStore.sendCommandMsg(airCompressor_setStateJSON([1])) |
|
|
|
|
|
testStore.updateAirCompressor(true) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -251,11 +255,11 @@ const handleStartTest = flag => { |
|
|
// 也就是将getState中获取的当前值currentAirPressure赋予 |
|
|
// 也就是将getState中获取的当前值currentAirPressure赋予 |
|
|
// 开始测试需要记录时间 |
|
|
// 开始测试需要记录时间 |
|
|
timerFunc() |
|
|
timerFunc() |
|
|
// 开始测试时关闭空压机 |
|
|
|
|
|
// 关闭一个阀门 |
|
|
|
|
|
// websocketStore.sendCommandMsg(someAirSwitchJSON(0, 0)) |
|
|
|
|
|
// websocketStore.sendCommandMsg(someAirSwitchJSON(1, 0)) |
|
|
|
|
|
// testStore.updateAirCompressor(false) |
|
|
|
|
|
|
|
|
// 关闭空压机通道 |
|
|
|
|
|
websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([0])) |
|
|
|
|
|
// 停止冲入空气,即关闭空压机 |
|
|
|
|
|
websocketStore.sendCommandMsg(airCompressor_setStateJSON([0])) |
|
|
|
|
|
testStore.updateAirCompressor(false) |
|
|
sealStore.updateOldAirPressure(sealStore.currentAirPressure) |
|
|
sealStore.updateOldAirPressure(sealStore.currentAirPressure) |
|
|
sealStore.updateIsStartTest(true) |
|
|
sealStore.updateIsStartTest(true) |
|
|
} |
|
|
} |
|
|