From 39f6cf663d444830a2ccefee7681e06e0e66e239 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 07 Jan 2022 14:11:22 +0800
Subject: [PATCH] 成绩修改,保安员检查,单位检查导出修改

---
 src/views/statisticalQueryManagement/securityGuardStatistics.vue |  123 ++++++++++++++++++++++++++--------------
 1 files changed, 79 insertions(+), 44 deletions(-)

diff --git a/src/views/statisticalQueryManagement/securityGuardStatistics.vue b/src/views/statisticalQueryManagement/securityGuardStatistics.vue
index 5ae1907..9d4e429 100644
--- a/src/views/statisticalQueryManagement/securityGuardStatistics.vue
+++ b/src/views/statisticalQueryManagement/securityGuardStatistics.vue
@@ -8,6 +8,7 @@
         :page.sync="page"
         :permission="permissionList"
         ref="crud"
+        :search.sync="search"
         @search-change="searchChange"
         @search-reset="searchReset"
         @current-change="currentChange"
@@ -17,7 +18,18 @@
         @cell-click="handleRowClick"
         class="rowClick"
       >
+      <template slot="menuLeft">
+      <el-button
+              type="warning"
+              size="small"
+              plain
+              icon="el-icon-download"
+              @click="handleExportSecurityStatisInfo"
+              >导出
+            </el-button>
+      </template>
       </avue-crud>
+      
     </basic-container>
     <el-dialog
       class="tongji-class"
@@ -27,22 +39,10 @@
       v-if="dialogShow"
     >
       <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";
-import XLSX from "xlsx";
 import { mapGetters } from "vuex";
 import {
   selectLi,
@@ -50,6 +50,8 @@
 } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
 import { lazyTreeJu, lazyTrees } from "../../api/index/index";
 import companyDetails from "./companyDetails";
+import Qs from "qs";
+import { getToken } from "@/util/auth";
 export default {
   name: "业务情况统计",
   components: {
@@ -62,6 +64,7 @@
         currentPage: 1,
         total: 0
       },
+      search:{},
       query: {},
       value1: "",
       value2: "",
@@ -106,7 +109,7 @@
       tableOption: {
         align: "center",
         viewBtn: true,
-        excelBtn: true,
+        // excelBtn: true,
         delBtn: false,
         editBtn: false,
         addBtn: false,
@@ -121,31 +124,9 @@
         searchShow: true,
         searchMenuSpan: 6,
         index: true,
+        indexLabel:'序号',
         dialogClickModal: false,
         column: [
-          {
-            label: "单位注册时间",
-            prop: "releaseTimeRange",
-            type: "date",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd",
-            searchRange: true,
-            searchSpan: 6,
-            searchLabelWidth: 120,
-            labelWidth:160,
-            hide: true,
-            addDisplay: false,
-            editDisplay: false,
-            viewDisplay: false,
-            search: true,
-            rules: [
-              {
-                required: true,
-                message: "请选择单位注册时间",
-                trigger: "blur",
-              },
-            ],
-          },
           {
             label: "公司名称",
             prop: "deptname",
@@ -210,6 +191,29 @@
             ]
           },
           {
+            label: "单位注册时间",
+            prop: "releaseTimeRange",
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            searchRange: true,
+            searchSpan: 6,
+            searchLabelWidth: 120,
+            labelWidth:160,
+            hide: true,
+            addDisplay: false,
+            editDisplay: false,
+            viewDisplay: false,
+            search: true,
+            rules: [
+              {
+                required: true,
+                message: "请选择单位注册时间",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
             label: "保安员总数",
             prop: "num",
             display: false
@@ -221,33 +225,33 @@
           },
           {
             label: "未派遣人数",
-            prop: "wpaiqnum",
+            prop: "wpqnum",
             display: false
           },
           {
             label: "派遣人数",
-            prop: "paiqnum",
+            prop: "pqnum",
             display: false
           },
           {
             label: "已采集照片人数",
-            prop: "ycaijzpnum",
+            prop: "ycjzpnum",
             display: false
           },
           {
             label: "未采集照片人数",
-            prop: "wcaijnum",
+            prop: "wcjzpnum",
             display: false
           },
           {
             label: "已采集指纹人数",
-            prop: "ycaijzwnum",
+            prop: "ycjzwnum",
             display: false
           },
           {
             label: "资格审查异常人数",
             width: 150,
-            prop: "yicnum",
+            prop: "scycnum",
             display: false
           },
           // {
@@ -257,7 +261,7 @@
           // },
           {
             label: "缴纳社保人数",
-            prop: "sbnum",
+            prop: "jnsbnum",
             display: false
           }
         ]
@@ -280,6 +284,36 @@
     }
   },
   methods: {
+    //保安员统计信息导出
+    handleExportSecurityStatisInfo() {
+      this.$confirm("是否导出保安员统计信息数据?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        //获取查询条件
+        const { releaseTimeRange } = this.search;
+        if (releaseTimeRange) {
+          this.search["startTime"] = releaseTimeRange[0];
+          this.search["endTime"] = releaseTimeRange[1];
+        }
+        var data = {
+          jurisdiction: this.search.jurname,
+          stats: this.search.stats,
+          deptid: this.search.deptname,
+          startTime: this.search.startTime,
+          endTime: this.search.endTime,
+        };
+        // console.log(data,123);
+        //序列号url形式,用&拼接
+        data = Qs.stringify(data);
+        window.open(
+          `/api/information/export-security-statis-info?${
+            this.website.tokenHeader
+          }=${getToken()}&` + data
+        );
+      });
+    },
     getSubOfficeData() {
       lazyTrees().then(res => {
         if (res.data.code === 200) {
@@ -338,6 +372,7 @@
       this.onLoad(this.page, this.query);
     },
     onLoad(page, params = {}) {
+      params = this.search;
       this.loading = true;
       let param = {};
       param["jurisdiction"] = params["jurname"] || "";
@@ -368,7 +403,7 @@
     handleRowClick(row, column, cell, event) {
       if (column.label == "保安员总数") {
         this.dialogTitle = "保安员明细";
-        this.fwdeptId = row.dept_id;
+        this.fwdeptId = row.departmentid;
         this.dialogShow = true;
       } else {
         this.dialogShow = false;

--
Gitblit v1.9.3