Browse Source

333

develop
mbp 1 month ago
parent
commit
29a21acba5
  1. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  2. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  3. 28
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue
  4. 2
      ruoyi-ui/vue.config.js

1
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue

@ -201,6 +201,7 @@ export default {
if(this.mapContainer === 'AMapContainer'){ if(this.mapContainer === 'AMapContainer'){
getMinMapLayers(); getMinMapLayers();
} }
markerClusterIns.vroot = this.$root;
markerClusterIns.mapContainer = this.mapContainer; markerClusterIns.mapContainer = this.mapContainer;
this.$root.$on('delete-event', this.handleRefresh); this.$root.$on('delete-event', this.handleRefresh);

7
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

@ -48,7 +48,7 @@ export class MarkerCluster {
infoWindow; infoWindow;
mapContainer; mapContainer;
data = []; //标注集合 data = []; //标注集合
vroot;
constructor() {} constructor() {}
getMap() { getMap() {
@ -149,13 +149,16 @@ export class MarkerCluster {
} }
}) })
if(aryPoints.length > 0){ if(aryPoints.length > 0){
this.$root.$emit('refresh-gismap',pointsObj_new); this.vroot.$emit('refresh-gismap',{pointList:aryPoints});
// map2d.addPointByArr( // map2d.addPointByArr(
// pointsObj_new, // {pointList:aryPoints} 点位数据数组(按以下规范组装) // pointsObj_new, // {pointList:aryPoints} 点位数据数组(按以下规范组装)
// 'customLayer111', // jhlayers 当前添加的数据 唯一标识(删除该图层时也会用到)//./事件专题/交通事故.svg // 'customLayer111', // jhlayers 当前添加的数据 唯一标识(删除该图层时也会用到)//./事件专题/交通事故.svg
// true // 当前新加图层是否启用聚合效果 // true // 当前新加图层是否启用聚合效果
// ); // );
// console.log(aryPoints,'点位数组') // console.log(aryPoints,'点位数组')
} else {
Vue.prototype.mapIns.removeLayerByName('jhlayers222');
} }
// if(Vue.prototype.isMapStatck){ // if(Vue.prototype.isMapStatck){
// Vue.prototype.mapIns.pileIsShow("jhlayers", true); // Vue.prototype.mapIns.pileIsShow("jhlayers", true);

28
ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue

@ -107,7 +107,7 @@ export default {
mapBoxHeight: '100vh', mapBoxHeight: '100vh',
mapZoom: '7.5', // '7.5' String mapZoom: '7.5', // '7.5' String
mapCenter: lnglat, //[118.75, 36.46] Array mapCenter: lnglat, //[118.75, 36.46] Array
ttt:null
}; };
}, },
provide() { provide() {
@ -135,15 +135,17 @@ export default {
methods: { methods: {
refreshLayer(layers){ refreshLayer(layers){
console.log(layers,'更新图标') console.log(layers,'更新图标')
//this.$refs.gisMap2d.addPointByArr(
// {pointList:[]}, //
// 'jhlayers', // //.//.svg
// true //
//);
if(layers){
this.ttt=layers;
}
this.$refs.gisMap2d.addPointByArr( this.$refs.gisMap2d.addPointByArr(
{pointList:[]}, // pointsObj_new,//JSON.parse(JSON.stringify(layers)),
'jhlayers', // //.//.svg "jhlayers1111",
true //
);
this.$refs.gisMap2d.removeLayerByName('jhlayers');
this.$refs.gisMap2d.addPointByArr(
layers,
"jhlayers",
true true
); );
@ -171,18 +173,19 @@ export default {
}, },
bbbbb() { bbbbb() {
console.log(this.ttt)
this.$refs.gisMap2d.addPointByArr( this.$refs.gisMap2d.addPointByArr(
// this.pointsObj, // this.pointsObj,
pointsObj_new, pointsObj_new,
"jhlayers", "jhlayers1111",
true true
); );
}, },
ccccc() { ccccc() {
this.$refs.gisMap2d.removeLayerByName("jhlayers"); this.$refs.gisMap2d.removeLayerByName("jhlayers1111");
}, },
ddddd() { ddddd() {
this.$refs.gisMap2d.pileIsShow("jhlayers", this.isShow); this.$refs.gisMap2d.pileIsShow("jhlayers1111", this.isShow);
// this.$refs.gisMap2d.pileIsShow("customLayer222", this.isShow); // this.$refs.gisMap2d.pileIsShow("customLayer222", this.isShow);
this.isShow = !this.isShow; this.isShow = !this.isShow;
}, },
@ -376,6 +379,7 @@ export default {
left: 5px; left: 5px;
} }
.btnItem { .btnItem {
user-select: none;
border: 1px #fff solid; border: 1px #fff solid;
padding: 3px; padding: 3px;
border-radius: 3px; border-radius: 3px;

2
ruoyi-ui/vue.config.js

@ -45,7 +45,7 @@ module.exports = {
// target: `http://10.168.72.174:8087`, //赵祥龙 // target: `http://10.168.72.174:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟凡峰 // target: `http://10.168.65.156:8097`, //孟凡峰
// target: `http://10.168.79.46:8089`, //王家宝 // target: `http://10.168.79.46:8089`, //王家宝
target: `http://10.168.77.128:8087`, //王兴琳 // target: `http://10.168.77.128:8087`, //王兴琳
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save