|
@@ -192,16 +192,30 @@ export default {
|
|
|
let data = res.data
|
|
|
this.projectOverview = data.projectOverview
|
|
|
this.resourcesOverview = data.resourcesOverview
|
|
|
- this.coordinates = [Number(data.latitude), Number(data.longitude)]
|
|
|
- this.mapValue = {
|
|
|
- params: new Date(),
|
|
|
- level: 12,//地图层级
|
|
|
- center: this.coordinates,//中心坐标
|
|
|
- allStationInfo: null,//场站坐标
|
|
|
- projectInfo: null,//项目坐标
|
|
|
- id: projectId,
|
|
|
- allPointInfo: this.allPointInfo,//所有点位信息
|
|
|
+ if(data.latitude !== undefined){
|
|
|
+ this.coordinates = [Number(data.latitude), Number(data.longitude)]
|
|
|
+ this.mapValue = {
|
|
|
+ params: new Date(),
|
|
|
+ level: 12,//地图层级
|
|
|
+ center: this.coordinates,//中心坐标
|
|
|
+ allStationInfo: null,//场站坐标
|
|
|
+ projectInfo: null,//项目坐标
|
|
|
+ id: projectId,
|
|
|
+ allPointInfo: this.allPointInfo,//所有点位信息
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.mapValue = {
|
|
|
+ params: new Date(),
|
|
|
+ level: 12,//地图层级
|
|
|
+ center: [46.69090, 128.13354],//中心坐标
|
|
|
+ allStationInfo: null,//场站坐标
|
|
|
+ projectInfo: null,//项目坐标
|
|
|
+ id: projectId,
|
|
|
+ allPointInfo: this.allPointInfo,//所有点位信息
|
|
|
+ }
|
|
|
+ this.$message.warning('此项目没有填写经纬度,请在后台管理信息中维护')
|
|
|
}
|
|
|
+
|
|
|
}).catch(err => {
|
|
|
console.log('单个项目信获取异常:' + err)
|
|
|
})
|