Browse Source

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

maxiaoxiao 4 months ago
parent
commit
8d825e0626
2 changed files with 57 additions and 54 deletions
  1. 2 2
      src/api/ghss/jctb.js
  2. 55 52
      src/views/farmlandProtection/components/jclxqk.vue

+ 2 - 2
src/api/ghss/jctb.js

@@ -6,9 +6,9 @@ export function GetDateList(params) {
         params
         params
     })
     })
 }
 }
-export function GetQueryOne(params) {
+export function CodeList(params) {
     return request({
     return request({
-        url: '/apply/jsc/QueryOne',
+        url: '/system/national/code/list',
         method: 'get',
         method: 'get',
         params
         params
     })
     })

+ 55 - 52
src/views/farmlandProtection/components/jclxqk.vue

@@ -1,12 +1,17 @@
 <template>
 <template>
   <div>
   <div>
     <div class="headerSelect">
     <div class="headerSelect">
-      <el-select v-model="yearsVal" placeholder="请选择">
+      <el-select
+        v-model="yearsVal"
+        placeholder="请选择"
+        @change="yearsChange"
+        clearable
+      >
         <el-option
         <el-option
           v-for="item in yearsOpt"
           v-for="item in yearsOpt"
           :key="item.quarter"
           :key="item.quarter"
           :label="item.quarter"
           :label="item.quarter"
-          :value="item.quarter"
+          :value="item"
         >
         >
         </el-option>
         </el-option>
       </el-select>
       </el-select>
@@ -18,12 +23,17 @@
         clearable
         clearable
         v-model="region"
         v-model="region"
       ></el-cascader>
       ></el-cascader>
-      <el-select v-model="monitorVal" placeholder="请选择">
+      <el-select
+        v-model="monitorVal"
+        placeholder="请选择"
+        @change="typeChange"
+        clearable
+      >
         <el-option
         <el-option
           v-for="item in monitorOpt"
           v-for="item in monitorOpt"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
+          :key="item.dictCode"
+          :label="item.dictValue"
+          :value="item.dictLabel"
         >
         >
         </el-option>
         </el-option>
       </el-select>
       </el-select>
@@ -100,7 +110,7 @@
 import Statistics from "./statistics";
 import Statistics from "./statistics";
 import { GetXzqhTree } from "@/api/map";
 import { GetXzqhTree } from "@/api/map";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
-import { GetDateList,GetQueryOne } from "@/api/ghss/jctb.js";
+import { GetDateList, CodeList } from "@/api/ghss/jctb.js";
 export default {
 export default {
   components: {
   components: {
     Statistics,
     Statistics,
@@ -116,45 +126,8 @@ export default {
       ],
       ],
       sdata: {},
       sdata: {},
       myChart: null,
       myChart: null,
-      cityList: [
-        {
-          name: "天涯区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "崖州区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "海棠区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "吉阳区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "吉阳区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "吉阳区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-      ],
-      yearsOpt: [],//检测图斑时间季度
+      cityList: [],
+      yearsOpt: [], //检测图斑时间季度
       monitorOpt: [
       monitorOpt: [
         {
         {
           value: "全部监测类型",
           value: "全部监测类型",
@@ -171,6 +144,9 @@ export default {
       ],
       ],
       monitorVal: "",
       monitorVal: "",
       yearsVal: "",
       yearsVal: "",
+      val0: "2024-02-17 00:00:00",
+      val1: "2024-12-31 23:59:59",
+      val2: "",
     };
     };
   },
   },
   computed: {},
   computed: {},
@@ -180,6 +156,24 @@ export default {
     this.getData();
     this.getData();
   },
   },
   methods: {
   methods: {
+    typeChange(val) {
+      this.val2 = val;
+      // this.GetCityList();
+    },
+    //年份季度改变
+    yearsChange(val) {
+      if (val) {
+        val = JSON.parse(JSON.stringify(val));
+        this.val0 = val.startTime;
+        this.val1 = val.endTime;
+        this.yearsVal = val.quarter;
+      } else {
+        this.val0 = "2024-02-17 00:00:00";
+        this.val1 = "2024-12-31 23:59:59";
+      }
+      this.getzl();
+      this.GetCityList();
+    },
     getXzqTreeData() {
     getXzqTreeData() {
       GetXzqhTree().then((res) => {
       GetXzqhTree().then((res) => {
         if (res.data.length > 0) {
         if (res.data.length > 0) {
@@ -196,7 +190,16 @@ export default {
 
 
       GetDateList().then((res) => {
       GetDateList().then((res) => {
         this.yearsOpt = res.data;
         this.yearsOpt = res.data;
-        console.log(res, "???????????");
+      });
+      //检测类型分类
+      CodeList({
+        dictType: "卫片执法后地类分类标准‌",
+        pageNum: 1,
+        pageSize: 999,
+      }).then((res) => {
+        if (res.code == 200) {
+          this.monitorOpt = res.rows;
+        }
       });
       });
     },
     },
     getData() {
     getData() {
@@ -207,9 +210,9 @@ export default {
       let sdres = await QueryOne({
       let sdres = await QueryOne({
         jscType: "t_gdbh_jctb_tbzl",
         jscType: "t_gdbh_jctb_tbzl",
         id: this.region,
         id: this.region,
-        val0: "2024-02-17 00:00:00",
-        val1: "2024-12-31 23:59:59",
-        val2: "",
+        val0: this.val0,
+        val1: this.val1,
+        val2: this.val2,
       });
       });
       this.sdata = sdres.data;
       this.sdata = sdres.data;
     },
     },
@@ -218,8 +221,8 @@ export default {
       let flres = await QueryList({
       let flres = await QueryList({
         jscType: "t_gdbh_jctb_qxfl",
         jscType: "t_gdbh_jctb_qxfl",
         id: this.region,
         id: this.region,
-        val0: "2024-02-17 00:00:00",
-        val1: "2024-12-31 23:59:59",
+        val0: this.val0,
+        val1: this.val1,
       });
       });
       flres.data.forEach((fl) => {
       flres.data.forEach((fl) => {
         this.cityList.push({
         this.cityList.push({