From 1f531be4ff85f6c313e49c1156f422377325fecb Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 22 Sep 2021 09:22:54 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhba_regulatory

---
 src/views/statisticalQueryManagement/businessStatistics.vue       |  189 +++++++--
 src/views/statisticalQueryManagement/businessStatisticsFwdq.vue   |  275 ++++++++++++++
 src/views/statisticalQueryManagement/companyDetails.vue           |   14 
 src/views/statisticalQueryManagement/securityGuardDetail.vue      |   16 
 src/views/statisticalQueryManagement/securityGuardStatistics.vue  |  148 +++++--
 src/views/statisticalQueryManagement/businessStatisticsDetail.vue |   26 +
 src/views/statisticalQueryManagement/businessStatisticsPq.vue     |  301 +++++++++++++++
 src/api/statisticalQueryManagement/statisticalQueryManagement.js  |  117 +++--
 src/styles/common.scss                                            |    5 
 9 files changed, 936 insertions(+), 155 deletions(-)

diff --git a/src/api/statisticalQueryManagement/statisticalQueryManagement.js b/src/api/statisticalQueryManagement/statisticalQueryManagement.js
index f21e114..65c4224 100644
--- a/src/api/statisticalQueryManagement/statisticalQueryManagement.js
+++ b/src/api/statisticalQueryManagement/statisticalQueryManagement.js
@@ -1,63 +1,88 @@
 import request from "@/router/axios";
-export const selectLi = (params) => {
-    return request({
-        url: "/api/information/selectLi",
-        method: "post",
-        params: params
-    });
+export const selectLi = params => {
+  return request({
+    url: "/api/information/selectLi",
+    method: "post",
+    params: params
+  });
 };
-export const selectYw = (params) => {
-    return request({
-        url: "/api/information/selectYw",
-        method: "post",
-        params: params
-    });
+export const selectYw = params => {
+  return request({
+    url: "/api/information/selectYw",
+    method: "post",
+    params: params
+  });
 };
-export const selectUIn = (params) => {
-    return request({
-        url: "/api/information/selectUIn",
-        method: "post",
-        params: params
-    });
+export const selectUIn = params => {
+  return request({
+    url: "/api/information/selectUIn",
+    method: "post",
+    params: params
+  });
 };
-export const selectDis = (params) => {
-    return request({
-        url: "/api/information/selectDis",
-        method: "post",
-        params: params
-    });
+export const selectDis = params => {
+  return request({
+    url: "/api/information/selectDis",
+    method: "post",
+    params: params
+  });
 };
 // 服务单位下拉接口
-export const selectFw = (params) => {
-    return request({
-        url: "/api/information/selectFw",
-        method: "post",
-        params: params
-    });
+export const selectFw = params => {
+  return request({
+    url: "/api/information/selectFw",
+    method: "post",
+    params: params
+  });
 };
 // 查保安员明细
-export const pageSecurity = (params) => {
-    return request({
-        url: "/api/blade-user/page-security",
-        method: "get",
-        params: params
-    });
+export const pageSecurity = params => {
+  return request({
+    url: "/api/blade-user/page-security",
+    method: "get",
+    params: params
+  });
 };
 
 // 服务对象明细
-export const fwList = (params) => {
-    return request({
-        url: "/api/dispatcherUnit/list",
-        method: "get",
-        params: params
-    });
+export const fwList = params => {
+  return request({
+    url: "/api/dispatcherUnit/list",
+    method: "get",
+    params: params
+  });
 };
 
 // 单位类型
 export const dictionaryList = () => {
-    return request({
-        url: "/api/blade-system/dict-biz/dictionary?code=stats",
-        method: "get",
-    });
+  return request({
+    url: "/api/blade-system/dict-biz/dictionary?code=stats",
+    method: "get"
+  });
+};
+// 服务对象数量
+export const dispatcherUnit = params => {
+  return request({
+    url: "/api/dispatcherUnit/page?isExpire=1",
+    method: "get",
+    params: params
+  });
 };
 
+// 派遣人员清单
+export const dispatcher = params => {
+  return request({
+    url: "/api/dispatcher/page?dispatch=0",
+    method: "get",
+    params: params
+  });
+};
+
+// 服务到期公司清单
+export const dispatcherUnit2 = params => {
+  return request({
+    url: "/api/dispatcherUnit/page?isExpire=2",
+    method: "get",
+    params: params
+  });
+};
diff --git a/src/styles/common.scss b/src/styles/common.scss
index 8f7b47b..05c4158 100644
--- a/src/styles/common.scss
+++ b/src/styles/common.scss
@@ -63,3 +63,8 @@
   }
 
 }
+// 统计弹表的样式
+.tongji-class .el-dialog{
+  width: 80%;
+  margin-top: 10vh;
+}
diff --git a/src/views/statisticalQueryManagement/businessStatistics.vue b/src/views/statisticalQueryManagement/businessStatistics.vue
index 0919ab9..221bbe3 100644
--- a/src/views/statisticalQueryManagement/businessStatistics.vue
+++ b/src/views/statisticalQueryManagement/businessStatistics.vue
@@ -1,26 +1,62 @@
 <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"
+        class="businessStatisticsStyle"
+      >
+      </avue-crud>
+    </basic-container>
+    <el-dialog
+      class="tongji-class"
+      :title="dialogTitle"
+      append-to-body
+      :visible.sync="dialogShow"
+      v-if="dialogShow"
     >
-    </avue-crud>
-  </basic-container>
+      <businessStatisticsDetail
+        v-if="searchitem === 'fw'"
+        :fwdeptId="fwdeptId"
+      ></businessStatisticsDetail>
+      <businessStatisticsPq
+        v-if="searchitem === 'pq'"
+        :fwdeptId="fwdeptId"
+      ></businessStatisticsPq>
+      <businessStatisticsFwdq
+        v-if="searchitem === 'dq'"
+        :fwdeptId="fwdeptId"
+      ></businessStatisticsFwdq>
+      <securityGuardDetail
+        v-if="searchitem === 'zong'"
+        :fwdeptId="fwdeptId"
+        :paramCz="paramCz"
+      ></securityGuardDetail>
+      <!-- <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";
@@ -30,9 +66,19 @@
   selectYw,
   dictionaryList
 } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
-import { lazyTreeJu,lazyTrees } from "../../api/index/index";
+import { lazyTreeJu, lazyTrees } from "../../api/index/index";
+import businessStatisticsDetail from "./businessStatisticsDetail";
+import businessStatisticsPq from "./businessStatisticsPq";
+import businessStatisticsFwdq from "./businessStatisticsFwdq";
+import securityGuardDetail from "./securityGuardDetail";
 export default {
   name: "业务情况统计",
+  components: {
+    businessStatisticsDetail,
+    businessStatisticsPq,
+    businessStatisticsFwdq,
+    securityGuardDetail
+  },
   data() {
     return {
       page: {
@@ -86,6 +132,7 @@
             prop: "enterpriseName",
             search: true,
             searchSpan: 4,
+            width: 300,
             display: false
           },
           {
@@ -121,18 +168,39 @@
             ]
           },
           {
+            label: "保安员人数",
+            prop: "znum",
+            display: false
+          },
+          {
+            label: "持证人数",
+            prop: "cznum",
+            display: false
+          },
+          {
+            label: "派遣人数",
+            prop: "pqnum",
+            display: false
+          },
+          {
             label: "服务对象数量",
             prop: "fwnum",
             display: false
           },
           {
-            label: "保安员人数",
-            prop: "znum",
+            label: "服务到期数量",
+            prop: "dqnum",
             display: false
           }
         ]
       },
-      loading: true
+      loading: true,
+      dialogTitle: "",
+      dialogShow: false,
+      pqdialogShow: false,
+      fwdeptId: "",
+      searchitem: "",
+      paramCz: false
     };
   },
   computed: {
@@ -209,23 +277,61 @@
       });
     },
     handleRowClick(row, column, cell, event) {
+      this.paramCz = false;
+
       if (column.label == "服务对象数量") {
-        this.$router.push({
-          path:
-            "/statisticalQueryManagement/businessStatisticsDetail?&departmentid=" +
-            row.departmentid
-        });
+        this.dialogTitle = "业务统计明细---服务对象清单";
+        this.searchitem = "fw";
+        this.fwdeptId = row.departmentid;
+        this.dialogShow = true;
+
+        // 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:
-            "/statisticalQueryManagement/securityGuardDetail?departmentid=" +
-            row.departmentid
-        });
+        this.dialogTitle = "业务统计明细---保安员清单";
+        this.searchitem = "zong";
+        this.fwdeptId = row.departmentid;
+        this.dialogShow = true;
+
+        // this.$router.push({
+        //   path:
+        //     "/statisticalQueryManagement/securityGuardDetail?departmentid=" +
+        //     row.departmentid
+        // });
+      } else if (column.label == "派遣人数") {
+        this.dialogTitle = "业务统计明细---派遣人员清单";
+        this.searchitem = "pq";
+        this.fwdeptId = row.departmentid;
+        this.dialogShow = true;
+      } else if (column.label == "服务到期数量") {
+        this.dialogTitle = "业务统计明细---服务到期公司清单";
+        this.searchitem = "dq";
+        this.fwdeptId = row.departmentid;
+        this.dialogShow = true;
+      } else if (column.label == "持证人数") {
+        this.dialogTitle = "业务统计明细---持证保安人员清单";
+        this.searchitem = "dq";
+        this.paramCz = true;
+        this.fwdeptId = row.departmentid;
+        this.dialogShow = true;
+      } else {
+        this.dialogShow = false;
       }
-    },
-    cellStyle(row, column, rowIndex, columnIndex) {
-      // if (columnIndex == 4 || columnIndex == 5) {
-      // }
     }
   },
   mounted() {
@@ -236,7 +342,10 @@
 </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>
diff --git a/src/views/statisticalQueryManagement/businessStatisticsDetail.vue b/src/views/statisticalQueryManagement/businessStatisticsDetail.vue
index b43d288..0f48442 100644
--- a/src/views/statisticalQueryManagement/businessStatisticsDetail.vue
+++ b/src/views/statisticalQueryManagement/businessStatisticsDetail.vue
@@ -14,6 +14,7 @@
       @current-change="currentChange"
       @size-change="sizeChange"
       @refresh-change="refreshChange"
+      @on-load="onLoad"
     >
     </avue-crud>
   </basic-container>
@@ -25,9 +26,10 @@
   selectFw,
   fwList
 } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
-import { lazyTreeJu,lazyTrees } from "../../api/index/index";
+import { lazyTreeJu, lazyTrees } from "../../api/index/index";
 export default {
   name: "业务情况统计明细",
+  props: ["fwdeptId"],
   data() {
     return {
       page: {
@@ -128,13 +130,13 @@
             prop: "name",
             props: {
               label: "name",
-              value: "id"
+              value: "name"
             },
             dicData: [],
             searchLabelWidth: 110,
             search: true,
             type: "tree",
-            searchSpan: 4,
+            searchSpan: 8,
             rules: [
               {
                 required: true,
@@ -145,6 +147,12 @@
             // display: false
           },
           {
+            label: "保安公司名称",
+            width: 300,
+            prop: "tenantName",
+            display: false
+          },
+          {
             label: "服务开始时间",
             prop: "startTime",
             display: false
@@ -152,6 +160,11 @@
           {
             label: "服务到期时间",
             prop: "endTime",
+            display: false
+          },
+          {
+            label: "保安员姓名",
+            prop: "realName",
             display: false
           },
           // {
@@ -266,10 +279,11 @@
       this.loading = true;
       let param = {};
       // param["jurisdiction"] = params["jurname"] || "";
-      param["id"] = params["name"] || "";
-      param["deptId"] = this.deptid;
+      // param["id"] = params["name"] || "";
+      param["deptId"] = this.fwdeptId;
       param["current"] = page.currentPage;
       param["size"] = page.pageSize;
+      param["name"] = params["name"] || "";
       fwList(param).then(res => {
         const data = res.data.data;
         this.page.total = data.total;
@@ -321,7 +335,7 @@
     // this.getTableData();
     this.getFuWuList();
     this.getSubOfficeData();
-    this.getLocationParams();
+    // this.getLocationParams();
   }
 };
 </script>
diff --git a/src/views/statisticalQueryManagement/businessStatisticsFwdq.vue b/src/views/statisticalQueryManagement/businessStatisticsFwdq.vue
new file mode 100644
index 0000000..1f45bc6
--- /dev/null
+++ b/src/views/statisticalQueryManagement/businessStatisticsFwdq.vue
@@ -0,0 +1,275 @@
+<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"
+    >
+    </avue-crud>
+  </basic-container>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import {
+  selectDis,
+  selectFw,
+  fwList,
+  dispatcherUnit,
+  dispatcherUnit2
+} from "../../api/statisticalQueryManagement/statisticalQueryManagement";
+import { lazyTreeJu, lazyTrees } from "../../api/index/index";
+export default {
+  name: "业务情况统计明细---保安公司服务到期的公司列表",
+  props: ["fwdeptId"],
+  data() {
+    return {
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      query: {},
+      value1: "",
+      value2: "",
+      // tableData: [],
+      tablePage: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      tableOption: {
+        excelBtn: true,
+        delBtn: false,
+        editBtn: false,
+        addBtn: false,
+        selection: true,
+        menu: false,
+        // dateBtn: true,
+        align: "center",
+        height: "auto",
+        calcHeight: 30,
+        tip: false,
+        searchShowBtn: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        index: true,
+        viewBtn: true,
+        dialogClickModal: false,
+        column: [
+          {
+            label: "服务单位名称",
+            prop: "name",
+            width: 300,
+            props: {
+              label: "name",
+              value: "name"
+            },
+            dicData: [],
+            searchLabelWidth: 110,
+            search: true,
+            type: "tree",
+            searchSpan: 8,
+            rules: [
+              {
+                required: true,
+                message: "请选择服务单位",
+                trigger: "blur"
+              }
+            ]
+            // display: false
+          },
+          {
+            label: "所属保安公司",
+            prop: "tenantName",
+            width: 300,
+            display: false
+          },
+          {
+            label: "服务开始时间",
+            prop: "startTime",
+            display: false
+          },
+          {
+            label: "服务到期时间",
+            prop: "endTime",
+            display: false
+          },
+          {
+            label: "保安员姓名",
+            prop: "realName",
+            display: false
+          },
+          {
+            label: "联系人",
+            prop: "linkman",
+            display: false
+          },
+          {
+            label: "联系电话",
+            prop: "phone",
+            display: false
+          }
+        ]
+      },
+      typeValue: "0",
+      typeOptions: [
+        {
+          value: "0",
+          label: "全部"
+        },
+        {
+          value: "1",
+          label: "社保缴纳人数"
+        },
+        {
+          value: "2",
+          label: "社保缴纳总额"
+        },
+        {
+          value: "3",
+          label: "公司派遣人数"
+        },
+        {
+          value: "4",
+          label: "社保缴纳人数占比"
+        }
+      ],
+      subofficeValue: "0",
+      subofficeOptions: [
+        {
+          value: "0",
+          label: "南昌市公安局"
+        },
+        {
+          value: "2",
+          label: "东湖分局"
+        },
+        {
+          value: "3",
+          label: "西湖分局"
+        },
+        {
+          value: "4",
+          label: "青云谱分局"
+        },
+        {
+          value: "5",
+          label: "青山湖分局"
+        }
+      ],
+      servicesList: [],
+      companyName: "",
+      loading: true,
+      deptid: ""
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.post_add, false),
+        viewBtn: this.vaildData(this.permission.post_view, false),
+        delBtn: this.vaildData(this.permission.post_delete, false),
+        editBtn: this.vaildData(this.permission.post_edit, false)
+      };
+    }
+  },
+  methods: {
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    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);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      let param = {};
+      // param["jurisdiction"] = params["jurname"] || "";
+      // param["id"] = params["name"] || "";
+      param["deptId"] = this.fwdeptId;
+      param["current"] = page.currentPage;
+      param["size"] = page.pageSize;
+      param["name"] = params["name"] || "";
+      dispatcherUnit2(param).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.tableData = data.records;
+        this.loading = false;
+      });
+    },
+    getFuWuList() {
+      selectFw().then(res => {
+        if (res.data.code === 200) {
+          this.tableOption.column.forEach(item => {
+            if (item.label == "服务单位名称") {
+              item.dicData = res.data.data;
+            }
+          });
+          // this.servicesList = res.data.data;
+        }
+      });
+    },
+    getSubOfficeData() {
+      lazyTrees().then(res => {
+        if (res.data.code === 200) {
+          this.tableOption.column.forEach(item => {
+            if (item.label == "所属辖区") {
+              item.dicData = res.data.data;
+            }
+          });
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    getLocationParams() {
+      let url = window.location.href;
+      let urlArr = url.split("?")[1].split("&");
+      var object = new Object();
+      for (var i = 0; i < urlArr.length; i++) {
+        let mm = urlArr[i].split("=");
+        object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
+      }
+      this.deptid = object["departmentid"] || "";
+      // let jurisdiction = object["jurisdiction"] || "";
+      this.query = { deptid: this.deptid };
+      // this.onLoad(this.page, obj);
+      this.onLoad(this.page, this.query);
+    }
+  },
+  mounted() {
+    // this.getTableData();
+    this.getFuWuList();
+    this.getSubOfficeData();
+    // this.getLocationParams();
+  }
+};
+</script>
+<style lang="scss" scoped></style>
diff --git a/src/views/statisticalQueryManagement/businessStatisticsPq.vue b/src/views/statisticalQueryManagement/businessStatisticsPq.vue
new file mode 100644
index 0000000..ddba4e3
--- /dev/null
+++ b/src/views/statisticalQueryManagement/businessStatisticsPq.vue
@@ -0,0 +1,301 @@
+<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"
+    >
+    </avue-crud>
+  </basic-container>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import {
+  selectDis,
+  selectFw,
+  fwList,
+  dispatcherUnit,
+  dispatcher
+} from "../../api/statisticalQueryManagement/statisticalQueryManagement";
+import { lazyTreeJu, lazyTrees } from "../../api/index/index";
+export default {
+  name: "业务情况统计明细",
+  props: ["fwdeptId"],
+  data() {
+    return {
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      query: {},
+      value1: "",
+      value2: "",
+      // tableData: [],
+      tablePage: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      tableOption: {
+        excelBtn: true,
+        delBtn: false,
+        editBtn: false,
+        addBtn: false,
+        selection: true,
+        menu: false,
+        // dateBtn: true,
+        align: "center",
+        height: "auto",
+        calcHeight: 30,
+        tip: false,
+        searchShowBtn: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        index: true,
+        viewBtn: true,
+        dialogClickModal: false,
+        column: [
+          // {
+          //   label: "公司名称",
+          //   prop: "gsname",
+          //   // search: true,
+          //   // searchSpan: 4,
+          //   display: false
+          // },
+
+          // {
+          //   label: "所属辖区",
+          //   prop: "jurname",
+          //   searchSpan: 4,
+          //   props: {
+          //     label: "title",
+          //     value: "id"
+          //   },
+          //   // cascaderItem: ["city", "area"],
+          //   // dicUrl:subofficeOptions,
+          //   dicData: [],
+          //   search: true,
+          //   type: "tree",
+          //   rules: [
+          //     {
+          //       required: true,
+          //       message: "请选择所属辖区",
+          //       trigger: "blur"
+          //     }
+          //   ]
+          // },
+
+          {
+            label: "保安公司名称",
+            prop: "dispatcherCompany",
+            width: 300,
+            display: false
+          },
+          {
+            label: "服务单位名称",
+            prop: "deptName",
+            width: 300,
+            props: {
+              label: "name",
+              value: "name"
+            },
+            dicData: [],
+            searchLabelWidth: 110,
+            search: true,
+            type: "tree",
+            searchSpan: 8,
+            rules: [
+              {
+                required: true,
+                message: "请选择服务单位",
+                trigger: "blur"
+              }
+            ]
+            // display: false
+          },
+          {
+            label: "派遣时间",
+            prop: "dispatchertime",
+            display: false
+          },
+          {
+            label: "保安员姓名",
+            prop: "securityName",
+            display: false
+          },
+          {
+            label: "身份证号",
+            prop: "idCardNo",
+            display: false
+          },
+          {
+            label: "联系电话",
+            prop: "securityPhone",
+            display: false
+          }
+        ]
+      },
+      typeValue: "0",
+      typeOptions: [
+        {
+          value: "0",
+          label: "全部"
+        },
+        {
+          value: "1",
+          label: "社保缴纳人数"
+        },
+        {
+          value: "2",
+          label: "社保缴纳总额"
+        },
+        {
+          value: "3",
+          label: "公司派遣人数"
+        },
+        {
+          value: "4",
+          label: "社保缴纳人数占比"
+        }
+      ],
+      subofficeValue: "0",
+      subofficeOptions: [
+        {
+          value: "0",
+          label: "南昌市公安局"
+        },
+        {
+          value: "2",
+          label: "东湖分局"
+        },
+        {
+          value: "3",
+          label: "西湖分局"
+        },
+        {
+          value: "4",
+          label: "青云谱分局"
+        },
+        {
+          value: "5",
+          label: "青山湖分局"
+        }
+      ],
+      servicesList: [],
+      companyName: "",
+      loading: true,
+      deptid: ""
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.post_add, false),
+        viewBtn: this.vaildData(this.permission.post_view, false),
+        delBtn: this.vaildData(this.permission.post_delete, false),
+        editBtn: this.vaildData(this.permission.post_edit, false)
+      };
+    }
+  },
+  methods: {
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    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);
+    },
+    onLoad(page, params = {}) {
+      debugger;
+      this.loading = true;
+      let param = {};
+      // param["jurisdiction"] = params["jurname"] || "";
+      // param["id"] = params["name"] || "";
+      param["deptId"] = this.fwdeptId;
+      param["current"] = page.currentPage;
+      param["size"] = page.pageSize;
+      param["dispatcherCompany"] = params["name"] || "";
+      dispatcher(param).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.tableData = data.records;
+        this.loading = false;
+      });
+    },
+    getFuWuList() {
+      selectFw().then(res => {
+        if (res.data.code === 200) {
+          this.tableOption.column.forEach(item => {
+            if (item.label == "服务单位名称") {
+              item.dicData = res.data.data;
+            }
+          });
+          // this.servicesList = res.data.data;
+        }
+      });
+    },
+    getSubOfficeData() {
+      lazyTrees().then(res => {
+        if (res.data.code === 200) {
+          this.tableOption.column.forEach(item => {
+            if (item.label == "所属辖区") {
+              item.dicData = res.data.data;
+            }
+          });
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    getLocationParams() {
+      let url = window.location.href;
+      let urlArr = url.split("?")[1].split("&");
+      var object = new Object();
+      for (var i = 0; i < urlArr.length; i++) {
+        let mm = urlArr[i].split("=");
+        object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
+      }
+      this.deptid = object["departmentid"] || "";
+      // let jurisdiction = object["jurisdiction"] || "";
+      this.query = { deptid: this.deptid };
+      // this.onLoad(this.page, obj);
+      this.onLoad(this.page, this.query);
+    }
+  },
+  mounted() {
+    // this.getTableData();
+    this.getFuWuList();
+    this.getSubOfficeData();
+    // this.getLocationParams();
+  }
+};
+</script>
+<style lang="scss" scoped></style>
diff --git a/src/views/statisticalQueryManagement/companyDetails.vue b/src/views/statisticalQueryManagement/companyDetails.vue
index fb8c354..0a427ec 100644
--- a/src/views/statisticalQueryManagement/companyDetails.vue
+++ b/src/views/statisticalQueryManagement/companyDetails.vue
@@ -12,6 +12,7 @@
       @current-change="currentChange"
       @size-change="sizeChange"
       @refresh-change="refreshChange"
+      @on-load="onLoad"
     >
     </avue-crud>
   </basic-container>
@@ -23,6 +24,7 @@
 import { selectUIn } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
 export default {
   name: "公司人员详情",
+  props: ["fwdeptId"],
   data() {
     return {
       page: {
@@ -85,7 +87,7 @@
         tip: false,
         searchShowBtn: false,
         searchShow: true,
-        searchMenuSpan: 3,
+        searchMenuSpan: 10,
         index: true,
         viewBtn: true,
         dialogClickModal: false,
@@ -95,7 +97,7 @@
             // searchLabelWidth: 90,
             prop: "real_name",
             search: true,
-            searchSpan: 3,
+            searchSpan: 4,
             display: false
           },
           {
@@ -126,7 +128,7 @@
           {
             label: "是否持证",
             prop: "hold",
-            searchSpan: 3,
+            searchSpan: 4,
             type: "select",
             props: {
               label: "label",
@@ -278,7 +280,7 @@
           {
             label: "是否派遣",
             prop: "dispatch",
-            searchSpan: 3,
+            searchSpan: 4,
             type: "select",
             props: {
               label: "label",
@@ -350,7 +352,7 @@
       //   params = { current: page.currentPage, size: page.pageSize };
       // }
       let param = {};
-      param["deptid"] = this.deptid;
+      param["deptid"] = this.fwdeptId;
       param["name"] = params["real_name"] || "";
       param["hold"] =
         params["hold"] || params["hold"] == "0" ? Number(params["hold"]) : "";
@@ -394,7 +396,7 @@
   },
   mounted() {
     // this.getTableData();
-    this.getLocationParams();
+    // this.getLocationParams();
   }
 };
 </script>
diff --git a/src/views/statisticalQueryManagement/securityGuardDetail.vue b/src/views/statisticalQueryManagement/securityGuardDetail.vue
index 4f05081..eab1b5e 100644
--- a/src/views/statisticalQueryManagement/securityGuardDetail.vue
+++ b/src/views/statisticalQueryManagement/securityGuardDetail.vue
@@ -15,6 +15,7 @@
       @size-change="sizeChange"
       @refresh-change="refreshChange"
       @row-click="handleRowClick"
+      @on-load="onLoad"
     >
     </avue-crud>
   </basic-container>
@@ -24,6 +25,7 @@
 import { pageSecurity } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
 export default {
   name: "保安员明细",
+  props: ["fwdeptId", "paramCz"],
   data() {
     return {
       page: {
@@ -211,7 +213,7 @@
               }
             ],
             slot: true,
-            display: false,
+            display: false
           },
           {
             label: "是否持证",
@@ -234,7 +236,7 @@
               }
             ],
             slot: true,
-            display: false,
+            display: false
           }
         ]
       },
@@ -283,8 +285,12 @@
       let param = {};
       param["realName"] = params["realName"] || "";
       param["status"] = params["status"] || "";
-      param["deptId"] = this.deptid;
-      param["hold"] = params["hold"] || "";
+      param["deptId"] = this.fwdeptId;
+      if (this.paramCz) {
+        param["hold"] = "0";
+      } else {
+        param["hold"] = params["hold"] || "";
+      }
       param["current"] = page.currentPage;
       param["size"] = page.pageSize;
       pageSecurity(param).then(res => {
@@ -309,7 +315,7 @@
     }
   },
   mounted() {
-    this.getLocationParams();
+    // this.getLocationParams();
   }
 };
 </script>
diff --git a/src/views/statisticalQueryManagement/securityGuardStatistics.vue b/src/views/statisticalQueryManagement/securityGuardStatistics.vue
index c74b169..ec0cf3b 100644
--- a/src/views/statisticalQueryManagement/securityGuardStatistics.vue
+++ b/src/views/statisticalQueryManagement/securityGuardStatistics.vue
@@ -1,23 +1,44 @@
 <template>
-  <basic-container>
-    <avue-crud
-      :option="tableOption"
-      :table-loading="loading"
-      :data="tableData"
-      :page.sync="page"
-      :permission="permissionList"
-      ref="crud"
-      @search-change="searchChange"
-      @search-reset="searchReset"
-      @current-change="currentChange"
-      @size-change="sizeChange"
-      @refresh-change="refreshChange"
-      @on-load="onLoad"
-      @row-click="handleRowClick"
-      class="rowClick"
+  <div>
+    <basic-container>
+      <avue-crud
+        :option="tableOption"
+        :table-loading="loading"
+        :data="tableData"
+        :page.sync="page"
+        :permission="permissionList"
+        ref="crud"
+        @search-change="searchChange"
+        @search-reset="searchReset"
+        @current-change="currentChange"
+        @size-change="sizeChange"
+        @refresh-change="refreshChange"
+        @on-load="onLoad"
+        @cell-click="handleRowClick"
+        class="rowClick"
+      >
+      </avue-crud>
+    </basic-container>
+    <el-dialog
+      class="tongji-class"
+      :title="dialogTitle"
+      append-to-body
+      :visible.sync="dialogShow"
+      v-if="dialogShow"
     >
-    </avue-crud>
-  </basic-container>
+      <companyDetails :fwdeptId="fwdeptId"></companyDetails>
+      <!-- <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";
@@ -25,17 +46,21 @@
 import { mapGetters } from "vuex";
 import {
   selectLi,
-  dictionaryList,
+  dictionaryList
 } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
 import { lazyTreeJu, lazyTrees } from "../../api/index/index";
+import companyDetails from "./companyDetails";
 export default {
   name: "业务情况统计",
+  components: {
+    companyDetails
+  },
   data() {
     return {
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 0,
+        total: 0
       },
       query: {},
       value1: "",
@@ -103,8 +128,8 @@
             prop: "deptname",
             search: true,
             searchSpan: 4,
-            width: 300,
-            display: false,
+            width: 280,
+            display: false
           },
           {
             label: "单位类型",
@@ -115,9 +140,9 @@
             type: "select",
             props: {
               label: "dictValue",
-              value: "dictKey",
+              value: "dictKey"
             },
-            dicData: [],
+            dicData: []
           },
           {
             label: "所属辖区",
@@ -126,7 +151,7 @@
             type: "tree",
             props: {
               label: "title",
-              value: "value",
+              value: "value"
             },
             // dicUrl: "/api/information/lazyTreeJu",
             // dicMethod:'post',
@@ -157,39 +182,50 @@
               {
                 required: true,
                 message: "请选择所属辖区",
-                trigger: "blur",
-              },
-            ],
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "保安员总数",
             prop: "num",
-            display: false,
+            display: false
           },
           {
             label: "持证上岗人数",
             prop: "cznum",
-            display: false,
+            display: false
           },
           {
             label: "未派遣人数",
             prop: "wpaiqnum",
-            display: false,
+            display: false
           },
           {
             label: "派遣人数",
             prop: "paiqnum",
-            display: false,
+            display: false
+          },
+          {
+            label: "已采集照片人数",
+            prop: "ycaijzpnum",
+            display: false
           },
           {
             label: "未采集照片人数",
             prop: "wcaijnum",
-            display: false,
+            display: false
+          },
+          {
+            label: "已采集指纹人数",
+            prop: "ycaijzwnum",
+            display: false
           },
           {
             label: "资格审查异常人数",
+            width: 150,
             prop: "yicnum",
-            display: false,
+            display: false
           },
           // {
           //   label: "过考保安人数",
@@ -199,12 +235,14 @@
           {
             label: "缴纳社保人数",
             prop: "sbnum",
-            display: false,
-          },
-        ],
+            display: false
+          }
+        ]
       },
       companyName: "",
       loading: true,
+      dialogShow: false,
+      dialogTitle: ""
     };
   },
   computed: {
@@ -214,15 +252,15 @@
         addBtn: this.vaildData(this.permission.post_add, false),
         viewBtn: this.vaildData(this.permission.post_view, false),
         delBtn: this.vaildData(this.permission.post_delete, false),
-        editBtn: this.vaildData(this.permission.post_edit, false),
+        editBtn: this.vaildData(this.permission.post_edit, false)
       };
-    },
+    }
   },
   methods: {
     getSubOfficeData() {
-      lazyTrees().then((res) => {
+      lazyTrees().then(res => {
         if (res.data.code === 200) {
-          this.tableOption.column.forEach((item) => {
+          this.tableOption.column.forEach(item => {
             if (item.label == "所属辖区") {
               // let data = res.data.data;
               item.dicData = res.data.data;
@@ -244,9 +282,9 @@
     //   });
     // },
     getDictionaryList() {
-      dictionaryList().then((res) => {
+      dictionaryList().then(res => {
         if (res.data.code === 200) {
-          this.tableOption.column.forEach((item) => {
+          this.tableOption.column.forEach(item => {
             if (item.label == "单位类型") {
               item.dicData = res.data.data;
             }
@@ -284,28 +322,34 @@
       param["stats"] = params["stats"] || "";
       param["current"] = page.currentPage;
       param["size"] = page.pageSize;
-      selectLi(param).then((res) => {
+      selectLi(param).then(res => {
         const data = res.data.data;
         this.page.total = data.total;
         this.tableData = data.records;
         this.loading = false;
       });
     },
-    handleRowClick(row, event, column) {
-      this.$router.push({
-        path:
-          "/statisticalQueryManagement/companyDetails?deptid=" + row.dept_id,
-      });
-    },
+    handleRowClick(row, column, cell, event) {
+      if (column.label == "保安员总数") {
+        this.dialogTitle = "保安员明细";
+        this.fwdeptId = row.dept_id;
+        this.dialogShow = true;
+      } else {
+        this.dialogShow = false;
+      }
+      // this.$router.push({
+      //   path: "/statisticalQueryManagement/companyDetails?deptid=" + row.dept_id
+      // });
+    }
   },
   mounted() {
     this.getSubOfficeData();
     this.getDictionaryList();
-  },
+  }
 };
 </script>
 <style lang="scss" scoped>
-/deep/ .rowClick .el-table__row:hover td {
+/deep/ .rowClick .el-table__row:hover td:nth-child(6) {
   cursor: pointer;
 }
 </style>

--
Gitblit v1.9.3