Bläddra i källkod

数据录入图斑详情接口添加,定位、对比按钮操作添加

maxiaoxiao 1 månad sedan
förälder
incheckning
98674015c2

+ 7 - 0
src/api/rsmonitoring/dataEntry.js

@@ -17,6 +17,13 @@ export function getDkdbList(params) {
     params
   })
 }
+// 查询录入详细
+export function getDetailsDk(id) {
+  return request({
+    url: '/rsmonitoring/dkgeomdb/details/' + id,
+    method: 'get'
+  })
+}
 
 export function adddb(data) {
   return request({

+ 13 - 3
src/views/pageCode/dataEntry/index.vue

@@ -76,7 +76,13 @@
         <el-button link type="primary" @click="handleBrowse(row)"
           >查看
         </el-button>
-        <el-button link type="primary" @click="Issued(row)">下发 </el-button>
+        <el-button
+          v-if="row.status == '0'"
+          link
+          type="primary"
+          @click="Issued(row)"
+          >下发
+        </el-button>
         <!-- <el-button
             link
             type="primary"
@@ -101,7 +107,7 @@
           <fileUpload
             v-model="form.shppath"
             :limit="1"
-            :fileSize="5000"
+            :fileSize="50"
             :fileType="['zip']"
             urltype="/v1"
           ></fileUpload>
@@ -230,12 +236,16 @@ function handleExport() {
   );
 }
 function handleBrowse(row) {
-  router.push({ path: "/remote/gdjc", query: { id: row.id } });
+  router.push({
+    path: "/remote/gdjc",
+    query: { id: row.id, form: "dataEntry" },
+  });
 }
 
 function Issued(row) {
   issueDkdb({ id: row.id }).then((res) => {
     proxy.$modal.msgSuccess("下发成功");
+    this.getList();
   });
 }
 getList();

+ 29 - 8
src/views/remote/farmland/details.vue

@@ -1,7 +1,11 @@
 <template>
   <div class="details">
     <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
-      <el-tab-pane label="基本信息" name="jbxx">
+      <el-tab-pane
+        label="基本信息"
+        name="jbxx"
+        v-if="!form || infoObj.type != 1"
+      >
         <el-descriptions class="margin-top" :column="1">
           <el-descriptions-item
             v-for="(item, i) in jbxx"
@@ -11,7 +15,11 @@
           </el-descriptions-item>
         </el-descriptions>
       </el-tab-pane>
-      <el-tab-pane label="业务研判" name="ywyp">
+      <el-tab-pane
+        label="业务研判"
+        name="ywyp"
+        v-if="!form || infoObj.type != 2"
+      >
         <el-tabs v-model="ywyptab">
           <el-tab-pane label="土地利用现状" name="tdxz">
             <el-row>
@@ -87,8 +95,8 @@
           </el-tab-pane>
         </el-tabs>
       </el-tab-pane>
-      <el-tab-pane label="核查信息" name="hcxx"
-        >共3次外业核查
+      <el-tab-pane label="核查信息" name="hcxx" v-if="!form">
+        共3次外业核查
         <el-collapse v-model="hcxxtab" @change="handleChange">
           <el-collapse-item v-for="(hcit, hi) in hcxxList" :key="hi" name="1">
             <template #title>
@@ -105,7 +113,7 @@
           </el-collapse-item>
         </el-collapse>
       </el-tab-pane>
-      <el-tab-pane label="业务记录" name="ywjl">
+      <el-tab-pane label="业务记录" name="ywjl" v-if="!form">
         <el-timeline>
           <el-timeline-item
             v-for="(activity, index) in activities"
@@ -127,7 +135,7 @@
   
   <script setup name="details">
 import Hcxx from "./hcxx.vue";
-import { listDkdb, adddb } from "@/api/rsmonitoring/dataEntry";
+import { getDetailsDk, adddb } from "@/api/rsmonitoring/dataEntry";
 import {
   jbxx,
   tdxzTable,
@@ -138,9 +146,10 @@ import {
 } from "./config";
 
 const { proxy } = getCurrentInstance();
-
+const route = useRoute();
 const router = useRouter();
-
+const form = route.query.form == "dataEntry";
+const props = defineProps({});
 const data = reactive({
   activeName: "jbxx",
   ywyptab: "tdxz",
@@ -177,11 +186,23 @@ const data = reactive({
 });
 
 const { activeName, ywyptab, infoObj, hcxxList, activities } = toRefs(data);
+
+function getDetails({ pcsjid, id }) {
+  console.log(pcsjid, id, "getDetails", form);
+  if (form) {
+    getDetailsDk(id).then((res) => {
+      infoObj.value = res.data;
+    });
+  }
+}
+defineExpose({ getDetails });
 </script>
 <style scoped>
 .el-button {
   margin: 0px !important;
   margin-bottom: 12px !important;
 }
+.details {
+}
 </style>
   

+ 86 - 43
src/views/remote/farmland/hcxx.vue

@@ -24,6 +24,13 @@
 
 <script>
 // import { getJctbhcInfo, getTiffPath } from "@/api/ghss/jctb.js";
+import VectorSource from "ol/source/Vector";
+import VectorLayer from "ol/layer/Vector";
+import Feature from "ol/Feature";
+import Point from "ol/geom/Point";
+import Style from "ol/style/Style";
+import Icon from "ol/style/Icon";
+
 export default {
   props: {
     detailObj: {
@@ -40,6 +47,8 @@ export default {
       monitorList: [
         {
           name: "11swm",
+          imagerLzb: "",
+          imagerBzb: "",
           imagerPath:
             "/analyse/全域土地整治/jctb/0/HN4602022023022004080074/1b9a9da4a23d426cab363ed369150b4f.jpg",
         },
@@ -61,8 +70,8 @@ export default {
     inputAction() {
       this.handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
       // 鼠标移动事件
-      this.handler.setInputAction(function (movement) {
-      }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
+      this.handler.setInputAction(function (movement) {},
+      Cesium.ScreenSpaceEventType.LEFT_CLICK);
     },
     handleMouseEnter(a, b) {
       this.ceshi(a.id, "yr");
@@ -82,48 +91,82 @@ export default {
     ddd(obj) {
       // 将经纬度转换为 Cartesian3 坐标,起始点
       //起始点
-      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(poi.lng, poi.lat);
-      // 创建一个实体来表示点
-      var pointEntity = viewer.entities.add({
-        id: "dw" + obj.id,
-        position: startPosition, // 点的位置
-        point: {
-          heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 设置为贴地
-          pixelSize: 10, // 点的大小
-          color: Cesium.Color.RED, // 点的颜色
-          outlineColor: Cesium.Color.BLACK, // 点的轮廓颜色
-          outlineWidth: 2, // 点的轮廓宽度
-        },
-      });
+      // 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(poi.lng, poi.lat);
+      // // 创建一个实体来表示点
+      // var pointEntity = viewer.entities.add({
+      //   id: "dw" + obj.id,
+      //   position: startPosition, // 点的位置
+      //   point: {
+      //     heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 设置为贴地
+      //     pixelSize: 10, // 点的大小
+      //     color: Cesium.Color.RED, // 点的颜色
+      //     outlineColor: Cesium.Color.BLACK, // 点的轮廓颜色
+      //     outlineWidth: 2, // 点的轮廓宽度
+      //   },
+      // });
       // 创建一个实体来放置箭头
-      var arrowEntity = viewer.entities.add({
-        id: "jt" + obj.id,
-        position: startPosition, // 设置箭头位置
-        billboard: {
-          // image: "http://192.168.176.1:8001/长箭头.png", // 设置箭头图标
-          image: "/static/images/路径@3x-2.png", // 设置箭头图标
-          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, // 设置贴地
-        },
-      });
+      // var arrowEntity = viewer.entities.add({
+      //   id: "jt" + obj.id,
+      //   position: startPosition, // 设置箭头位置
+      //   billboard: {
+      //     // image: "http://192.168.176.1:8001/长箭头.png", // 设置箭头图标
+      //     image: "/static/images/路径@3x-2.png", // 设置箭头图标
+      //     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, // 设置贴地
+      //   },
+      // });
+
+      // // 聚焦视角到箭头位置
+      // viewer.zoomTo(arrowEntity);
 
-      // 聚焦视角到箭头位置
-      viewer.zoomTo(arrowEntity);
+      var vectorSource = new VectorSource();
+      window.map.mapDiv.addLayer(
+        new VectorLayer({
+          source: vectorSource,
+          style: new Style({
+            image: new Icon({
+              anchor: [0.5, 46], // 调整锚点以正确显示箭头尖端位置
+              anchorXUnits: "fraction",
+              anchorYUnits: "pixels",
+              src: "/static/images/路径@3x-2.png", // 替换为你的箭头图片路径
+              rotation: Math.PI / 4, //360 - Number(obj.imagerAngle),
+            }),
+          }), // 使用自定义样式
+        })
+      );
+
+      // 添加一个特征,并设置其旋转角度
+      var feature = new Feature({
+        geometry: new Point([0, 0]), // 设置位置
+      });
+      // feature.setStyle(
+      //   new ol.style.Style({
+      //     // 可以单独为特征设置样式以覆盖图层样式
+      //     image: new ol.style.Icon({
+      //       anchor: [0.5, 46], // 保持锚点设置不变
+      //       anchorXUnits: "fraction",
+      //       anchorYUnits: "pixels",
+      //       src: "path/to/your/arrow.png", // 替换为你的箭头图片路径
+      //       rotation: Math.PI / 4, // 设置旋转角度,例如45度角,Math.PI / 4 表示 π/4 弧度,即45度角。可以根据需要调整角度值。
+      //     }),
+      //   })
+      // );
+      vectorSource.addFeature(feature);
     },
     ceshi(id, evtName) {
       let aaa = viewer.entities.getById("jt" + id);
@@ -236,7 +279,7 @@ export default {
         // window.axiosURI +/file/upload/attachment
         item.imagerPath =
           "http://192.168.60.2:8080/file/upload/attachment" + item.imagerPath;
-        // this.ddd(item);
+        this.ddd(item);
         this.idArr.push(item.id);
       });
       // }

+ 9 - 27
src/views/remote/farmland/index.vue

@@ -71,10 +71,10 @@
     </div>
     <div class="jctbCon" v-if="dialogVisible">
       <el-button @click="returnlist()">返回列表</el-button>
-      图斑编号:{{ newObj.id }}
+      图斑编号:{{ nowObj.dkbh }}
       <el-button @click="next(false)">上一个</el-button>
       <el-button @click="next(true)">下一个</el-button>
-      <Details></Details>
+      <Details ref="detailsRef"></Details>
     </div>
     <!-- <CustomDetails :model="infoObj" :config="detailInfos"></CustomDetails> -->
   </div>
@@ -87,12 +87,7 @@ import CustomDetails from "@/components/custom-detailsInfo.vue";
 import Details from "./details.vue";
 import parse from "wellknown";
 // import { pinyin } from "pinyin-pro";
-import {
-  getPcsj,
-  listPcsjXQList,
-  getXqIdMap,
-  getXqIdKey,
-} from "@/api/supervise/pcsj";
+
 import { getDkdbList } from "@/api/rsmonitoring/dataEntry";
 import { TableHeader } from "./config";
 import "ol/ol.css";
@@ -163,7 +158,6 @@ export default {
 
       TableHeader: TableHeader,
 
-      descriptionsList: ["name"], //详情描述列表存储字段
       envelopegeomObj: {}, //用于存储进入页面飞入视角的对象
       ids: [],
     };
@@ -262,26 +256,14 @@ export default {
       }
     },
 
-    getList() {
-      // listPcsjXQList(this.queryParams).then((response) => {
-      //   this.tableData = response.rows;
-      //   this.total = response.total;
-      //   this.initVectorLayer("mapDiv");
-      //   this.initVectorLayer("mapCon1");
-      //   this.initVectorLayer("mapCon2");
-      //   this.addGeoJson("mapDiv");
-      //   this.addGeoJson("mapCon1");
-      //   this.addGeoJson("mapCon2");
-      // });
-    },
     handleDetails(row) {
-      // getXqIdMap({ pcsjid: this.$route.query.id, id: row.id }).then((res) => {
-      //   this.infoObj = res.data;
-      // });
-      // getXqIdKey({ pcsjid: this.$route.query.id }).then((res) => {
-      //   this.descriptionsList = res.data;
-      // });
       this.dialogVisible = true;
+      this.$nextTick(() => {
+        this.$refs.detailsRef.getDetails({
+          pcsjid: this.$route.query.id,
+          id: row.id,
+        });
+      });
     },
 
     test(item) {

BIN
static/images/路径@3x-2.png