Browse Source

设置预充速度

master
zhangjiming 5 months ago
parent
commit
1ea7f1918c
  1. 2
      src/services/globalCmd/globalCmd.ts
  2. 15
      src/views/PreSpray.vue

2
src/services/globalCmd/globalCmd.ts

@ -91,7 +91,7 @@ export function startWash(params: { type: WashType }) {
export function stopWash(params: Record<string, any>) {
return httpRequest<BaseResponse>({ url: "/api/cmd/stopWash", params, method: "POST" });
}
export function startPrefill(params: Record<string, any>) {
export function startPrefill(params: { speed: number }) {
return httpRequest<BaseResponse>({ url: "/api/cmd/startPrefill", params, method: "POST" });
}
export function stopPrefill(params: Record<string, any>) {

15
src/views/PreSpray.vue

@ -34,7 +34,13 @@
<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 gap-6">
<p class="text-lg">预充管道</p>
<!-- <p class="text-lg">预充管道</p> -->
<p class="text-lg mr-4">
预充速度 <input
type="number"
v-model.number="prefillSpeed"
class="border-none outline-none h-[32px] w-[60px] mx-2 bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center" />ul/min
</p>
<button
:disabled="statusStore.workStatus !== 'idle'"
class="btn-dark px-8 py-2 text-lg"
@ -153,6 +159,7 @@ const dialogContent = ref<DialogParam>({
const showDialog = ref(false);
const humidity = ref<number | undefined>();
const prefillSpeed = ref<number | undefined>();
function onStartDehumidify() {
if (typeof humidity.value !== "number") {
@ -209,7 +216,11 @@ function onStopWash() {
}
function onStartPrefill() {
startPrefill({}).then(res => {
if (typeof prefillSpeed.value !== "number") {
ElMessage.error("请输入预充速度");
return;
}
startPrefill({ speed: prefillSpeed.value }).then(res => {
if (res.success) {
ElMessage.success("已经开始预充");
} else {

Loading…
Cancel
Save