|
@@ -1,5 +1,11 @@
|
|
|
<template>
|
|
|
<div class="ghzc">
|
|
|
+ <div class="btn" v-if="splitScreen">
|
|
|
+ <span class="sx jcbh">前后影像对比:{{ detailObj.jcbh }}</span>
|
|
|
+ <!-- <el-button @click="drawer = true">打开抽屉</el-button> -->
|
|
|
+ <span class="sx qsx">前时相:{{ detailObj.qsx }}</span>
|
|
|
+ <span class="sx hsx">后时相:{{ detailObj.hsx }}</span>
|
|
|
+ </div>
|
|
|
<div class="sm-panel sm-function-module-query" v-drag>
|
|
|
<div class="sm-panel-header">
|
|
|
<span>图斑详情</span>
|
|
@@ -8,10 +14,21 @@
|
|
|
<div class="ServiceCon">
|
|
|
<el-tabs type="border-card" class="xz_box" v-model="activeTabs" stretch>
|
|
|
<el-tab-pane label="基本信息" name="jbxx">
|
|
|
- <Jbxx :detailObj="detailObj" @updateParent="changeData" ref="jbxx"></Jbxx>
|
|
|
+ <div class="dbBtn" @click="clickOpen">查看前后影像对比</div>
|
|
|
+
|
|
|
+ <Jbxx
|
|
|
+ :detailObj="detailObj"
|
|
|
+ @updateParent="changeData"
|
|
|
+ ref="jbxx"
|
|
|
+ v-if="activeTabs == 'jbxx'"
|
|
|
+ ></Jbxx>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="核查信息" name="hcxx">
|
|
|
- <Hcxx @updateParent="changeData" :jcbh="detailObj.jcbh" v-if="activeTabs == 'hcxx'"></Hcxx>
|
|
|
+ <Hcxx
|
|
|
+ @updateParent="changeData"
|
|
|
+ :jcbh="detailObj.jcbh"
|
|
|
+ v-if="activeTabs == 'hcxx'"
|
|
|
+ ></Hcxx>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
@@ -28,6 +45,7 @@ import {
|
|
|
initroller,
|
|
|
useRoller,
|
|
|
} from "@/utils/MapHelper/map.js";
|
|
|
+import { getTiffPath } from "@/api/ghss/jctb.js";
|
|
|
export default {
|
|
|
props: {
|
|
|
detailObj: {
|
|
@@ -41,41 +59,28 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
activeTabs: "jbxx",
|
|
|
- templateList: [
|
|
|
- {
|
|
|
- 图斑编号: 6401812024070108270002,
|
|
|
- 行政名称: "海棠区",
|
|
|
- 前时相: "20230925",
|
|
|
- 后时相: "20240701",
|
|
|
- 前类型: "XX",
|
|
|
- 后类型: "XXX",
|
|
|
- },
|
|
|
- ],
|
|
|
emitImgIndex: -1,
|
|
|
emitImgList: [],
|
|
|
imagelayers: [],
|
|
|
- splitScreen:false
|
|
|
+ splitScreen: false,
|
|
|
+ idArr: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
|
- mounted() {
|
|
|
- this.$nextTick(() => {
|
|
|
- // initroller();
|
|
|
- // this.splitScreen = true;
|
|
|
- });
|
|
|
- },
|
|
|
+ mounted() {},
|
|
|
methods: {
|
|
|
changeData(name, updata) {
|
|
|
this[name] = updata;
|
|
|
},
|
|
|
closeBox() {
|
|
|
if (this.splitScreen) {
|
|
|
- this.splitScreen = false
|
|
|
- this.onClick(false);
|
|
|
+ this.splitScreen = false;
|
|
|
+ // this.onClick(false);
|
|
|
}
|
|
|
+ viewer.entities.removeAll();
|
|
|
this.$emit("updateParent", "isShowTb", false);
|
|
|
-
|
|
|
this.$emit("updateParent", "emitImgIndex", -1);
|
|
|
+ this.$emit("updateParent", "allShow", true);
|
|
|
},
|
|
|
onClickjl(show) {
|
|
|
if (show) {
|
|
@@ -104,7 +109,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onClick(show) {
|
|
|
- console.log("a-aa--", show);
|
|
|
let mul = show ? "HORIZONTAL" : "NONE";
|
|
|
scene.multiViewportMode = Cesium.MultiViewportMode[mul];
|
|
|
let jl = {
|
|
@@ -117,7 +121,6 @@ export default {
|
|
|
this.setImager({ url: jl.zzq, year: "qian" }, true, (layer) => {
|
|
|
layer.setVisibleInViewport(0, false);
|
|
|
});
|
|
|
-
|
|
|
},
|
|
|
setImager(obj, isshow = true, fun) {
|
|
|
if (this.imagelayers[obj.year]) this.imagelayers[obj.year].show = isshow;
|
|
@@ -132,13 +135,79 @@ export default {
|
|
|
fun && fun(this.imagelayers[obj.year]);
|
|
|
// viewer.flyTo(this.imagelayers[obj.year]);
|
|
|
},
|
|
|
+ clickOpen() {
|
|
|
+ getTiffPath(this.detailObj.qsxtif).then((res) => {
|
|
|
+ this.remove();
|
|
|
+ console.log(res.data,'res.data')
|
|
|
+ if (res.data.pngenvelope) {
|
|
|
+ this.getEntities(
|
|
|
+ this.detailObj.jcbh,
|
|
|
+ res.data.pngpath,
|
|
|
+ res.data.pngenvelope
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // getTiffPath(this.detailObj.hsxtif).then((res) => {
|
|
|
+ // this.remove();
|
|
|
+ // if (res.data.pngenvelope) {
|
|
|
+ // this.getEntities(
|
|
|
+ // this.detailObj.jcbh,
|
|
|
+ // res.data.pngpath,
|
|
|
+ // res.data.pngenvelope
|
|
|
+ // );
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+
|
|
|
+ this.$emit("updateParent", "allShow", false);
|
|
|
+ this.splitScreen = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ getEntities(id, url, position) {
|
|
|
+ // let mul = "HORIZONTAL";
|
|
|
+ // viewer.scene.multiViewportMode = Cesium.MultiViewportMode[mul];
|
|
|
+ let imageUrl = "";
|
|
|
+ let posArr = position;
|
|
|
+ imageUrl = window.axiosURI + "/file/upload/attachment" + url;
|
|
|
+ // 创建Cesium的ImageMaterialProperty
|
|
|
+ const imageMaterial = new Cesium.ImageMaterialProperty({
|
|
|
+ image: imageUrl,
|
|
|
+ repeat: new Cesium.Cartesian2(1.0, 1.0), // 控制图像重复,这里设置为不重复
|
|
|
+ transparent: true, // 如果图像有透明通道,设置为true
|
|
|
+ });
|
|
|
+
|
|
|
+ // 创建一个矩形实体并应用材质
|
|
|
+ const rectangleEntity = viewer.entities.add({
|
|
|
+ name: "Image Overlay",
|
|
|
+ id: id,
|
|
|
+ rectangle: {
|
|
|
+ coordinates: Cesium.Rectangle.fromDegrees(
|
|
|
+ posArr[0],
|
|
|
+ posArr[1],
|
|
|
+ posArr[2],
|
|
|
+ posArr[3]
|
|
|
+ ), // 设置矩形的经纬度范围
|
|
|
+ material: imageMaterial,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ this.idArr.push(rectangleEntity.id);
|
|
|
+ // rectangleEntity.setVisibleInViewport(1, false);
|
|
|
+ // 调整视图以查看实体
|
|
|
+ viewer.zoomTo(rectangleEntity);
|
|
|
+ },
|
|
|
+ remove() {
|
|
|
+ if (this.idArr.length != 0) {
|
|
|
+ this.idArr.forEach((item) => {
|
|
|
+ viewer.entities.removeById(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
emitImgIndex(val) {
|
|
|
this.$emit("updateParent", "imgIndex", val);
|
|
|
this.$emit("updateParent", "imgList", this.emitImgList);
|
|
|
},
|
|
|
- splitScreen(val){
|
|
|
+ splitScreen(val) {
|
|
|
this.onClick(val);
|
|
|
},
|
|
|
},
|
|
@@ -188,4 +257,31 @@ export default {
|
|
|
padding: 1rem 0.5rem 0px 0.5rem;
|
|
|
height: 100% !important;
|
|
|
}
|
|
|
+.btn {
|
|
|
+ .sx {
|
|
|
+ background: #64daff9c;
|
|
|
+ padding: 5px 10px;
|
|
|
+ border: 1px solid #4949492b;
|
|
|
+ border-radius: 5px;
|
|
|
+ position: absolute;
|
|
|
+ top: 4vh;
|
|
|
+ left: calc(50% - 170px);
|
|
|
+ z-index: 40;
|
|
|
+ }
|
|
|
+ .hsx {
|
|
|
+ left: 52vw;
|
|
|
+ }
|
|
|
+ .jcbh {
|
|
|
+ left: 3vw;
|
|
|
+ }
|
|
|
+}
|
|
|
+.dbBtn {
|
|
|
+ width: 136px;
|
|
|
+ height: 33px;
|
|
|
+ background-color: #0f7ac8;
|
|
|
+ line-height: 33px;
|
|
|
+ text-align: center;
|
|
|
+ margin: 10px 0;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
</style>
|