shuhao 5 months ago
parent
commit
fc14223011
3 changed files with 24 additions and 14 deletions
  1. 15 7
      src/views/authentic/Pdf.vue
  2. 3 0
      src/views/home/index.vue
  3. 6 7
      src/views/home/regionLayer.js

+ 15 - 7
src/views/authentic/Pdf.vue

@@ -39,6 +39,10 @@
                 <td class="name">联系电话</td>
                 <td class="name">联系电话</td>
                 <td class="text">{{rowData.masterTel}}</td>
                 <td class="text">{{rowData.masterTel}}</td>
               </tr>
               </tr>
+              <tr>
+                <td class="name">经纬度</td>
+                <td colspan="3" class="text2">{{rowData.points}}</td>
+              </tr>
             </table>
             </table>
             <div class="a4_sub_title">地块四至图</div>
             <div class="a4_sub_title">地块四至图</div>
             <div class="img_box" >
             <div class="img_box" >
@@ -219,10 +223,9 @@ $body-height:calc(100% - $title-height);
     font-family: PingFangSC-Medium, PingFang SC;
     font-family: PingFangSC-Medium, PingFang SC;
     background-color: #FFFFFF;
     background-color: #FFFFFF;
     width:595px;
     width:595px;
-    height:842px;
+    height:1000px;
     margin: 5px 0px 5px 0px;
     margin: 5px 0px 5px 0px;
     padding: 19px 63px 19px 63px;
     padding: 19px 63px 19px 63px;
-    box-shadow: 0px 0px 10px 0px #071010;
     font-weight: 600;
     font-weight: 600;
     color: #000000;
     color: #000000;
     .a4_title{
     .a4_title{
@@ -242,21 +245,26 @@ $body-height:calc(100% - $title-height);
       width:595px;
       width:595px;
       font-size: 12px;
       font-size: 12px;
       .name{
       .name{
-        width: 92px;
-        height: 38px;
-        line-height: 38px;
+        width: 50px;
+        height: 20px;
+        line-height: 20px;
         padding-right: 9px;
         padding-right: 9px;
         box-sizing: border-box;
         box-sizing: border-box;
         text-align: right;
         text-align: right;
       }
       }
       .text{
       .text{
         width: 122px;
         width: 122px;
-        height: 38px;
-        line-height: 38px;
+        height: 20px;
+        line-height: 20px;
         text-align: left;
         text-align: left;
         padding-left: 9px;
         padding-left: 9px;
         box-sizing: border-box;
         box-sizing: border-box;
       }
       }
+      .text2{
+        text-align: left;
+        font-size: 10px;
+        font-weight: normal;
+      }
     }
     }
     .img_box{
     .img_box{
       position: relative;
       position: relative;

+ 3 - 0
src/views/home/index.vue

@@ -52,6 +52,7 @@ import phenologyPage from "./components/phenologyPage.vue";
 import { useRouter } from "vue-router";
 import { useRouter } from "vue-router";
 import SamplePointLayer from "./samplePointLayer";
 import SamplePointLayer from "./samplePointLayer";
 import {useStore} from "vuex";
 import {useStore} from "vuex";
+import RegionLayer from "./regionLayer";
 let store = useStore()
 let store = useStore()
 const components = {
 const components = {
   homePage,
   homePage,
@@ -70,11 +71,13 @@ const currentRegion = {
 }
 }
 let homeMap = new HomeMap();
 let homeMap = new HomeMap();
 let samplePointLayer = null
 let samplePointLayer = null
+let regionLayer = null
 const router = useRouter();
 const router = useRouter();
 const mapRef = ref();
 const mapRef = ref();
 onMounted(() => {
 onMounted(() => {
   homeMap.initMap(store.getters.userinfo.location, mapRef.value);
   homeMap.initMap(store.getters.userinfo.location, mapRef.value);
   samplePointLayer = new SamplePointLayer(homeMap.kmap.map, currentFarm, currentRegion)
   samplePointLayer = new SamplePointLayer(homeMap.kmap.map, currentFarm, currentRegion)
+  regionLayer = new RegionLayer(homeMap.kmap.map, currentFarm, currentRegion)
 });
 });
 
 
 const currentComponent = ref("homePage");
 const currentComponent = ref("homePage");

+ 6 - 7
src/views/home/regionLayer.js

@@ -10,22 +10,21 @@ import { useRouter } from "vue-router";
 import {unByKey} from "ol/Observable";
 import {unByKey} from "ol/Observable";
 import Style from "ol/style/Style";
 import Style from "ol/style/Style";
 import Icon from "ol/style/Icon";
 import Icon from "ol/style/Icon";
-import {Cluster, Vector as VectorSource} from "ol/source";
+import {Vector as VectorSource} from "ol/source";
 import {newRegionFeature} from "../zhgl/map";
 import {newRegionFeature} from "../zhgl/map";
 
 
 /**
 /**
  * @description 地图层对象
  * @description 地图层对象
  */
  */
-class SamplePointLayer {
+class RegionLayer {
   constructor(map, farm) {
   constructor(map, farm) {
     let that = this;
     let that = this;
     this.farmId = farm.id
     this.farmId = farm.id
-    let vectorStyle = new KMap.VectorStyle();
-    this.vectorStyle = vectorStyle;
+    this.vectorStyle  = new KMap.VectorStyle();
 
 
     this.regionLayer = new KMap.VectorLayer("regionLayer",999,{
     this.regionLayer = new KMap.VectorLayer("regionLayer",999,{
       minZoom:15,
       minZoom:15,
-      source:this.clusterSource,
+      source:new VectorSource(),
       style:(f)=> this.getStyle(f)})
       style:(f)=> this.getStyle(f)})
     map.addLayer(this.regionLayer.layer)
     map.addLayer(this.regionLayer.layer)
     this.initData(this.farmId)
     this.initData(this.farmId)
@@ -66,11 +65,11 @@ class SamplePointLayer {
   }
   }
 
 
   // 清除聚合图层,解除绑定
   // 清除聚合图层,解除绑定
-  clearCluster() {
+  clearLayer() {
     if (this.regionLayer) {
     if (this.regionLayer) {
       this.regionLayer.layer.getSource().clear()
       this.regionLayer.layer.getSource().clear()
     }
     }
   }
   }
 }
 }
 
 
-export default SamplePointLayer;
+export default RegionLayer;