Commit f38d4d25 authored by Kimber's avatar Kimber

'up'

parent ef3ef72b
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
background-image:linear-gradient(to bottom, rgba(20, 72, 247, .4), transparent); background-image:linear-gradient(to bottom, rgba(20, 72, 247, .4), transparent);
} }
.selects select{ .selects select{
position:relative;z-index:2; position:relative;z-index:2;max-width:150px;
background-color:transparent;color:#92f9ff; background-color:transparent;color:#92f9ff;
border-color:transparent;outline:none; border-color:transparent;outline:none;
option{ option{
...@@ -215,8 +215,6 @@ ...@@ -215,8 +215,6 @@
} }
} }
} }
</style> </style>
</head> </head>
...@@ -298,6 +296,7 @@ ...@@ -298,6 +296,7 @@
<!-- 物联网主机 --> <!-- 物联网主机 -->
<div style="transform-origin:left center;left:0;" class="absolute" :style="{transform:'scale(' + ( heightScale) + ')'}"> <div style="transform-origin:left center;left:0;" class="absolute" :style="{transform:'scale(' + ( heightScale) + ')'}">
<!-- 设备状态 -->
<div style="width: 514px;"> <div style="width: 514px;">
<div class="ml10 flex align-center f20 color-theme wp100" <div class="ml10 flex align-center f20 color-theme wp100"
style="background-image: url('static/sub-title.png');background-size: 100% 100%;height: 48px;"> style="background-image: url('static/sub-title.png');background-size: 100% 100%;height: 48px;">
...@@ -306,13 +305,9 @@ ...@@ -306,13 +305,9 @@
<div class="relative" style="height: 220px;width: 480px;"> <div class="relative" style="height: 220px;width: 480px;">
<div class="md1-wrap absolute"> <div class="md1-wrap absolute">
<ul> <ul>
<li> <li v-for="item in devicelist">
<div class="icon"><font>156</font></div> <div class="icon"><font>{{item.num}}</font></div>
<span>设备在线</span> <span>{{item.name}}</span>
</li>
<li>
<div class="icon"><font>156</font></div>
<span>设备离线</span>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -965,6 +960,10 @@ ...@@ -965,6 +960,10 @@
mineNumber3: 0, mineNumber3: 0,
mineNumber4: 0, mineNumber4: 0,
mineNumber5: 0, mineNumber5: 0,
// 设备状态
devicelist:[],
// 公告信息 // 公告信息
notice: { notice: {
title: '', title: '',
...@@ -1098,6 +1097,7 @@ ...@@ -1098,6 +1097,7 @@
// 区域选择列表 // 区域选择列表
var mselect = document.getElementById("mselect"); var mselect = document.getElementById("mselect");
var selects = mselect.children; var selects = mselect.children;
// 请求三级联动 // 请求三级联动
this.reqSelectArea(selects); this.reqSelectArea(selects);
}, },
...@@ -1119,10 +1119,11 @@ ...@@ -1119,10 +1119,11 @@
select.onchange = function(e){ select.onchange = function(e){
var tag = e.target || e.srcElement; var tag = e.target || e.srcElement;
var value = tag.selectedOptions[0].value; var value = tag.selectedOptions[0].value;
if(i<3){ if(i<3){
reqiust(value, i); reqiust(value, i);
}else{ }else{
that.reqEnterprise(value, select[i]); that.reqEnterprise(value, selects[i]);
}; };
}; };
...@@ -1135,7 +1136,6 @@ ...@@ -1135,7 +1136,6 @@
})(0, i); })(0, i);
}, },
reqEnterprise(value, select){ reqEnterprise(value, select){
if(true){
var req = { var req = {
params: { params: {
deptId:(this.deptId = value || 0) deptId:(this.deptId = value || 0)
...@@ -1144,25 +1144,35 @@ ...@@ -1144,25 +1144,35 @@
axios.get(host + '/api/yingji/deptandenterprise/enterprise', req).then(res => { axios.get(host + '/api/yingji/deptandenterprise/enterprise', req).then(res => {
res = res.data; res = res.data;
var list = res.body || []; var list = res.body || [];
console.log('body ________________ ', list, select);
this[select.id] = list; this[select.id] = list;
this.isReady = true; this.isReady = true;
if(list[0]){ if(list[0]){
this.reqMines(this.enterpriseId = list[0].id); this.enterpriseId = list[0].id;
}else{ }else{
this.enterpriseId = 0;
this.marker = []; this.marker = [];
} }
console.log('this.enterpriseId ________________ ', this.enterpriseId);
// 矿山数据
this.reqMines(this.enterpriseId);
this.setMap(); this.setMap();
}); });
};
},
console.log('select ________________ ', select);
var that = this;
!select.onchange && (select.onchange = function(e){
var tag = e.target || e.srcElement;
var value = tag.selectedOptions[0].value;
that.enterpriseId = value;
console.log('value ________________ ', value);
that.reqMines(that.enterpriseId);
});
},
reqDeviceStatus(){ reqDeviceStatus(){
var req = { var req = {
params: { params: {
...@@ -1172,29 +1182,8 @@ ...@@ -1172,29 +1182,8 @@
}; };
axios.get(host + '/api/yingji/keynoteadmin/deviceStatus', req).then(res => { axios.get(host + '/api/yingji/keynoteadmin/deviceStatus', req).then(res => {
res = res.data; res = res.data;
console.log('deviceStatus ________________ ', res);
return ;
var list = res.body || []; var list = res.body || [];
this.devicelist = list;
console.log('body ________________ ', list, select);
this[select.id] = list;
this.isReady = true;
if(list[0]){
this.reqMines(this.enterpriseId = list[0].id);
}else{
this.marker = [];
}
this.setMap();
}); });
}, },
...@@ -1812,6 +1801,9 @@ ...@@ -1812,6 +1801,9 @@
}, },
async getData(refesh) { async getData(refesh) {
console.log('getData ________________ ', refesh);
this.refreshTimes = this.refreshTimes + 1; this.refreshTimes = this.refreshTimes + 1;
/** /**
* 5分钟1次 * 5分钟1次
...@@ -1856,15 +1848,10 @@ ...@@ -1856,15 +1848,10 @@
*/ */
if (!refesh) { if (!refesh) {
//this.reqMines(); //this.reqMines();
} setTimeout(() => this.getData('refesh'), 60 * 1000);// 10秒一个刷新周期
if (this.refreshTimes % 60 == 0) {
_5minus();
} }
_5minus(); _5minus();
setTimeout(() => this.getData('refesh'), 60 * 1000);// 10秒一个刷新周期
}, },
// 危险作业列表 // 危险作业列表
......
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