From d356332a2003d00ca803b4e73dc404b9643b60d5 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 08 Sep 2021 08:27:53 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_regulatory

---
 src/views/statisticalQueryManagement/businessStatistics.vue |   54 +++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 43 insertions(+), 11 deletions(-)

diff --git a/src/views/statisticalQueryManagement/businessStatistics.vue b/src/views/statisticalQueryManagement/businessStatistics.vue
index 2590585..0919ab9 100644
--- a/src/views/statisticalQueryManagement/businessStatistics.vue
+++ b/src/views/statisticalQueryManagement/businessStatistics.vue
@@ -26,8 +26,11 @@
 import FileSaver from "file-saver";
 import XLSX from "xlsx";
 import { mapGetters } from "vuex";
-import { selectYw } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
-import { lazyTreeJu } from "../../api/index/index";
+import {
+  selectYw,
+  dictionaryList
+} from "../../api/statisticalQueryManagement/statisticalQueryManagement";
+import { lazyTreeJu,lazyTrees } from "../../api/index/index";
 export default {
   name: "业务情况统计",
   data() {
@@ -85,12 +88,24 @@
             searchSpan: 4,
             display: false
           },
-
+          {
+            label: "单位类型",
+            prop: "stats",
+            search: true,
+            searchSpan: 4,
+            display: false,
+            type: "select",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            dicData: []
+          },
           {
             label: "所属辖区",
             prop: "jurname",
             searchSpan: 4,
-            type: "select",
+            type: "tree",
             props: {
               label: "title",
               value: "id"
@@ -133,7 +148,7 @@
   },
   methods: {
     getSubOfficeData() {
-      lazyTreeJu().then(res => {
+      lazyTrees().then(res => {
         if (res.data.code === 200) {
           this.tableOption.column.forEach(item => {
             if (item.label == "所属辖区") {
@@ -142,6 +157,17 @@
           });
         } else {
           this.$message.error(res.msg);
+        }
+      });
+    },
+    getDictionaryList() {
+      dictionaryList().then(res => {
+        if (res.data.code === 200) {
+          this.tableOption.column.forEach(item => {
+            if (item.label == "单位类型") {
+              item.dicData = res.data.data;
+            }
+          });
         }
       });
     },
@@ -158,9 +184,11 @@
     },
     currentChange(currentPage) {
       this.page.currentPage = currentPage;
+      this.onLoad(this.page, this.query);
     },
     sizeChange(pageSize) {
       this.page.pageSize = pageSize;
+      this.onLoad(this.page, this.query);
     },
     refreshChange() {
       this.onLoad(this.page, this.query);
@@ -168,8 +196,9 @@
     onLoad(page, params = {}) {
       this.loading = true;
       let param = {};
-      param["jurisdiction"] = params["jurname"] ? params["jurname"] : "";
-      param["deptid"] = "";
+      param["jurisdiction"] = params["jurname"] || "";
+      param["deptid"] = params["enterpriseName"] || "";
+      param["stats"] = params["stats"] || "";
       param["current"] = page.currentPage;
       param["size"] = page.pageSize;
       selectYw(param).then(res => {
@@ -182,13 +211,15 @@
     handleRowClick(row, column, cell, event) {
       if (column.label == "服务对象数量") {
         this.$router.push({
-          path: "/statisticalQueryManagement/businessStatisticsDetail"
+          path:
+            "/statisticalQueryManagement/businessStatisticsDetail?&departmentid=" +
+            row.departmentid
         });
       } else if (column.label == "保安员人数") {
         this.$router.push({
           path:
-            "/statisticalQueryManagement/securityGuardDetail?enterpriseName=" +
-            row.enterpriseName
+            "/statisticalQueryManagement/securityGuardDetail?departmentid=" +
+            row.departmentid
         });
       }
     },
@@ -199,11 +230,12 @@
   },
   mounted() {
     this.getSubOfficeData();
+    this.getDictionaryList();
   }
 };
 </script>
 <style lang="scss" scoped>
-/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(5),
+/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(7),
 /deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(6) {
   cursor: pointer !important;
 }

--
Gitblit v1.9.3