|
|
@ -4,7 +4,7 @@ |
|
|
|
<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">开始清洗</button> |
|
|
|
<button class="btn-dark px-8 py-2 text-lg" @click="onStartWash">开始清洗</button> |
|
|
|
</div> |
|
|
|
</main> |
|
|
|
<header |
|
|
@ -18,7 +18,7 @@ |
|
|
|
<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">开始预充</button> |
|
|
|
<button class="btn-dark px-8 py-2 text-lg" @click="onStartPrefill">开始预充</button> |
|
|
|
</div> |
|
|
|
</main> |
|
|
|
<header |
|
|
@ -35,10 +35,11 @@ |
|
|
|
<p class="text-lg mx-6"> |
|
|
|
要求湿度<input |
|
|
|
type="number" |
|
|
|
v-model.number="humidity" |
|
|
|
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="startDry">开始除湿</button> |
|
|
|
<button class="btn-dark px-8 py-2 text-lg" @click="onStartDehumidify">开始除湿</button> |
|
|
|
</div> |
|
|
|
</main> |
|
|
|
<header |
|
|
@ -59,7 +60,7 @@ |
|
|
|
ul |
|
|
|
</p> |
|
|
|
<p class="text-lg mx-6"> |
|
|
|
流速<input |
|
|
|
基质流速<input |
|
|
|
type="number" |
|
|
|
class="border-none outline-none h-[32px] w-[64px] mx-2 bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center" /> |
|
|
|
ul/min |
|
|
@ -82,6 +83,7 @@ |
|
|
|
<p class="text-lg font-medium text-primary">注射器设置</p> |
|
|
|
</header> |
|
|
|
</section> --> |
|
|
|
|
|
|
|
<section class="flex items-center justify-end mt-6"> |
|
|
|
<button class="btn-dark px-8 py-2 text-lg" @click="onGoSpray">设置喷涂区域</button> |
|
|
|
</section> |
|
|
@ -90,11 +92,11 @@ |
|
|
|
<van-overlay v-if="showDialog" :show="true"> |
|
|
|
<div class="flex justify-center items-center h-full"> |
|
|
|
<Dialog |
|
|
|
title="已完成" |
|
|
|
desc="湿度已达到50%RH,氮气已置换完毕。" |
|
|
|
type="confirm" |
|
|
|
ok-text="去喷涂" |
|
|
|
cancel-text="关闭" |
|
|
|
:title="dialogContent.title" |
|
|
|
:desc="dialogContent.desc" |
|
|
|
:type="dialogContent.type" |
|
|
|
:ok-text="dialogContent.okText" |
|
|
|
:cancel-text="dialogContent.cancelText" |
|
|
|
@on-ok="onOk" |
|
|
|
@on-cancel="showDialog = false"></Dialog> |
|
|
|
</div> |
|
|
@ -102,13 +104,45 @@ |
|
|
|
</template> |
|
|
|
<script lang="ts" setup> |
|
|
|
import { ref } from "vue"; |
|
|
|
import Dialog from "@/components/Dialog.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"; |
|
|
|
const router = useRouter(); |
|
|
|
|
|
|
|
const dialogContent = ref<DialogParam>({ |
|
|
|
title: "已完成", |
|
|
|
desc: "湿度已达到50%RH,氮气已置换完毕。", |
|
|
|
type: "confirm", |
|
|
|
okText: "去喷涂", |
|
|
|
cancelText: "关闭", |
|
|
|
_brand: "humidity_complete", |
|
|
|
}); |
|
|
|
|
|
|
|
const showDialog = ref(false); |
|
|
|
const humidity = ref<number | undefined>(); |
|
|
|
|
|
|
|
function onStartDehumidify() { |
|
|
|
if (typeof humidity.value !== "number") { |
|
|
|
ElMessage.error("请输入要求湿度"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
function startDry() { |
|
|
|
startDehumidify({ humidity: humidity.value }).then(res => { |
|
|
|
if (res.success) { |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
dialogContent.value = { |
|
|
|
title: "已完成", |
|
|
|
desc: "湿度已达到50%RH,氮气已置换完毕。", |
|
|
|
type: "confirm", |
|
|
|
okText: "去喷涂", |
|
|
|
cancelText: "关闭", |
|
|
|
_brand: "humidity_complete", |
|
|
|
}; |
|
|
|
showDialog.value = true; |
|
|
|
} |
|
|
|
function onOk() { |
|
|
@ -116,7 +150,33 @@ function onOk() { |
|
|
|
router.push("/spray"); |
|
|
|
} |
|
|
|
function onGoSpray() { |
|
|
|
router.push("/spray"); |
|
|
|
dialogContent.value = { |
|
|
|
title: "提示", |
|
|
|
desc: "请确认 清洗、预充、除湿均已完成", |
|
|
|
type: "confirm", |
|
|
|
okText: "确认", |
|
|
|
cancelText: "取消", |
|
|
|
_brand: "goSpray", |
|
|
|
}; |
|
|
|
showDialog.value = true; |
|
|
|
} |
|
|
|
|
|
|
|
function onStartWash() { |
|
|
|
startWash({}).then(res => { |
|
|
|
if (res.success) { |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function onStartPrefill() { |
|
|
|
startPrefill({}).then(res => { |
|
|
|
if (res.success) { |
|
|
|
} else { |
|
|
|
ElMessage.error(res.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped></style> |