Merge branch 'pc-master' of https://git.lihe-control.com/xiaomeng/wszhyWx into pc-master
commit
416dba2437
|
@ -160,6 +160,10 @@ export default {
|
|||
getControlGetState(data) {
|
||||
return sendGetRequest('/readControl/getState', data)
|
||||
},
|
||||
//控制器 气象站实时数据折线图
|
||||
getControlChartdata(data) {
|
||||
return sendPostRequest('/equip/chartdata?equipmentId='+data, '')
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div class="formula realTime">
|
||||
<div class="page-content new-data" :class="deviceName == 10 ? 'control-page' : ''">
|
||||
<div class="page-content new-data" :class="deviceName == 10||deviceName == 30 ? 'control-page' : ''">
|
||||
|
||||
<div class="control-view" v-if="deviceName == 10">
|
||||
<div class="control-view" v-if="deviceName == 10||deviceName == 30">
|
||||
<div class="title">气象站:</div>
|
||||
<vue-seamless class="control-list" :data="controlList" :class-option="defaultOption1">
|
||||
<div class="list-view" v-for="item, index in controlList " :key="index">
|
||||
|
@ -22,8 +22,6 @@
|
|||
<div class="table-title">
|
||||
<img src="../../assets/image/real-time.png" alt="" />
|
||||
实时数据
|
||||
<!-- <div class="tips">种植作物1</div> -->
|
||||
|
||||
</div>
|
||||
<div class="timeNow" v-if="list.length">
|
||||
<!-- {{ time.year.year }}-{{ time.year.month }}-{{ time.year.date }}<span> {{ time.time }}:{{ time.timeS
|
||||
|
@ -53,7 +51,7 @@
|
|||
|
||||
</div>
|
||||
<div class="flex-list realTime-bottom">
|
||||
<div class="left-view">
|
||||
<div class="left-view" v-if="deviceName!=30">
|
||||
<div ref="monitor" class="monitor" id="monitor">
|
||||
<!-- <video ref="videoPlayer" class="video-js" id="video-js"></video> -->
|
||||
<div ref="videoPlayer" class="video-js" id="video-js"></div>
|
||||
|
@ -606,6 +604,41 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
} else if (this.deviceName == 30) {
|
||||
this.api.getControlRtDatastation(formData).then(res => {
|
||||
this.controlList = []
|
||||
if (res.data.code == 200) {
|
||||
res.data.data.forEach((el, index) => {
|
||||
list.forEach((el1, index1) => {
|
||||
if (el.formula == el1.value) {
|
||||
// console.log(el1);
|
||||
var num = el.environmentData + el1.unit
|
||||
this.list.push({
|
||||
...el,
|
||||
name:el.environmentDataId,
|
||||
num: num,
|
||||
img: require(`../../assets/image/real-time-${el.formula}.png`)
|
||||
})
|
||||
this.controlList.push({
|
||||
...el,
|
||||
num: num,
|
||||
img: require(`../../assets/image/real-time-${el.formula}.png`)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
// console.log(this.controlList);
|
||||
})
|
||||
this.api.getControlChartdata(equipmentId).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
res.data.data.forEach((el, index) => {
|
||||
var chartsData = res.data.data
|
||||
realTimeLine('realTime-line', chartsData)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue