|
@@ -262,7 +262,7 @@ export default {
|
|
|
created() {
|
|
|
// this.getYear();
|
|
|
// this.GetDate();
|
|
|
- this.typeList = [{ id: "01", label: "耕地", index: 0 }, ...legends];
|
|
|
+ this.typeList = [...JSON.parse(JSON.stringify(legends))];
|
|
|
},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
@@ -289,7 +289,6 @@ export default {
|
|
|
} else {
|
|
|
if (nowtype.layerID) {
|
|
|
this.nowlayer = this.nowyear + nowtype.layerID;
|
|
|
- console.log(nowtype, "----nowtype");
|
|
|
} else if (this.layers.length) {
|
|
|
let yobj = this.yearList.find((y) => y.year == this.nowyear);
|
|
|
if (yobj) this.goLayer(yobj, nowtype);
|
|
@@ -349,8 +348,8 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
showInfo(data, obj) {
|
|
|
- let legends = store.state.addlegend;
|
|
|
- if (legends && legends.length && legends[0].id == "gdbh") {
|
|
|
+ let alegends = store.state.addlegend;
|
|
|
+ if (alegends && alegends.length && alegends[0].id == "gdbh") {
|
|
|
this.$emit("handleView", data, obj);
|
|
|
}
|
|
|
},
|
|
@@ -480,7 +479,6 @@ export default {
|
|
|
viewer.flyTo(this.imagelayers[obj.year]);
|
|
|
},
|
|
|
sourcesshow(show) {
|
|
|
- console.log(this.nowyear, show, "000");
|
|
|
this.setImager({ year: this.nowlayer }, show);
|
|
|
},
|
|
|
reset() {
|
|
@@ -489,6 +487,8 @@ export default {
|
|
|
Object.keys(this.imagelayers).forEach((key) => {
|
|
|
viewer.imageryLayers.remove(this.imagelayers[key]);
|
|
|
});
|
|
|
+ this.imagelayers = {};
|
|
|
+ this.typeList = [...JSON.parse(JSON.stringify(legends))];
|
|
|
});
|
|
|
},
|
|
|
setEchart(data, id) {
|
|
@@ -502,7 +502,6 @@ export default {
|
|
|
console.log(newValue, "---");
|
|
|
},
|
|
|
nowlayer(newValue, oldVal) {
|
|
|
- console.log(newValue, oldVal, "-ssssss--");
|
|
|
this.setImager({ year: oldVal }, false);
|
|
|
this.setImager({ year: newValue }, true);
|
|
|
},
|