|
@@ -70,7 +70,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- <div class="legend-panel" v-if="showLegend">
|
|
|
+ <div class="legend-panel" v-if="showLegend">
|
|
|
<div class="name-panel">
|
|
|
<div class="name">图例</div>
|
|
|
<img
|
|
@@ -94,17 +94,19 @@
|
|
|
:key="index"
|
|
|
class="zl"
|
|
|
>
|
|
|
- <i
|
|
|
+ <img v-if="item.type=='img'" :src="citem.imgSrc">
|
|
|
+ <i v-else
|
|
|
:style="{
|
|
|
background: citem.fill == 'transparent' ? '' : citem.fill,
|
|
|
borderColor: citem.border,
|
|
|
}"
|
|
|
></i
|
|
|
- >{{ citem.name }}
|
|
|
+ >
|
|
|
+ {{ citem.name }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
<div v-if="!showQuery" class="topdiv">
|
|
|
<div class="m-textarea-panel">
|
|
|
<textarea
|
|
@@ -506,46 +508,46 @@ export default {
|
|
|
this.activeIndex = 0;
|
|
|
this.initMap();
|
|
|
|
|
|
- // this.showResult = true;
|
|
|
- // this.showQuery = true;
|
|
|
+ this.showResult = true;
|
|
|
+ this.showQuery = true;
|
|
|
+ this.xgdk = [
|
|
|
+ {
|
|
|
+ objectid: 1839,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objectid: 1843,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objectid: 1845,
|
|
|
+ },
|
|
|
+ ];
|
|
|
// this.xgdk = [
|
|
|
// {
|
|
|
- // objectid: 1839,
|
|
|
+ // id: 7685,
|
|
|
// },
|
|
|
// {
|
|
|
- // objectid: 1843,
|
|
|
+ // id: 37091,
|
|
|
// },
|
|
|
// {
|
|
|
- // objectid: 1845,
|
|
|
+ // id: 40175,
|
|
|
// },
|
|
|
// ];
|
|
|
- // // this.xgdk = [
|
|
|
- // // {
|
|
|
- // // id: 7685,
|
|
|
- // // },
|
|
|
- // // {
|
|
|
- // // id: 37091,
|
|
|
- // // },
|
|
|
- // // {
|
|
|
- // // id: 40175,
|
|
|
- // // },
|
|
|
- // // ];
|
|
|
- // this.getDetailByIdList(this.xgdk, (data) => {
|
|
|
- // this.xgdk = data;
|
|
|
- // });
|
|
|
- // this.addGdLayer(this.xgdk);
|
|
|
- // this.detailData = {
|
|
|
- // id: 48668,
|
|
|
- // dkid: "1895353609416212480",
|
|
|
- // xzqmc: "萧山区",
|
|
|
- // dkmc: "湘湖国家旅游度假区建设工矿仓储项目",
|
|
|
- // address: "位于萧山区义桥镇,东至空地,南至空地,西至空地,北至云临路。",
|
|
|
- // dkmj: 60.714,
|
|
|
- // tdyt: "工业用地",
|
|
|
- // tax: "100",
|
|
|
- // center_wkt: "POINT(120.912063 29.486802)",
|
|
|
- // };
|
|
|
- // this.showDetail = true;
|
|
|
+ this.getDetailByIdList(this.xgdk, (data) => {
|
|
|
+ this.xgdk = data;
|
|
|
+ });
|
|
|
+ this.addGdLayer(this.xgdk);
|
|
|
+ this.detailData = {
|
|
|
+ id: 48668,
|
|
|
+ dkid: "1895353609416212480",
|
|
|
+ xzqmc: "萧山区",
|
|
|
+ dkmc: "湘湖国家旅游度假区建设工矿仓储项目",
|
|
|
+ address: "位于萧山区义桥镇,东至空地,南至空地,西至空地,北至云临路。",
|
|
|
+ dkmj: 60.714,
|
|
|
+ tdyt: "工业用地",
|
|
|
+ tax: "100",
|
|
|
+ center_wkt: "POINT(120.912063 29.486802)",
|
|
|
+ };
|
|
|
+ this.showDetail = true;
|
|
|
// this.checkPermision();
|
|
|
});
|
|
|
},
|
|
@@ -560,7 +562,7 @@ export default {
|
|
|
methods: {
|
|
|
dSourceChange() {
|
|
|
if (this.dSource === "3") {
|
|
|
- this.$Message.error("暂无数据,请选择其他源!");
|
|
|
+ this.$Message.error("暂无数据,请选择其他数据源!");
|
|
|
}
|
|
|
},
|
|
|
toggleContentVisabledAll() {
|
|
@@ -830,10 +832,27 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.map.addLayer(item.layer);
|
|
|
+
|
|
|
+ //添加图例
|
|
|
+ if (item.legend && item.legend.children) {
|
|
|
+ let find = this.legend.find((ele) => ele.name == item.name);
|
|
|
+ if (!find) {
|
|
|
+ this.legend.push({
|
|
|
+ name: item.name,
|
|
|
+ type:item.legend.type,
|
|
|
+ children: item.legend.children,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
if (item.layer != undefined || item.layer != null) {
|
|
|
this.map.removeLayer(item.layer);
|
|
|
}
|
|
|
+
|
|
|
+ let findIndex = this.legend.findIndex((ele) => ele.name == item.name);
|
|
|
+ if (findIndex > -1) {
|
|
|
+ this.legend.splice(findIndex, 1);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
customTileUrl(coords) {
|