diff --git a/src/assets/images/dehumidifier.svg b/src/assets/images/dehumidifier.svg new file mode 100644 index 0000000..0fb8942 --- /dev/null +++ b/src/assets/images/dehumidifier.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/entry/heat_icon.svg b/src/assets/images/heat_icon.svg similarity index 100% rename from src/assets/images/entry/heat_icon.svg rename to src/assets/images/heat_icon.svg diff --git a/src/components/home/Environment/index.vue b/src/components/home/Environment/index.vue new file mode 100644 index 0000000..cd5463d --- /dev/null +++ b/src/components/home/Environment/index.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/src/views/main/index.vue b/src/views/main/index.vue index fc740a5..c32e84c 100644 --- a/src/views/main/index.vue +++ b/src/views/main/index.vue @@ -2,6 +2,7 @@ import { getDeviceStatus } from 'apis/system' import FtStream from 'components/common/FTStream/index.vue' import Check from 'components/home/Check/index.vue' +import Environment from 'components/home/Environment/index.vue' import Stop from 'components/home/Stop/index.vue' import { ElMessageBox } from 'element-plus' import { FtMessage } from 'libs/message' @@ -17,9 +18,10 @@ const systemStore = useSystemStore() // 使用 systemStore const checkVisible = ref(false) console.log(import.meta.env.FT_NODE_ENV) - +const environmentVisible = ref(false) const cancel = () => { checkVisible.value = false + environmentVisible.value = false } const getStatus = async () => { @@ -76,7 +78,7 @@ const sensorMessage = async (data: any) => { await sendControl(params) FtMessage.success('当前温度已达目标温度,加热已完成') } - if (systemStore.systemStatus.nozzleHeating && systemStore.systemSensor.nozzleTemperature <= systemStore.targetNozzleTemperature) { + if (systemStore.systemStatus.nozzleHeating && systemStore.systemSensor.nozzleTemperature >= systemStore.targetNozzleTemperature) { const params = { cmdCode: 'nozzle_heat_stop', cmdId: '', @@ -92,12 +94,12 @@ socket.init(() => {}, 'pong') const ingObj = { idle: '空闲', - spraying: '正在喷涂中', + spraying: '喷涂中', paused: '喷涂暂停中', cleaningSyringePipeline: '正在清洗注射器管路', cleaningNozzlePipeline: '正在清洗喷嘴管路', - prefilling: '正在预充中', - dehumidifierRunning: '正在除湿中', + prefilling: '预充中', + dehumidifierRunning: '除湿中', stopPressed: '急停中', virtual: '虚拟模式', nozzleHeating: '喷嘴加热中', @@ -176,55 +178,9 @@ watch(() => isClose.value, async (newValue) => { } } }) -const slideSwitch = async () => { - if (systemStore.systemStatus.slidePlatHeating) { - ElMessageBox.confirm('确认关闭载玻台加热?', '提示', { - type: 'warning', - confirmButtonText: '确定', - cancelButtonText: '取消', - showCancelButton: true, - showClose: false, - closeOnClickModal: false, - closeOnPressEscape: false, - closeOnHashChange: false, - }).then(async () => { - const params = { - cmdCode: 'slide_plat_heat_stop', - cmdId: '', - } - await sendControl(params) - FtMessage.success('已关闭载玻台加热') - }) - } - else { - FtMessage.warning('载玻台加热已关闭') - } -} -const nozzleSwitch = async () => { - if (systemStore.systemStatus.nozzleHeating) { - ElMessageBox.confirm('确认关闭喷头加热?', '提示', { - type: 'warning', - confirmButtonText: '确定', - cancelButtonText: '取消', - showCancelButton: true, - showClose: false, - closeOnClickModal: false, - closeOnPressEscape: false, - closeOnHashChange: false, - }).then(async () => { - const params = { - cmdCode: 'nozzle_heat_stop', - cmdId: '', - } - await sendControl(params) - FtMessage.success('已关闭喷头加热') - }) - } - else { - FtMessage.warning('喷头加热已关闭') - } +const environmentSet = () => { + environmentVisible.value = true } - const backHandle = () => { router.back() } @@ -263,19 +219,20 @@ const backHandle = () => {
- + + 当前湿度: {{ systemStore.systemSensor.humidity }}%RH
- - + + 喷头温度: {{ systemStore.systemSensor.nozzleTemperature }}℃
- - + + 载玻台温度: {{ systemStore.systemSensor.slideTemperature }}℃
@@ -296,6 +253,7 @@ const backHandle = () => { + diff --git a/src/views/spraySet/index.vue b/src/views/spraySet/index.vue index 3b1fa9d..5bbc125 100644 --- a/src/views/spraySet/index.vue +++ b/src/views/spraySet/index.vue @@ -27,9 +27,9 @@ const startWork = () => { }) } -const humidity = ref() -const slideTemperature = ref() -const nozzleTemperature = ref() +const humidity = ref(systemStore.targetHumidity) +const slideTemperature = ref(systemStore.targetSlideTemperature) +const nozzleTemperature = ref(systemStore.targetNozzleTemperature) const speed = ref() const clearSpeed = ref() @@ -70,7 +70,7 @@ const slideStart = () => { slideStartRef.value.setLoading(false) }) .catch(() => { - FtMessage.error('取消加热') + FtMessage.error('取消载玻台加热') }) } const nozzleStart = () => { @@ -110,7 +110,7 @@ const nozzleStart = () => { nozzleStartRef.value.setLoading(false) }) .catch(() => { - FtMessage.error('取消加热') + FtMessage.error('取消喷头加热') }) } const slideStartRef = ref()