|
|
@ -4,7 +4,24 @@ |
|
|
|
<main class="mt-[43px] border border-[#D6D6D6] bg-white rounded-b-md rounded-tr-md px-6 py-6"> |
|
|
|
<div class="flex items-center gap-6"> |
|
|
|
<p class="text-lg">清洗管道</p> |
|
|
|
<button class="btn-dark px-8 py-2 text-lg" @click="onStartWash">开始清洗</button> |
|
|
|
<button |
|
|
|
:disabled="statusStore.workStatus !== 'idle'" |
|
|
|
class="btn-dark px-8 py-2 text-lg" |
|
|
|
@click="onStartWash('injector')"> |
|
|
|
清洗注射器管路 |
|
|
|
</button> |
|
|
|
<button |
|
|
|
:disabled="statusStore.workStatus !== 'idle'" |
|
|
|
class="btn-dark px-8 py-2 text-lg" |
|
|
|
@click="onStartWash('nozzle')"> |
|
|
|
清洗喷涂部分 |
|
|
|
</button> |
|
|
|
<button |
|
|
|
:disabled="statusStore.workStatus !== 'washing'" |
|
|
|
class="btn-dark px-8 py-2 text-lg" |
|
|
|
@click="onStopWash"> |
|
|
|
停止清洗 |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</main> |
|
|
|
<header |
|
|
@ -18,7 +35,18 @@ |
|
|
|
<main class="mt-[43px] border border-[#D6D6D6] bg-white rounded-b-md rounded-tr-md px-6 py-6"> |
|
|
|
<div class="flex items-center gap-6"> |
|
|
|
<p class="text-lg">预充管道</p> |
|
|
|
<button class="btn-dark px-8 py-2 text-lg" @click="onStartPrefill">开始预充</button> |
|
|
|
<button |
|
|
|
:disabled="statusStore.workStatus !== 'idle'" |
|
|
|
class="btn-dark px-8 py-2 text-lg" |
|
|
|
@click="onStartPrefill"> |
|
|
|
开始预充 |
|
|
|
</button> |
|
|
|
<button |
|
|
|
:disabled="statusStore.workStatus !== 'prefilling'" |
|
|
|
class="btn-dark px-8 py-2 text-lg" |
|
|
|
@click="onStopPrefill"> |
|
|
|
结束预充 |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</main> |
|
|
|
<header |
|
|
@ -31,7 +59,9 @@ |
|
|
|
<section class="flex flex-col relative text-primary mb-4"> |
|
|
|
<main class="mt-[43px] border border-[#D6D6D6] bg-white rounded-b-md rounded-tr-md px-6 py-6"> |
|
|
|
<div class="flex items-center"> |
|
|
|
<p class="text-lg">当前湿度 <span class="text-[28px] font-semibold">50</span> %RH</p> |
|
|
|
<p class="text-lg"> |
|
|
|
当前湿度 <span class="text-[28px] font-semibold">{{ statusStore.equipmentStatus.humidity }}</span> %RH |
|
|
|
</p> |
|
|
|
<p class="text-lg mx-6"> |
|
|
|
要求湿度<input |
|
|
|
type="number" |
|
|
@ -39,7 +69,12 @@ |
|
|
|
class="border-none outline-none h-[32px] w-[60px] mx-2 bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center" />%RH |
|
|
|
</p> |
|
|
|
|
|
|
|
<button class="btn-dark px-8 py-2 text-lg" @click="onStartDehumidify">开始除湿</button> |
|
|
|
<button |
|
|
|
:disabled="statusStore.workStatus !== 'idle'" |
|
|
|
class="btn-dark px-8 py-2 text-lg" |
|
|
|
@click="onStartDehumidify"> |
|
|
|
开始除湿 |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</main> |
|
|
|
<header |
|
|
@ -107,16 +142,13 @@ import { ref } from "vue"; |
|
|
|
import Dialog, { type DialogParam } from "@/components/Dialog.vue"; |
|
|
|
import { useRouter } from "vue-router"; |
|
|
|
import { ElMessage } from "element-plus"; |
|
|
|
import { startDehumidify, startPrefill, startWash } from "@/services/globalCmd/globalCmd"; |
|
|
|
import { startDehumidify, startPrefill, startWash, stopPrefill, stopWash, type WashType } from "@/services/globalCmd/globalCmd"; |
|
|
|
import { useEquipmentStatusStore } from "@/stores/equipmentStatus"; |
|
|
|
const router = useRouter(); |
|
|
|
const statusStore = useEquipmentStatusStore(); |
|
|
|
|
|
|
|
const dialogContent = ref<DialogParam>({ |
|
|
|
title: "已完成", |
|
|
|
desc: "湿度已达到50%RH,氮气已置换完毕。", |
|
|
|
type: "confirm", |
|
|
|
okText: "去喷涂", |
|
|
|
cancelText: "关闭", |
|
|
|
_brand: "humidity_complete", |
|
|
|
desc: "描述", |
|
|
|
}); |
|
|
|
|
|
|
|
const showDialog = ref(false); |
|
|
@ -127,42 +159,46 @@ function onStartDehumidify() { |
|
|
|
ElMessage.error("请输入要求湿度"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
startDehumidify({ humidity: humidity.value }).then(res => { |
|
|
|
if (res.success) { |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
dialogContent.value = { |
|
|
|
title: "已完成", |
|
|
|
desc: "湿度已达到50%RH,氮气已置换完毕。", |
|
|
|
desc: "请确认已关闭载物台门和注射器门", |
|
|
|
type: "confirm", |
|
|
|
okText: "去喷涂", |
|
|
|
cancelText: "关闭", |
|
|
|
_brand: "humidity_complete", |
|
|
|
_brand: "start_dehumidify", |
|
|
|
}; |
|
|
|
showDialog.value = true; |
|
|
|
} |
|
|
|
function onOk() { |
|
|
|
showDialog.value = false; |
|
|
|
if (dialogContent.value._brand === "start_dehumidify") { |
|
|
|
startDehumidify({ humidity: humidity.value! }).then(res => { |
|
|
|
if (res.success) { |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
router.push("/spray"); |
|
|
|
} |
|
|
|
} |
|
|
|
function onGoSpray() { |
|
|
|
dialogContent.value = { |
|
|
|
title: "提示", |
|
|
|
desc: "请确认 清洗、预充、除湿均已完成", |
|
|
|
desc: "请确认 清洗、预充、除湿均已完成,\n且外部氮气压力大于0.35MPa", |
|
|
|
type: "confirm", |
|
|
|
okText: "确认", |
|
|
|
cancelText: "取消", |
|
|
|
_brand: "goSpray", |
|
|
|
}; |
|
|
|
showDialog.value = true; |
|
|
|
} |
|
|
|
|
|
|
|
function onStartWash() { |
|
|
|
startWash({}).then(res => { |
|
|
|
function onStartWash(type: WashType) { |
|
|
|
startWash({ type }).then(res => { |
|
|
|
if (res.success) { |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function onStopWash() { |
|
|
|
stopWash({}).then(res => { |
|
|
|
if (res.success) { |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg); |
|
|
@ -178,5 +214,13 @@ function onStartPrefill() { |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
function onStopPrefill() { |
|
|
|
stopPrefill({}).then(res => { |
|
|
|
if (res.success) { |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped></style> |