Commit ff57d83b authored by 耿迪迪's avatar 耿迪迪

分环境配置及详情地图图标 gengdidi

parent f1dd56f1
......@@ -7,5 +7,8 @@ VUE_APP_BASE_API = '/dev-api'
#地图中心
VUE_APP_MAP_CENTER = '石家庄'
#代理地址
VUE_APP_TARGET = 'http://localhost:8903/gassafety'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
......@@ -7,4 +7,7 @@ VUE_APP_BASE_API = '/prod-api'
#地图中心
VUE_APP_MAP_CENTER = '石家庄'
#代理地址
VUE_APP_TARGET = 'http://36.148.23.59:8901/gassafety'
port = 8091
......@@ -46,7 +46,6 @@ class gaodeMap {
constructor(center, latlng,containerId) {
let container = containerId ? containerId : "container";
this.markers = [];
console.log(center,"........,,,,,,,<<<<<<,")
this.center = center ? center : defaultCenter;
map = new AMap.Map(container, {
//mask: addMask(result.districtList[0].boundaries),
......@@ -236,7 +235,8 @@ class gaodeMap {
this.setMarkerIcon(marker);
if (
DEVICE_TYPE.WORKORDER != markerType &&
DEVICE_TYPE.INSPECTOR != markerType
DEVICE_TYPE.INSPECTOR != markerType &&
func != "false"
) {
marker.content = this.getMarketContent(data);
marker.on("mouseover", this.infoOpen);
......@@ -351,7 +351,9 @@ class gaodeMap {
//infoWindow.close(map, e.target.getPosition());
}
if (func) {
func();
if(func != "false"){
func();
}
}
}
// 其他设备
......
......@@ -387,7 +387,18 @@
let obj = this.form.deviceList[0];
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, [obj.longitude, obj.latitude],"containerInspect");
this.gaoMap = gaoMap;
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj)
if("1" == obj.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, obj,"false")
}
if("2" == obj.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, obj,"false")
}
if("3" == obj.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, obj,"false")
}
if("4" == obj.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, obj,"false")
}
// }
}
......
......@@ -34,7 +34,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://36.148.23.59:8901/gassafety`,
target: `http://36.148.23.59:8901/gassafety`,
target: process.env.VUE_APP_TARGET,
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: ""
......
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