|
@@ -17,12 +17,13 @@
|
|
|
v-for="(k, i) in 2"
|
|
|
:key="i"
|
|
|
class="splitScreen w50"
|
|
|
- v-show="active == 1"
|
|
|
+ v-show="active == 0 || active == 1"
|
|
|
>
|
|
|
<li
|
|
|
class="sm-tool-btn sm-btn"
|
|
|
title="目录"
|
|
|
@click="$set(layers, i, !layers[i])"
|
|
|
+ v-show="active == 1"
|
|
|
>
|
|
|
<span class="iconfont icontuceng"></span>
|
|
|
</li>
|
|
@@ -62,7 +63,7 @@ import {
|
|
|
} from "@/utils/MapHelper/map.js";
|
|
|
import { loadGeoJSON, removeGeoJSON } from "@/utils/MapHelper/help.js";
|
|
|
import AsideBottom from "./AsideBottom.vue";
|
|
|
-import { QueryList } from "@/api/cockpitNew";
|
|
|
+import { QueryOne, QueryList } from "@/api/cockpitNew";
|
|
|
let geoSources = {};
|
|
|
export default {
|
|
|
props: {},
|
|
@@ -72,14 +73,7 @@ export default {
|
|
|
list: ["卷帘对比", "分屏对比", "影像对比", "重置"],
|
|
|
active: 0,
|
|
|
dbdata: { id: "", fp: {} },
|
|
|
- mllist: [
|
|
|
- { label: "耕地", value: "0" },
|
|
|
- { label: "种植园", value: "1" },
|
|
|
- { label: "林地", value: "2" },
|
|
|
- { label: "草地", value: "3" },
|
|
|
- { label: "商服", value: "4" },
|
|
|
- { label: "住宅", value: "5" },
|
|
|
- ],
|
|
|
+
|
|
|
checkdata: [[], []],
|
|
|
imagelayers: {},
|
|
|
nolayer: "",
|
|
@@ -87,6 +81,9 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
components: { AsideBottom },
|
|
|
+ created() {
|
|
|
+ this.GetServer();
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
initroller();
|
|
@@ -96,13 +93,26 @@ export default {
|
|
|
closeInster() {
|
|
|
this.onClick(-1);
|
|
|
removeGeoJSON("fpdb");
|
|
|
-
|
|
|
this.$emit("close");
|
|
|
},
|
|
|
show(data) {
|
|
|
- this.dbdata = data;
|
|
|
+ this.dbdata = { ...this.dbdata, ...data };
|
|
|
this.onClick(0);
|
|
|
},
|
|
|
+ async GetServer() {
|
|
|
+ if (this.dbdata.zzq_server) return;
|
|
|
+ if (!store.state.jlserver.zz) {
|
|
|
+ let res = await QueryOne({
|
|
|
+ jscType: "qytuzz_sdxz_server",
|
|
|
+ id: "1",
|
|
|
+ });
|
|
|
+
|
|
|
+ store.setJlServer("zz", res.data);
|
|
|
+ }
|
|
|
+
|
|
|
+ this.dbdata.zzq_server = store.state.jlserver.zz.zzq_server;
|
|
|
+ this.dbdata.zzh_server = store.state.jlserver.zz.zzh_server;
|
|
|
+ },
|
|
|
checkedChange(value) {
|
|
|
console.log(value);
|
|
|
},
|
|
@@ -123,16 +133,33 @@ export default {
|
|
|
clickml() {},
|
|
|
async onClick(i) {
|
|
|
this.active = i;
|
|
|
- if (i == 0) {
|
|
|
+ if (!this.layersData.length) {
|
|
|
await this.Getlayers();
|
|
|
this.$refs.aside.setdata(this.layersData);
|
|
|
- this.nolayer = this.layersData[1].year;
|
|
|
- this.setImager(this.layersData[1], true, (layer) => {
|
|
|
- useRoller(true, "lrRoller", "leftRoller", "", false);
|
|
|
- setImageryRoller(layer);
|
|
|
- });
|
|
|
+ }
|
|
|
+ if (i == 0) {
|
|
|
+ // this.nolayer = this.layersData[1].year;
|
|
|
+ // this.setImager(this.layersData[1], true, (layer) => {
|
|
|
+ // useRoller(true, "lrRoller", "leftRoller", "", false);
|
|
|
+ // setImageryRoller(layer);
|
|
|
+ // });
|
|
|
+ // this.nolayer = this.layersData[1].year;
|
|
|
+ store.setaddNode([
|
|
|
+ { id: "ttzz", url: this.dbdata.zzq_server, label: "土地整治对比" },
|
|
|
+ ]);
|
|
|
+ this.setImager({ url: this.dbdata.zzq_server, year: "qian" }, true);
|
|
|
+ this.setImager(
|
|
|
+ { url: this.dbdata.zzh_server, year: "hou" },
|
|
|
+ true,
|
|
|
+ (layer) => {
|
|
|
+ useRoller(true, "lrRoller", "leftRoller", "", false);
|
|
|
+ setImageryRoller(layer);
|
|
|
+ }
|
|
|
+ );
|
|
|
} else {
|
|
|
- hideImageryRoller(this.imagelayers[this.nolayer]);
|
|
|
+ store.setaddNode([]);
|
|
|
+ // hideImageryRoller(this.imagelayers[this.nolayer]);
|
|
|
+ hideImageryRoller(this.imagelayers["hou"]);
|
|
|
useRoller(false);
|
|
|
}
|
|
|
this.multiView();
|
|
@@ -297,7 +324,7 @@ export default {
|
|
|
}
|
|
|
.sm-toolTitle {
|
|
|
top: 10px;
|
|
|
- left: -70px;
|
|
|
+ left: 25%;
|
|
|
font-size: 20px;
|
|
|
}
|
|
|
}
|