Browse Source

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

maxiaoxiao 5 months ago
parent
commit
d12b950b04

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

@@ -13,3 +13,10 @@ export function CodeList(params) {
         params
     })
 }
+export function JscQueryList(params) {
+    return request({
+        url: '/apply/jsc/QueryList',
+        method: 'get',
+        params
+    })
+}

+ 4 - 0
src/common/scss/globe.scss

@@ -936,4 +936,8 @@ body::-webkit-scrollbar-track {
     -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
     border-radius: 10px;
     background: #2a4fd1b3;
+}
+//在全局设置
+input[aria-hidden=true]{
+    display: none !important;
 }

+ 31 - 30
src/views/farmlandProtection/components/jclxqk.vue

@@ -19,6 +19,7 @@
         :show-all-levels="false"
         :options="xzqTreeData"
         placeholder="行政区"
+        @change="regionChange"
         :props="{ checkStrictly: true, expandTrigger: 'hover' }"
         clearable
         v-model="region"
@@ -33,7 +34,7 @@
           v-for="item in monitorOpt"
           :key="item.dictCode"
           :label="item.dictValue"
-          :value="item.dictLabel"
+          :value="item.dictCode"
         >
         </el-option>
       </el-select>
@@ -110,7 +111,7 @@
 import Statistics from "./statistics";
 import { GetXzqhTree } from "@/api/map";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
-import { GetDateList, CodeList } from "@/api/ghss/jctb.js";
+import { GetDateList, CodeList, JscQueryList } from "@/api/ghss/jctb.js";
 export default {
   components: {
     Statistics,
@@ -151,14 +152,21 @@ export default {
   },
   computed: {},
   mounted() {
-    this.initEcharts();
     this.getXzqTreeData();
     this.getData();
   },
   methods: {
+    regionChange(region) {
+      if (region.length && region.length > 1) {
+        this.region = region[1];
+      } else {
+        this.region = region[0];
+      }
+      this.getData();
+    },
     typeChange(val) {
       this.val2 = val;
-      // this.GetCityList();
+      this.getzl();
     },
     //年份季度改变
     yearsChange(val) {
@@ -171,8 +179,10 @@ export default {
         this.val0 = "2024-02-17 00:00:00";
         this.val1 = "2024-12-31 23:59:59";
       }
-      this.getzl();
-      this.GetCityList();
+      // this.getzl();
+      // this.GetCityList();
+      // this.initEcharts();
+      this.getData();
     },
     getXzqTreeData() {
       GetXzqhTree().then((res) => {
@@ -184,7 +194,6 @@ export default {
             list[0].value = "4602";
             this.xzqTreeData = list[0];
           } else this.xzqTreeData = res.data;
-          //   store.setRegionTree(this.xzqTreeData);
         }
       });
 
@@ -205,6 +214,7 @@ export default {
     getData() {
       this.getzl();
       this.GetCityList();
+      this.initEcharts();
     },
     async getzl() {
       let sdres = await QueryOne({
@@ -233,31 +243,22 @@ export default {
         });
       });
     },
-    initEcharts(payload) {
-      console.log(payload);
+    async initEcharts() {
       this.myChart = echarts.init(this.$refs.echars_pie);
-
-      var names = [
-          "新增耕地",
-          "新增园地",
-          "新增林地",
-          "新增草地",
-          "新增湿地",
-          "新增农村道路用地",
-          "新增农业设施大棚",
-          "新增教育用地、体育用地",
-          "新增建筑物",
-          "新增工业用地、物流仓储用地、储备库用地",
-        ],
-        values = [];
-      for (var a = 0; a < 10; a++) {
-        values.push(Math.round(Math.random() * 100));
+      let jclxres = await JscQueryList({
+        jscType: "t_gdbh_jctb_jclx",
+        id: this.region,
+        val0: this.val0,
+        val1: this.val1,
+      });
+      var names = [];
+      var values = [];
+      if (jclxres.data.length) {
+        jclxres.data.forEach((item) => {
+          names.push(item.dict_value);
+          values.push(item.jcmj);
+        });
       }
-
-      // qxslyqsLineEcharts.setOption({
-
-      // });
-
       let option = {
         // backgroundColor: "#041139",
         tooltip: {