浏览代码

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

gushoubang 7 月之前
父节点
当前提交
23eeec96ea

+ 21 - 0
src/api/ghss/jctb.js

@@ -27,3 +27,24 @@ export function JctbList(params) {
         params
     })
 }
+export function getJctbInfo(id) {
+    return request({
+        url: '/apply/gdbh/jctb/'+`${id}`,
+        method: 'get',
+        id:id
+    })
+}
+export function getJctbhcInfo(jcbh) {
+    return request({
+        url: '/apply/gdbh/jctbhc/jcbh/' +`${jcbh}`,
+        method: 'get',
+        jcbh:jcbh
+    })
+}
+export function getFilePath(filePath) {
+    return request({
+        url: '/analyse/fzss/DownloadReport?filePath=' +`${filePath}`,
+        method: 'get',
+        filePath:filePath
+    })
+}

+ 1 - 1
src/components/Query/clickQuery/clickQuery.vue

@@ -478,7 +478,7 @@ export default {
           datasetNames: [str3],
           ids: [pickedFeature.id],
         };
-        let e = awaitmapQuery(url2, queryByIDParameters);
+        let e = await mapQuery(url2, queryByIDParameters);
         if (e && e.totalCount > 0) {
           // that.layerList.push(store.state.vectorlayerlist[i]);
           that.layerList.push(obj);

+ 1 - 1
src/views/LandConsolidation/components/config.js

@@ -37,7 +37,7 @@ export const reasonList = [
 export const TableHeader = [
   { label: "项目名称", prop: "xmmc", align: 'center' },
   // { label: "主管部门", prop: "zgbm", width: '80px' },// slot: "mj"
-  { label: "建设规模", prop: "gm", width: '80px', align: 'center' },
+  { label: "建设规模(公顷)", prop: "gm", width: '120px',slot: "mj", align: 'center' },
   { label: "操作", slot: "action", width: '80px', align: 'center' },
 ]
 

+ 28 - 13
src/views/LandConsolidation/components/contrast.vue

@@ -120,7 +120,7 @@ export default {
   },
 
   created() {
-    this.$props.ptaye == "gdbh" && this.GetServer();
+    this.$props.ptaye != "gdbh" && this.GetServer();
   },
   mounted() {
     this.$nextTick(() => {
@@ -133,6 +133,10 @@ export default {
       this.onClick(-1);
       removeGeoJSON("fpdb");
       this.$emit("close");
+      Object.keys(this.imagelayers).forEach((key) => {
+        viewer.imageryLayers.remove(this.imagelayers[key]);
+      });
+      this.imagelayers = {};
     },
     show(data) {
       console.log(data);
@@ -164,8 +168,18 @@ export default {
     },
     clickcheck(i, name, checked) {
       if (this.$props.ptaye == "gdbh") {
-        let geodata = geoSources[`${name}${i ? "h" : "q"}`];
-        geodata.setVisibleInViewport(i, checked);
+        if (this.active == 0) {
+          if (i == 0) {
+            let dobj = this.dbdata.fp.fined((d) => d.year == name);
+            this.setImager(dobj, checked, (layer) => {
+              setImageryRoller(layer);
+            });
+          }
+        } else if (this.active == 1) {
+          let lay = this.imagelayers[name];
+          viewer.flyTo(lay);
+          lay.setVisibleInViewport(i, checked);
+        }
       } else {
         let geodata = geoSources[`${name}${i ? "h" : "q"}`];
         if (geodata) {
@@ -196,13 +210,18 @@ export default {
         return;
       }
       this.active = i;
-
+      if (this.active != 0 || this.active != 1) {
+        Object.keys(this.imagelayers).forEach((key) => {
+          this.imagelayers[key].show = false;
+        });
+      }
       if (i == 0) {
+        
         this.layers = [false, false];
         this.gdjlcheck[0].push(this.dbdata.fp[0].year);
         this.gdjlcheck[1].push(this.dbdata.fp[1].year);
-        this.setImager({ ...this.dbdata.fp[0] }, true);
-        this.setImager({ ...this.dbdata.fp[1] }, true, (layer) => {
+        this.setImager({ ...this.dbdata.fp[0], top: true }, true);
+        this.setImager({ ...this.dbdata.fp[1], top: false }, true, (layer) => {
           useRoller(true, "lrRoller", "leftRoller", "", false);
           setImageryRoller(layer);
         });
@@ -230,10 +249,6 @@ export default {
       } else {
         this.reset();
       }
-      // if (this.active != 0) {
-      //   this.setImager({ year: "qian" }, false);
-      //   this.setImager({ year: "hou" }, false);
-      // }
     },
     async onTdzzClick(i) {
       if (i == 3) {
@@ -364,9 +379,6 @@ export default {
       if (this.active == 1) setImageryRoller(imageryLayer);
       else hideImageryRoller(imageryLayer);
     },
-    setVisible(id, show) {
-      imagelayer.setVisibleInViewport(id, show);
-    },
   },
   watch: {
     nolayer(newVal, oldVal) {
@@ -374,6 +386,9 @@ export default {
       if (oldVal) this.setImager({ year: oldVal }, false);
     },
   },
+  beforeDestroy() {
+    this.closeInster();
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 1 - 1
src/views/LandConsolidation/components/list.vue

@@ -37,7 +37,7 @@
       @currentChange="searchFun"
     >
       <template #mj="{ row }">
-        {{ Number(row.crmj).toFixed(2) }}
+        {{ Number(row.gm).toFixed(2) }}
       </template>
       <template #action="{ row }">
         <span class="usable" @click="detail(row)">详情</span>

+ 1 - 1
src/views/LandConsolidation/index.vue

@@ -162,7 +162,7 @@ export default {
       xzqh: "",
       checkList: [
         {
-          title: "试点总",
+          title: "试点总",
         },
         {
           title: "整治项目",

+ 124 - 256
src/views/farmlandProtection/components/hcxx.vue

@@ -6,24 +6,26 @@
           label="图斑编号"
           label-class-name="my-label"
           content-class-name="my-content"
-          >{{ "6401812024070108270002" }}</el-descriptions-item
+          >{{ hcObj.jcbh }}</el-descriptions-item
         >
         <el-descriptions-item
           label="外业核实情况"
           content-class-name="my-content"
           :span="3"
-          >{{ "已核实" }}</el-descriptions-item
+          >{{ hcObj.wyhsqk }}</el-descriptions-item
         >
         <el-descriptions-item label="实际地类代码">{{
-          "4601"
+          hcObj.sjdldm
         }}</el-descriptions-item>
         <el-descriptions-item label="调查人员">{{
-          "刘子规"
+          hcObj.dcry
         }}</el-descriptions-item>
         <el-descriptions-item label="调查时间">{{
-          "20240116"
+          hcObj.dcsj
+        }}</el-descriptions-item>
+        <el-descriptions-item label="扩展信息1">{{
+          "无"
         }}</el-descriptions-item>
-        <el-descriptions-item label="扩展信息1">{{ "1" }}</el-descriptions-item>
         <el-descriptions-item label="扩展信息2">{{
           "无"
         }}</el-descriptions-item>
@@ -34,9 +36,7 @@
     </div>
     <div class="imgCon">
       <div class="echartTitle">
-        <div class="block-title">
-          监测类型情况 <span @click="ceshi">测试</span>
-        </div>
+        <div class="block-title">监测类型情况</div>
       </div>
       <div class="imgList">
         <div
@@ -48,8 +48,10 @@
           @mouseleave="handleMouseLeave(item, i)"
         >
           <span>{{ i + 1 }}</span>
-          <img :src="item.imgUrl" />
-          <p>{{ item.info }}</p>
+          <!-- <img :src="imgUrl" /> -->
+          <img :src="item.imagerPath" />
+          <!-- <img :src="imgUrl + item.imagerPath" /> -->
+          <p>{{ item.imagerSj }}</p>
         </div>
       </div>
     </div>
@@ -57,90 +59,68 @@
 </template>
 
 <script>
+import { getJctbhcInfo } from "@/api/ghss/jctb.js";
 export default {
   props: {
     detailObj: {
       type: Object,
     },
+    jcbh: {
+      type: String,
+    },
   },
   components: {},
   data() {
     return {
-      monitorList: [
+      imgUrl: "",
+      monitorList:[],
+      monitorImg: [
         {
-          id: "s1",
           imgUrl:
             "https://b0.bdstatic.com/ugc/Gr0RkpztmAdvrxnS4n54Iw49d04e3484c9bb1a11f03b38a819d893.jpg@h_1280",
-          info: "2024-09-27 15:04",
-          name: "钱复式",
-          lat: "168.18",
-          lon: "46.33",
-          psfw: "45°",
         },
         {
-          id: "s2",
           imgUrl:
             "https://img2.baidu.com/it/u=3692233586,2896402884&fm=253&fmt=auto&app=120&f=JPEG?w=759&h=427",
-          info: "2024-09-27 15:04",
-          name: "梅执礼",
-          lat: "168.18",
-          lon: "46.33",
-          psfw: "45°",
         },
         {
-          id: "s3",
           imgUrl:
             "https://img2.baidu.com/it/u=882190421,2711411099&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1067",
-          info: "2024-09-27 15:04",
-          name: "陈贵志",
-          lat: "168.18",
-          lon: "46.33",
-          psfw: "45°",
         },
         {
-          id: "s4",
           imgUrl:
             "http://img2.baidu.com/it/u=516755055,1384417278&fm=253&app=138&f=JPEG?w=800&h=1067",
-          info: "2024-09-27 15:04",
-          name: "权超英",
-          lat: "168.18",
-          lon: "46.33",
-          psfw: "45°",
         },
         {
-          id: "s5",
           imgUrl:
             "http://img0.baidu.com/it/u=1366170349,307387023&fm=253&app=138&f=JPEG?w=800&h=1067",
-          info: "2024-09-27 15:04",
-          name: "王XX",
-          lat: "168.18",
-          lon: "46.33",
-          psfw: "45°",
         },
       ],
       primitive: null,
       selectId: null,
       primitivesArray: [],
+      hcObj: null,
+      // jtArr:[],//箭头id数组
+      // dwArr:[],//
+      idArr:[],//id数组
     };
   },
   computed: {},
   mounted() {
     this.$nextTick(() => {
       // this.aaa();
-      // this.colorChange();
-      // this.ccc();
-      // this.onClickButton();
-      this.ddd();
+      // this.ddd();
+      // this.imgUrl =
+      //   "https://b0.bdstatic.com/ugc/Gr0RkpztmAdvrxnS4n54Iw49d04e3484c9bb1a11f03b38a819d893.jpg@h_1280";
     });
+    this.imgUrl = window.axiosURI + "/analyse/fzss/DownloadReport?filePath=";
   },
   methods: {
     handleMouseEnter(a, b) {
-      console.log("鼠标移入", a, b);
-      this.ceshi('111')
+      this.ceshi(a.id,'yr');
     },
     handleMouseLeave(a, b) {
-      console.log("鼠标移出");
-      this.ceshi()
+      this.ceshi(a.id,'yc');
     },
     changeData(name, updata) {
       this[name] = updata;
@@ -149,178 +129,48 @@ export default {
       this.$emit("updateParent", "emitImgList", this.monitorList);
       this.$emit("updateParent", "emitImgIndex", val);
     },
-    aaa() {
-      var redLine = viewer.entities.add({
-        // 贴在地面上 两点之间的直线距离
-        name: "line",
-        // polyline: {
-        // positions: Cesium.Cartesian3.fromDegreesArray([
-        //   // o.inx,
-        //   // o.iny,
-        //   // o.outx,
-        //   // o.outy,
-        //   109.5077, 18.309, 109.5111, 18.3093,
-        // ]),
-        //   width: 20,
-        //   // 不带箭头的线
-        //   // material: Cesium.Color.RED,
-        //   // 是否紧贴地面
-        //   clampToGround: true,
-        //   // 带箭头的线
-        //   material: new Cesium.PolylineArrowMaterialProperty(Cesium.Color.RED),
-        // },
-
-        polygon: {
-          hierarchy: Cesium.Cartesian3.fromDegreesArray([
-            // o.inx,
-            // o.iny,
-            // o.outx,
-            // o.outy,
-            109.5077, 18.309, 109.5111, 18.3093,
-          ]),
-          material: new Cesium.ColorMaterialProperty(
-            Cesium.Color.fromCssColorString("rgba(255, 255, 255, 1)")
-          ),
-          width: 15,
-        },
-      });
-    },
-    ccc() {
-      // // var viewer = new Cesium.Viewer("cesiumContainer");
-      // // var scene = viewer.scene;
-      // // 创建BillboardCollection来存储图片或图标
-      // var billboards = viewer.scene.primitives.add(
-      //   new Cesium.BillboardCollection()
-      // );
-      // // 添加一个带偏移量和旋转的图标
-      // var billboard = billboards.add({
-      //   image:
-      //     "https://img2.baidu.com/it/u=2726480512,4270878021&fm=253&fmt=auto&app=120&f=JPEG?w=193&h=193", // 替换为图片的路径
-      //   position: Cesium.Cartesian3.fromDegrees(109.5077, 18.309), // 设置图片的位置,采用经纬度
-      //   width: 64, // 设置图片的宽度
-      //   height: 64, // 设置图片的高度
-      //   rotation: Cesium.Math.toRadians(45), // 设置初始旋转角度(单位弧度)
-      //   // clampToGround: true,
-      //   pixelOffset: new Cesium.Cartesian2(30, -40), // 设置偏移量,X轴偏移30像素,Y轴偏移-40像素
-      //   heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
-      //   horizontalOrigin: Cesium.HorizontalOrigin.CENTER, // 水平锚点
-      //   verticalOrigin: Cesium.VerticalOrigin.BOTTOM, // 垂直锚点
-      // });
-
-      // 创建一个Cesium视图
-      // var viewer = new Cesium.Viewer("cesiumContainer");
-
-      // 获取场景对象
-      var scene = viewer.scene;
-
-      // 创建一个BillboardCollection,用于存放所有Billboard对象
-      var billboards = scene.primitives.add(new Cesium.BillboardCollection());
-
-      // 定义图片的URL
-      var imageUrl = "https://example.com/your-image.png";
-
-      // 设置图片的初始位置(经纬度)
-      var longitude = -75.0;
-      var latitude = 40.0;
-      var height = 1000; // 距离地面1000米
-
-      // 创建Billboard对象
-      var billboard = billboards.add({
-        image: imageUrl, // 设置图片
-        position: Cesium.Cartesian3.fromDegrees(longitude, latitude, height), // 设置位置
-        heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 贴地
-        scale: 1.0, // 图片的缩放比例
-        rotation: Cesium.Math.toRadians(45), // 旋转角度,单位是弧度
-        pixelOffset: new Cesium.Cartesian2(50, 0), // 图片的偏移量,单位是像素(x, y)
-        alignedAxis: Cesium.Cartesian3.ZERO, // 不需要对齐轴
-      });
-    },
-    //点击事件
-    onClickButton(e, val) {
-      // 每次进来清空,然后再重新加载图片
-      this.primitivesArray.forEach((primitive) => {
-        viewer.scene.primitives.remove(primitive);
-      });
-      this.primitivesArray = []; // 清空数组,
-
-      //传的图片
-      let image =
-        "https://img2.baidu.com/it/u=2726480512,4270878021&fm=253&fmt=auto&app=120&f=JPEG?w=193&h=193";
-      //传的图片 、经纬度、范围
-      this.PosButtonClick(image, 109.5077, 18.309, 24);
-    },
+    // aaa() {
+    //   var redLine = viewer.entities.add({
+    //     // 贴在地面上 两点之间的直线距离
+    //     name: "line",
+    //     polyline: {
+    //     positions: Cesium.Cartesian3.fromDegreesArray([
+    //       // o.inx,
+    //       // o.iny,
+    //       // o.outx,
+    //       // o.outy,
+    //       109.5077, 18.309, 109.5111, 18.3093,
+    //     ]),
+    //       width: 20,
+    //       // 不带箭头的线
+    //       // material: Cesium.Color.RED,
+    //       // 是否紧贴地面
+    //       clampToGround: true,
+    //       // 带箭头的线
+    //       material: new Cesium.PolylineArrowMaterialProperty(Cesium.Color.RED),
+    //     },
+    //   });
+    // },
 
     //加载图片
-    PosButtonClick(imageurl, lon, lat, round) {
-      var point = {
-        longitude: lon,
-        latitude: lat,
-        height: -0.7728200032702337,
-      };
-      var rvalue = round; //范围半径
-
-      // 计算边界
-      var west =
-        point.longitude -
-        Cesium.Math.toDegrees(rvalue / Cesium.Ellipsoid.WGS84.maximumRadius);
-      var south =
-        point.latitude -
-        Cesium.Math.toDegrees(rvalue / Cesium.Ellipsoid.WGS84.maximumRadius);
-      var east =
-        point.longitude +
-        Cesium.Math.toDegrees(rvalue / Cesium.Ellipsoid.WGS84.maximumRadius);
-      var north =
-        point.latitude +
-        Cesium.Math.toDegrees(rvalue / Cesium.Ellipsoid.WGS84.maximumRadius);
-
-      var bounds = Cesium.Rectangle.fromDegrees(west, south, east, north);
-
-      var bound = new Cesium.Rectangle(west, south, east, north);
-
-      var heatPrimitive = viewer.scene.primitives.add(
-        new Cesium.GroundPrimitive({
-          geometryInstances: new Cesium.GeometryInstance({
-            geometry: new Cesium.RectangleGeometry({
-              rectangle: Cesium.Rectangle.fromDegrees(
-                bound.west,
-                bound.south,
-                bound.east,
-                bound.north
-              ),
-              vertexFormat: Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT,
-              width: 24, // 设置图片的宽度
-              height: 24, // 设置图片的高度
-              rotation: Cesium.Math.toRadians(45), // 设置初始旋转角度(单位弧度)
-              // clampToGround: true,
-              pixelOffset: new Cesium.Cartesian2(30, -400), // 设置偏移量,X轴偏移30像素,Y轴偏移-40像素
-            }),
-          }),
-          appearance: new Cesium.EllipsoidSurfaceAppearance({
-            aboveGround: true,
-            material: new Cesium.Material({
-              fabric: {
-                type: "Image",
-                uniforms: {
-                  image: imageurl,
-                },
-              },
-            }),
-          }),
-        })
-      );
-      // 将新创建的GroundPrimitive添加到数组中
-      this.primitivesArray.push(heatPrimitive);
-    },
-    ddd() {
+    ddd(obj) {
       // 将经纬度转换为 Cartesian3 坐标,起始点
-      var startPosition = Cesium.Cartesian3.fromDegrees(109.5077, 18.309);
-      console.log(this.getLonAndLat(109.5077, 18.309, 78, 20), "======");
+      //起始点
+      var startPosition = Cesium.Cartesian3.fromDegrees(
+        Number(obj.imagerLzb),
+        Number(obj.imagerBzb)
+      );
+      let poi = this.getLonAndLat(
+        Number(obj.imagerLzb),
+        Number(obj.imagerBzb),
+        Number(obj.imagerAngle),
+        20
+      );
       //结束点
-      var targetPosition = Cesium.Cartesian3.fromDegrees(109.5111, 18.3093);
-
+      var targetPosition = Cesium.Cartesian3.fromDegrees(poi.lng, poi.lat);
       // 创建一个实体来表示点
       var pointEntity = viewer.entities.add({
-        id: "dw" + 1,
+        id: "dw" + obj.id,
         position: startPosition, // 点的位置
         point: {
           heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 设置为贴地
@@ -330,10 +180,9 @@ export default {
           outlineWidth: 2, // 点的轮廓宽度
         },
       });
-
       // 创建一个实体来放置箭头
       var arrowEntity = viewer.entities.add({
-        id: "jt" + 1,
+        id: "jt" + obj.id,
         position: startPosition, // 设置箭头位置
         billboard: {
           // image: "http://192.168.176.1:8001/长箭头.png", // 设置箭头图标
@@ -341,44 +190,44 @@ export default {
           width: 37, // 设置图标宽度
           height: 69, // 设置图标高度
           scale: 0.7, // 设置图标缩放
+          rotation: Cesium.Math.toRadians(360 - Number(obj.imagerAngle)), // 可选,默认为0
+          // rotation: Number(obj.imagerAngle), // 可选,默认为0
           heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 设置贴地
         },
       });
 
-      // 计算箭头的方向并更新
-      function updateArrowOrientation() {
-        // 计算起点到目标点的方向向量
-        var direction = Cesium.Cartesian3.subtract(
-          targetPosition,
-          startPosition,
-          new Cesium.Cartesian3()
-        );
+      // // 计算箭头的方向并更新
+      // function updateArrowOrientation() {
+      //   // 计算起点到目标点的方向向量
+      //   var direction = Cesium.Cartesian3.subtract(
+      //     targetPosition,
+      //     startPosition,
+      //     new Cesium.Cartesian3()
+      //   );
 
-        // 确保方向向量有效
-        if (Cesium.Cartesian3.magnitude(direction) > 0) {
-          // 计算箭头朝向目标的方向角(使用 JavaScript 原生 Math.atan2)
-          var heading = Cesium.Math.toDegrees(
-            Math.atan2(direction.y, direction.x)
-          );
+      //   // 确保方向向量有效
+      //   if (Cesium.Cartesian3.magnitude(direction) > 0) {
+      //     // 计算箭头朝向目标的方向角(使用 JavaScript 原生 Math.atan2)
+      //     var heading = Cesium.Math.toDegrees(
+      //       Math.atan2(direction.y, direction.x)
+      //     );
 
-          // 固定方向,使用 rotation 设置固定旋转
-          arrowEntity.billboard.rotation = Cesium.Math.toRadians(heading); // 固定旋转角度,不随地图旋转
-        }
-      }
+      //     // 固定方向,使用 rotation 设置固定旋转
+      //     arrowEntity.billboard.rotation = Cesium.Math.toRadians(heading); // 固定旋转角度,不随地图旋转
+      //   }
+      // }
 
-      // 每次视图更新时,重新计算箭头方向
-      viewer.scene.preRender.addEventListener(function () {
-        updateArrowOrientation();
-      });
+      // // 每次视图更新时,重新计算箭头方向
+      // viewer.scene.preRender.addEventListener(function () {
+      //   updateArrowOrientation();
+      // });
 
       // 聚焦视角到箭头位置
       viewer.zoomTo(arrowEntity);
     },
-    ceshi(item) {
-      // console.log(item,"?????");
-      let aaa = viewer.entities.getById("jt1");
-
-      if (item) {
+    ceshi(id,evtName) {
+      let aaa = viewer.entities.getById("jt" + id);
+      if (evtName == 'yr') {
         aaa.billboard.image = "/static/images/路径@3x.png";
       } else {
         aaa.billboard.image = "/static/images/路径@3x-2.png";
@@ -468,20 +317,39 @@ export default {
       return lngLatObj;
     },
 
-    delatePoi(item) {
-      // if (this.arrww.length != 0) {
-      // this.arrww.forEach((item) => {
-      viewer.entities.removeById(item);
-      // });
-      // this.arrww = [];
-      // }
+    delatePoi(type) {
+      if (this.idArr.length != 0) {
+        this.idArr.forEach((item) => {
+      viewer.entities.removeById(type + item);
+      });
+      // this.idArr = [];
+      }
+    },
+  },
+  watch: {
+    jcbh: {
+      handler(newVal, oldVal) {
+        getJctbhcInfo(newVal).then((res) => {
+          this.idArr= []
+          if (res.code == 200) {
+            this.monitorList = res.data.images;
+            this.hcObj = res.data;
+            this.monitorList.forEach((item, i) => {
+              item.name = res.data.dcry;
+              item.imagerPath = this.monitorImg[i].imgUrl
+              this.ddd(item);
+              this.idArr.push(item.id)
+            });
+          }
+        });
+      },
+      deep: true,
+      immediate: true,
     },
   },
-  watch: {},
-  watch: {},
   beforeDestroy() {
-    this.delatePoi("jt1");
-    this.delatePoi("dw1");
+    this.delatePoi("jt");
+    this.delatePoi("dw");
   },
 };
 </script>

+ 19 - 9
src/views/farmlandProtection/components/jbxx.vue

@@ -7,7 +7,7 @@
           label="图斑编号"
           label-class-name="my-label"
           content-class-name="my-content"
-          >{{ detailObj.tbbh }}</el-descriptions-item
+          >{{ detailObj.jcbh }}</el-descriptions-item
         >
         <el-descriptions-item
           label="监测面积"
@@ -19,7 +19,7 @@
           label="行政名称"
           content-class-name="my-content"
           :span="3"
-          >{{ detailObj.xzmc }}</el-descriptions-item
+          >{{ detailObj.xmc }}</el-descriptions-item
         >
         <el-descriptions-item label="前时相">{{
           detailObj.qsx
@@ -28,12 +28,12 @@
           detailObj.hsx
         }}</el-descriptions-item>
         <el-descriptions-item label="前类型">{{
-          detailObj.qxl
+          detailObj.qlx
         }}</el-descriptions-item>
         <el-descriptions-item label="后类型">{{
           detailObj.hlx
         }}</el-descriptions-item>
-        <el-descriptions-item
+        <!-- <el-descriptions-item
           label="中心点经度"
           label-class-name="my-label"
           content-class-name="my-content"
@@ -44,13 +44,14 @@
           label-class-name="my-label"
           content-class-name="my-content"
           >{{ detailObj.zxdwd }}</el-descriptions-item
-        >
+        > -->
       </el-descriptions>
     </div>
   </div>
 </template>
 
 <script>
+import {getFilePath} from "@/api/ghss/jctb.js";
 export default {
   props: {
     detailObj: {
@@ -67,10 +68,19 @@ export default {
     changeData(name, updata) {
       this[name] = updata;
     },
-    clickOpen(){
-      this.$emit('updateParent','splitScreen',true)
+    clickOpen() {
+      this.$emit("updateParent", "splitScreen", true);
       // this.$refs.tbDetails.onClick(val);
-    }
+      var imageryProvider = new Cesium.UrlTemplateImageryProvider({
+        url: "http://192.168.60.2:8080/analyse/fzss/DownloadReport?filePath=/全域土地整治/jctb/1/0output/HN4602022023022004080080.tif",
+        format: "image/tiff",
+        tilingScheme: new Cesium.GeographicTilingScheme(),
+        maximumLevel: 18,
+      });
+      console.log(imageryProvider, "imageryProviderimageryProvider");
+      viewer.imageryLayers.addImageryProvider(imageryProvider);
+      viewer.flyTo(imageryProvider);
+    },
   },
   watch: {},
   watch: {},
@@ -95,7 +105,7 @@ export default {
   .dbBtn {
     width: 136px;
     height: 33px;
-    background-color:#0f7ac8;
+    background-color: #0f7ac8;
     line-height: 33px;
     text-align: center;
     margin-bottom: 10px;

+ 6 - 2
src/views/farmlandProtection/components/tbDetails.vue

@@ -11,7 +11,7 @@
             <Jbxx :detailObj="detailObj" @updateParent="changeData" ref="jbxx"></Jbxx>
           </el-tab-pane>
           <el-tab-pane label="核查信息" name="hcxx">
-            <Hcxx @updateParent="changeData" v-if="activeTabs == 'hcxx'"></Hcxx>
+            <Hcxx @updateParent="changeData" :jcbh="detailObj.jcbh" v-if="activeTabs == 'hcxx'"></Hcxx>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -68,8 +68,12 @@ export default {
       this[name] = updata;
     },
     closeBox() {
-      this.onClick(false);
+      if (this.splitScreen) {
+        this.splitScreen = false
+        this.onClick(false);
+      }
       this.$emit("updateParent", "isShowTb", false);
+
       this.$emit("updateParent", "emitImgIndex", -1);
     },
     onClick(show) {

+ 18 - 9
src/views/farmlandProtection/components/tbqd.vue

@@ -2,8 +2,12 @@
   <div class="tbqd">
     <div>
       <div class="headerInput">
-        <el-input v-model="input" placeholder="请输入监测编号搜索"></el-input>
-        <span>共{{total}}条</span>
+        <el-input
+          v-model="input"
+          placeholder="请输入监测编号搜索"
+          @keyup.enter.native="initNew"
+        ></el-input>
+        <span>共{{ total }}条</span>
       </div>
       <div class="pagination">
         <!-- <el-table :data="tableData" style="width: 100%" height="560">
@@ -134,7 +138,7 @@ import * as wellknown from "wellknown";
 import * as turf from "@turf/turf";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
 import { loadGeoJSON } from "@/utils/MapHelper/help.js";
-import { JctbList } from "@/api/ghss/jctb.js";
+import { JctbList, getJctbInfo } from "@/api/ghss/jctb.js";
 let layerSources = {};
 export default {
   props: {
@@ -182,13 +186,11 @@ export default {
         jcbh: this.input,
       };
       JctbList(obj).then((res) => {
-        console.log(res,'>>>>>');
         this.active_dableData = res.rows;
-        this.total = res.total
+        this.total = res.total;
       });
     },
     handleClick(item) {
-      console.log(item, "---");
       if (!item.geom) {
         this.$message.warning("缺少定位图斑");
       } else {
@@ -209,6 +211,11 @@ export default {
     },
     handleDetails(row) {
       this.$emit("updateParent", "isShowTb", true);
+      getJctbInfo(row.id).then((res) => {
+        if (res.code == 200) {
+          this.$emit("updateParent", "detailObj", res.data);
+        }
+      });
     },
     handleSizeChange(val) {
       this.pageSize = val;
@@ -257,10 +264,12 @@ export default {
       deep: true,
       immediate: true,
     },
-    input(newVal, oldVal){
-      this.initNew();
-    },
+    // input(newVal, oldVal){
+    //   this.initNew();
+    // },
     active_dableData(newVal, oldVal) {
+      viewer.dataSources.removeAll();
+      viewer.entities.removeAll();
       newVal.forEach((res, index) => {
         res.type = "图斑上图";
         res.index = index;

+ 9 - 7
src/views/farmlandProtection/gdzl/index.vue

@@ -28,7 +28,7 @@
             v-model="nowyear"
             placeholder="请选择"
             size="mini"
-            @change="regionChange()"
+            @change="yearChange()"
           >
             <el-option
               v-for="item in yearList"
@@ -280,6 +280,11 @@ export default {
     unitChange() {
       this.setLnbh(this.lnbndata);
     },
+    yearChange() {
+      let yobj = this.yearList.find((y) => y.year == this.nowyear);
+      this.setImager(yobj);
+      this.regionChange();
+    },
     dlbmChange() {
       let nowtype = this.typeList.find((x) => x.id == this.dlbm);
       this.gtype = nowtype.label;
@@ -327,12 +332,9 @@ export default {
       this.nowlayer = this.nowyear;
       init_handler(this.yearList[0], this.showInfo);
       store.setaddNode([
-        {
-          id: "gdbh" + this.$props.pageType,
-          url: this.yearList[0].url,
-          label: "耕地保护",
-        },
+        { id: "gdbh", url: this.yearList[0].url, label: "耕地保护" },
       ]);
+      // + this.$props.pageType
       this.setImager(this.yearList[0], true, (layer) => {
         Getlayers(this.yearList[0].url, (layers) => {
           this.layers = layers;
@@ -476,7 +478,7 @@ export default {
       this.$emit("contrast", dbdata);
     },
     fly() {
-      viewer.flyTo(this.imagelayers[obj.year]);
+      // viewer.flyTo(this.imagelayers[this.nowlayer]);
     },
     sourcesshow(show) {
       this.setImager({ year: this.nowlayer }, show);

+ 20 - 21
src/views/farmlandProtection/jctb/index.vue

@@ -72,6 +72,7 @@
               @updateParent="changeData"
               ref="tbqd"
               :updateObj="updateObj"
+              v-if="activeTabs == 'tbqd'"
             ></Tbqd>
           </el-tab-pane>
         </el-tabs>
@@ -98,16 +99,18 @@
           ref="carousel"
         >
           <el-carousel-item v-for="(item, i) in imgList" :key="i">
-            <img :src="item.imgUrl" />
+            <img :src="item.imagerPath" />
             {{ item }}
             <div class="imgInfo">
               <p>
-                <span>拍摄时间:{{ item.info }}</span
+                <span>拍摄时间:{{ item.imagerSj }}</span
                 ><span>拍摄人:{{ item.name }}</span>
               </p>
               <p>
-                <span>拍摄坐标:{{ item.lat }}, {{ item.lon }}</span
-                ><span>拍摄方位:{{ item.psfw }}</span>
+                <span
+                  >拍摄坐标:{{ keepDigitDecimal(item.imagerLzb, 6) }},
+                  {{ keepDigitDecimal(item.imagerBzb, 6) }}</span
+                ><span>拍摄方位:{{ item.imagerAngleSm }}</span>
               </p>
             </div>
           </el-carousel-item>
@@ -141,18 +144,7 @@ export default {
     return {
       activeTabs: "tbzl",
       isShowTb: false,
-      // detailObj: null,
-      detailObj: {
-        tbbh: "6401812024070108270002",
-        jcmj: "3.98",
-        xzmc: "海棠区",
-        qsx: "20230925",
-        hsx: "20240701",
-        qxl: "草地",
-        hlx: "新增推堆土",
-        zxdjd: "106.675447",
-        zxdwd: "38.209985",
-      },
+      detailObj: {},
       // isShowImg: false,
       imgList: [],
       imgIndex: -1,
@@ -191,6 +183,14 @@ export default {
         // this.$refs.tbqd.initNew();
       }
     },
+    keepDigitDecimal(num, n) {
+      // 小于零,先转正数计算
+      if (num < 0) {
+        return (Math.floor(-1 * num * 10 ** n) / 10 ** n) * -1;
+      }
+
+      return Math.floor(num * 10 ** n) / 10 ** n;
+    },
     closeBox() {
       this.imgIndex = -1;
     },
@@ -234,8 +234,6 @@ export default {
     },
     //年份季度改变
     yearsChange(val) {
-      // if (val) {
-      console.log(val, "valval");
       val = JSON.parse(JSON.stringify(val));
       this.updateObj.val0 = val.startTime;
       this.updateObj.val1 = val.endTime;
@@ -323,7 +321,8 @@ export default {
       height: 332px;
     }
     .imgInfo {
-      width: 245px;
+      // width: 245px;
+      width: 60%;
       height: 46px;
       // background-color: rgba(255, 192, 203, 0.356);
       position: absolute;
@@ -378,7 +377,7 @@ export default {
   margin: 5px 0px;
   display: flex;
   justify-content: space-between;
-  /deep/ .el-select{
+  /deep/ .el-select {
     padding: 0 10px;
   }
   /deep/ .el-input--suffix .el-input__inner {
@@ -399,7 +398,7 @@ export default {
     color: #fff;
   }
 }
-.xz_box{
+.xz_box {
   padding-top: 0px;
 }
 </style>