|
@@ -13,7 +13,12 @@
|
|
<li class="el-icon-close" @click="closeInster"></li>
|
|
<li class="el-icon-close" @click="closeInster"></li>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
- <div v-for="(k, i) in 2" :key="i" class="splitScreen w50">
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-for="(k, i) in 2"
|
|
|
|
+ :key="i"
|
|
|
|
+ class="splitScreen w50"
|
|
|
|
+ v-show="active == 1"
|
|
|
|
+ >
|
|
<li
|
|
<li
|
|
class="sm-tool-btn sm-btn"
|
|
class="sm-tool-btn sm-btn"
|
|
title="目录"
|
|
title="目录"
|
|
@@ -36,15 +41,20 @@
|
|
</div>
|
|
</div>
|
|
<div class="sm-toolTitle">{{ `整治${!i ? "前" : "后"}地类图斑` }}</div>
|
|
<div class="sm-toolTitle">{{ `整治${!i ? "前" : "后"}地类图斑` }}</div>
|
|
</div>
|
|
</div>
|
|
- <AsideBottom></AsideBottom>
|
|
|
|
|
|
+ <AsideBottom ref="aside" v-show="active == 2"></AsideBottom>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { district } from "@/api/Idleland.js";
|
|
|
|
-import { setImageryRoller, hideImageryRoller } from "@/utils/MapHelper/map.js";
|
|
|
|
|
|
+import {
|
|
|
|
+ setImageryRoller,
|
|
|
|
+ hideImageryRoller,
|
|
|
|
+ initroller,
|
|
|
|
+ useRoller,
|
|
|
|
+} from "@/utils/MapHelper/map.js";
|
|
import { loadGeoJSON } from "@/utils/MapHelper/help.js";
|
|
import { loadGeoJSON } from "@/utils/MapHelper/help.js";
|
|
import AsideBottom from "./AsideBottom.vue";
|
|
import AsideBottom from "./AsideBottom.vue";
|
|
|
|
+import { QueryList } from "@/api/cockpitNew";
|
|
let geoSources = {};
|
|
let geoSources = {};
|
|
export default {
|
|
export default {
|
|
props: {},
|
|
props: {},
|
|
@@ -53,7 +63,7 @@ export default {
|
|
layers: [false, false],
|
|
layers: [false, false],
|
|
list: ["卷帘对比", "分屏对比", "影像对比", "重置"],
|
|
list: ["卷帘对比", "分屏对比", "影像对比", "重置"],
|
|
active: 0,
|
|
active: 0,
|
|
- dbdata: { fp: {} },
|
|
|
|
|
|
+ dbdata: { id: "", fp: {} },
|
|
mllist: [
|
|
mllist: [
|
|
{ label: "耕地", value: "0" },
|
|
{ label: "耕地", value: "0" },
|
|
{ label: "种植园", value: "1" },
|
|
{ label: "种植园", value: "1" },
|
|
@@ -63,16 +73,22 @@ export default {
|
|
{ label: "住宅", value: "5" },
|
|
{ label: "住宅", value: "5" },
|
|
],
|
|
],
|
|
checkdata: [[], []],
|
|
checkdata: [[], []],
|
|
|
|
+ layers: {},
|
|
|
|
+ nolayer: "",
|
|
|
|
+ layersData: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
components: { AsideBottom },
|
|
components: { AsideBottom },
|
|
mounted() {
|
|
mounted() {
|
|
- this.onClick(0);
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ initroller(false);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
closeInster() {
|
|
closeInster() {
|
|
console.log("ssss");
|
|
console.log("ssss");
|
|
this.onClick(-1);
|
|
this.onClick(-1);
|
|
|
|
+ removeGeoJSON("fpdb");
|
|
this.$emit("close");
|
|
this.$emit("close");
|
|
},
|
|
},
|
|
show(data) {
|
|
show(data) {
|
|
@@ -90,8 +106,8 @@ export default {
|
|
offset: new Cesium.HeadingPitchRange(0, -45),
|
|
offset: new Cesium.HeadingPitchRange(0, -45),
|
|
});
|
|
});
|
|
// geodata.setVisibleInViewport(i, checked);
|
|
// geodata.setVisibleInViewport(i, checked);
|
|
- geodata.setVisibleInViewport(0, checked);
|
|
|
|
- geodata.setVisibleInViewport(1, checked);
|
|
|
|
|
|
+ geoSources[`${name}q`].setVisibleInViewport(0, checked);
|
|
|
|
+ geoSources[`${name}h`].setVisibleInViewport(1, checked);
|
|
// geodata.show = checked;
|
|
// geodata.show = checked;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -99,9 +115,30 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
clickml() {},
|
|
clickml() {},
|
|
- onClick(i) {
|
|
|
|
|
|
+ async onClick(i) {
|
|
this.active = i;
|
|
this.active = i;
|
|
|
|
+ console.log(i, this.layersData, "---");
|
|
|
|
+ if (i == 0) {
|
|
|
|
+ await this.Getlayers();
|
|
|
|
+ this.nolayer = this.layersData[1].year;
|
|
|
|
+ this.setImager(this.layersData[1], true, (layer) => {
|
|
|
|
+ useRoller(true, "lrRoller", "leftRoller");
|
|
|
|
+ // setImageryRoller(layer);
|
|
|
|
+ layer.splitDirection = new Cesium.Cartesian2(
|
|
|
|
+ Cesium.ImagerySplitDirection.RIGHT,
|
|
|
|
+ Cesium.ImagerySplitDirection.NONE
|
|
|
|
+ );
|
|
|
|
+ });
|
|
|
|
+ } else useRoller(false);
|
|
this.multiView();
|
|
this.multiView();
|
|
|
|
+ if (i == 2) {
|
|
|
|
+ this.$refs.aside.activeVal == 0;
|
|
|
|
+ this.$refs.aside.clickHandler();
|
|
|
|
+ } else {
|
|
|
|
+ // this.layersData.forEach((img) => {
|
|
|
|
+ // this.setImager(img, false);
|
|
|
|
+ // });
|
|
|
|
+ }
|
|
// switch (this.active) {
|
|
// switch (this.active) {
|
|
// case 0:
|
|
// case 0:
|
|
// break;
|
|
// break;
|
|
@@ -115,15 +152,36 @@ export default {
|
|
// break;
|
|
// break;
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
- roller(){
|
|
|
|
- rollerShutterConfig.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE);
|
|
|
|
|
|
+ async Getlayers() {
|
|
|
|
+ let res = await QueryList({
|
|
|
|
+ jscType: "qytuzz_lj_imagers",
|
|
|
|
+ id: this.dbdata.id,
|
|
|
|
+ });
|
|
|
|
+ this.layersData = res.data;
|
|
|
|
+ },
|
|
|
|
+ setImager(obj, isshow = true, fun) {
|
|
|
|
+ console.log(obj, isshow, "---");
|
|
|
|
+
|
|
|
|
+ if (this.layers[obj.year]) this.layers[obj.year].show = isshow;
|
|
|
|
+ else if (isshow)
|
|
|
|
+ this.layers[obj.year] = viewer.imageryLayers.addImageryProvider(
|
|
|
|
+ new Cesium.SuperMapImageryProvider({
|
|
|
|
+ url: obj.url,
|
|
|
|
+ name: obj.year,
|
|
|
|
+ })
|
|
|
|
+ );
|
|
|
|
+ fun && fun(this.layers[obj.year]);
|
|
|
|
+ // viewer.flyTo(this.layers[obj.year]);
|
|
|
|
+ },
|
|
|
|
+ roller() {
|
|
|
|
+ rollerShutterConfig.splitDirection = new Cesium.Cartesian2(
|
|
|
|
+ Cesium.ImagerySplitDirection.LEFT,
|
|
|
|
+ Cesium.ImagerySplitDirection.NONE
|
|
|
|
+ );
|
|
},
|
|
},
|
|
multiView() {
|
|
multiView() {
|
|
let mul = this.active == 1 ? "HORIZONTAL" : "NONE";
|
|
let mul = this.active == 1 ? "HORIZONTAL" : "NONE";
|
|
scene.multiViewportMode = Cesium.MultiViewportMode[mul];
|
|
scene.multiViewportMode = Cesium.MultiViewportMode[mul];
|
|
- console.log(this.dbdata, "---");
|
|
|
|
- // let qgeom =
|
|
|
|
- // "SRID=4326;POLYGON((109.15412537651648 18.33292898400856,109.15414451156408 18.33293727703712,109.15415954142809 18.331308849767996,109.15415695380635 18.331067639473183,109.15413798111571 18.331089811465688,109.15414034671478 18.3313088685252,109.15412537651648 18.33292898400856))";
|
|
|
|
this.active == 1 && this.active_tableData(this.dbdata.fp); //this.dbdata.fp
|
|
this.active == 1 && this.active_tableData(this.dbdata.fp); //this.dbdata.fp
|
|
},
|
|
},
|
|
active_tableData(newVal) {
|
|
active_tableData(newVal) {
|
|
@@ -162,7 +220,12 @@ export default {
|
|
imagelayer.setVisibleInViewport(id, show);
|
|
imagelayer.setVisibleInViewport(id, show);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- watch: {},
|
|
|
|
|
|
+ watch: {
|
|
|
|
+ nolayer(newVal, oldVal) {
|
|
|
|
+ console.log(newVal, oldVal);
|
|
|
|
+ if (oldVal) this.setImager({ year: oldVal }, false);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|