Browse Source

合法性判定汇总接口联调,合法性判定情况统计表接口联调

maxiaoxiao 1 day ago
parent
commit
193ff18a76

+ 2 - 2
src/views/pageCode/statistic/progress/config.js

@@ -26,13 +26,13 @@ export const zllist = {
     { name: "省级\n已审核", prop: "SJJYSH", prop3: "完成进度" },
   ],
   judge: [
-    { name: "监测\n图斑", pro: "all" },
+    { name: "监测\n图斑", pro: "JCAll" },
     { name: "未判定\n图斑", prop: "WPD", prop3: "占比" },
     { name: "已判定\n图斑\n(拆分前)", prop: "PDCFQ", prop3: "占比" },
     { name: "已判定\n图斑\n(拆分后)", prop: "PDCFH" },
   ],
   result: [
-    { name: "已判定\n图斑", pro: "all", api: "pdjg" },
+    { name: "已判定\n图斑", pro: "PDAll", api: "pdjg" },
     { name: "判定为\n合法用地", prop: "HFYD", prop3: "占比", api: "pdjg" },
     { name: "判定为\n违法用地", prop: "WFYD", prop3: "占比", api: "pdjg" },
     { name: "判定为\n其它用地", prop: "QTYD", prop3: "占比", api: "pdjg" },

+ 138 - 56
src/views/pageCode/statistic/progress/index.vue

@@ -34,7 +34,7 @@
         </template>
       </customForm>
       <div class="content gdzlc">
-        <div class="item" v-for="zl in zllist[route.query.type]" :key="zl.name">
+        <div class="item" v-for="zl in zllist[route.query.type]" :key="zl.prop">
           <div
             class="icon"
             :class="(zl.name.match(/\n/g) || []).length == 2 ? 'tree' : ''"
@@ -54,7 +54,7 @@
         </div>
       </div>
     </div>
-    <div class="box-left">
+    <div class="box-left" v-loading="loading">
       <div class="box-left-content">
         <div class="echartTitle">
           <div class="block-title">{{ titles[route.query.type] }}</div>
@@ -165,12 +165,21 @@ import { FormConfig, titles, units, allTable, judgeTable } from "./config";
 import { zllist } from "./config";
 import { nextTick } from "vue";
 import { userDept } from "@/api/system/dept";
-import { getcount, listJctb, listJz } from "@/api/rsmonitoring/statistics";
+import {
+  getcount,
+  listJctb,
+  listJz,
+  getCfCount,
+  listHfx,
+  getjgCout,
+  listjg,
+} from "@/api/rsmonitoring/statistics";
 import parse from "wellknown";
 const route = useRoute();
 const router = useRouter();
 const { proxy } = getCurrentInstance();
 const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
+const loading = ref(false);
 const echartRef = ref();
 const echartsMap = ref();
 const mapGeoJson = ref({
@@ -223,24 +232,38 @@ let countparm = {
     SJJYSH: [{ auditflowStep: "SJJSH" }],
   },
   judge: {
-    XJDSH: [
+    JCAll: null,
+    WPD: [
+      { auditflowStep: "WYFF" },
+      { auditflowStep: "WYDC" },
+      { auditflowStep: "WYQR" },
+      { auditflowStep: "WYTJ" },
       { auditflowStep: "XJHGX" },
       { auditflowStep: "XJSH" },
-      { auditflowStep: "WYTJ", successType: "0" },
     ],
-    XJYSH: [{ auditflowStep: "XJSH" }],
-    XJYTJ: [{ auditflowStep: "XJTJ" }],
-    SJTH: [{ auditflowStep: "SJTJ", successType: "1" }],
-    SJJTH: [{ auditflowStep: "SJJTJ", successType: "1" }],
+    PDCFQ: [
+      { auditflowStep: "XJTJ" },
+      { auditflowStep: "SJSH" },
+      { auditflowStep: "SJTJ" },
+      { auditflowStep: "SJJSH" },
+      { auditflowStep: "SJJTJ" },
+    ],
+    PDCFH: [
+      { auditflowStep: "XJTJ" },
+      { auditflowStep: "SJSH" },
+      { auditflowStep: "SJTJ" },
+      { auditflowStep: "SJJSH" },
+      { auditflowStep: "SJJTJ" },
+    ],
   },
   result: {
-    SJDSH: [
+    PDAll: [
       { auditflowStep: "SJSH" },
       { auditflowStep: "XJTJ", successType: "0" },
     ],
-    SJYSH: [{ auditflowStep: "SJSH" }],
-    SJYTJ: [{ auditflowStep: "SJTJ" }],
-    SJJTH: [{ auditflowStep: "SJJTJ", successType: "1" }],
+    PDHF: [{ auditflowStep: "SJSH" }],
+    PDWF: [{ auditflowStep: "SJTJ" }],
+    PDQT: [{ auditflowStep: "SJJTJ", successType: "1" }],
   },
 };
 onMounted(() => {});
@@ -253,18 +276,37 @@ function getData() {
   countData.value = {};
   let prams = countparm[route.query.type];
   Object.keys(prams).forEach((key) => {
-    getcount({
+    let pram = {
       xzqdm: queryParams.value.xzqdm,
       startTime: queryParams.value.time[0],
       endTime: queryParams.value.time[1],
       auditflowList: prams[key],
-    }).then((res) => {
-      countData.value[`${key}num`] = res.data.dq.countNumber;
-      countData.value[`${key}mj`] = res.data.dq.countSum;
-      countData.value[`${key}zb`] = res.data.zb;
-    });
+    };
+    if (key == "PDCFH") {
+      getCfCount(pram).then((res) => {
+        setCount(key, res.data);
+      });
+    } else if (
+      key == "PDAll" ||
+      key == "PDHF" ||
+      key == "PDWF" ||
+      key == "PDQT"
+    ) {
+      getjgCout(pram).then((res) => {
+        setCount(key, res.data);
+      });
+    } else {
+      getcount(pram).then((res) => {
+        setCount(key, res.data);
+      });
+    }
   });
 }
+function setCount(key, data) {
+  countData.value[`${key}num`] = data.dq.countNumber;
+  countData.value[`${key}mj`] = data.dq.countSum;
+  countData.value[`${key}zb`] = data.zb;
+}
 // function getDrpt() {
 //   userDept({}).then((response) => {
 //     // deptList.value = response.data;
@@ -286,40 +328,64 @@ function resetQuery() {
 }
 /** 查询角色列表 */
 function getList() {
-  // loading.value = true;
-  listJctb(queryParams.value).then((res) => {
-    tableData.value = res.data;
-    // mapGeoJson.value = JSON.parse(res.data[1].geom);
-    mapGeoJson.value.features = [];
-    mapVals.value = [];
-    res.data.forEach((a, i) => {
-      if (i == 1) {
-        mapGeoJson.value.features.push({
-          type: "Feature",
-          properties: {
-            adcode: a.xzqdm,
-            name: a.xzqmc,
-            // center: [116.310316, 39.956074],
-            // centroid: [116.23328, 40.026927],
-            childrenNum: 0,
-            level: "district",
-            // acroutes: [100000, 110000],
-            // parent: { adcode: 110000 },
-          },
-          geometry: JSON.parse(a.geom),
-        });
-        mapVals.value.push({
-          name: a.xzqmc,
-          value: { Number: a.countNumber + 100, Sum: a.countSum },
-        });
-      }
+  loading.value = true;
+  if (route.query.type == "all") {
+    listJctb(queryParams.value).then((res) => {
+      tableData.value = res.data;
+      setMap(res.data);
+      setLnbh(res.data);
+      // total.value = response.total;
+      loading.value = false;
     });
-    changeNtype();
-    setLnbh(res.data);
-    // total.value = response.total;
-    // loading.value = false;
+    // listJz(queryParams.value).then((res) => {});
+  } else if (route.query.type == "judge") {
+    listHfx(queryParams.value).then((res) => {
+      setList(res.data);
+    });
+  } else {
+    listjg(queryParams.value).then((res) => {
+      setList(res.data);
+    });
+  }
+}
+function setList(data) {
+  tableData.value = []; //data;
+  data.forEach((re) => {
+    tableData.value.push({ ...re, ...re.hzjg });
+  });
+  console.log(tableData.value, "---");
+  setMap(data);
+  setLnbh(tableData.value);
+  // total.value = response.total;
+  loading.value = false;
+}
+function setMap(data) {
+  // mapGeoJson.value = JSON.parse(res.data[1].geom);
+  mapGeoJson.value.features = [];
+  mapVals.value = [];
+  data.forEach((a, i) => {
+    if (i) {
+      mapGeoJson.value.features.push({
+        type: "Feature",
+        properties: {
+          adcode: a.xzqdm,
+          name: a.xzqmc,
+          // center: [116.310316, 39.956074],
+          // centroid: [116.23328, 40.026927],
+          childrenNum: 0,
+          level: "district",
+          // acroutes: [100000, 110000],
+          // parent: { adcode: 110000 },
+        },
+        geometry: JSON.parse(a.geom),
+      });
+      mapVals.value.push({
+        name: a.xzqmc,
+        value: { Number: a.countNumber + 100, Sum: a.countSum },
+      });
+    }
   });
-  listJz(queryParams.value).then((res) => {});
+  changeNtype();
 }
 function changeNtype() {
   echartsMap.value.init(mapVals.value, ntype.value == "0" ? "Number" : "Sum");
@@ -327,14 +393,29 @@ function changeNtype() {
 function setLnbh(data) {
   //eData.value.yName = `变化面积${this.unitList[this.nowunit].unit}`;
   eData.value.xData = [];
-  eData.value.yData = [[]];
+  eData.value.yData = [[], [], [], []];
   data.forEach((res) => {
     eData.value.xData.push(res.xzqmc);
-    eData.value.yData[0].push(
-      res[ntype.value == "0" ? "countNumber" : "countSum"]
-    );
+    if (route.query.type == "all") {
+      eData.value.yData[0].push(
+        res[ntype.value == "0" ? "countNumber" : "countSum"]
+      );
+    } else if (route.query.type == "judge") {
+      eData.value.yData[0].push(
+        res[ntype.value == "0" ? "v1_number" : "v1_sum"]
+      );
+      eData.value.yData[1].push(
+        res[ntype.value == "0" ? "v2_number" : "v2_sum"]
+      );
+      eData.value.yData[2].push(
+        res[ntype.value == "0" ? "v3_number" : "v3_sum"]
+      );
+      eData.value.yData[3].push(
+        res[ntype.value == "0" ? "v4_number" : "v4_sum"]
+      );
+    }
   });
-
+  console.log(eData.value, "eData.value");
   echartRef.value.setOptions(eData.value);
 }
 
@@ -391,6 +472,7 @@ getList();
 .progress {
   .gdzlc {
     height: 80px;
+    margin-right: 50px;
     display: flex;
     justify-content: space-between;