From dc91db9bb3473c3ed058f86f74359e15c035a8a5 Mon Sep 17 00:00:00 2001
From: zhengpz <1838927346@qq.com>
Date: Mon, 23 Aug 2021 22:13:10 +0800
Subject: [PATCH] 表查询完善

---
 src/views/securityUnitOperation/securityEchart.js                 |   25 +
 src/views/statisticalQueryManagement/businessStatistics.vue       |   14 
 src/router/views/index.js                                         |   14 +
 src/views/statisticalQueryManagement/companyDetails.vue           |   55 +--
 src/views/statisticalQueryManagement/securityGuardDetail.vue      |  318 ++++++++++++++++++++++++++
 src/views/statisticalQueryManagement/securityGuardStatistics.vue  |    6 
 src/views/statisticalQueryManagement/businessStatisticsDetail.vue |  179 +++++++++-----
 src/views/securityUnitOperation/economicAnalysis.vue              |    7 
 src/views/securityUnitOperation/economicTable.vue                 |    9 
 src/views/securityUnitOperation/operationAnalysis.vue             |   18 
 src/views/securityUnitOperation/operationTable.vue                |   43 ---
 11 files changed, 519 insertions(+), 169 deletions(-)

diff --git a/src/router/views/index.js b/src/router/views/index.js
index 8e29d23..b732d4a 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -411,5 +411,19 @@
             component: () =>
                 import( /* webpackChunkName: "views" */ '@/views/statisticalQueryManagement/businessStatisticsDetail')
         }]
+    },
+    {
+        path: '/statisticalQueryManagement/securityGuardDetail',
+        redirect: '/statisticalQueryManagement/securityGuardDetail/index',
+        component: Layout,
+        children: [{
+            path: 'index',
+            name: '保安员明细',
+            meta: {
+                i18n: 'index',
+            },
+            component: () =>
+                import( /* webpackChunkName: "views" */ '@/views/statisticalQueryManagement/securityGuardDetail')
+        }]
     }
 ]
\ No newline at end of file
diff --git a/src/views/securityUnitOperation/economicAnalysis.vue b/src/views/securityUnitOperation/economicAnalysis.vue
index ef152f0..327a2b2 100644
--- a/src/views/securityUnitOperation/economicAnalysis.vue
+++ b/src/views/securityUnitOperation/economicAnalysis.vue
@@ -88,7 +88,7 @@
     <el-row>
       <el-col :span="24">
         <div class="rowContent" v-loading="loading3">
-          <span class="span-title">年龄趋势</span>
+          <span class="span-title">服务客户数量</span>
           <div id="bottomEchart"></div>
         </div>
       </el-col>
@@ -106,7 +106,8 @@
   selectTo,
   queryYearSoil,
   queryYearAn,
-  queryYearPz
+  queryYearPz,
+  queryYearKh
 } from "../../api/securityUnitOperation/securityUnitOperation";
 export default {
   data() {
@@ -277,7 +278,7 @@
         jurisdiction: this.value1,
         deptid: this.value2
       };
-      queryYearAn(params).then(res => {
+      queryYearKh(params).then(res => {
         if (res.data.code === 200) {
           let bottomEchart = echarts.init(
             document.getElementById("bottomEchart")
diff --git a/src/views/securityUnitOperation/economicTable.vue b/src/views/securityUnitOperation/economicTable.vue
index b149b5a..9ca75a8 100644
--- a/src/views/securityUnitOperation/economicTable.vue
+++ b/src/views/securityUnitOperation/economicTable.vue
@@ -33,6 +33,7 @@
         currentPage: 1,
         total: 0
       },
+      query:{},
       value1: "",
       value2: "",
       tableData: [
@@ -304,9 +305,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);
@@ -314,14 +317,14 @@
     onLoad(page, params = {}) {
       this.loading = true;
       let param = {};
-      param["jurisdiction"] = params["jurisdiction"] || "";
+      param["jurisdiction"] = params["jurname"] || "";
       param["enterpriseName"] = params["enterpriseName"] || "";
       param["current"] = page.currentPage;
       param["size"] = page.pageSize;
       selectJj(param).then(res => {
         const data = res.data.data;
         this.page.total = data.total;
-        this.tableData = res.data.data;
+        this.tableData = data.records;
         this.loading = false;
       });
     },
@@ -346,7 +349,7 @@
         let mm = urlArr[i].split("=");
         object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
       }
-      let jurisdiction = object["jurisdiction"] || "";
+      let jurisdiction = object["jurisdiction1"] || "";
       let enterpriseName = object["enterpriseName"] || "";
       let obj = { jurisdiction: jurisdiction, enterpriseName: enterpriseName };
       this.onLoad(this.page, obj);
diff --git a/src/views/securityUnitOperation/operationAnalysis.vue b/src/views/securityUnitOperation/operationAnalysis.vue
index 10fd02b..6879482 100644
--- a/src/views/securityUnitOperation/operationAnalysis.vue
+++ b/src/views/securityUnitOperation/operationAnalysis.vue
@@ -208,15 +208,7 @@
   },
   methods: {
     setEchart() {
-      this.loading3 = true;
       let data = [];
-      if (!this.echartDom.bottomEchart) {
-        this.echartDom.bottomEchart = echarts.init(
-          document.getElementById("bottomEchart")
-        );
-        this.echartDom.bottomEchart.setOption(echartJs.bottomOption1(data));
-      }
-      this.loading3 = false;
 
       let data1 = [];
       if (!this.echartDom.bottomEchart1) {
@@ -314,6 +306,7 @@
     },
     getQueryYearG() {
       this.loading1 = true;
+      this.loading3 = true;
       let params = {
         jurisdiction: this.value1,
         deptid: this.value2
@@ -328,7 +321,16 @@
           this.echartDom.middleEchart1.setOption(
             echartJs.middleOption1(res.data.data)
           );
+          if (!this.echartDom.bottomEchart) {
+            this.echartDom.bottomEchart = echarts.init(
+              document.getElementById("bottomEchart")
+            );
+          }
+          this.echartDom.bottomEchart.setOption(
+            echartJs.bottomOption1(res.data.data)
+          );
         }
+        this.loading3 = false;
         this.loading1 = false;
       });
     },
diff --git a/src/views/securityUnitOperation/operationTable.vue b/src/views/securityUnitOperation/operationTable.vue
index 43bcb26..a78a129 100644
--- a/src/views/securityUnitOperation/operationTable.vue
+++ b/src/views/securityUnitOperation/operationTable.vue
@@ -7,8 +7,6 @@
       :page.sync="page"
       :permission="permissionList"
       ref="crud"
-      @row-update="rowUpdates"
-      @row-save="rowSave"
       @search-change="searchChange"
       @search-reset="searchReset"
       @current-change="currentChange"
@@ -20,8 +18,6 @@
   </basic-container>
 </template>
 <script>
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
 import { selectTb } from "../../api/securityUnitOperation/securityUnitOperation";
 import { lazyTreeJu } from "../../api/index/index";
 export default {
@@ -33,6 +29,7 @@
         currentPage: 1,
         total: 0
       },
+      query:{},
       value1: "",
       value2: "",
       tableData: [
@@ -243,38 +240,6 @@
     };
   },
   methods: {
-    rowSave(row, done, loading) {
-      adddata(row).then(
-        () => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        },
-        error => {
-          window.console.log(error);
-          loading();
-        }
-      );
-    },
-    rowUpdates(row, index, done, loading) {
-      update(row).then(
-        () => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        },
-        error => {
-          window.console.log(error);
-          loading();
-        }
-      );
-    },
     searchChange(params, done) {
       this.query = params;
       this.page.currentPage = 1;
@@ -288,9 +253,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);
@@ -305,7 +272,7 @@
       selectTb(param).then(res => {
         const data = res.data.data;
         this.page.total = data.total;
-        this.tableData = res.data.data;
+        this.tableData = data.records;
         this.loading = false;
       });
     },
@@ -330,7 +297,7 @@
         let mm = urlArr[i].split("=");
         object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
       }
-      let jurisdiction = object["jurisdiction"] || "";
+      let jurisdiction = object["jurisdiction1"] || "";
       let enterpriseName = object["enterpriseName"] || "";
       let obj = { jurisdiction: jurisdiction, enterpriseName: enterpriseName };
       this.onLoad(this.page, obj);
diff --git a/src/views/securityUnitOperation/securityEchart.js b/src/views/securityUnitOperation/securityEchart.js
index 9162c8c..215f700 100644
--- a/src/views/securityUnitOperation/securityEchart.js
+++ b/src/views/securityUnitOperation/securityEchart.js
@@ -33,7 +33,7 @@
       containLabel: true
     },
     legend: {
-      data: ["服务对象数量"],
+      data: ["服务客户数量"],
       top: "0%",
       textStyle: {
         color: "#fff"
@@ -89,6 +89,22 @@
   return option;
 }
 function bottomOption1(alldata) {
+  let baoan = [];
+  let chiz = [];
+  let paiq = [];
+  alldata.forEach(item => {
+    for (var i in item) {
+      for (var j in item[i]) {
+        if (i === "baoan") {
+          baoan.push(item[i][j]);
+        } else if (i === "chiz") {
+          chiz.push(item[i][j]);
+        } else if (i === "paiq") {
+          paiq.push(item[i][j]);
+        }
+      }
+    }
+  });
   let option = {
     // title: {
     //   text: "公司运营趋势",
@@ -98,7 +114,6 @@
     // },
     color: [
       "#73c0de",
-
       "#fac858",
       "#91cc75",
       "#3ba272",
@@ -168,19 +183,19 @@
         name: "保安员数量",
         type: "line",
         stack: "总量",
-        data: [120, 132, 101, 134, 90, 230, 210, 113, 221, 42, 152, 111]
+        data: baoan
       },
       {
         name: "派遣数量",
         type: "line",
         stack: "总量",
-        data: [220, 182, 191, 234, 290, 330, 310, 111, 110, 91, 111, 131]
+        data: paiq
       },
       {
         name: "持证数量",
         type: "line",
         stack: "总量",
-        data: [150, 232, 201, 154, 190, 330, 410, 90, 91, 93, 112, 133]
+        data: chiz
       }
     ]
   };
diff --git a/src/views/statisticalQueryManagement/businessStatistics.vue b/src/views/statisticalQueryManagement/businessStatistics.vue
index 62103cf..2590585 100644
--- a/src/views/statisticalQueryManagement/businessStatistics.vue
+++ b/src/views/statisticalQueryManagement/businessStatistics.vue
@@ -145,7 +145,7 @@
         }
       });
     },
-     searchChange(params, done) {
+    searchChange(params, done) {
       this.query = params;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
@@ -175,21 +175,27 @@
       selectYw(param).then(res => {
         const data = res.data.data;
         this.page.total = data.total;
-        this.tableData = res.data.data;
+        this.tableData = data.records;
         this.loading = false;
       });
     },
     handleRowClick(row, column, cell, event) {
-      if (column.label == "服务对象数量" || column.label == "保安员人数") {
+      if (column.label == "服务对象数量") {
         this.$router.push({
           path: "/statisticalQueryManagement/businessStatisticsDetail"
+        });
+      } else if (column.label == "保安员人数") {
+        this.$router.push({
+          path:
+            "/statisticalQueryManagement/securityGuardDetail?enterpriseName=" +
+            row.enterpriseName
         });
       }
     },
     cellStyle(row, column, rowIndex, columnIndex) {
       // if (columnIndex == 4 || columnIndex == 5) {
       // }
-    },
+    }
   },
   mounted() {
     this.getSubOfficeData();
diff --git a/src/views/statisticalQueryManagement/businessStatisticsDetail.vue b/src/views/statisticalQueryManagement/businessStatisticsDetail.vue
index 255caf1..69e6013 100644
--- a/src/views/statisticalQueryManagement/businessStatisticsDetail.vue
+++ b/src/views/statisticalQueryManagement/businessStatisticsDetail.vue
@@ -2,28 +2,39 @@
   <basic-container>
     <avue-crud
       :option="tableOption"
-      :data="tableData"
-      :page.sync="tablePage"
       :table-loading="loading"
+      :data="tableData"
+      :page.sync="page"
       :permission="permissionList"
-      :before-open="beforeOpen"
-      @date-change="dateChange"
+      ref="crud"
+      @row-update="rowUpdates"
+      @row-save="rowSave"
+      @search-change="searchChange"
+      @search-reset="searchReset"
+      @current-change="currentChange"
+      @size-change="sizeChange"
+      @refresh-change="refreshChange"
     >
     </avue-crud>
   </basic-container>
 </template>
 <script>
-// import FileSaver from "file-saver";
-// import XLSX from "xlsx";
 import { mapGetters } from "vuex";
 import {
   selectDis,
   selectFw
 } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
+import { lazyTreeJu } from "../../api/index/index";
 export default {
   name: "业务情况统计明细",
   data() {
     return {
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      query: {},
       value1: "",
       value2: "",
       tableData: [
@@ -85,8 +96,8 @@
           {
             label: "公司名称",
             prop: "gsname",
-            search: true,
-            searchSpan: 4,
+            // search: true,
+            // searchSpan: 4,
             display: false
           },
 
@@ -94,36 +105,15 @@
             label: "所属辖区",
             prop: "jurname",
             searchSpan: 4,
-            type: "select",
             props: {
-              label: "label",
-              value: "value"
+              label: "title",
+              value: "id"
             },
             // cascaderItem: ["city", "area"],
             // dicUrl:subofficeOptions,
-            dicData: [
-              {
-                value: "0",
-                label: "南昌市公安局"
-              },
-              {
-                value: "2",
-                label: "东湖分局"
-              },
-              {
-                value: "3",
-                label: "西湖分局"
-              },
-              {
-                value: "4",
-                label: "青云谱分局"
-              },
-              {
-                value: "5",
-                label: "青山湖分局"
-              }
-            ],
+            dicData: [],
             search: true,
+            type: "tree",
             rules: [
               {
                 required: true,
@@ -145,16 +135,29 @@
           {
             label: "服务单位名称",
             prop: "fwname",
+            props: {
+              label: "name",
+              value: "id"
+            },
+            dicData: [],
             searchLabelWidth: 110,
             search: true,
+            type: "tree",
             searchSpan: 4,
-            display: false
+            rules: [
+              {
+                required: true,
+                message: "请选择服务单位",
+                trigger: "blur"
+              }
+            ]
+            // display: false
           },
           {
             label: "保安派遣人数",
             prop: "num",
             display: false
-          },
+          }
           // {
           //   label: "备注",
           //   prop: "bz",
@@ -225,52 +228,88 @@
     }
   },
   methods: {
-    dateChange() {},
-    getTableData() {
-      let params = {
-        jurisdiction: "",
-        current: 1,
-        fid: 20,
-        deptid: "1412222709480509442",
-        size: 10
-      };
-      selectDis(params).then(res => {
-        if (res.data.code === 200) {
-          this.tableData = res.data.data;
-          this.loading = false;
-        }
+    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["fid"] = params["fwname"] || "";
+      param["deptid"] = params["deptid"] || "1425365559645601794";
+      param["current"] = page.currentPage;
+      param["size"] = page.pageSize;
+      selectDis(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.servicesList = res.data.data;
+          this.tableOption.column.forEach(item => {
+            if (item.label == "服务单位名称") {
+              item.dicData = res.data.data;
+            }
+          });
+          // this.servicesList = res.data.data;
         }
       });
+    },
+    getSubOfficeData() {
+      lazyTreeJu().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]);
+      // }
+      // let jurisdiction = object["jurisdiction1"] || "";
+      // let enterpriseName = object["enterpriseName"] || "";
+      // let obj = { jurisdiction: jurisdiction, enterpriseName: enterpriseName };
+      // this.onLoad(this.page, obj);
+      this.onLoad(this.page, this.query);
     }
-    // downExcel() {
-    //   let et = XLSX.utils.table_to_book(document.getElementById("table"));
-    //   let etout = XLSX.write(et, {
-    //     bookType: "xlsx",
-    //     bookSST: true,
-    //     type: "array"
-    //   });
-    //   try {
-    //     FileSaver.saveAs(
-    //       new Blob([etout], {
-    //         type: "application/octet-stream"
-    //       }),
-    //       `表.xlsx`
-    //     ); //导出的文件名
-    //   } catch (e) {
-    //     console.log(e, etout);
-    //   }
-    //   return etout;
-    // }
   },
   mounted() {
-    this.getTableData();
+    // this.getTableData();
     this.getFuWuList();
+    this.getSubOfficeData();
+    this.getLocationParams();
   }
 };
 </script>
diff --git a/src/views/statisticalQueryManagement/companyDetails.vue b/src/views/statisticalQueryManagement/companyDetails.vue
index 3387f09..d23026d 100644
--- a/src/views/statisticalQueryManagement/companyDetails.vue
+++ b/src/views/statisticalQueryManagement/companyDetails.vue
@@ -12,7 +12,6 @@
       @current-change="currentChange"
       @size-change="sizeChange"
       @refresh-change="refreshChange"
-      @on-load="onLoad"
     >
     </avue-crud>
   </basic-container>
@@ -326,9 +325,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);
@@ -341,49 +342,33 @@
       let param = {};
       param["deptid"] = params["deptid"] || "";
       param["name"] = params["real_name"] || "";
-      param["hold"] = params["hold"] || "";
-      param["photo"] = params["photo"] || "";
-      param["examinationtype"] = params["examination_type"] || "";
-      param["dispatch"] = params["dispatch"] || "";
-      param["soil"] = params["soil"] || "";
+      param["hold"] =
+        params["hold"] || params["hold"] == "0" ? Number(params["hold"]) : "";
+      param["photo"] =
+        params["photo"] || params["photo"] == "0"
+          ? Number(params["photo"])
+          : "";
+      param["examinationtype"] =
+        params["examination_type"] || params["examination_type"] == "0"
+          ? Number(params["examination_type"])
+          : "";
+      param["dispatch"] =
+        params["dispatch"] || params["dispatch"] == "0"
+          ? Number(params["dispatch"])
+          : "";
+      param["soil"] =
+        params["soil"] || params["soil"] == "0" ? Number(params["soil"]) : "";
       param["current"] = page.currentPage;
       param["size"] = page.pageSize;
       selectUIn(param).then(res => {
         const data = res.data.data;
         this.page.total = data.total;
-        this.tableData = res.data.data;
+        this.tableData = data.records;
         // this.data = data.records;
         this.loading = false;
-        // this.selectionClear();
       });
     },
-    // getTableData() {
-    //   selectUIn(param).then(res => {
-    //     if (res.data.code === 200) {
-    //       this.tableData = res.data.data;
-    //       this.loading = false;
-    //     }
-    //   });
-    // }
-    // downExcel() {
-    //   let et = XLSX.utils.table_to_book(document.getElementById("table"));
-    //   let etout = XLSX.write(et, {
-    //     bookType: "xlsx",
-    //     bookSST: true,
-    //     type: "array"
-    //   });
-    //   try {
-    //     FileSaver.saveAs(
-    //       new Blob([etout], {
-    //         type: "application/octet-stream"
-    //       }),
-    //       `表.xlsx`
-    //     ); //导出的文件名
-    //   } catch (e) {
-    //     console.log(e, etout);
-    //   }
-    //   return etout;
-    // }
+   
     getLocationParams() {
       let url = window.location.href;
       let urlArr = url.split("?")[1].split("&");
diff --git a/src/views/statisticalQueryManagement/securityGuardDetail.vue b/src/views/statisticalQueryManagement/securityGuardDetail.vue
new file mode 100644
index 0000000..4efc3de
--- /dev/null
+++ b/src/views/statisticalQueryManagement/securityGuardDetail.vue
@@ -0,0 +1,318 @@
+<template>
+  <basic-container>
+    <avue-crud
+      :option="tableOption"
+      :table-loading="loading"
+      :data="data"
+      ref="crud"
+      v-model="form"
+      :permission="permissionList"
+      :page.sync="page"
+      @search-change="searchChange"
+      @search-reset="searchReset"
+      @selection-change="selectionChange"
+      @current-change="currentChange"
+      @size-change="sizeChange"
+      @refresh-change="refreshChange"
+      @row-click="handleRowClick"
+    >
+    </avue-crud>
+  </basic-container>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import { getListSecurity } from "@/api/system/user";
+export default {
+  name: "保安员明细",
+  data() {
+    return {
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      query: {},
+      value1: "",
+      value2: "",
+      tableData: [
+        // {
+        //   company: "江西省永安保安服务有限公司",
+        //   subOffice: "南昌市公安局",
+        //   timeStart: "2020-07-14",
+        //   timeEnd: "2021-06-30",
+        //   customerName: "南昌市幼儿园",
+        //   num: "7",
+        //   // status: "正在服务",
+        //   bz: ""
+        // },
+        // {
+        //   company: "南昌市赣水保安服务有限公司",
+        //   subOffice: "东湖分局",
+        //   timeStart: "2020-01-23",
+        //   timeEnd: "2020-12-31",
+        //   customerName: "南昌市第一人民医院",
+        //   num: "32",
+        //   // status: "已完成",
+        //   bz: ""
+        // },
+        // {
+        //   company: "江西中业兴达保安服务有限公司",
+        //   subOffice: "西湖分局",
+        //   timeStart: "2020-03-16",
+        //   timeEnd: "2021-7-29",
+        //   customerName: "南昌市动物园",
+        //   num: "12",
+        //   // status: "未下单",
+        //   bz: ""
+        // }
+      ],
+      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: "realName",
+            search: true,
+            searchSpan: 4,
+            display: false,
+            width: 78
+          },
+          {
+            label: "性别",
+            prop: "sex",
+            type: "select",
+            // search: true,
+            searchSpan: 4,
+            searchLabelWidth: 50,
+            dicData: [
+              {
+                label: "女",
+                value: 2
+              },
+              {
+                label: "男",
+                value: 1
+              }
+            ],
+            slot: true,
+            display: false,
+            width: 48
+          },
+          {
+            label: "保安公司",
+            prop: "deptName",
+            // width: 120,
+            search: true,
+            searchSpan: 4,
+            overHidden: true,
+            slot: true,
+            display: false
+          },
+          {
+            label: "保安证编号",
+            prop: "securitynumber",
+            display: false,
+            searchSpan: 5,
+            searchLabelWidth: 110
+            // search: true,
+          },
+          {
+            label: "身份证号",
+            prop: "cardid",
+            slot: true,
+            display: false,
+            width: 145
+          },
+          {
+            label: "联系方式",
+            prop: "phone",
+            slot: true,
+            display: false,
+            width: 100
+          },
+          {
+            label: "联系地址",
+            prop: "address",
+            slot: true,
+            display: false,
+            hide: true
+          },
+          {
+            label: "入职时间",
+            prop: "rtime",
+            slot: true,
+            display: false,
+            width: 82
+          },
+          {
+            label: "所属角色",
+            prop: "roleName",
+            slot: true,
+            display: false,
+            width: 78,
+            hide: true
+          },
+
+          // {
+          //   label: "所属辖区",
+          //   prop: "jurisdiction",
+          //   // multiple: true,
+          //   minWidth: 60,
+          //   type: "tree",
+          //   dicUrl: "/api/jurisdiction/lazy-tree?parentId=0",
+          //   props: {
+          //     label: "title",
+          //     value: "id",
+          //   },
+          //   checkStrictly: true,
+          //   slot: true,
+          //   rules: [
+          //     {
+          //       required: true,
+          //       message: "请选择所属辖区",
+          //       trigger: "click",
+          //     },
+          //   ],
+          // },
+          {
+            label: "是否在职",
+            prop: "status",
+            type: "select",
+            search: true,
+            searchSpan: 4,
+            dicData: [
+              {
+                label: "否",
+                value: 0
+              },
+              {
+                label: "是",
+                value: 1
+              }
+            ],
+            slot: true,
+            display: false,
+            width: 70
+          },
+          {
+            label: "是否持证",
+            prop: "hold",
+            type: "select",
+            search: true,
+            searchSpan: 4,
+            dicData: [
+              {
+                label: "是",
+                value: "0"
+              },
+              {
+                label: "否",
+                value: "1"
+              },
+              {
+                label: "已吊销",
+                value: "2"
+              }
+            ],
+            slot: true,
+            display: false,
+            width: 70
+          }
+        ]
+      },
+      typeValue: "0",
+      servicesList: [],
+      companyName: "",
+      loading: true
+    };
+  },
+  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;
+      params["deptName"] = params["enterpriseName"];
+      params["jurisdiction"] = this.jurisdiction;
+      getListSecurity(
+        page.currentPage,
+        page.pageSize,
+        Object.assign(params, this.query)
+      ).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+      });
+    },
+    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]);
+      }
+      let enterpriseName = object["enterpriseName"] || "";
+      let obj = { enterpriseName: enterpriseName };
+      this.onLoad(this.page, obj);
+      //   this.onLoad(this.page, this.query);
+    }
+  },
+  mounted() {
+    this.getLocationParams();
+  }
+};
+</script>
+<style lang="scss" scoped></style>
diff --git a/src/views/statisticalQueryManagement/securityGuardStatistics.vue b/src/views/statisticalQueryManagement/securityGuardStatistics.vue
index ccc2722..1e36ecf 100644
--- a/src/views/statisticalQueryManagement/securityGuardStatistics.vue
+++ b/src/views/statisticalQueryManagement/securityGuardStatistics.vue
@@ -238,14 +238,14 @@
     onLoad(page, params = {}) {
       this.loading = true;
       let param = {};
-      param["jurisdiction"] = params["jurname"] ? params["jurname"] : "";
-      param["deptid"] = "";
+      param["jurisdiction"] = params["jurname"] || "";
+      param["deptid"] = params["deptname"] || "";
       param["current"] = page.currentPage;
       param["size"] = page.pageSize;
       selectLi(param).then(res => {
         const data = res.data.data;
         this.page.total = data.total;
-        this.tableData = res.data.data;
+        this.tableData = data.records;
         this.loading = false;
       });
     },

--
Gitblit v1.9.3