yang1998 2 月之前
父節點
當前提交
75dcff6876
共有 3 個文件被更改,包括 22 次插入8 次删除
  1. 1 1
      src/utils/data/all-layer-info.js
  2. 1 1
      src/utils/map/AddLayer.js
  3. 20 6
      src/views/deck/pages/layer_right/Page_gbzntxz.vue

+ 1 - 1
src/utils/data/all-layer-info.js

@@ -214,7 +214,7 @@ export var allLayerInfo = [
 				name: '规模化养殖场',
 				layer: 2,
 				url: process.env.VUE_APP_MAP_SERVICE + '/ags_feature_svc/dwfy/FeatureServer/0',
-
+				url2: process.env.VUE_APP_MAP_SERVICE + '/ags_feature_svc/dwfy/FeatureServer/4',
 				id: 'gmhyzc',
 				title: 'gmhyzc',
 				geo: 'point'

+ 1 - 1
src/utils/map/AddLayer.js

@@ -250,7 +250,7 @@ export function addLayer(layer, visible = true, opacity = 1, mapID = 'map', wher
   if (layer.renderer) {
     params['renderer'] = layer.renderer
   }
-  if (renderer) {
+  if (renderer && layer.id !== "gmhyzc_2") {
     params['renderer'] = renderer
   }
   if (layer.labelingInfo) {

+ 20 - 6
src/views/deck/pages/layer_right/Page_gbzntxz.vue

@@ -33,8 +33,12 @@
       
       <span class="box-title2">建设年份统计</span>
       <div>
-        <el-table :data="tableData_year" class="table-default" height="38vh">
-          <el-table-column label="建设年份" min-width="100" prop="jsnf" show-overflow-tooltip/>
+        <el-table :data="tableData_year" class="table-default" height="38vh" @row-click="handleRowClick" highlight-current-row>
+          <el-table-column label="建设年份" min-width="100" prop="jsnf" show-overflow-tooltip>
+            <template #default="scope">
+              <span>{{ scope.row.jsnf }}</span>
+            </template>
+          </el-table-column>
           <el-table-column label="项目总数(个)" min-width="100" prop="xmzs" show-overflow-tooltip/>
           <el-table-column label="项目面积(万亩)" min-width="100" prop="xmmj" show-overflow-tooltip/>
         </el-table>
@@ -62,7 +66,8 @@
 <script>
 
 import {getGbzntDataAreaAndCount, getGbzntDataByYear, getGbzntSourceData} from "@/services/one-map";
-import {addLayer} from "@/utils/map/AddLayer";
+import {addLayer, layerQueryGet} from "@/utils/map/AddLayer";
+import {getLayerByName} from "@/utils/data/all-layer-info";
 
 export default {
   name: 'PageYjjbnt',
@@ -73,12 +78,13 @@ export default {
         { name: '项目总面积', value: '45.44', unit: '万亩', icon: require('@/assets/imgs/deck/icon-xmzmj.png'),prop:'sumarea'  },
       ],
       data_sta2: [
-        { name: '永农范围内的高标准农田', value: '22.43', unit: '万亩', icon: require('@/assets/imgs/deck/icon-dkzs.png'),prop:'cnt'  },
-        { name: '永农范围外的高标准农田', value: '27.3', unit: '万亩', icon: require('@/assets/imgs/deck/icon-xmzmj.png'),prop:'sumarea'  },
+        { name: '永农范围内的高标准农田', value: '22.89', unit: '万亩', icon: require('@/assets/imgs/deck/icon-dkzs.png'),prop:'cnt'  },
+        { name: '永农范围外的高标准农田', value: '27.86', unit: '万亩', icon: require('@/assets/imgs/deck/icon-xmzmj.png'),prop:'sumarea'  },
       ],
       tableData_origin: [],
       tableData_year: [],
-      isClickTitle:false
+      isClickTitle:false,
+      currentYear:""
     }
   },
   mounted() {
@@ -122,6 +128,11 @@ export default {
     }
   },
   methods: {
+    handleRowClick(row, col){
+      console.log(row, col);
+      this.currentYear = row.jsnf
+      layerQueryGet(getLayerByName('高标准农田现状').url, "date_build='" + row.jsnf + "'")
+    },
     changeIsClickT(){
       this.isClickTitle = !this.isClickTitle
       this.$emit('changeIsClickTitle',this.isClickTitle)
@@ -253,4 +264,7 @@ export default {
   border-radius: 50%;
 }
 
+.active{
+  color: yellow;
+}
 </style>