1
This commit is contained in:
parent
f4f2a8befe
commit
3768e57d72
File diff suppressed because one or more lines are too long
2
src/assets/css/main.min.css
vendored
2
src/assets/css/main.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
src/assets/image/left-img3.png
Normal file
BIN
src/assets/image/left-img3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -224,31 +224,44 @@ export function realTimeLine(id, data) {
|
|||||||
color: "#57617B",
|
color: "#57617B",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
extraCssText: 'z-index: 9999;', // 设置 z-index
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
icon: "circle",
|
icon: "circle",
|
||||||
itemWidth: 10,
|
itemWidth: 10,
|
||||||
itemHeight: 10,
|
itemHeight: 10,
|
||||||
|
type: 'scroll', // 启用翻页
|
||||||
data: list,
|
data: list,
|
||||||
right: "center",
|
right: "center",
|
||||||
|
top:10,
|
||||||
|
itemGap: 10,
|
||||||
|
width:'90%',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
},
|
},
|
||||||
|
pageTextStyle: {
|
||||||
|
color: '#fff', // 设置翻页文字颜色
|
||||||
|
},
|
||||||
|
pageIconColor: '#fff', // 设置翻页按钮颜色
|
||||||
},
|
},
|
||||||
dataZoom: [
|
dataZoom: [
|
||||||
{
|
{
|
||||||
show: true,
|
show: true,
|
||||||
realtime: true,
|
realtime: true,
|
||||||
start: 30,
|
start:0,
|
||||||
end: 70,
|
end: 100,
|
||||||
xAxisIndex: [0, 1]
|
xAxisIndex: [0, 1],
|
||||||
|
textStyle: {
|
||||||
|
color: '#fff'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'inside',
|
type: 'inside',
|
||||||
realtime: true,
|
realtime: true,
|
||||||
start: 30,
|
start: 0,
|
||||||
end: 70,
|
height:20,
|
||||||
|
end:100,
|
||||||
xAxisIndex: [0, 1],
|
xAxisIndex: [0, 1],
|
||||||
backgroundColor: 'rgba(11, 28, 42, 0.4)',
|
backgroundColor: 'rgba(11, 28, 42, 0.4)',
|
||||||
fillerColor: 'rgba(2, 148, 226, 1)',
|
fillerColor: 'rgba(2, 148, 226, 1)',
|
||||||
@ -259,7 +272,7 @@ export function realTimeLine(id, data) {
|
|||||||
],
|
],
|
||||||
grid: {
|
grid: {
|
||||||
left: "3%",
|
left: "3%",
|
||||||
right: "4%",
|
right: "10%",
|
||||||
bottom: "13%",
|
bottom: "13%",
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
@ -311,6 +324,7 @@ export function realTimeLine(id, data) {
|
|||||||
series: list,
|
series: list,
|
||||||
};
|
};
|
||||||
option && myChart.setOption(option);
|
option && myChart.setOption(option);
|
||||||
|
myChart.resize();
|
||||||
window.addEventListener("resize", function () {
|
window.addEventListener("resize", function () {
|
||||||
myChart.resize();
|
myChart.resize();
|
||||||
});
|
});
|
||||||
|
@ -81,7 +81,10 @@ export default {
|
|||||||
{ name: '首页', img: require('../assets/image/index-icon.png'), list: [], router: 'realTime', isRouter: true, },
|
{ 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: '温室', 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: '二号温室', 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',
|
routerNow: 'realTime',
|
||||||
deviceName: 1,
|
deviceName: 1,
|
||||||
routerIndex: 1,
|
routerIndex: 1,
|
||||||
@ -196,6 +199,7 @@ export default {
|
|||||||
});
|
});
|
||||||
this.leftList[1].list = []
|
this.leftList[1].list = []
|
||||||
this.leftList[2].list = []
|
this.leftList[2].list = []
|
||||||
|
this.leftList[3].list = []
|
||||||
this.$store.state.equipmentList.forEach((el, index) => {
|
this.$store.state.equipmentList.forEach((el, index) => {
|
||||||
//链接中的deviceId
|
//链接中的deviceId
|
||||||
if (this.deviceId && this.deviceId == el.deviceId) {
|
if (this.deviceId && this.deviceId == el.deviceId) {
|
||||||
@ -207,12 +211,18 @@ export default {
|
|||||||
this.leftList[index1].list.push(el)
|
this.leftList[index1].list.push(el)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else if (el.deviceName == 10) {
|
||||||
this.leftList.forEach((el1, index1) => {
|
this.leftList.forEach((el1, index1) => {
|
||||||
if (el1.name == '温室') {
|
if (el1.name == '温室') {
|
||||||
this.leftList[index1].list.push(el)
|
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) => {
|
this.leftList.forEach((el1, index1) => {
|
||||||
@ -222,6 +232,9 @@ export default {
|
|||||||
if (el1.name == '施肥机') {
|
if (el1.name == '施肥机') {
|
||||||
this.leftList[index1].list.sort(this.compare('equipmentStatu'))
|
this.leftList[index1].list.sort(this.compare('equipmentStatu'))
|
||||||
}
|
}
|
||||||
|
if (el1.name == '生态气象站') {
|
||||||
|
this.leftList[index1].list.sort(this.compare('equipmentStatu'))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.gerRouter()
|
this.gerRouter()
|
||||||
this.getByid()
|
this.getByid()
|
||||||
@ -273,7 +286,7 @@ export default {
|
|||||||
} else if (item.router == 'dataAnalysis' && this.$route.query.index != item.index) {
|
} else if (item.router == 'dataAnalysis' && this.$route.query.index != item.index) {
|
||||||
this.$router.push({ path: `/dataAnalysis?index=${item.index ? item.index : 1}` })
|
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` })
|
this.$router.push({ path: `/control` })
|
||||||
} else if (item.router == 'realTime') {
|
} else if (item.router == 'realTime') {
|
||||||
|
|
||||||
@ -307,10 +320,7 @@ export default {
|
|||||||
if (item.router) {
|
if (item.router) {
|
||||||
if (item.http) {
|
if (item.http) {
|
||||||
window.location.href = 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) {
|
} else if (item.router == 'formula' && this.$route.query.index != item.index) {
|
||||||
|
|
||||||
if (this.routerNow == 'realTime') {
|
if (this.routerNow == 'realTime') {
|
||||||
this.$store.state.equipmentIndex = item.index
|
this.$store.state.equipmentIndex = item.index
|
||||||
this.$router.push({ path: `/realTime?index=${item.index ? item.index : 1}&name=${item.deviceName}` })
|
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.$store.state.equipmentIndex = item.index
|
||||||
this.routerIndex = 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){
|
if(this.routerNow!='skylight'&&this.leftList[1].routerList.indexOf(this.$route.name)!=-1){
|
||||||
return
|
return
|
||||||
|
@ -94,7 +94,7 @@
|
|||||||
this.$router.push({ name: 'index' })
|
this.$router.push({ name: 'index' })
|
||||||
} else {
|
} else {
|
||||||
localStorage.removeItem('token')
|
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="flex-view border-none shrink-none padding-none">
|
||||||
<div class="input-main-80">
|
<div class="input-main-80">
|
||||||
<span>高压微雾1-2组输出通道:</span>
|
<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)"
|
<input @blur="blurChange(20720, $event)" v-model="inputData[20720]" @input="change(20720, $event)"
|
||||||
type="text" placeholder="0">
|
type="text" placeholder="0">
|
||||||
|
<input @blur="blurChange(20721, $event)" v-model="inputData[20721]" @input="change(20721, $event)"
|
||||||
|
type="text" placeholder="0">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-view border-none shrink-none padding-none">
|
<div class="flex-view border-none shrink-none padding-none">
|
||||||
|
@ -584,12 +584,31 @@
|
|||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
warnModel: true,
|
||||||
|
modelPassword:'',
|
||||||
sensorType: '',
|
sensorType: '',
|
||||||
typeList1: [
|
typeList1: [
|
||||||
{ label: '1#平均空气温度', value: 1 },
|
{ label: '1#平均空气温度', value: 1 },
|
||||||
@ -636,6 +655,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
modelClose(){
|
||||||
|
this.$router.go(-1); // 返回前一页
|
||||||
|
},
|
||||||
|
modelConfirm(){
|
||||||
|
if(this.modelPassword=='230509'){
|
||||||
|
this.warnModel=false
|
||||||
|
}else{
|
||||||
|
this.$message('密码错误');
|
||||||
|
}
|
||||||
|
},
|
||||||
getData1(data) {
|
getData1(data) {
|
||||||
var name = ''
|
var name = ''
|
||||||
this.typeList1.forEach((el, index) => {
|
this.typeList1.forEach((el, index) => {
|
||||||
@ -801,7 +830,5 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss"></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,6 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="formula realTime">
|
<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="control-view" v-if="deviceName == 10 || deviceName == 30">
|
||||||
<div class="title">气象站:</div>
|
<div class="title">气象站:</div>
|
||||||
@ -44,7 +70,7 @@
|
|||||||
<img :src="item.img" alt="">
|
<img :src="item.img" alt="">
|
||||||
<div>
|
<div>
|
||||||
<div class="text">{{ item.name }}</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>
|
||||||
</div>
|
</div>
|
||||||
</vue-seamless>
|
</vue-seamless>
|
||||||
@ -60,6 +86,7 @@
|
|||||||
<div class="right" id="realTime-line"></div>
|
<div class="right" id="realTime-line"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 控制器 -->
|
||||||
<div class="page-content" v-if="deviceName == 10">
|
<div class="page-content" v-if="deviceName == 10">
|
||||||
<div class="table-title">
|
<div class="table-title">
|
||||||
<img src="../../assets/image/status.png" alt="" />
|
<img src="../../assets/image/status.png" alt="" />
|
||||||
@ -247,6 +274,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog title="请选择要显示的设备" :append-to-body="true" :visible.sync="addModel" width="70%">
|
<el-dialog title="请选择要显示的设备" :append-to-body="true" :visible.sync="addModel" width="70%">
|
||||||
<div class="model-title">请选择要显示的设备</div>
|
<div class="model-title">请选择要显示的设备</div>
|
||||||
<div class="model-sel scroll">
|
<div class="model-sel scroll">
|
||||||
@ -474,7 +502,7 @@ export default {
|
|||||||
this.deviceName = store.equipmentList[this.indexs - 1].deviceName
|
this.deviceName = store.equipmentList[this.indexs - 1].deviceName
|
||||||
this.deviceState = store.equipmentList[this.indexs - 1].deviceState
|
this.deviceState = store.equipmentList[this.indexs - 1].deviceState
|
||||||
// this.getTime()
|
// this.getTime()
|
||||||
|
console.log(store.equipmentList[this.indexs - 1].deviceName,this.indexs - 1,77);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
that.dataInit();
|
that.dataInit();
|
||||||
that.timer && clearInterval(that.timer)
|
that.timer && clearInterval(that.timer)
|
||||||
@ -1010,17 +1038,20 @@ export default {
|
|||||||
} else if (this.deviceName == 30) {
|
} else if (this.deviceName == 30) {
|
||||||
this.api.getControlRtDatastation(formData).then(res => {
|
this.api.getControlRtDatastation(formData).then(res => {
|
||||||
this.controlList = []
|
this.controlList = []
|
||||||
|
this.list=[]
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
res.data.data.forEach((el, index) => {
|
res.data.data.forEach((el, index) => {
|
||||||
list.forEach((el1, index1) => {
|
list.forEach((el1, index1) => {
|
||||||
if (el.formula == el1.value) {
|
if (el.formula == el1.value) {
|
||||||
// console.log(el1);
|
// console.log(el1);
|
||||||
var num = 0
|
var num = 0
|
||||||
|
var name=''
|
||||||
if (el.equipmentStart == 0) {
|
if (el.equipmentStart == 0) {
|
||||||
num = '故障'
|
num = '故障'
|
||||||
} else {
|
} else {
|
||||||
num = el.environmentData + el1.unit
|
num = el.environmentData + el1.unit
|
||||||
}
|
}
|
||||||
|
|
||||||
this.list.push({
|
this.list.push({
|
||||||
...el,
|
...el,
|
||||||
name: el.environmentDataId,
|
name: el.environmentDataId,
|
||||||
|
@ -257,8 +257,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex-view shrink-none border-none">
|
<div class="flex-view shrink-none border-none">
|
||||||
<div class="input-main-80">
|
<div class="input-main-80">
|
||||||
<span>降温需求到达2</span>
|
<span>降温需求到达</span>
|
||||||
<input @blur="blurChange(21972, $event)" v-model="inputData[21972]" @input="change(21972, $event)"
|
<input @blur="blurChange(21973, $event)" v-model="inputData[21973]" @input="change(21973, $event)"
|
||||||
type="text" placeholder="0">
|
type="text" placeholder="0">
|
||||||
<span>级时,湿帘泵2启动。</span>
|
<span>级时,湿帘泵2启动。</span>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user