Browse Source

优化调试页面

master
LiLongLong 5 months ago
parent
commit
25f115d9c8
  1. 2
      src/views/History.vue
  2. 26
      src/views/debug/index.vue
  3. 16
      src/views/matrixCraft/index.vue

2
src/views/History.vue

@ -4,7 +4,7 @@
<el-button @click="onDel">删除</el-button>
</div>
<div class=" mt-[2rem] h-[70vh] history_table">
<el-table :data="tableData" stripe style="width: 100%" ref="historyTableRef" v-loading="loading">
<el-table empty-text="无数据" :data="tableData" stripe style="width: 100%" ref="historyTableRef" v-loading="loading">
<el-table-column type="selection" width="55" />
<el-table-column prop="matrixName" label="基质名称" />
<el-table-column prop="name" label="工艺名称"/>

26
src/views/debug/index.vue

@ -79,12 +79,14 @@
<el-col :span="6" class="text-right">
湿度
</el-col>
<el-col :span="6" class="ml-[20px]">
<el-col :span="12" class="ml-[20px]">
<input placeholder='湿度' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />
<div class="flex mt-[10px]">
<el-button type="primary">开始除湿</el-button>
<el-button type="primary">结束除湿</el-button>
</div>
</el-col>
<el-col :span="4">
<el-button type="primary">确定</el-button>
</el-col>
</el-row>
<el-divider />
@ -160,16 +162,16 @@
<div>
<div>气压阀</div>
<div>
<el-button type="primary" @click="onControlValve('Cleaning')">打开清洗阀</el-button>
<el-button @click="onStopWash()">关闭清洗阀</el-button>
<el-button type="primary" @click="onControlValve('Cleaning',true)">打开清洗阀</el-button>
<el-button @click="onControlValve('Cleaning',false)">关闭清洗阀</el-button>
</div>
<div class="mt-[10px]">
<el-button type="primary" @click="onControlValve('Nozzle')">打开喷嘴阀</el-button>
<el-button @click="onStopWork">关闭喷嘴阀</el-button>
<el-button type="primary" @click="onControlValve('Nozzle',true)">打开喷嘴阀</el-button>
<el-button @click="onControlValve('Nozzle',false)">关闭喷嘴阀</el-button>
</div>
<div class="mt-[10px]">
<el-button type="primary" @click="onControlValve('Dehumidification')">打开除湿阀</el-button>
<el-button @click="onStopDehumidify()">关闭除湿阀</el-button>
<el-button type="primary" @click="onControlValve('Dehumidification',true)">打开除湿阀</el-button>
<el-button @click="onControlValve('Dehumidification',false)">关闭除湿阀</el-button>
</div>
</div>
<el-divider />
@ -354,11 +356,11 @@ import {
})
}
const onControlValve = (type:ControlNitrogen) => {
const onControlValve = (type:ControlNitrogen,open:boolean) => {
const params = <ControlValueType>{
params:{
valveType:type,
isOpen:true
isOpen:open
}
}
controlValve(params).then((res:any) => {

16
src/views/matrixCraft/index.vue

@ -61,6 +61,7 @@
<el-select
v-model="defaultSprayData.matrixId"
placeholder="选择"
no-data-text="无数据"
style="width: 120px"
@change="onMatrixChange">
<el-option
@ -121,11 +122,20 @@
const defaultSprayData = ref<CraftItem>(defaultCraft);
watch(()=>settingStore.matrixList, (newVal)=>{
if(newVal && newVal.length){
defaultSprayData.value.matrixId = newVal[0].id
onMatrixChange(newVal[0].id)
}else{
onMatrixChange(null)
}
console.log('defaultSprayData---', defaultSprayData)
})
onMounted(()=>{
tableData.value = settingStore.matrixList;
let matrixList = settingStore.matrixList
tableData.value = matrixList;
if(matrixList && matrixList.length){
onMatrixChange(matrixList[0].id)
}else{
onMatrixChange(null)
}
getCraftList()
})
@ -242,7 +252,7 @@
}
function onMatrixChange(val: number) {
function onMatrixChange(val: any) {
defaultSprayData.value.matrixId = val
}

Loading…
Cancel
Save