Browse Source

优化调试页面

master
LiLongLong 5 months ago
parent
commit
9a334cc01a
  1. 39
      src/views/debug/index.vue

39
src/views/debug/index.vue

@ -163,8 +163,15 @@
<div class="debug_right">
<div>
<el-button type="primary">急停</el-button>
<el-button type="primary" @click="onTurnOnLightPanel">开启照明灯</el-button>
<el-button @click="onTurnOffLightPanel">关闭照明灯</el-button>
<div class="mt-[20px]">
<input
v-model="brightness"
placeholder="亮度"
type="number"
class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />
<el-button class="ml-[20px]" type="primary" @click="onTurnOnLightPanel">开启照明灯</el-button>
<el-button @click="onTurnOffLightPanel">关闭照明灯</el-button>
</div>
</div>
<el-divider />
<div>
@ -189,9 +196,11 @@
</div>
</div>
<el-divider />
<!-- <div class="mt-[10px]">
<el-button type="primary">关闭电压控制器</el-button>
</div> -->
<div class="mt-[10px]">
<el-button type="primary" @click="onStartWash('injector')">开始清洗注射器</el-button>
<el-button type="primary" @click="onStartWash('nozzle')">开始清洗喷涂部分</el-button>
<el-button @click="onStopWash">停止清洗</el-button>
</div>
<!-- <el-divider />
<div class="h-[13rem] bg-[#f4f4f4] p-[10px]">
<div>状态反馈区</div>
@ -347,6 +356,8 @@ import {
stopWash,
stopDehumidify,
setMotorSpeed,
type WashType,
startWash
} from "@/services/globalCmd/globalCmd";
const activeName = ref("debug");
const voltageValue = ref();
@ -437,6 +448,16 @@ const onStopDehumidify = () => {
});
};
function onStartWash(type: WashType) {
startWash({ type }).then(res => {
if (res.success) {
ElMessage.success("已经开始清洗");
} else {
ElMessage.error(res.msg);
}
});
}
const onStopWash = () => {
stopWash({}).then((res: any) => {
success(res);
@ -468,8 +489,8 @@ const onTurnOnSyringePump = () => {
const params = <SyringeType>{
params: {
rotationSpeed: syringeForm.value.rotationSpeed,
direction: syringeForm.value.direction,
time: syringeForm.value.time,
// direction: syringeForm.value.direction,
// time: syringeForm.value.time,
},
};
turnOnSyringePump(params).then((res: any) => {
@ -530,10 +551,12 @@ type resData = {
code: number;
msg: string;
};
let brightness = ref()
const onTurnOnLightPanel = () => {
const params = {
params: {
brightness: 40,
brightness: brightness.value
},
};
turnOnLightPanel(params).then((res: any) => {

Loading…
Cancel
Save