Browse Source

图斑总栏时间接口

lkk 5 months ago
parent
commit
422e5fd3a6
2 changed files with 26 additions and 34 deletions
  1. 15 0
      src/api/ghss/jctb.js
  2. 11 34
      src/views/farmlandProtection/components/jclxqk.vue

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

@@ -0,0 +1,15 @@
+import request from '@/utils/request.js'
+export function GetDateList(params) {
+    return request({
+        url: '/apply/gdbh/jctb/date/list',
+        method: 'get',
+        params
+    })
+}
+export function GetQueryOne(params) {
+    return request({
+        url: '/apply/jsc/QueryOne',
+        method: 'get',
+        params
+    })
+}

+ 11 - 34
src/views/farmlandProtection/components/jclxqk.vue

@@ -4,9 +4,9 @@
       <el-select v-model="yearsVal" placeholder="请选择">
         <el-option
           v-for="item in yearsOpt"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
+          :key="item.quarter"
+          :label="item.quarter"
+          :value="item.quarter"
         >
         </el-option>
       </el-select>
@@ -57,7 +57,7 @@
             <span style="color: #fff">监测面积</span>
           </div>
           <div>
-            <span class="numberColor">{{  sdata.jcmj }}km²</span>
+            <span class="numberColor">{{ sdata.jcmj }}km²</span>
           </div>
         </div>
       </div>
@@ -100,6 +100,7 @@
 import Statistics from "./statistics";
 import { GetXzqhTree } from "@/api/map";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
+import { GetDateList,GetQueryOne } from "@/api/ghss/jctb.js";
 export default {
   components: {
     Statistics,
@@ -153,36 +154,7 @@ export default {
           unit: "km²",
         },
       ],
-      yearsOpt: [
-        {
-          value: "2024年",
-          label: "2024年",
-        },
-        {
-          value: "2024年第一季度",
-          label: "2024年第一季度",
-        },
-        {
-          value: "2024年第二季度",
-          label: "2024年第二季度",
-        },
-        {
-          value: "2024年第三季度",
-          label: "2024年第三季度",
-        },
-        {
-          value: "2024年第四季度",
-          label: "2024年第四季度",
-        },
-        {
-          value: "2023年",
-          label: "2023年",
-        },
-        {
-          value: "2023年第一季度",
-          label: "2023年第一季度",
-        },
-      ],
+      yearsOpt: [],//检测图斑时间季度
       monitorOpt: [
         {
           value: "全部监测类型",
@@ -221,6 +193,11 @@ export default {
           //   store.setRegionTree(this.xzqTreeData);
         }
       });
+
+      GetDateList().then((res) => {
+        this.yearsOpt = res.data;
+        console.log(res, "???????????");
+      });
     },
     getData() {
       this.getzl();