Commit 21e9cea5 authored by mahui's avatar mahui

init

parent 2c127487
...@@ -36,4 +36,8 @@ export default { ...@@ -36,4 +36,8 @@ export default {
typeData(params) { typeData(params) {
return http.post('web/type/typeData', params) return http.post('web/type/typeData', params)
}, },
//获取各值实时数据
getDeviceData(params) {
return http.post('web/data/getDeviceData', params)
}
} }
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
<div class="table-body"> <div class="table-body">
<div class="row" v-for="(item,index) in typeList.slice(0,4)" :key="index"> <div class="row" v-for="(item,index) in typeList.slice(0,4)" :key="index">
<div class="cell"> <div class="cell">
<span class="value">{{item.name}}</span> <span class="value">{{item.typeName}}</span>
</div> </div>
<div class="cell">{{item.value}} {{item.unit}}</div> <div class="cell">{{item.value}} {{item.unit}}</div>
</div> </div>
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
<div class="table-body"> <div class="table-body">
<div class="row" v-for="(item,index) in typeList.slice(4)" :key="index"> <div class="row" v-for="(item,index) in typeList.slice(4)" :key="index">
<div class="cell flex_2"> <div class="cell flex_2">
<span class="value">{{item.name}}</span> <span class="value">{{item.typeName}}</span>
</div> </div>
<div class="cell flex_3">{{item.value}} {{item.unit}}</div> <div class="cell flex_3">{{item.value}} {{item.unit}}</div>
</div> </div>
...@@ -334,80 +334,81 @@ ...@@ -334,80 +334,81 @@
time_order:['',''] time_order:['','']
}, },
type:[], type:[],
typeList:[ // typeList:[
{ // {
name:'液位', // name:'液位',
prop:'液位', // prop:'液位',
value:0, // value:0,
unit:'m', // unit:'m',
color:'#09a8ae', // color:'#09a8ae',
CreatedAt:'', // CreatedAt:'',
show:false // show:false
}, // },
{ // {
name:'调解池流量', // name:'调解池流量',
prop:'调解池流量', // prop:'调解池流量',
value:0, // value:0,
unit:'m3/h', // unit:'m3/h',
color:'#ff6b6b', // color:'#ff6b6b',
CreatedAt:'', // CreatedAt:'',
show:false // show:false
}, // },
{ // {
name:'出水池流量', // name:'出水池流量',
prop:'出水池流量', // prop:'出水池流量',
value:0, // value:0,
unit:'m3/h', // unit:'m3/h',
color:'#946fd0', // color:'#946fd0',
CreatedAt:'', // CreatedAt:'',
show:false // show:false
}, // },
{ // {
name:'厌氧池PH值', // name:'厌氧池PH值',
prop:'厌氧池PH值', // prop:'厌氧池PH值',
value:0, // value:0,
unit:'', // unit:'',
color:'#3396fb', // color:'#3396fb',
CreatedAt:'', // CreatedAt:'',
show:false // show:false
}, // },
{ // {
name:'好氧池PH值', // name:'好氧池PH值',
prop:'好氧池PH值', // prop:'好氧池PH值',
value:0, // value:0,
unit:'', // unit:'',
color:'#28ae09', // color:'#28ae09',
CreatedAt:'', // CreatedAt:'',
show:false // show:false
}, // },
{ // {
name:'出水池PH值', // name:'出水池PH值',
prop:'出水池PH值', // prop:'出水池PH值',
value:0, // value:0,
unit:'', // unit:'',
color:'#ffc019', // color:'#ffc019',
CreatedAt:'', // CreatedAt:'',
show:false // show:false
}, // },
{ // {
name:'好氧池DO值', // name:'好氧池DO值',
prop:'好氧池DO值', // prop:'好氧池DO值',
value:0, // value:0,
unit:'mg/l', // unit:'mg/l',
color:'#f8893f', // color:'#f8893f',
CreatedAt:'', // CreatedAt:'',
show:false // show:false
}, // },
{ // {
name:'MBR池DO值', // name:'MBR池DO值',
prop:'MBR池DO值', // prop:'MBR池DO值',
value:0, // value:0,
unit:'mg/l', // unit:'mg/l',
color:'#eb509d', // color:'#eb509d',
CreatedAt:'', // CreatedAt:'',
show:false // show:false
} // }
], // ],
typeList:[],
typeList_order:[ typeList_order:[
{ {
name:'全部类型', name:'全部类型',
...@@ -480,7 +481,7 @@ ...@@ -480,7 +481,7 @@
getHistoryDataList(); getHistoryDataList();
} }
if(item.value=='process'){ if(item.value=='process'){
getYewei(); getDeviceData();
} }
if(item.value=='order'){ if(item.value=='order'){
getOrderList(); getOrderList();
...@@ -506,6 +507,15 @@ ...@@ -506,6 +507,15 @@
} }
}); });
} }
function getDeviceData() {
api.getDeviceData({toilet_id:props.site_id}).then((res)=>{
if(res.code==0){
if(res.data){
state.typeList = res.data;
}
}
});
}
function initGauge(){ function initGauge(){
nextTick(()=>{ nextTick(()=>{
setTimeout(()=>{ setTimeout(()=>{
......
...@@ -122,6 +122,9 @@ ...@@ -122,6 +122,9 @@
<el-form-item label="液位设备编号:"> <el-form-item label="液位设备编号:">
<el-input v-model="formData.yewei_device" clearable placeholder="请输入"/> <el-input v-model="formData.yewei_device" clearable placeholder="请输入"/>
</el-form-item> </el-form-item>
<el-form-item label="净化设备编号:">
<el-input v-model="formData.jinghua_device_id" clearable placeholder="请输入"/>
</el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
...@@ -169,6 +172,7 @@ ...@@ -169,6 +172,7 @@
name: '', name: '',
showImage: '', showImage: '',
type: '', type: '',
jinghua_device_id: ''//净化设备编号
}) })
const rules = ref({ const rules = ref({
name: [ name: [
...@@ -370,6 +374,7 @@ ...@@ -370,6 +374,7 @@
name: '', name: '',
showImage: '', showImage: '',
type: '', type: '',
jinghua_device_id: ''//净化设备编号
} }
} }
// 弹窗确定 // 弹窗确定
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment