Commit 9b94b542 authored by xinzhedeai's avatar xinzhedeai
parents 8e78632b 00ddc6aa
...@@ -178,24 +178,11 @@ ...@@ -178,24 +178,11 @@
<select style="margin:0 20px;"> <select style="margin:0 20px;">
<option value="1">淄博市</option> <option value="1">淄博市</option>
</select> </select>
<select style="margin:0 20px;"> <select style="margin:0 20px;" id="selectArea">
<option value="370305">临淄区</option> <option v-for="(item, i) in selectArea" :value="item.id">{{item.name}}</option>
<option value="370306">周村区</option>
<option value="370302">淄川区</option>
<option value="370303">张店区</option>
<option value="370304">博山区</option>
<option value="370321">桓台县</option>
<option value="370322">高青县</option>
<option value="370323">沂源县</option>
</select> </select>
<select style="margin:0 20px;width:120px;" id="selectCompany"> <select style="margin:0 20px;width:120px;" id="selectCompany">
<option value="1">请选择矿山企业</option> <option v-for="(item, i) in selectUnit" :value="item.id">{{item.name}}</option>
<option value="2">淄博卓正新材料科技有限公司</option>
<option value="3">淄博凯运达运贸有限公司石厂</option>
<option value="4">淄博博望矿业有限责任公司</option>
<option value="5">淄博洪泉石料厂</option>
<option value="6">淄博市淄川区岭子镇杨家村石料厂</option>
<option value="7">山东宝山科技有限公司水泥用灰岩矿</option>
</select> </select>
</div> </div>
<div> <div>
...@@ -834,9 +821,9 @@ ...@@ -834,9 +821,9 @@
<!-- cookie --> <!-- cookie -->
<script src="js/js.cookie.js"></script> <script src="js/js.cookie.js"></script>
<script> <script>
const host = location.protocol + '//' + (location.hostname === '192.168.3.226' ? '192.168.3.37' : '192.168.13.200') + ':8013'; //const host = location.protocol + '//' + (location.hostname === '192.168.3.226' ? '192.168.3.37' : '192.168.13.200') + ':8013';
const host = location.protocol + '//' + (location.hostname === '192.168.3.226' ? '192.168.2.200' : '192.168.13.200') + ':8013';
const selfHost = location.hostname === '192.168.3.226' ? 'http://192.168.3.226:8057' : location.protocol + '//' + window.location.host; const selfHost = location.hostname === '192.168.3.226' ? 'http://192.168.3.226:8057' : location.protocol + '//' + window.location.host;
...@@ -963,7 +950,7 @@ ...@@ -963,7 +950,7 @@
isMaskShow: false, isMaskShow: false,
maskTabs: ['全部', '审核中', '已通过', '未通过'], maskTabs: ['全部', '审核中', '已通过', '未通过'],
maskActive: 0, maskActive: 0,
pieList: [ ], pieList: [],
// marker 弹窗 // marker 弹窗
markerMask: false, markerMask: false,
...@@ -972,6 +959,9 @@ ...@@ -972,6 +959,9 @@
markerType: null, markerType: null,
markerTypeName: ['应急队伍', '应急物资', '应急预案', '应急演练'], markerTypeName: ['应急队伍', '应急物资', '应急预案', '应急演练'],
markerSearchName: '', // 搜索的对应 应急队伍、应急物资、应急预案、应急演练 名称 markerSearchName: '', // 搜索的对应 应急队伍、应急物资、应急预案、应急演练 名称
selectArea:[],
selectUnit:[],
} }
}, },
watch: { watch: {
...@@ -1042,15 +1032,114 @@ ...@@ -1042,15 +1032,114 @@
}; };
}; };
}; */ }; */
// 区域列表
this.reqSelectArea();
var selectArea = document.getElementById("selectArea");
selectArea.onchange = function(e){
var value = this.selectedOptions[0].value;
this.reqEnterprise(value);
};
// 企业选择列表 // 企业选择列表
var selectCompany = document.getElementById("selectCompany"); var selectCompany = document.getElementById("selectCompany");
selectCompany.onchange = function(e){ selectCompany.onchange = function(e){
var tag = e.target || e.srcElement; var value = this.selectedOptions[0].value;
window.location.reload() //window.location.reload()
} };
}, },
methods: { methods: {
reqSelectArea(){
axios.get(host + '/api/yingji/deptandenterprise/dept').then(res => {
res = res.data;
this.selectArea = res.body;
this.reqEnterprise(res.body[0].id);
});
},
reqEnterprise(value){
var req = {
params: {
deptId:value
}
};
axios.get(host + '/api/yingji/deptandenterprise/enterprise', req).then(res => {
res = res.data;
console.log('enterprise ________________ ', res);
this.selectUnit = res.body;
var value = res.body[0].id;
this.reqMines(value);
});
},
reqMines(id){
var loading = this.$loading({
lock: true,
text: '加载中',
// spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
// 查询全部矿山
var req = {
params: {
enterpriseId:id
}
};
axios.get(host + '/api/datav/mine', req).then(res => {
this.mineList = res && res.data && res.data.results;
this.mineNumber1 = this.mineList.filter(x => x.mineType == 1).length;
this.mineNumber2 = this.mineList.filter(x => x.mineType == 2).length;
this.mineNumber3 = this.mineList.filter(x => x.mineType == 3).length;
this.mineNumber4 = this.mineList.filter(x => x.hasEnable == false).length;
const markerUpdater = this.mineList.filter(mine => {
if (!mine.longitude || !mine.latitude) {
return false;
}
return true;
}).map(mine => {
return {
id: 't' + mine.mineType + 'id' + mine.id,
mineType: mine.mineType,
mineId: mine.id,
longitude: mine.longitude,
latitude: mine.latitude,
type: mine.mineType,
name: mine.name,
number: mine.code || '-',
address: mine.address || '-',
userName: mine.liablePerson || '-',
mobile: mine.liablePersonPhone || '-',
team: mine.emergencyTeamNumber || 0,
supplies: mine.emergencySuppliesNumber || 0,
plan: mine.emergencyPlanNumber || 0,
drill: mine.emergencyDrillNumber || 0
};
});
/* this.marker = [
{ id: 0, longitude: '117.855635', latitude: '37.065754', mineType: 0, mineId: 0, type: 0, name: '应急管理局', number: '0', address: '平度市东阁街道', userName: '某某某', mobile: '18888888888', team: 0, supplies: 0, plan: 0, drill: 0 }
, ...markerUpdater
]; */
this.marker = [...markerUpdater];
console.log('this.marker ________________ ', this.marker);
loading.close();
this.isReady = true;
// 准备地图
this.setMap();
// 初始化
//_5minus();
this.getData();
});
},
// -------------------------------------------------------------------
querySearchAsync(queryString, cb) { querySearchAsync(queryString, cb) {
var results = queryString ? this.marker.filter(v => v.name.indexOf(queryString) != -1) : this.marker var results = queryString ? this.marker.filter(v => v.name.indexOf(queryString) != -1) : this.marker
...@@ -1541,11 +1630,9 @@ ...@@ -1541,11 +1630,9 @@
{ text: '报警处理率', percent: rn6, legend: rn6 + '%' } { text: '报警处理率', percent: rn6, legend: rn6 + '%' }
] ]
} }
}, },
async getData(refesh) { async getData(refesh) {
var loading;
this.refreshTimes = this.refreshTimes + 1; this.refreshTimes = this.refreshTimes + 1;
/** /**
* 5分钟1次 * 5分钟1次
...@@ -1584,60 +1671,16 @@ ...@@ -1584,60 +1671,16 @@
* 仅第一次加载时执行 * 仅第一次加载时执行
*/ */
if (!refesh) { if (!refesh) {
loading = this.$loading({ //this.reqMines();
lock: true,
text: '加载中',
// spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
// 查询全部矿山
axios.get(host + '/api/datav/mine').then(res => {
this.mineList = res && res.data && res.data.results;
this.mineNumber1 = this.mineList.filter(x => x.mineType == 1).length;
this.mineNumber2 = this.mineList.filter(x => x.mineType == 2).length;
this.mineNumber3 = this.mineList.filter(x => x.mineType == 3).length;
this.mineNumber4 = this.mineList.filter(x => x.hasEnable == false).length;
const markerUpdater = this.mineList.filter(mine => {
if (!mine.longitude || !mine.latitude) {
return false;
}
return true;
}).map(mine => {
return {
id: 't' + mine.mineType + 'id' + mine.id,
mineType: mine.mineType,
mineId: mine.id,
longitude: mine.longitude,
latitude: mine.latitude,
type: mine.mineType,
name: mine.name,
number: mine.code || '-',
address: mine.address || '-',
userName: mine.liablePerson || '-',
mobile: mine.liablePersonPhone || '-',
team: mine.emergencyTeamNumber || 0,
supplies: mine.emergencySuppliesNumber || 0,
plan: mine.emergencyPlanNumber || 0,
drill: mine.emergencyDrillNumber || 0
};
});
this.marker = [
{ id: 0, longitude: '117.855635', latitude: '37.065754', mineType: 0, mineId: 0, type: 0, name: '应急管理局', number: '0', address: '平度市东阁街道', userName: '某某某', mobile: '18888888888', team: 0, supplies: 0, plan: 0, drill: 0 }
, ...markerUpdater
];
loading.close();
this.isReady = true;
// 准备地图
this.setMap();
// 初始化
_5minus();
});
} }
if (this.refreshTimes % 60 == 0) { if (this.refreshTimes % 60 == 0) {
_5minus(); _5minus();
} }
setTimeout(() => this.getData('refesh'), 10 * 1000);// 10秒一个刷新周期
_5minus();
setTimeout(() => this.getData('refesh'), 15 * 1000);// 10秒一个刷新周期
}, },
// 危险作业列表 // 危险作业列表
......
...@@ -443,7 +443,8 @@ ...@@ -443,7 +443,8 @@
console.log('selectedMineJson ________________ ', this.selectedMine);
...@@ -459,24 +460,24 @@ ...@@ -459,24 +460,24 @@
"appKey": "54309ca903e94a9bb14b7f0a69b0da94", "appKey": "54309ca903e94a9bb14b7f0a69b0da94",
"appSecret": "446ece35fb3a65264a04375b72246b1f", "appSecret": "446ece35fb3a65264a04375b72246b1f",
"list": [ "list": [
{ /* {
"name": "视频2@DS-7804N-K1", "name": "视频1",
"channel": "2.hd.live", "channel": "1.hd.live",
"id": "G67791074", "id": "G67791074",
"remark": "无", "remark": "无",
"captcha": "" "captcha": ""
}, },
{ {
"name": "视频1", "name": "视频2",
"channel": "1.hd.live", "channel": "2.hd.live",
"id": "G67791073", "id": "G67791073",
"remark": "无", "remark": "无",
"captcha": "" "captcha": ""
} } */
], ],
}; };
if(this.selectedMine.code === "1225421" || true){ if(this.selectedMine.code === "3703023006"){
res = { res = {
"appKey": "6039de9e0bf44407a15a15553986433c", "appKey": "6039de9e0bf44407a15a15553986433c",
"appSecret": "fb498de47fb488e14305ff300bd30d27", "appSecret": "fb498de47fb488e14305ff300bd30d27",
...@@ -512,9 +513,6 @@ ...@@ -512,9 +513,6 @@
], ],
}; };
}; };
console.log('selectedMineJson ________________ ', this.selectedMine);
this.info = { this.info = {
appKey:res.appKey, appKey:res.appKey,
...@@ -536,8 +534,6 @@ ...@@ -536,8 +534,6 @@
var video = document.getElementById("video-container"); var video = document.getElementById("video-container");
video.innerHTML = ''; video.innerHTML = '';
this.player = new EZUIKit.EZUIKitPlayer({ this.player = new EZUIKit.EZUIKitPlayer({
autoplay: true, autoplay: true,
id: "video-container", id: "video-container",
......
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