From 0bfdaad01fdcdeef567b59a49f7715a7ac7f0d51 Mon Sep 17 00:00:00 2001
From: zhengpz <1838927346@qq.com>
Date: Fri, 17 Sep 2021 00:57:21 +0800
Subject: [PATCH] 对接口

---
 src/views/statisticalQueryManagement/businessStatistics.vue |  147 +++++++++++++++++++++++++++++--------------------
 1 files changed, 87 insertions(+), 60 deletions(-)

diff --git a/src/views/statisticalQueryManagement/businessStatistics.vue b/src/views/statisticalQueryManagement/businessStatistics.vue
index 983e540..86ec5dc 100644
--- a/src/views/statisticalQueryManagement/businessStatistics.vue
+++ b/src/views/statisticalQueryManagement/businessStatistics.vue
@@ -1,26 +1,46 @@
 <template>
-  <basic-container>
-    <avue-crud
-      :option="tableOption"
-      :table-loading="loading"
-      :data="tableData"
-      :page.sync="page"
-      :permission="permissionList"
-      ref="crud"
-      @row-update="rowUpdates"
-      @row-save="rowSave"
-      @search-change="searchChange"
-      @search-reset="searchReset"
-      @current-change="currentChange"
-      @size-change="sizeChange"
-      @refresh-change="refreshChange"
-      @on-load="onLoad"
-      @cell-click="handleRowClick"
-      :cell-style="cellStyle"
-      class="businessStatisticsStyle"
+  <div>
+    <basic-container>
+      <avue-crud
+        :option="tableOption"
+        :table-loading="loading"
+        :data="tableData"
+        :page.sync="page"
+        :permission="permissionList"
+        ref="crud"
+        @row-update="rowUpdates"
+        @row-save="rowSave"
+        @search-change="searchChange"
+        @search-reset="searchReset"
+        @current-change="currentChange"
+        @size-change="sizeChange"
+        @refresh-change="refreshChange"
+        @on-load="onLoad"
+        @cell-click="handleRowClick"
+        :cell-style="cellStyle"
+        class="businessStatisticsStyle"
+      >
+      </avue-crud>
+    </basic-container>
+    <el-dialog
+      class="fuwu-class"
+      :title="dialogTitle"
+      append-to-body
+      :visible.sync="dialogShow"
     >
-    </avue-crud>
-  </basic-container>
+      <businessStatisticsDetail :fwdeptId="fwdeptId"></businessStatisticsDetail>
+      <!-- <avue-crud
+        :option="option2"
+        :data="data2"
+        :page.sync="page2"
+        @row-save="rowSave2"
+        @row-update="rowUpdate2"
+        @row-del="rowDel2"
+        :table-loading="loading2"
+      >
+      </avue-crud> -->
+    </el-dialog>
+  </div>
 </template>
 <script>
 import FileSaver from "file-saver";
@@ -28,13 +48,23 @@
 import { mapGetters } from "vuex";
 import {
   selectYw,
-  dictionaryList
+  dictionaryList,
+  dispatcherUnit
 } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
-import { lazyTreeJu,lazyTrees } from "../../api/index/index";
+import { lazyTreeJu, lazyTrees } from "../../api/index/index";
+import businessStatisticsDetail from "./businessStatisticsDetail";
 export default {
   name: "业务情况统计",
+  components: {
+    businessStatisticsDetail
+  },
   data() {
     return {
+      tablePage: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
       page: {
         pageSize: 10,
         currentPage: 1,
@@ -42,26 +72,7 @@
       },
       value1: "",
       value2: "",
-      tableData: [
-        // {
-        //   company: "江西省永安保安服务有限公司",
-        //   subOffice: "南昌市公安局",
-        //   customer: "76",
-        //   num: "1124"
-        // },
-        // {
-        //   company: "南昌市赣水保安服务有限公司",
-        //   subOffice: "东湖分局",
-        //   customer: "85",
-        //   num: "1428"
-        // },
-        // {
-        //   company: "江西中业兴达保安服务有限公司",
-        //   subOffice: "西湖分局",
-        //   customer: "46",
-        //   num: "974"
-        // }
-      ],
+      tableData: [],
       tableOption: {
         excelBtn: true,
         delBtn: false,
@@ -126,14 +137,14 @@
             prop: "znum",
             display: false
           },
-           {
+          {
             label: "持证人数",
-            prop: "",
+            prop: "cznum",
             display: false
           },
           {
             label: "派遣人数",
-            prop: "",
+            prop: "pqnum",
             display: false
           },
           {
@@ -143,13 +154,15 @@
           },
           {
             label: "服务到期数量",
-            prop: "",
+            prop: "dqnum",
             display: false
-          },
-          
+          }
         ]
       },
-      loading: true
+      loading: true,
+      dialogTitle: "",
+      dialogShow: false,
+      fwdeptId: ""
     };
   },
   computed: {
@@ -226,12 +239,26 @@
       });
     },
     handleRowClick(row, column, cell, event) {
+      this.dialogShow = true;
       if (column.label == "服务对象数量") {
-        this.$router.push({
-          path:
-            "/statisticalQueryManagement/businessStatisticsDetail?&departmentid=" +
-            row.departmentid
-        });
+        this.fwdeptId = row.departmentid;
+        // dispatcherUnit({
+        //   deptId: row.departmentid
+        // }).then(res => {
+        //   if (res.data.code === 200) {
+        //     this.page = {
+        //       pageSize: 10,
+        //       currentPage: 1,
+        //       total: res.data.data.total
+        //     };
+        //     this.tableData = res.data.data.records;
+        //   }
+        // });
+        // this.$router.push({
+        //   path:
+        //     "/statisticalQueryManagement/businessStatisticsDetail?&departmentid=" +
+        //     row.departmentid
+        // });
       } else if (column.label == "保安员人数") {
         this.$router.push({
           path:
@@ -239,10 +266,6 @@
             row.departmentid
         });
       }
-    },
-    cellStyle(row, column, rowIndex, columnIndex) {
-      // if (columnIndex == 4 || columnIndex == 5) {
-      // }
     }
   },
   mounted() {
@@ -253,7 +276,11 @@
 </script>
 <style lang="scss" scoped>
 /deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(7),
-/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(6) {
+/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(6),
+/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(8),
+/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(9),
+/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(10) {
   cursor: pointer !important;
 }
+
 </style>

--
Gitblit v1.9.3