|
@@ -2558,6 +2558,17 @@
|
|
|
var storage = window.localStorage;
|
|
|
storage.setItem('projectId',false);
|
|
|
storage.setItem('companyId',false);
|
|
|
+
|
|
|
+ if(this.projectId != 0){
|
|
|
+ this.projectType = 'data';
|
|
|
+ }else{
|
|
|
+ this.projectType = 'list';
|
|
|
+ }
|
|
|
+ this.lampId = '-1';
|
|
|
+ if(this.projectsIdChangeType == 'list'){
|
|
|
+ this.streetLampType = 'list';
|
|
|
+ }
|
|
|
+ this.maplampListDW();
|
|
|
},
|
|
|
projectSelectFun(type,data,d){
|
|
|
var storage = window.localStorage;
|
|
@@ -2569,6 +2580,18 @@
|
|
|
}
|
|
|
}
|
|
|
this.projectId = data.id;
|
|
|
+
|
|
|
+ if(this.projectId != 0){
|
|
|
+ this.projectType = 'data';
|
|
|
+ }else{
|
|
|
+ this.projectType = 'list';
|
|
|
+ }
|
|
|
+ this.lampId = '-1';
|
|
|
+ if(this.projectsIdChangeType == 'list'){
|
|
|
+ this.streetLampType = 'list';
|
|
|
+ }
|
|
|
+ this.maplampListDW();
|
|
|
+
|
|
|
this.roadId = '';
|
|
|
if(!data.isOpen||this.projectId != data.id){
|
|
|
this.$set(data,'isOpen',true)
|
|
@@ -2584,6 +2607,17 @@
|
|
|
if(data.id != this.projectId){
|
|
|
storage.setItem('projectId',data.id);
|
|
|
this.projectId = data.id;
|
|
|
+
|
|
|
+ if(this.projectId != 0){
|
|
|
+ this.projectType = 'data';
|
|
|
+ }else{
|
|
|
+ this.projectType = 'list';
|
|
|
+ }
|
|
|
+ this.lampId = '-1';
|
|
|
+ if(this.projectsIdChangeType == 'list'){
|
|
|
+ this.streetLampType = 'list';
|
|
|
+ }
|
|
|
+ this.maplampListDW();
|
|
|
}
|
|
|
this.roadId = obj.name;
|
|
|
}else{
|
|
@@ -2594,6 +2628,17 @@
|
|
|
if(obj.id != this.projectId){
|
|
|
storage.setItem('projectId',obj.id);
|
|
|
this.projectId = obj.id;
|
|
|
+
|
|
|
+ if(this.projectId != 0){
|
|
|
+ this.projectType = 'data';
|
|
|
+ }else{
|
|
|
+ this.projectType = 'list';
|
|
|
+ }
|
|
|
+ this.lampId = '-1';
|
|
|
+ if(this.projectsIdChangeType == 'list'){
|
|
|
+ this.streetLampType = 'list';
|
|
|
+ }
|
|
|
+ this.maplampListDW();
|
|
|
}
|
|
|
this.roadId = d.name;
|
|
|
}
|
|
@@ -3982,6 +4027,7 @@
|
|
|
// zoom: 16,
|
|
|
// });
|
|
|
// }else{
|
|
|
+ console.log(type,XY,obj,isNew,'----------======--------------')
|
|
|
if(isNew){
|
|
|
let wgs84togcj02 = this.wgs84togcj02(data.data.longitude,data.data.latitude)
|
|
|
data.data.longitude = wgs84togcj02.lng;
|
|
@@ -4017,7 +4063,7 @@
|
|
|
let lampId = '';
|
|
|
if(type == 'lamp'){
|
|
|
XY = [this.wgs84togcj02(XY[0],XY[1]).lng,this.wgs84togcj02(XY[0],XY[1]).lat];
|
|
|
- console.log(XY[0],XY[1],this.wgs84togcj02(XY[0],XY[1]),this.wgs84togcj02(XY[0],XY[1]).lng)
|
|
|
+ // console.log(XY[0],XY[1],this.wgs84togcj02(XY[0],XY[1]),this.wgs84togcj02(XY[0],XY[1]).lng)
|
|
|
this_.map.setZoomAndCenter(17,XY)
|
|
|
lampId = this_.lampId;
|
|
|
}else{
|
|
@@ -4708,18 +4754,18 @@
|
|
|
}
|
|
|
},
|
|
|
watch:{
|
|
|
- projectId(curVal){
|
|
|
+ projectId(){
|
|
|
// this.projectInfo(curVal);
|
|
|
- if(curVal != 0){
|
|
|
- this.projectType = 'data';
|
|
|
- }else{
|
|
|
- this.projectType = 'list';
|
|
|
- }
|
|
|
- this.lampId = '-1';
|
|
|
- if(this.projectsIdChangeType == 'list'){
|
|
|
- this.streetLampType = 'list';
|
|
|
- }
|
|
|
- this.maplampListDW();
|
|
|
+ // if(curVal != 0){
|
|
|
+ // this.projectType = 'data';
|
|
|
+ // }else{
|
|
|
+ // this.projectType = 'list';
|
|
|
+ // }
|
|
|
+ // this.lampId = '-1';
|
|
|
+ // if(this.projectsIdChangeType == 'list'){
|
|
|
+ // this.streetLampType = 'list';
|
|
|
+ // }
|
|
|
+ // this.maplampListDW();
|
|
|
},
|
|
|
lampType(curVal){
|
|
|
if(curVal == 'monitor'){
|
|
@@ -4742,7 +4788,7 @@
|
|
|
}
|
|
|
},
|
|
|
lampId(curVal){
|
|
|
- let this_ = this;
|
|
|
+ // let this_ = this;
|
|
|
this.slider = '0';
|
|
|
if(curVal == '-1'){
|
|
|
$('.lamp').removeClass("Lamp_active");
|
|
@@ -4762,29 +4808,16 @@
|
|
|
this.networkLampList = [];
|
|
|
this.networkId = '';
|
|
|
this.getProjectCompany(curVal,data => {
|
|
|
+ // console.log(data,this.lampEdit)
|
|
|
if(this.lampIdChangeType != 'list'){
|
|
|
- let decrypt = this_.bd_decrypt(data.data.longitude,data.data.latitude,this_.mapTCtype == 'Satellite');
|
|
|
- data.data.longitude = decrypt.lng;
|
|
|
- data.data.latitude = decrypt.lat;
|
|
|
+ // let decrypt = this_.bd_decrypt(data.data.longitude,data.data.latitude,this_.mapTCtype == 'Satellite');
|
|
|
+ if(this.browserLanguage == 'bd'){
|
|
|
+ data.data.longitude = this.wgs84togcj02(data.data.longitude,data.data.latitude).lng;
|
|
|
+ data.data.latitude = this.wgs84togcj02(data.data.longitude,data.data.latitude).lat;
|
|
|
+ }
|
|
|
}
|
|
|
if(this.lampEdit){
|
|
|
this.projectsIdChangeType = 'map';
|
|
|
- // this.lampInfo(curVal,data=>{
|
|
|
- // this.streetLamp = data.data;
|
|
|
- // if(this.streetLamp.loadtype == '0'){
|
|
|
- // this.sideBarNavList = [{label:'路灯信息',key:'0'},{key:'1',label:'项目信息'},{key:'2',label:'监控信息'}];
|
|
|
- // this.sideBarNavListEN = [{label:'Lamp',key:'0'},{key:'1',label:'Project'},{key:'2',label:'Monitoring'}];
|
|
|
- // }else{
|
|
|
- // this.sideBarNavList = [{label:'捕虫器设备信息',key:'0'},{key:'1',label:'项目信息'},{key:'2',label:'监控信息'}];
|
|
|
- // this.sideBarNavListEN = [{label:'Catcher information',key:'0'},{key:'1',label:'Project'},{key:'2',label:'Monitoring'}];
|
|
|
- // }
|
|
|
- // this.streetLamp.lighteness = this.streetLamp.lighteness?parseInt(this.streetLamp.lighteness):0;
|
|
|
- // })
|
|
|
- // if(data.data.projectid == this.projectType){
|
|
|
- // this.projectInfo('-1',curVal);
|
|
|
- // }else{
|
|
|
- // this.projectInfo(data.data.projectid);
|
|
|
- // }
|
|
|
this.streetLampType = 'data';
|
|
|
this.projectType = 'data';
|
|
|
// this.monitorInfo();
|