|
|
@@ -2,7 +2,7 @@
|
|
|
<div class="GISMap_main">
|
|
|
<div class="main_top_bg">
|
|
|
</div>
|
|
|
- <side-bar-idcol class="side_bar_left" :sideBarList="projectNav" :projectId="projectId" :roadId="roadId" :sideBarListIsOpen="sideBarListIsOpen" :projectSelectFun="projectSelectFun" :roadSelectFun="roadSelectFun" :sideBarIsOn="sideBarIsOn" :sideBarType="sideBarType" :sideBarCompanyList="sideBarCompanyList" :projectAll="projectAll"></side-bar-idcol>
|
|
|
+ <side-bar-idcol class="side_bar_left" :sideBarList="projectNav" :companyId="companyId" :projectId="projectId" :roadId="roadId" :sideBarListIsOpen="sideBarListIsOpen" :projectSelectFun="projectSelectFun" :roadSelectFun="roadSelectFun" :sideBarIsOn="sideBarIsOn" :sideBarType="sideBarType" :sideBarCompanyList="sideBarCompanyList" :projectAll="projectAll"></side-bar-idcol>
|
|
|
<div class="right_sidebar_box">
|
|
|
<div class="top_data_box" :class="{'EN':version == '0'}" :style="{'top':topDataBoxShow?'0px':'-96px'}">
|
|
|
<div class="ul" >
|
|
|
@@ -20,7 +20,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="amap-wrapper" element-loading-text="地图数据加载中">
|
|
|
+ <div class="amap-wrapper" element-loading-text="Map data loading">
|
|
|
<div id="container">
|
|
|
</div>
|
|
|
<ul class="contextmenu" :style="{'top':contextmenuY+'px','left':contextmenuX+'px'}" v-show="contextmenuIsShow" @contextmenu="contextmenuFun">
|
|
|
@@ -66,7 +66,7 @@
|
|
|
<div class="li li2"><span class="span1">{{'SN'}}</span><span class="span2">{{dialogLampInfo.address}}</span></div>
|
|
|
</div>
|
|
|
<div class="box1_right">
|
|
|
- <img :src="'./src/img/GIS/wifi_'+dialogLampInfo.netStatus+'.png'" />
|
|
|
+ <img :src="require('../img/GIS/wifi_'+dialogLampInfo.netStatus+'.png')" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="box">
|
|
|
@@ -127,8 +127,8 @@
|
|
|
<div class="li">
|
|
|
<div class="li_left">
|
|
|
<span class="span1">{{'state'}}</span>
|
|
|
- <span class="span2" v-if="version=='0'">{{chargestageData[dialogLampInfo.chargestage]}}</span>
|
|
|
- <span class="span2" v-if="version=='1'">{{chargestageDataEN[dialogLampInfo.chargestage]}}</span>
|
|
|
+ <!-- <span class="span2" v-if="version=='0'">{{chargestageData[dialogLampInfo.chargestage]}}</span> -->
|
|
|
+ <span class="span2" >{{chargestageDataEN[dialogLampInfo.chargestage]}}</span>
|
|
|
</div>
|
|
|
<i></i>
|
|
|
<div class="li_right">
|
|
|
@@ -345,7 +345,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<i class="border_i" v-if="item.prop=='number'"></i>
|
|
|
<span v-if="item.prop!='netStatus'" :class="{'red':scope.row.isfaulted == 1}">{{scope.row[item.prop]}}</span>
|
|
|
- <img v-if="item.prop=='netStatus'" :src="'./src/img/GIS/wifi_'+scope.row[item.prop]+'.png'" class="wifi_img" />
|
|
|
+ <img v-if="item.prop=='netStatus'" :src="require('../img/GIS/wifi_'+scope.row[item.prop]+'.png')" class="wifi_img" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -718,14 +718,13 @@
|
|
|
height="374"
|
|
|
:row-class-name="tableRowClassName">
|
|
|
<el-table-column
|
|
|
- v-if="version == 0"
|
|
|
label="Number"
|
|
|
prop="LSLD_index"
|
|
|
align="center"
|
|
|
:show-overflow-tooltip="true"
|
|
|
width="82">
|
|
|
</el-table-column>
|
|
|
- <template v-if="version == 0">
|
|
|
+ <template>
|
|
|
<el-table-column :show-overflow-tooltip="true" :sortable="item.sortable" :prop="item.prop" :label="item.label" :key="item.id" v-for="item in historicalTableList" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="item.prop !='lampstatus' && item.prop !='battstatus' && item.prop !='chargestage'">{{scope.row[item.prop]}}</span>
|
|
|
@@ -764,7 +763,7 @@
|
|
|
</el-table-column>
|
|
|
</template>
|
|
|
|
|
|
- <el-table-column :show-overflow-tooltip="true" header-align="center" prop="updatetime" label="Update time" width="160px" v-if="version == 0">
|
|
|
+ <el-table-column :show-overflow-tooltip="true" header-align="center" prop="updatetime" label="Update time" width="160px">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div v-if="dataLSType == '0'" class="LS_echarts" key="dataLSType_0">
|
|
|
@@ -2446,32 +2445,36 @@
|
|
|
data =>{
|
|
|
// console.log(data,'公司列表')
|
|
|
console.log(init)
|
|
|
- if(init){
|
|
|
- if(type == 0){
|
|
|
- if(data.data.length>0){
|
|
|
+ let storage = window.localStorage;
|
|
|
+ let companyId = storage.getItem("companyId");
|
|
|
+ let projectId = storage.getItem("projectId")
|
|
|
+ if(type == 0){
|
|
|
+ if(data.data.length>0){
|
|
|
+ if(projectId){
|
|
|
+ this.projectId = projectId;
|
|
|
+ }else{
|
|
|
this.projectId = data.data[0].id;
|
|
|
- this.sectionNavGet(data.data[0].id,data.data[0])
|
|
|
- for(let key in data.data){
|
|
|
- this.$set(data.data[key],'isOpen',false)
|
|
|
+ }
|
|
|
+ this.sectionNavGet(data.data[0].id,data.data[0])
|
|
|
+ for(let key in data.data){
|
|
|
+ this.$set(data.data[key],'isOpen',false)
|
|
|
+ if(data.data[key].id == this.projectId){
|
|
|
+ this.$set(data.data[key],'isOpen',true)
|
|
|
}
|
|
|
- this.$set(data.data[0],'isOpen',true)
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- }else{
|
|
|
- if(data.data.length>0){
|
|
|
- for(let key in data.data){
|
|
|
- this.$set(data.data[key],'isOpen',false)
|
|
|
- if(data.data[0].projectList.length>0){
|
|
|
- for(let d of data.data[0].projectList){
|
|
|
- this.$set(d,'isOpen',true)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.$set(data.data[0],'isOpen',true)
|
|
|
- this.companyId = data.data[0].cId;
|
|
|
+ }else{
|
|
|
+ if(data.data.length>0){
|
|
|
+ if(companyId){
|
|
|
+ this.companyId = companyId;
|
|
|
if(data.data[0].projectList.length>0){
|
|
|
- this.projectId = data.data[0].projectList[0].id;
|
|
|
- this.$set(data.data[0].projectList[0],'isOpen',true)
|
|
|
+ if(projectId){
|
|
|
+ this.projectId = projectId;
|
|
|
+ }else{
|
|
|
+ this.projectId = data.data[0].projectList[0].id;
|
|
|
+ }
|
|
|
+ // this.$set(data.data[0].projectList[0],'isOpen',true)
|
|
|
this.sectionNavGet(data.data[0].id,data.data[0])
|
|
|
}else{
|
|
|
this.projectId = null;
|
|
|
@@ -2487,49 +2490,12 @@
|
|
|
this.fault = 0;
|
|
|
}
|
|
|
}else{
|
|
|
- this.companyId = null
|
|
|
- this.projectId = null;
|
|
|
- this.deviceTotalData = {
|
|
|
- light_num:0,
|
|
|
- online_num:0,
|
|
|
- fault_count:0,
|
|
|
- network_num:0
|
|
|
- };
|
|
|
- this.deviceList = [];
|
|
|
- this.total = 0;
|
|
|
- this.count = 0;
|
|
|
- this.fault = 0;
|
|
|
- }
|
|
|
- }
|
|
|
- }else{
|
|
|
- if(type == 0){
|
|
|
- if(data.data.length>0){
|
|
|
- this.projectId = data.data[0].id;
|
|
|
- this.sectionNavGet(data.data[0].id,data.data[0])
|
|
|
- for(let key in data.data){
|
|
|
- this.$set(data.data[key],'isOpen',false)
|
|
|
- }
|
|
|
- this.$set(data.data[0],'isOpen',true)
|
|
|
- }
|
|
|
-
|
|
|
- }else{
|
|
|
- if(data.data.length>0){
|
|
|
- for(let key in data.data){
|
|
|
- this.$set(data.data[key],'isOpen',false)
|
|
|
- if(data.data[0].projectList.length>0){
|
|
|
- for(let d of data.data[0].projectList){
|
|
|
- this.$set(d,'isOpen',true)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.$set(data.data[0],'isOpen',true)
|
|
|
this.companyId = data.data[0].cId;
|
|
|
if(data.data[0].projectList.length>0){
|
|
|
this.projectId = data.data[0].projectList[0].id;
|
|
|
- this.$set(data.data[0].projectList[0],'isOpen',true)
|
|
|
+ // this.$set(data.data[0].projectList[0],'isOpen',true)
|
|
|
this.sectionNavGet(data.data[0].id,data.data[0])
|
|
|
}else{
|
|
|
- this.projectId = null;
|
|
|
this.projectId = null;
|
|
|
this.deviceTotalData = {
|
|
|
light_num:0,
|
|
|
@@ -2542,22 +2508,37 @@
|
|
|
this.count = 0;
|
|
|
this.fault = 0;
|
|
|
}
|
|
|
- }else{
|
|
|
- this.companyId = null;
|
|
|
- this.projectId = null;
|
|
|
- this.deviceTotalData = {
|
|
|
- light_num:0,
|
|
|
- online_num:0,
|
|
|
- fault_count:0,
|
|
|
- network_num:0
|
|
|
- };
|
|
|
- this.deviceList = [];
|
|
|
- this.total = 0;
|
|
|
- this.count = 0;
|
|
|
- this.fault = 0;
|
|
|
}
|
|
|
+ for(let key in data.data){
|
|
|
+ this.$set(data.data[key],'isOpen',false)
|
|
|
+ if(data.data[key].cId == this.companyId){
|
|
|
+ this.$set(data.data[key],'isOpen',true)
|
|
|
+ }
|
|
|
+ if(data.data[0].projectList.length>0){
|
|
|
+ for(let d of data.data[0].projectList){
|
|
|
+ this.$set(d,'isOpen',true)
|
|
|
+ if(d.id == this.projectId){
|
|
|
+ this.$set(d,'isOpen',true)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.companyId = null
|
|
|
+ this.projectId = null;
|
|
|
+ this.deviceTotalData = {
|
|
|
+ light_num:0,
|
|
|
+ online_num:0,
|
|
|
+ fault_count:0,
|
|
|
+ network_num:0
|
|
|
+ };
|
|
|
+ this.deviceList = [];
|
|
|
+ this.total = 0;
|
|
|
+ this.count = 0;
|
|
|
+ this.fault = 0;
|
|
|
}
|
|
|
}
|
|
|
+ console.log(this.companyId)
|
|
|
this.projectNav = data.data;
|
|
|
this.dateNav();
|
|
|
this.lampListGet(1);
|
|
|
@@ -2720,15 +2701,9 @@
|
|
|
// console.log(data)
|
|
|
for(let d of data.data.lamps){
|
|
|
if(d.status == '1'){
|
|
|
- d.runState = '亮灯'
|
|
|
- if(this_.version == 1){
|
|
|
- d.runState = 'Lamp on'
|
|
|
- }
|
|
|
+ d.runState = 'Lamp on'
|
|
|
}else{
|
|
|
- d.runState = '关灯'
|
|
|
- if(this_.version == 1){
|
|
|
- d.runState = 'Lamp off'
|
|
|
- }
|
|
|
+ d.runState = 'Lamp off'
|
|
|
}
|
|
|
this_.streetLampList.push(d);
|
|
|
}
|
|
|
@@ -2764,15 +2739,9 @@
|
|
|
this.lampListPage = 1;
|
|
|
for(let d of this.streetLampList){
|
|
|
if(d.status == '1'){
|
|
|
- d.runState = '亮灯'
|
|
|
- if(this.version == 1){
|
|
|
- d.runState = 'Lamp on'
|
|
|
- }
|
|
|
+ d.runState = 'Lamp on'
|
|
|
}else{
|
|
|
- d.runState = '关灯'
|
|
|
- if(this.version == 1){
|
|
|
- d.runState = 'Lamp off'
|
|
|
- }
|
|
|
+ d.runState = 'Lamp off'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -2790,9 +2759,9 @@
|
|
|
},
|
|
|
/*灯控删除*/
|
|
|
lampDelFun(){
|
|
|
- this.$confirm(this.version==0?'此操作将永久删除该'+this.lmText+', 是否继续?':'This operation will permanently delete the lamp control, will it continue?', this.version==0?'提示':'Prompt', {
|
|
|
- confirmButtonText: this.version==0?'确定':'confirm',
|
|
|
- cancelButtonText: this.version==0?'取消':'cancel',
|
|
|
+ this.$confirm('This operation will permanently delete the lamp control, will it continue?', 'Prompt', {
|
|
|
+ confirmButtonText: 'confirm',
|
|
|
+ cancelButtonText: 'cancel',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
if(this.lampType == 'monitor'){
|
|
|
@@ -2860,7 +2829,7 @@
|
|
|
this.lampId = '-1';
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
- message: this.version == 0?'已取消删除':'Canceled deleting'
|
|
|
+ message: 'Canceled deleting'
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
@@ -2879,9 +2848,9 @@
|
|
|
this.lamp_editFun();
|
|
|
if(this.lampEditFunIsfirst){
|
|
|
this.$notify({
|
|
|
- title: this.version==0?'编辑您'+this.lmText:'Edit '+this.lmText,
|
|
|
+ title: 'Edit '+this.lmText,
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
- message: this.version==0?'拖动'+this.lmText+'来调整它的位置经纬度<span class="lampEditTiTleClose">我知道了</span>':'Drag the '+this.lmText+' to adjust its latitude and longitude<span class="lampEditTiTleClose">Oh I see</span>',
|
|
|
+ message: 'Drag the '+this.lmText+' to adjust its latitude and longitude<span class="lampEditTiTleClose">Oh I see</span>',
|
|
|
customClass:"lampEditTiTle",
|
|
|
duration: 0,
|
|
|
offset: 100,
|
|
|
@@ -2904,13 +2873,9 @@
|
|
|
data.data.latitude = bd_decrypt.lat.toFixed(8);
|
|
|
let JDstr = '';
|
|
|
let WDstr = '';
|
|
|
- if(this.version == 0){
|
|
|
- JDstr = '经度';
|
|
|
- WDstr = '纬度';
|
|
|
- }else{
|
|
|
- JDstr = 'longitude';
|
|
|
- WDstr = 'latitude';
|
|
|
- }
|
|
|
+
|
|
|
+ JDstr = 'longitude';
|
|
|
+ WDstr = 'latitude';
|
|
|
|
|
|
this.lampLongitude = data.data.longitude;
|
|
|
this.lampLatitude = data.data.latitude;
|
|
|
@@ -3247,7 +3212,7 @@
|
|
|
}else{
|
|
|
this.$message({
|
|
|
showClose: true,
|
|
|
- message:this.version==0?'该组网当前没有灯控':'The network has no light control at present',
|
|
|
+ message:'The network has no light control at present',
|
|
|
type: 'warning'
|
|
|
});
|
|
|
}
|
|
|
@@ -3396,14 +3361,14 @@
|
|
|
if(this.streetLampList.length == 0){
|
|
|
this.$message({
|
|
|
showClose: true,
|
|
|
- message:this.version==0?'该项目当前没有灯控':'The project has no light control at present',
|
|
|
+ message:'The project has no light control at present',
|
|
|
type: 'warning'
|
|
|
});
|
|
|
}else{
|
|
|
// console.log(this.projectData.company)
|
|
|
- this.$confirm(this.version==0?'是否确认?':'Is it confirmed?', this.version==0?'提示':'Prompt', {
|
|
|
- confirmButtonText: this.version==0?'确定':'confirm',
|
|
|
- cancelButtonText: this.version==0?'取消':'cancel',
|
|
|
+ this.$confirm('Is it confirmed?', 'Prompt', {
|
|
|
+ confirmButtonText: 'confirm',
|
|
|
+ cancelButtonText: 'cancel',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
this.turnonoffType = value;
|
|
|
@@ -3441,7 +3406,7 @@
|
|
|
this.lampId = '-1';
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
- message: this.version == 0?'已取消操作':'Canceled deleting'
|
|
|
+ message: 'Canceled deleting'
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
@@ -3629,18 +3594,12 @@
|
|
|
let bgColor = '';
|
|
|
let borderColor = '';
|
|
|
if(d.lampstatus == '0'){
|
|
|
- d.runningState = '故障';
|
|
|
- if(this_.version == 1){
|
|
|
- d.runningState = 'malfunction'
|
|
|
- }
|
|
|
+ d.runningState = 'malfunction'
|
|
|
lampType = 'fault'
|
|
|
bgColor = '#ff0505';
|
|
|
borderColor = 'rgba(255, 5, 5, 0.14)';
|
|
|
}else{
|
|
|
- d.runningState = '正常'
|
|
|
- if(this_.version == 1){
|
|
|
- d.runningState = 'malfunction'
|
|
|
- }
|
|
|
+ d.runningState = 'malfunction'
|
|
|
if(d.netStatus == '0'){
|
|
|
lampType = 'off-line';
|
|
|
bgColor = '#7c7c7c';
|
|
|
@@ -3828,395 +3787,8 @@
|
|
|
this_.lamp_editFun();
|
|
|
}
|
|
|
},1)
|
|
|
- // console.log(this_.map.getZoom())
|
|
|
- if(this_.map.getZoom() > 17){
|
|
|
- // this_.cluster = new AMap.MarkerClusterer(this_.map,this_.markers,{
|
|
|
- // gridSize:52,
|
|
|
- // minClusterSize:2,
|
|
|
- // maxZoom:2,
|
|
|
- // renderCluserMarker:this_._renderCluserMarker
|
|
|
- // });
|
|
|
- // var markers = this_.markers.map(function(location, i) {
|
|
|
- // return new google.maps.Marker({
|
|
|
- // position: location,
|
|
|
- // label: '',
|
|
|
- // });
|
|
|
- // });
|
|
|
- // var markerCluster = new MarkerClusterer(this_.map, this_.markers,{imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});
|
|
|
- // var markerCluster = new MarkerClusterer(this_.map, this_.markers,{imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});
|
|
|
- }else{
|
|
|
- // var markers = this_.markers.map(function(location, i) {
|
|
|
- // return new google.maps.Marker({
|
|
|
- // position: location,
|
|
|
- // label: '',
|
|
|
- // });
|
|
|
- // });
|
|
|
- // var markerCluster = new MarkerClusterer(this_.map, this_.markers,{imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});
|
|
|
- // let number = parseInt(this_.markers.length)
|
|
|
- // this_.cluster = new AMap.MarkerClusterer(this_.map,this_.markers,{
|
|
|
- // gridSize:52,
|
|
|
- // minClusterSize:2,
|
|
|
- // maxZoom:number*100,
|
|
|
- // renderCluserMarker:this_._renderCluserMarker
|
|
|
- // });
|
|
|
- }
|
|
|
});
|
|
|
},
|
|
|
- // mapGet(type,XY,obj,isNew){
|
|
|
- // let this_ = this;
|
|
|
- // let isGet = true;
|
|
|
- // if(obj){
|
|
|
- // isGet = false;
|
|
|
- // this.mapFun(this_,obj,true);
|
|
|
- // }
|
|
|
- // if(isGet){
|
|
|
- // baseApi.ajax_post(
|
|
|
- // allUrl.gisMap.getLngLat,
|
|
|
- // {
|
|
|
- // username:this.username,
|
|
|
- // client_key:this.client_key,
|
|
|
- // token:this.token,
|
|
|
- // lampid:0,
|
|
|
- // projectid:this.projectId,
|
|
|
- // section:this.roadId,
|
|
|
- // },
|
|
|
- // {},
|
|
|
- // data =>{
|
|
|
- // // if(data.data.longitude == 0 && data.data.latitude == 0){
|
|
|
- // // /*创建地图*/
|
|
|
- // // this_.map = new AMap.Map("container", {
|
|
|
- // // resizeEnable: true,
|
|
|
- // // zooms:[0,20],
|
|
|
- // // zoom: 16,
|
|
|
- // // });
|
|
|
- // // }else{
|
|
|
- // if(isNew){
|
|
|
- // let decrypt = this.bd_decrypt(data.data.longitude,data.data.latitude)
|
|
|
- // data.data.longitude = decrypt.lng;
|
|
|
- // data.data.latitude = decrypt.lat;
|
|
|
- // // console.log(data.data.longitude,data.data.latitude,'===========')
|
|
|
- // /*创建地图*/
|
|
|
- // this.map = new AMap.Map("container", {
|
|
|
- // resizeEnable: true,
|
|
|
- // center:[data.data.longitude,data.data.latitude],
|
|
|
- // zooms:[0,20],
|
|
|
- // zoom: 16,
|
|
|
- // });
|
|
|
- // // }
|
|
|
- // this.map.setFeatures(['road','bg','point']); // 多个种类要素显示 bg区域面/point兴趣点/road道路及道路标注/
|
|
|
- // // this.map.setMapStyle('amap://styles/macaron');
|
|
|
- // // console.log(this.map.getFeatures(),'--------------')
|
|
|
- // var homeControl=new AMap.mapSwitch(this.map); //新建自定义插件对象
|
|
|
- // this.map.addControl(homeControl);
|
|
|
- // // this_.map.setLang(Lang);
|
|
|
- // console.log(type,XY,'--123---')
|
|
|
- // AMap.plugin([
|
|
|
- // // 'AMap.MapType',
|
|
|
- // 'AMap.ToolBar',
|
|
|
- // ], function(){
|
|
|
- // // this_.map.addControl(new AMap.MapType({
|
|
|
-
|
|
|
- // // }));
|
|
|
- // this_.map.addControl(new AMap.ToolBar({
|
|
|
- // liteStyle:true
|
|
|
- // }));
|
|
|
- // })
|
|
|
- // }
|
|
|
- // let lampId = '';
|
|
|
- // if(type == 'lamp'){
|
|
|
- // XY = [this.bd_decrypt(XY[0],XY[1]).lng,this.bd_decrypt(XY[0],XY[1]).lat];
|
|
|
- // this_.map.setZoomAndCenter(17,XY)
|
|
|
- // lampId = this_.lampId;
|
|
|
- // }else if(type != 'del'){
|
|
|
- // if(this_.streetLampType == 'list'){
|
|
|
- // this_.lampIdChangeType = 'list';
|
|
|
- // this_.lampId = '-1';
|
|
|
- // }
|
|
|
- // }
|
|
|
- // this.$nextTick(function(){
|
|
|
- // let encrypt_low = this.bd_encrypt(this.map.getBounds().southwest.lng,this.map.getBounds().southwest.lat)
|
|
|
- // let encrypt_high = this.bd_encrypt(this.map.getBounds().northeast.lng,this.map.getBounds().northeast.lat)
|
|
|
-
|
|
|
- // baseApi.ajax_post(
|
|
|
- // allUrl.gisMap.mapGet,
|
|
|
- // {
|
|
|
- // username:this.username,
|
|
|
- // client_key:this.client_key,
|
|
|
- // token:this.token,
|
|
|
- // project_id:this.projectId,
|
|
|
- // section:this.roadId,
|
|
|
- // type:this.operationType,
|
|
|
- // keyword:this.keyword,
|
|
|
- // lng_low:encrypt_low.bd_lng,
|
|
|
- // lat_low:encrypt_low.bd_lat,
|
|
|
- // lng_high:encrypt_high.bd_lng,
|
|
|
- // lat_high:encrypt_high.bd_lat,
|
|
|
- // multiple:this.map.getZoom(),
|
|
|
- // lampid:lampId,
|
|
|
- // },
|
|
|
- // {},
|
|
|
- // data =>{
|
|
|
- // this.mapDataListHC = data.data.lamps;
|
|
|
- // this.mapFun(this_,data.data.lamps);
|
|
|
- // },
|
|
|
- // this)
|
|
|
- // this_.map.on('dragend', function() {
|
|
|
- // clearTimeout(this_.timeoutMap)
|
|
|
- // this_.timeoutMap = setTimeout(function(){
|
|
|
-
|
|
|
- // let encrypt_low = this_.bd_encrypt(this_.map.getBounds().southwest.lng,this_.map.getBounds().southwest.lat)
|
|
|
- // let encrypt_high = this_.bd_encrypt(this_.map.getBounds().northeast.lng,this_.map.getBounds().northeast.lat)
|
|
|
-
|
|
|
- // this_.cluster.clearMarkers();
|
|
|
- // baseApi.ajax_post(
|
|
|
- // allUrl.gisMap.mapGet,
|
|
|
- // {
|
|
|
- // username:this_.username,
|
|
|
- // client_key:this_.client_key,
|
|
|
- // token:this_.token,
|
|
|
- // project_id:this_.projectId,
|
|
|
- // section:this_.roadId,
|
|
|
- // type:this_.operationType,
|
|
|
- // keyword:this_.keyword,
|
|
|
- // lng_low:encrypt_low.bd_lng,
|
|
|
- // lat_low:encrypt_low.bd_lat,
|
|
|
- // lng_high:encrypt_high.bd_lng,
|
|
|
- // lat_high:encrypt_high.bd_lat,
|
|
|
- // multiple:this_.map.getZoom(),
|
|
|
- // lampid:lampId,
|
|
|
- // },
|
|
|
- // {},
|
|
|
- // data =>{
|
|
|
- // this_.mapDataListHC = data.data.lamps;
|
|
|
- // this_.mapFun(this_,data.data.lamps);
|
|
|
- // },
|
|
|
- // this_)
|
|
|
- // },800)
|
|
|
- // })
|
|
|
- // this_.map.on('zoomchange', function() {
|
|
|
- // clearTimeout(this_.timeoutMap)
|
|
|
- // this_.timeoutMap = setTimeout(function(){
|
|
|
-
|
|
|
- // let encrypt_low = this_.bd_encrypt(this_.map.getBounds().southwest.lng,this_.map.getBounds().southwest.lat)
|
|
|
- // let encrypt_high = this_.bd_encrypt(this_.map.getBounds().northeast.lng,this_.map.getBounds().northeast.lat)
|
|
|
-
|
|
|
- // this_.cluster.clearMarkers();
|
|
|
- // baseApi.ajax_post(
|
|
|
- // allUrl.gisMap.mapGet,
|
|
|
- // {
|
|
|
- // username:this_.username,
|
|
|
- // client_key:this_.client_key,
|
|
|
- // token:this_.token,
|
|
|
- // project_id:this_.projectId,
|
|
|
- // section:this_.roadId,
|
|
|
- // type:this_.operationType,
|
|
|
- // keyword:this_.keyword,
|
|
|
- // lng_low:encrypt_low.bd_lng,
|
|
|
- // lat_low:encrypt_low.bd_lat,
|
|
|
- // lng_high:encrypt_high.bd_lng,
|
|
|
- // lat_high:encrypt_high.bd_lat,
|
|
|
- // multiple:this_.map.getZoom(),
|
|
|
- // lampid:lampId,
|
|
|
- // },
|
|
|
- // {},
|
|
|
- // data =>{
|
|
|
- // this_.mapDataListHC = data.data.lamps;
|
|
|
- // this_.mapFun(this_,data.data.lamps);
|
|
|
- // },
|
|
|
- // this_)
|
|
|
- // },800)
|
|
|
- // });
|
|
|
- // })
|
|
|
- // },
|
|
|
- // this)
|
|
|
- // }
|
|
|
- // },
|
|
|
- // mapFun(this_,data,isTrue){
|
|
|
- // this_.cluster = null;
|
|
|
- // this_.markers = [];
|
|
|
- // this_.$nextTick(function(){
|
|
|
- // this_.map.remove(this_.markerListHC)
|
|
|
- // // this_.map.clearMap()
|
|
|
- // this_.markerListHC = [];
|
|
|
- // for(let d of data){
|
|
|
- // if(!isTrue){
|
|
|
- // let decrypt = this_.bd_decrypt(d.longitude,d.latitude);
|
|
|
- // d.longitude = decrypt.lng;
|
|
|
- // d.latitude = decrypt.lat;
|
|
|
- // }
|
|
|
-
|
|
|
- // if((!this_.lampEdit && d.id != this_.lampId) || this_.lampEdit){
|
|
|
- // if(d.is_lamp == 1){
|
|
|
- // let lampType = '';
|
|
|
- // let bgColor = '';
|
|
|
- // let borderColor = '';
|
|
|
- // if(d.lampstatus == '0'){
|
|
|
- // d.runningState = '故障';
|
|
|
- // if(this_.version == 1){
|
|
|
- // d.runningState = 'malfunction'
|
|
|
- // }
|
|
|
- // lampType = 'fault'
|
|
|
- // bgColor = '#ff0505';
|
|
|
- // borderColor = 'rgba(255, 5, 5, 0.14)';
|
|
|
- // }else{
|
|
|
- // d.runningState = '正常'
|
|
|
- // if(this_.version == 1){
|
|
|
- // d.runningState = 'malfunction'
|
|
|
- // }
|
|
|
- // if(d.netStatus == '0'){
|
|
|
- // lampType = 'off-line';
|
|
|
- // bgColor = '#7c7c7c';
|
|
|
- // borderColor = 'rgba(167, 167, 167, 0.18)';
|
|
|
- // }else{
|
|
|
- // if(d.status == '1'){
|
|
|
- // lampType = 'on'
|
|
|
- // bgColor = 'linear-gradient(#fc8440, #fe7121)';
|
|
|
- // borderColor = 'rgba(253, 122, 48, 0.18)';
|
|
|
- // }else{
|
|
|
- // lampType = 'off'
|
|
|
- // bgColor = '#ffb68d';
|
|
|
- // borderColor = 'rgba(242, 223, 199, 0.18)';
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // let lamp_icon;
|
|
|
- // if(this_.mapTCtype == 'TileLayer'){
|
|
|
- // lamp_icon = `<div style="text-align:center;background:${bgColor};background-clip:padding-box;border:2px solid #fff; height: 16px; width: 16px; border-radius:50%;" class="lamp lamp_${d.id} ${lampType}"></div>`
|
|
|
- // }else{
|
|
|
- // lamp_icon = `<div class="lamp lamp_${d.id} ${lampType} lamp_icon lamp_Satellite_${lampType}_${d.direction}"></div>`
|
|
|
- // }
|
|
|
-
|
|
|
-
|
|
|
- // this_.markers.push(new AMap.Marker({
|
|
|
- // position:[d.longitude,d.latitude],
|
|
|
- // content: `<div style="text-align:center;border:11px solid ${borderColor};border-radius:50%;" class="lamp lamp_${d.id} ${lampType} lamp_${this_.mapTCtype}">
|
|
|
- // ${lamp_icon}
|
|
|
- // <div class="map_lamp_info map_lamp_info_${d.id}">
|
|
|
- // <div class="map_lamp_info_bg">
|
|
|
- // <div class="top">
|
|
|
- // <span>${'路灯'+d.number}</span>
|
|
|
- // <img src="./src/img/GIS/wifi_${d.netStatus}.png" />
|
|
|
- // <sapn class="right lamp_info_click ${d.id}" >${'更多'}</span>
|
|
|
- // </div>
|
|
|
- // <div class="ul">
|
|
|
- // <div class="li">
|
|
|
- // <span class="span1">${'亮度:'}</span>
|
|
|
- // <span class="span2">${d.light}%</span>
|
|
|
- // </div>
|
|
|
- // <div class="li">
|
|
|
- // <span class="span1">${'电压:'}</span>
|
|
|
- // <span class="span2">${d.lampvoltage}V</span>
|
|
|
- // </div>
|
|
|
- // <div class="li">
|
|
|
- // <span class="span1">${'功率:'}</span>
|
|
|
- // <span class="span2">${d.lamppower}W</span>
|
|
|
- // </div>
|
|
|
- // <div class="li">
|
|
|
- // <span class="span1">${'SN:'}</span>
|
|
|
- // <span class="span2">${d.address}</span>
|
|
|
- // </div>
|
|
|
- // <div class="li">
|
|
|
- // <span class="span1">${'充电:'}</span>
|
|
|
- // <span class="span2">${this_.chargestageData[d.chargestage]}</span>
|
|
|
- // </div>
|
|
|
- // </div>
|
|
|
- // <div class="bottom">
|
|
|
- // <span class="span1">${'更新时间:'}</span>
|
|
|
- // <span class="span2">${d.updatetime}</span>
|
|
|
- // </div>
|
|
|
- // <div class="icon"></div>
|
|
|
- // </div>
|
|
|
- // </div>
|
|
|
- // </div>`,
|
|
|
- // offset: new AMap.Pixel(-19,-19),
|
|
|
- // extData:d.id+d.number,
|
|
|
- // }))
|
|
|
- // }else if(d.is_marker == 1){
|
|
|
- // // console.log(d,'----------')
|
|
|
- // let div = document.createElement('div');
|
|
|
- // div.style.backgroundColor = '#ffffff';
|
|
|
- // div.style.height = '27px';
|
|
|
- // div.style.width = (d.count.toString().length*8+20)+'px';
|
|
|
- // div.style.borderRadius = '2px';
|
|
|
- // div.style.boxShadow = '0 0 4px rgba(0, 0, 0, 0.2)';
|
|
|
- // div.innerHTML = d.count;
|
|
|
- // div.className = 'map_jh';
|
|
|
- // div.style.lineHeight = '27px';
|
|
|
- // div.style.color = '#222222';
|
|
|
- // div.style.fontSize = '12px';
|
|
|
- // div.style.textAlign = 'center';
|
|
|
- // let divCY = document.createElement('div');
|
|
|
- // divCY.className = 'map_CY';
|
|
|
- // div.appendChild(divCY);
|
|
|
- // var marker = new AMap.Marker({
|
|
|
- // content: div, // 自定义点标记覆盖物内容
|
|
|
- // position:[d.longitude, d.latitude], // 基点位置
|
|
|
- // offset:new AMap.Pixel(-(d.count.toString().length*8+20)/2,-27/2) // 相对于基点的偏移位置
|
|
|
- // });
|
|
|
- // marker.on('click',function(e){
|
|
|
- // // console.log(e)
|
|
|
- // this_.map.setZoomAndCenter(this_.map.getZoom()+1, [e.lnglat.lng,e.lnglat.lat]);
|
|
|
- // })
|
|
|
- // this_.map.add(marker);
|
|
|
- // this_.markerListHC.push(marker)
|
|
|
- // }else if(d.is_video == 1){
|
|
|
- // this_.markers.push(new AMap.Marker({
|
|
|
- // position:[d.longitude,d.latitude],
|
|
|
- // content:'<div style="text-align:center;border:11px solid rgba(49, 180, 253, 0.18); border-radius:50%;cursor:pointer;" class="monitor monitor_'+d.id+' '+d.latitude+' '+d.longitude+' '+d.image+'"><div style="text-align:center;background:#31b4fd;background-clip: padding-box;border:2px solid #fff; height: 16px; width: 16px; border-radius:50%;" class="monitor monitor_'+d.id+' '+d.latitude+' '+d.longitude+' '+d.image+'"></div></div>',
|
|
|
- // offset: new AMap.Pixel(-19,-19),
|
|
|
- // extData:d.id+d.number,
|
|
|
- // }))
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // clearInterval(this_.intervalMap)
|
|
|
- // this_.intervalMap = setInterval(function(){
|
|
|
- // if(this_.networkLampList.length > 0){
|
|
|
- // for(let d of this_.networkLampList){
|
|
|
- // $('.lamp_'+d.id).addClass("Lamp_active");
|
|
|
- // }
|
|
|
- // if($('.lamp_'+this_.networkLampList[0].id).length>0){
|
|
|
- // clearInterval(this_.intervalMap)
|
|
|
- // }
|
|
|
- // }else if($('.lamp_'+this_.lampId).length>0){
|
|
|
- // $('.lamp').removeClass("Lamp_active");
|
|
|
- // $('.monitor').removeClass("monitor_active");
|
|
|
- // $('.lamp_'+this_.lampId).addClass("Lamp_active");
|
|
|
- // clearInterval(this_.intervalMap)
|
|
|
- // }else{
|
|
|
- // setTimeout(function(){
|
|
|
- // if($('.amap-marker').length>0){
|
|
|
- // clearInterval(this_.intervalMap)
|
|
|
- // }
|
|
|
- // },500)
|
|
|
- // }
|
|
|
- // setTimeout(function(){
|
|
|
- // if($('.amap-markers').children().length == 0){
|
|
|
- // clearInterval(this_.intervalMap)
|
|
|
- // }
|
|
|
- // },1000)
|
|
|
- // if(!this_.lampEdit){
|
|
|
- // this_.lamp_editFun();
|
|
|
- // }
|
|
|
- // },1)
|
|
|
- // if(this_.map.getZoom() > 16){
|
|
|
- // this_.cluster = new AMap.MarkerClusterer(this_.map,this_.markers,{
|
|
|
- // gridSize:52,
|
|
|
- // minClusterSize:2,
|
|
|
- // maxZoom:2,
|
|
|
- // renderCluserMarker:this_._renderCluserMarker
|
|
|
- // });
|
|
|
- // }else{
|
|
|
- // let number = parseInt(this_.markers.length)
|
|
|
- // this_.cluster = new AMap.MarkerClusterer(this_.map,this_.markers,{
|
|
|
- // gridSize:52,
|
|
|
- // minClusterSize:2,
|
|
|
- // maxZoom:number*100,
|
|
|
- // renderCluserMarker:this_._renderCluserMarker
|
|
|
- // });
|
|
|
- // }
|
|
|
- // });
|
|
|
- // },
|
|
|
videoListGet(callback){
|
|
|
baseApi.ajax_post(
|
|
|
allUrl.gisMap.videoList,
|
|
|
@@ -4382,7 +3954,7 @@
|
|
|
const this_=this;
|
|
|
this_.definition=flag;
|
|
|
if(flag==0){
|
|
|
- this_.definitionBtnText=this_.version==0?'标清':'SD';
|
|
|
+ this_.definitionBtnText='SD';
|
|
|
//标清
|
|
|
setTimeout(function(){
|
|
|
let source=`<video ref="myPlayer" id="myPlayer" controls autoplay playsInline webkit-playsinline poster="">
|
|
|
@@ -4393,7 +3965,7 @@
|
|
|
console.log(player)
|
|
|
},100)
|
|
|
}else{
|
|
|
- this_.definitionBtnText=this_.version==0?'高清':'HD';
|
|
|
+ this_.definitionBtnText='HD';
|
|
|
// 高清
|
|
|
setTimeout(function(){
|
|
|
let source=`<video ref="myPlayer" id="myPlayer" controls autoplay playsInline webkit-playsinline poster="">
|
|
|
@@ -4489,17 +4061,9 @@
|
|
|
},
|
|
|
lampType(curVal){
|
|
|
if(curVal == 'monitor'){
|
|
|
- if(this.version == 0){
|
|
|
- this.lmText = '监控'
|
|
|
- }else{
|
|
|
- this.lmText = 'monitor'
|
|
|
- }
|
|
|
+ this.lmText = 'monitor'
|
|
|
}else{
|
|
|
- if(this.version == 0){
|
|
|
- this.lmText = '灯控'
|
|
|
- }else{
|
|
|
- this.lmText = 'lamp'
|
|
|
- }
|
|
|
+ this.lmText = 'lamp'
|
|
|
}
|
|
|
},
|
|
|
surveillanceVideoDialog(curVal){
|
|
|
@@ -4530,26 +4094,9 @@
|
|
|
}else{
|
|
|
this.lampInfoGet(curVal);
|
|
|
// this.sideBarNav = '路灯信息';
|
|
|
- if(this.version == 0){
|
|
|
- let time = setInterval(function(){
|
|
|
- if($('.amap-marker').length>0){
|
|
|
- clearInterval(time)
|
|
|
- }
|
|
|
- setTimeout(function(){
|
|
|
- if($('.amap-markers').children().length == 0){
|
|
|
- clearInterval(time)
|
|
|
- }
|
|
|
- },1000)
|
|
|
- $('.lamp').removeClass("Lamp_active");
|
|
|
- $('.monitor').removeClass("monitor_active");
|
|
|
- $('.lamp_'+curVal).addClass("Lamp_active");
|
|
|
- // console.log($('.amap-marker').length,$('.amap-markers').children().length)
|
|
|
- },1)
|
|
|
- }else{
|
|
|
- $('.lamp').removeClass("Lamp_active");
|
|
|
- $('.monitor').removeClass("monitor_active");
|
|
|
- $('.lamp_'+curVal).addClass("Lamp_active");
|
|
|
- }
|
|
|
+ $('.lamp').removeClass("Lamp_active");
|
|
|
+ $('.monitor').removeClass("monitor_active");
|
|
|
+ $('.lamp_'+curVal).addClass("Lamp_active");
|
|
|
this.networkLampList = [];
|
|
|
this.networkId = '';
|
|
|
this.getProjectCompany(curVal,data => {
|
|
|
@@ -4591,18 +4138,14 @@
|
|
|
|
|
|
}else{
|
|
|
if(this.map){
|
|
|
- if(this.version == 0){
|
|
|
- this.map.panTo([data.data.longitude,data.data.latitude]);
|
|
|
+ if(data.data.longitude == 0&&data.data.latitude == 0){
|
|
|
+ this.map.setCenter(new google.maps.LatLng(0, 0));
|
|
|
+ }else if(data.data.longitude == 0&&data.data.latitude != 0){
|
|
|
+ this.map.setCenter(new google.maps.LatLng(Number(data.data.latitude),0));
|
|
|
+ }else if(data.data.longitude != 0&&data.data.latitude == 0){
|
|
|
+ this.map.setCenter(new google.maps.LatLng(0,Number(data.data.longitude)));
|
|
|
}else{
|
|
|
- if(data.data.longitude == 0&&data.data.latitude == 0){
|
|
|
- this.map.setCenter(new google.maps.LatLng(0, 0));
|
|
|
- }else if(data.data.longitude == 0&&data.data.latitude != 0){
|
|
|
- this.map.setCenter(new google.maps.LatLng(Number(data.data.latitude),0));
|
|
|
- }else if(data.data.longitude != 0&&data.data.latitude == 0){
|
|
|
- this.map.setCenter(new google.maps.LatLng(0,Number(data.data.longitude)));
|
|
|
- }else{
|
|
|
- this.map.setCenter(new google.maps.LatLng(Number(data.data.latitude),Number(data.data.longitude)));
|
|
|
- }
|
|
|
+ this.map.setCenter(new google.maps.LatLng(Number(data.data.latitude),Number(data.data.longitude)));
|
|
|
}
|
|
|
}
|
|
|
}
|