Commit f38d4d25 authored by Kimber's avatar Kimber

'up'

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