commit
a375f26b88
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -224,31 +224,44 @@ export function realTimeLine(id, data) {
|
|||
color: "#57617B",
|
||||
},
|
||||
},
|
||||
extraCssText: 'z-index: 9999;', // 设置 z-index
|
||||
},
|
||||
legend: {
|
||||
icon: "circle",
|
||||
itemWidth: 10,
|
||||
itemHeight: 10,
|
||||
type: 'scroll', // 启用翻页
|
||||
data: list,
|
||||
right: "center",
|
||||
top:10,
|
||||
itemGap: 10,
|
||||
width:'90%',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: "#fff",
|
||||
},
|
||||
pageTextStyle: {
|
||||
color: '#fff', // 设置翻页文字颜色
|
||||
},
|
||||
pageIconColor: '#fff', // 设置翻页按钮颜色
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
show: true,
|
||||
realtime: true,
|
||||
start: 30,
|
||||
end: 70,
|
||||
xAxisIndex: [0, 1]
|
||||
start:0,
|
||||
end: 100,
|
||||
xAxisIndex: [0, 1],
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'inside',
|
||||
realtime: true,
|
||||
start: 30,
|
||||
end: 70,
|
||||
start: 0,
|
||||
height:20,
|
||||
end:100,
|
||||
xAxisIndex: [0, 1],
|
||||
backgroundColor: 'rgba(11, 28, 42, 0.4)',
|
||||
fillerColor: 'rgba(2, 148, 226, 1)',
|
||||
|
@ -259,7 +272,7 @@ export function realTimeLine(id, data) {
|
|||
],
|
||||
grid: {
|
||||
left: "3%",
|
||||
right: "4%",
|
||||
right: "10%",
|
||||
bottom: "13%",
|
||||
containLabel: true,
|
||||
},
|
||||
|
@ -311,6 +324,7 @@ export function realTimeLine(id, data) {
|
|||
series: list,
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
myChart.resize();
|
||||
window.addEventListener("resize", function () {
|
||||
myChart.resize();
|
||||
});
|
||||
|
|
|
@ -81,7 +81,10 @@ export default {
|
|||
{ name: '首页', img: require('../assets/image/index-icon.png'), list: [], router: 'realTime', isRouter: true, },
|
||||
{ name: '温室', routerList: ['realTime','exitSettings', 'skylight', 'control','systemSet-con', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con','alarmSettings', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval', "targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet"], img: require('../assets/image/left-img0.png'), list: [] },
|
||||
// { name: '二号温室', img: require('../assets/image/left-img1.png'), list: [] },
|
||||
{ name: '施肥机', routerList: ['formula', 'irrigateSet', 'PIDSet', 'systemSet', 'upload', 'sensorSet', 'realTime', 'history', 'dataAnalysis'], img: require('../assets/image/left-img2.png'), list: [] },],
|
||||
{ name: '施肥机', routerList: ['formula', 'irrigateSet', 'PIDSet', 'systemSet', 'upload', 'sensorSet', 'realTime', 'history', 'dataAnalysis'], img: require('../assets/image/left-img2.png'), list: [] },
|
||||
{ name: '生态气象站', routerList: ['realTime','exitSettings', 'skylight', 'control','systemSet-con', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con','alarmSettings', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval', "targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet"], img: require('../assets/image/left-img3.png'), list: [] },
|
||||
],
|
||||
|
||||
routerNow: 'realTime',
|
||||
deviceName: 1,
|
||||
routerIndex: 1,
|
||||
|
@ -196,6 +199,7 @@ export default {
|
|||
});
|
||||
this.leftList[1].list = []
|
||||
this.leftList[2].list = []
|
||||
this.leftList[3].list = []
|
||||
this.$store.state.equipmentList.forEach((el, index) => {
|
||||
//链接中的deviceId
|
||||
if (this.deviceId && this.deviceId == el.deviceId) {
|
||||
|
@ -207,12 +211,18 @@ export default {
|
|||
this.leftList[index1].list.push(el)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
} else if (el.deviceName == 10) {
|
||||
this.leftList.forEach((el1, index1) => {
|
||||
if (el1.name == '温室') {
|
||||
this.leftList[index1].list.push(el)
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.leftList.forEach((el1, index1) => {
|
||||
if (el1.name == '生态气象站') {
|
||||
this.leftList[index1].list.push(el)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.leftList.forEach((el1, index1) => {
|
||||
|
@ -222,6 +232,9 @@ export default {
|
|||
if (el1.name == '施肥机') {
|
||||
this.leftList[index1].list.sort(this.compare('equipmentStatu'))
|
||||
}
|
||||
if (el1.name == '生态气象站') {
|
||||
this.leftList[index1].list.sort(this.compare('equipmentStatu'))
|
||||
}
|
||||
})
|
||||
this.gerRouter()
|
||||
this.getByid()
|
||||
|
@ -273,7 +286,7 @@ export default {
|
|||
} else if (item.router == 'dataAnalysis' && this.$route.query.index != item.index) {
|
||||
this.$router.push({ path: `/dataAnalysis?index=${item.index ? item.index : 1}` })
|
||||
|
||||
} else if (this.routerNow == 'realTime' && item.router == 'status' && this.deviceName == '10') {
|
||||
} else if (this.routerNow == 'realTime' && item.router == 'status' && (this.deviceName == '10'||this.deviceName == '30')) {
|
||||
this.$router.push({ path: `/control` })
|
||||
} else if (item.router == 'realTime') {
|
||||
|
||||
|
@ -307,10 +320,7 @@ export default {
|
|||
if (item.router) {
|
||||
if (item.http) {
|
||||
window.location.href = item.http;
|
||||
} else if (item.deviceState==0) {
|
||||
this.$message('当前设备为离线状态');
|
||||
} else if (item.router == 'formula' && this.$route.query.index != item.index) {
|
||||
|
||||
if (this.routerNow == 'realTime') {
|
||||
this.$store.state.equipmentIndex = item.index
|
||||
this.$router.push({ path: `/realTime?index=${item.index ? item.index : 1}&name=${item.deviceName}` })
|
||||
|
@ -318,7 +328,7 @@ export default {
|
|||
|
||||
this.$store.state.equipmentIndex = item.index
|
||||
this.routerIndex = item.index
|
||||
if (item.deviceName == 10) {
|
||||
if (item.deviceName == 10||item.deviceName == 30) {
|
||||
// 限制页面随意跳转
|
||||
if(this.routerNow!='skylight'&&this.leftList[1].routerList.indexOf(this.$route.name)!=-1){
|
||||
return
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
this.$router.push({ name: 'index' })
|
||||
} else {
|
||||
localStorage.removeItem('token')
|
||||
this.$message.error("请求出错,请重试");
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -176,10 +176,10 @@
|
|||
<div class="flex-view border-none shrink-none padding-none">
|
||||
<div class="input-main-80">
|
||||
<span>高压微雾1-2组输出通道:</span>
|
||||
<input @blur="blurChange(20721, $event)" v-model="inputData[20721]" @input="change(20721, $event)"
|
||||
type="text" placeholder="0">
|
||||
<input @blur="blurChange(20720, $event)" v-model="inputData[20720]" @input="change(20720, $event)"
|
||||
type="text" placeholder="0">
|
||||
<input @blur="blurChange(20721, $event)" v-model="inputData[20721]" @input="change(20721, $event)"
|
||||
type="text" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none shrink-none padding-none">
|
||||
|
|
|
@ -584,12 +584,31 @@
|
|||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog title="请输入密码" class="vrcode-model confirm-psw" top="30vh" :append-to-body="true" :visible.sync="warnModel"
|
||||
width="700px">
|
||||
<div class="vrcode-model-title vrcode-model-title-282">请输入密码</div>
|
||||
<div class="warning-model" style="padding: 0 30px;">
|
||||
<div class="flex-view border-none">
|
||||
<div class="input-main">
|
||||
<div>密码:</div>
|
||||
<input type="text" v-model="modelPassword">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="modelClose">取 消</el-button>
|
||||
<el-button type="success" @click="modelConfirm">确 认</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
warnModel: true,
|
||||
modelPassword:'',
|
||||
sensorType: '',
|
||||
typeList1: [
|
||||
{ label: '1#平均空气温度', value: 1 },
|
||||
|
@ -636,6 +655,16 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
modelClose(){
|
||||
this.$router.go(-1); // 返回前一页
|
||||
},
|
||||
modelConfirm(){
|
||||
if(this.modelPassword=='230509'){
|
||||
this.warnModel=false
|
||||
}else{
|
||||
this.$message('密码错误');
|
||||
}
|
||||
},
|
||||
getData1(data) {
|
||||
var name = ''
|
||||
this.typeList1.forEach((el, index) => {
|
||||
|
@ -801,7 +830,5 @@
|
|||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
<style lang="scss"></style>
|
||||
|
|
@ -1,6 +1,32 @@
|
|||
<template>
|
||||
<div class="formula realTime">
|
||||
<div class="page-content new-data" :class="deviceName == 10 || deviceName == 30 ? 'control-page' : ''">
|
||||
<!-- 生态气象站 -->
|
||||
<div class="page-content new-data" v-if="deviceName == 30" :class="deviceName == 10 || deviceName == 30 ? 'control-page' : ''">
|
||||
|
||||
<div class="table-title">
|
||||
<img src="../../assets/image/real-time.png" alt="" />
|
||||
生态气象站<span class="outline" v-if="deviceState == 0">(设备离线)</span>
|
||||
</div>
|
||||
<div class="timeNow" v-if="list.length">
|
||||
<!-- {{ time.year.year }}-{{ time.year.month }}-{{ time.year.date }}<span> {{ time.time }}:{{ time.timeS
|
||||
}}</span> -->
|
||||
{{ list[0].updateTime ? list[0].updateTime : '' }}
|
||||
</div>
|
||||
<div class="flex-list realTime-bottom" :class="deviceName==30?'weather':''">
|
||||
<div class="left-view-new">
|
||||
<div class="list-view" v-for="item, index in list " :key="index">
|
||||
<img :src="item.img" alt="">
|
||||
<div>
|
||||
<div class="text">{{ item.name }}</div>
|
||||
<div class="number" :class="item.num == '故障' ? 'red' : ''"> {{ getControlData(item) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right" id="realTime-line"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 控制器/施肥机 -->
|
||||
<div class="page-content new-data" v-else :class="deviceName == 10 || deviceName == 30 ? 'control-page' : ''">
|
||||
|
||||
<div class="control-view" v-if="deviceName == 10 || deviceName == 30">
|
||||
<div class="title">气象站:</div>
|
||||
|
@ -44,7 +70,7 @@
|
|||
<img :src="item.img" alt="">
|
||||
<div>
|
||||
<div class="text">{{ item.name }}</div>
|
||||
<div class="number" :class="item.num=='故障'?'red':''">{{ item.num }}</div>
|
||||
<div class="number" :class="item.num == '故障' ? 'red' : ''"> {{ getControlData(item) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</vue-seamless>
|
||||
|
@ -60,6 +86,7 @@
|
|||
<div class="right" id="realTime-line"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 控制器 -->
|
||||
<div class="page-content" v-if="deviceName == 10">
|
||||
<div class="table-title">
|
||||
<img src="../../assets/image/status.png" alt="" />
|
||||
|
@ -247,6 +274,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog title="请选择要显示的设备" :append-to-body="true" :visible.sync="addModel" width="70%">
|
||||
<div class="model-title">请选择要显示的设备</div>
|
||||
<div class="model-sel scroll">
|
||||
|
@ -474,7 +502,7 @@ export default {
|
|||
this.deviceName = store.equipmentList[this.indexs - 1].deviceName
|
||||
this.deviceState = store.equipmentList[this.indexs - 1].deviceState
|
||||
// this.getTime()
|
||||
|
||||
console.log(store.equipmentList[this.indexs - 1].deviceName,this.indexs - 1,77);
|
||||
setTimeout(() => {
|
||||
that.dataInit();
|
||||
that.timer && clearInterval(that.timer)
|
||||
|
@ -1010,17 +1038,20 @@ export default {
|
|||
} else if (this.deviceName == 30) {
|
||||
this.api.getControlRtDatastation(formData).then(res => {
|
||||
this.controlList = []
|
||||
this.list=[]
|
||||
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 = 0
|
||||
var name=''
|
||||
if (el.equipmentStart == 0) {
|
||||
num = '故障'
|
||||
} else {
|
||||
num = el.environmentData + el1.unit
|
||||
}
|
||||
|
||||
this.list.push({
|
||||
...el,
|
||||
name: el.environmentDataId,
|
||||
|
|
|
@ -151,11 +151,11 @@ export default {
|
|||
},
|
||||
getType(index) {
|
||||
if (index == 0) {
|
||||
return '施肥机正常'
|
||||
return '控制器正常'
|
||||
} else if (index == 1) {
|
||||
return '施肥机待锁机'
|
||||
return '控制器待锁机'
|
||||
} else if (index == 2) {
|
||||
return '施肥机已锁机'
|
||||
return '控制器已锁机'
|
||||
} else {
|
||||
return ' '
|
||||
}
|
||||
|
|
|
@ -257,8 +257,8 @@
|
|||
</div>
|
||||
<div class="flex-view shrink-none border-none">
|
||||
<div class="input-main-80">
|
||||
<span>降温需求到达2</span>
|
||||
<input @blur="blurChange(21972, $event)" v-model="inputData[21972]" @input="change(21972, $event)"
|
||||
<span>降温需求到达</span>
|
||||
<input @blur="blurChange(21973, $event)" v-model="inputData[21973]" @input="change(21973, $event)"
|
||||
type="text" placeholder="0">
|
||||
<span>级时,湿帘泵2启动。</span>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue