pc-master #95

Merged
xiaomeng merged 2 commits from pc-master into portal 2024-01-19 01:22:13 +00:00
12 changed files with 387 additions and 189 deletions

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

View File

@ -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();
});

View File

@ -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

View File

@ -94,7 +94,7 @@
this.$router.push({ name: 'index' })
} else {
localStorage.removeItem('token')
this.$message.error("请求出错,请重试");
this.$message.error(res.data.msg);
}
});
},

View File

@ -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">

View File

@ -6,7 +6,7 @@
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span>1#外遮阳:目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21745)">
<el-dropdown @command="handleCommand3($event, 21745)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21745]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -19,7 +19,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand1($event,21744)">
<el-dropdown @command="handleCommand1($event, 21744)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21744]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -34,7 +34,7 @@
<div class="flex-view shrink-none">
<div class="input-sel input-sel-w180">
<span>2#外遮阳:目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21747)">
<el-dropdown @command="handleCommand3($event, 21747)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21747]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -47,7 +47,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand1($event,21746)">
<el-dropdown @command="handleCommand1($event, 21746)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21746]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -63,7 +63,7 @@
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span>1#内遮阳:目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21749)">
<el-dropdown @command="handleCommand3($event, 21749)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21749]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -76,7 +76,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand1($event,21748)">
<el-dropdown @command="handleCommand1($event, 21748)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21748]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -89,7 +89,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>目标湿度选择</span>
<el-dropdown @command="handleCommand4($event,21751)">
<el-dropdown @command="handleCommand4($event, 21751)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21751]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -102,7 +102,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境湿度选择</span>
<el-dropdown @command="handleCommand2($event,21750)">
<el-dropdown @command="handleCommand2($event, 21750)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21750]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -118,7 +118,7 @@
<div class="flex-view shrink-none">
<div class="input-sel input-sel-w180">
<span>2#内遮阳:目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21753)">
<el-dropdown @command="handleCommand3($event, 21753)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21753]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -131,7 +131,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand1($event,21752)">
<el-dropdown @command="handleCommand1($event, 21752)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21752]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -144,7 +144,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>目标湿度选择</span>
<el-dropdown @command="handleCommand4($event,21755)">
<el-dropdown @command="handleCommand4($event, 21755)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21755]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -157,7 +157,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境湿度选择</span>
<el-dropdown @command="handleCommand2($event,21754)">
<el-dropdown @command="handleCommand2($event, 21754)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21754]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -173,7 +173,7 @@
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span>1#通风窗: 目标温度选择</span>
<el-dropdown @command="handleCommand1($event,21757)">
<el-dropdown @command="handleCommand1($event, 21757)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21757]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -186,7 +186,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand3($event,21756)">
<el-dropdown @command="handleCommand3($event, 21756)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21756]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -199,7 +199,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>目标湿度选择</span>
<el-dropdown @command="handleCommand4($event,21759)">
<el-dropdown @command="handleCommand4($event, 21759)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21759]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -212,7 +212,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境湿度选择</span>
<el-dropdown @command="handleCommand2($event,21758)">
<el-dropdown @command="handleCommand2($event, 21758)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21758]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -228,7 +228,7 @@
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span>2#通风窗: 目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21761)">
<el-dropdown @command="handleCommand3($event, 21761)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21761]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -241,7 +241,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand1($event,21760)">
<el-dropdown @command="handleCommand1($event, 21760)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21760]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -254,7 +254,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>目标湿度选择</span>
<el-dropdown @command="handleCommand4($event,21763)">
<el-dropdown @command="handleCommand4($event, 21763)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21763]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -267,7 +267,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境湿度选择</span>
<el-dropdown @command="handleCommand2($event,21762)">
<el-dropdown @command="handleCommand2($event, 21762)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21762]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -283,7 +283,7 @@
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span>3#通风窗: 目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21765)">
<el-dropdown @command="handleCommand3($event, 21765)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21765]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -296,7 +296,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand1($event,21764)">
<el-dropdown @command="handleCommand1($event, 21764)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21764]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -309,7 +309,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>目标湿度选择</span>
<el-dropdown @command="handleCommand4($event,21767)">
<el-dropdown @command="handleCommand4($event, 21767)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21767]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -322,7 +322,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境湿度选择</span>
<el-dropdown @command="handleCommand2($event,21766)">
<el-dropdown @command="handleCommand2($event, 21766)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21766]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -338,7 +338,7 @@
<div class="flex-view shrink-none">
<div class="input-sel input-sel-w180">
<span>4#通风窗: 目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21769)">
<el-dropdown @command="handleCommand3($event, 21769)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21769]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -351,7 +351,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand1($event,21768)">
<el-dropdown @command="handleCommand1($event, 21768)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21768]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -364,7 +364,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>目标湿度选择</span>
<el-dropdown @command="handleCommand4($event,21771)">
<el-dropdown @command="handleCommand4($event, 21771)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21771]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -377,7 +377,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境湿度选择</span>
<el-dropdown @command="handleCommand2($event,21770)">
<el-dropdown @command="handleCommand2($event, 21770)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21770]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -393,7 +393,7 @@
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span>环流风机: 1#风扇室内湿度选择</span>
<el-dropdown @command="handleCommand2($event,21730)">
<el-dropdown @command="handleCommand2($event, 21730)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21730]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -406,7 +406,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>2#风扇室内湿度选择</span>
<el-dropdown @command="handleCommand2($event,21731)">
<el-dropdown @command="handleCommand2($event, 21731)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21731]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -421,7 +421,7 @@
<div class="flex-view shrink-none">
<div class="input-sel input-sel-w180">
<span>湿帘外翻窗1#湿帘窗温度选择</span>
<el-dropdown @command="handleCommand1($event,21742)">
<el-dropdown @command="handleCommand1($event, 21742)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21742]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -434,7 +434,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>2#湿帘窗温度选择</span>
<el-dropdown @command="handleCommand1($event,21743)">
<el-dropdown @command="handleCommand1($event, 21743)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21743]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -450,7 +450,7 @@
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span class="padding-none">1#高压微雾:目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21733)">
<el-dropdown @command="handleCommand3($event, 21733)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21733]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -463,7 +463,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand1($event,21732)">
<el-dropdown @command="handleCommand1($event, 21732)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21732]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -476,7 +476,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>目标湿度选择</span>
<el-dropdown @command="handleCommand4($event,21735)">
<el-dropdown @command="handleCommand4($event, 21735)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21735]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -489,7 +489,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境湿度选择</span>
<el-dropdown @command="handleCommand2($event,21734)">
<el-dropdown @command="handleCommand2($event, 21734)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21734]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -504,7 +504,7 @@
<div class="flex-view shrink-none">
<div class="input-sel input-sel-w180">
<span class="padding-none">2#高压微雾:目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21737)">
<el-dropdown @command="handleCommand3($event, 21737)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21737]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -517,7 +517,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand1($event,21736)">
<el-dropdown @command="handleCommand1($event, 21736)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21736]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -530,7 +530,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>目标湿度选择</span>
<el-dropdown @command="handleCommand4($event,21739)">
<el-dropdown @command="handleCommand4($event, 21739)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21739]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -543,7 +543,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境湿度选择</span>
<el-dropdown @command="handleCommand2($event,21738)">
<el-dropdown @command="handleCommand2($event, 21738)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21738]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -555,11 +555,11 @@
</el-dropdown>
</div>
</div>
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span>轴流风机: 目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21741)">
<el-dropdown @command="handleCommand3($event, 21741)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21741]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -572,7 +572,7 @@
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand1($event,21740)">
<el-dropdown @command="handleCommand1($event, 21740)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21740]" type="text" class="input-input" placeholder="无">
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
@ -584,50 +584,69 @@
</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(){
</template>
<script>
export default {
data() {
return {
sensorType:'',
warnModel: true,
modelPassword:'',
sensorType: '',
typeList1: [
{ label: '1#平均空气温度', value: 1 },
{ label: '2#平均空气温度', value: 2 },
{ label: '1#空气温度', value: 3 },
{ label: '2#空气温度', value: 4 },
{ label: '3#空气温度', value: 5 },
{ label: '4#空气温度', value: 6 },
{ label: '5#空气温度', value: 7 },
{ label: '6#空气温度', value: 8 },
{ label: '7#空气温度', value: 7 },
{ label: '8#空气温度', value: 8 },],
list1:[21732,21736,21740,21742,21743,21744,21746,21748,21752,21756,21760,21764,21768],
{ label: '1#平均空气温度', value: 1 },
{ label: '2#平均空气温度', value: 2 },
{ label: '1#空气温度', value: 3 },
{ label: '2#空气温度', value: 4 },
{ label: '3#空气温度', value: 5 },
{ label: '4#空气温度', value: 6 },
{ label: '5#空气温度', value: 7 },
{ label: '6#空气温度', value: 8 },
{ label: '7#空气温度', value: 7 },
{ label: '8#空气温度', value: 8 },],
list1: [21732, 21736, 21740, 21742, 21743, 21744, 21746, 21748, 21752, 21756, 21760, 21764, 21768],
typeList2: [
{ label: '1#平均空气湿度', value: 1 },
{ label: '2#平均空气湿度', value: 2 },
{ label: '1#空气湿度', value: 3 },
{ label: '2#空气湿度', value: 4 },
{ label: '3#空气湿度', value: 5 },
{ label: '4#空气湿度', value: 6 },
{ label: '5#空气湿度', value: 7 },
{ label: '6#空气湿度', value: 8 },
{ label: '7#空气湿度', value: 7 },
{ label: '8#空气湿度', value: 8 },],
list2:[21730,21731,21734,21738,21750,21754,21758,21762,21766,21770],
{ label: '1#平均空气湿度', value: 1 },
{ label: '2#平均空气湿度', value: 2 },
{ label: '1#空气湿度', value: 3 },
{ label: '2#空气湿度', value: 4 },
{ label: '3#空气湿度', value: 5 },
{ label: '4#空气湿度', value: 6 },
{ label: '5#空气湿度', value: 7 },
{ label: '6#空气湿度', value: 8 },
{ label: '7#空气湿度', value: 7 },
{ label: '8#空气湿度', value: 8 },],
list2: [21730, 21731, 21734, 21738, 21750, 21754, 21758, 21762, 21766, 21770],
typeList3: [
{ label: '目标温度1', value: 1 },
{ label: '目标温度2', value: 2 },],
list3:[21733,21737,21741,21745,21747,21749,21753,21757,21761,21765,21769],
{ label: '目标温度1', value: 1 },
{ label: '目标温度2', value: 2 },],
list3: [21733, 21737, 21741, 21745, 21747, 21749, 21753, 21757, 21761, 21765, 21769],
typeList4: [
{ label: '目标湿度1', value: 1 },
{ label: '目标湿度2', value: 2 },],
list4:[21735,21739,21751,21755,21759,21763,21767,21771],
inputData:[],
inputDataNew:[],
{ label: '目标湿度1', value: 1 },
{ label: '目标湿度2', value: 2 },],
list4: [21735, 21739, 21751, 21755, 21759, 21763, 21767, 21771],
inputData: [],
inputDataNew: [],
}
},
mounted(){
mounted() {
this.dataInit()
//input
let inputList = document.querySelectorAll('input');
@ -635,39 +654,49 @@
inputList[index].onfocus = this.selectValue;//input
}
},
methods:{
methods: {
modelClose(){
this.$router.go(-1); //
},
modelConfirm(){
if(this.modelPassword=='230509'){
this.warnModel=false
}else{
this.$message('密码错误');
}
},
getData1(data) {
var name=''
var name = ''
this.typeList1.forEach((el, index) => {
if (el.value == data) {
name=el.label
name = el.label
}
})
return name
},
getData2(data) {
var name=''
var name = ''
this.typeList2.forEach((el, index) => {
if (el.value == data) {
name=el.label
name = el.label
}
})
return name
},
getData3(data) {
var name=''
var name = ''
this.typeList3.forEach((el, index) => {
if (el.value == data) {
name=el.label
name = el.label
}
})
return name
},
getData4(data) {
var name=''
var name = ''
this.typeList4.forEach((el, index) => {
if (el.value == data) {
name=el.label
name = el.label
}
})
return name
@ -679,27 +708,27 @@
};
this.api.manufacturerparameter(data).then(res => {
if (res.data.code == 200) {
this.inputData =JSON.parse(JSON.stringify(res.data.data));
this.inputDataNew=JSON.parse(JSON.stringify(res.data.data))
this.list1.forEach((el,index)=>{
this.inputDataNew[el]=this.getData1(this.inputData[el])
this.inputData = JSON.parse(JSON.stringify(res.data.data));
this.inputDataNew = JSON.parse(JSON.stringify(res.data.data))
this.list1.forEach((el, index) => {
this.inputDataNew[el] = this.getData1(this.inputData[el])
})
this.list2.forEach((el,index)=>{
this.inputDataNew[el]=this.getData2(this.inputData[el])
this.list2.forEach((el, index) => {
this.inputDataNew[el] = this.getData2(this.inputData[el])
})
this.list3.forEach((el,index)=>{
this.inputDataNew[el]=this.getData3(this.inputData[el])
this.list3.forEach((el, index) => {
this.inputDataNew[el] = this.getData3(this.inputData[el])
})
this.list4.forEach((el,index)=>{
this.inputDataNew[el]=this.getData4(this.inputData[el])
this.list4.forEach((el, index) => {
this.inputDataNew[el] = this.getData4(this.inputData[el])
})
}
})
},
//
changeBtn(code, el) {
//
changeBtn(code, el) {
var store = this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
@ -708,8 +737,8 @@
};
this.delayTimerBtn(0, data);
},
//btn j*100
delayTimerBtn(i, data) {
//btn j*100
delayTimerBtn(i, data) {
const that = this;
//
let j = this.$store.state.lateSendBtn;
@ -724,8 +753,8 @@
}
}, 100);
},
//
handleCommand1(command,code) {
//
handleCommand1(command, code) {
this.typeList1.forEach((el, index) => {
if (el.value == command) {
this.inputDataNew[code] = el.label
@ -738,8 +767,8 @@
};
this.changeBtn(code, dataNum);
},
//
handleCommand2(command,code) {
//
handleCommand2(command, code) {
this.typeList2.forEach((el, index) => {
if (el.value == command) {
this.inputDataNew[code] = el.label
@ -752,8 +781,8 @@
};
this.changeBtn(code, dataNum);
},
//
handleCommand3(command,code) {
//
handleCommand3(command, code) {
this.typeList3.forEach((el, index) => {
if (el.value == command) {
this.inputDataNew[code] = el.label
@ -766,8 +795,8 @@
};
this.changeBtn(code, dataNum);
},
//
handleCommand4(command,code) {
//
handleCommand4(command, code) {
this.typeList4.forEach((el, index) => {
if (el.value == command) {
this.inputDataNew[code] = el.label
@ -798,10 +827,8 @@
});
},
},
}
</script>
<style lang="scss">
</style>
}
</script>
<style lang="scss"></style>

View File

@ -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>
@ -13,26 +39,26 @@
</vue-seamless>
</div>
<!-- <div class="control-list" >
<div v-for="(item, index) in controlList" :key="index">
<img :src="item.img" alt="">
{{ item.environmentDataId
}}:{{ getControlData(item) }}
</div>
</div> -->
<div v-for="(item, index) in controlList" :key="index">
<img :src="item.img" alt="">
{{ item.environmentDataId
}}:{{ getControlData(item) }}
</div>
</div> -->
<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> -->
}}</span> -->
{{ list[0].updateTime ? list[0].updateTime : '' }}
</div>
<div class="flex-view border-none warning-btn">
<div class="input-btn ">
<!-- <div class="btn blue">
<img src="../../assets/image/real-time-icon1.png" alt="" />3D动态水肥监控
</div> -->
<img src="../../assets/image/real-time-icon1.png" alt="" />3D动态水肥监控
</div> -->
<div class="btn green" @click="openWarn">
<img src="../../assets/image/real-time-icon2.png" alt="" />短信报警
</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">
@ -356,7 +384,7 @@
</el-table>
</div>
</div>
</div>
</el-dialog>
</div>
@ -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)
@ -808,9 +836,9 @@ export default {
// }else if(el1.countType==3){
// num=this.countType3(el.environmentData)+el1.unit
// }else{
if(el.equipmentStart==0){
num='故障'
}else{
if (el.equipmentStart == 0) {
num = '故障'
} else {
num = el.environmentData + el1.unit
}
// }
@ -907,10 +935,10 @@ export default {
// }else if(el1.countType==3){
// num=this.countType3(el.environmentData)+el1.unit
// }else{
if(el.equipmentStart==0){
num='故障'
}else{
if (el.equipmentStart == 0) {
num = '故障'
} else {
num = el.environmentData + el1.unit
}
// }
@ -951,10 +979,10 @@ export default {
list.forEach((el1, index1) => {
if (el.formula == el1.value) {
// console.log(el1);
var num=0
if(el.equipmentStart==0){
num='故障'
}else{
var num = 0
if (el.equipmentStart == 0) {
num = '故障'
} else {
num = el.environmentData + el1.unit
}
this.controlList.push({
@ -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
if(el.equipmentStart==0){
num='故障'
}else{
var num = 0
var name=''
if (el.equipmentStart == 0) {
num = '故障'
} else {
num = el.environmentData + el1.unit
}
this.list.push({
...el,
name: el.environmentDataId,

View File

@ -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 ' '
}

View File

@ -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>