zhengpz
2021-12-09 c2a2ab525314a63901eb47b5023b9b9917f1cd32
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhba_regulatory
4 files modified
472 ■■■■■ changed files
src/views/qualificationExamination/qualificationExamination.vue 339 ●●●● patch | view | raw | blame | history
src/views/qualificationExamination/signQualificationExamination.vue 6 ●●●● patch | view | raw | blame | history
src/views/statisticalQueryManagement/businessStatistics.vue 53 ●●●●● patch | view | raw | blame | history
src/views/statisticalQueryManagement/securityGuardStatistics.vue 74 ●●●● patch | view | raw | blame | history
src/views/qualificationExamination/qualificationExamination.vue
@@ -15,6 +15,7 @@
      :permission="permissionList"
      v-model="form"
      ref="crud"
      :search.sync="search"
      @row-update="rowUpdates"
      @row-save="rowSave"
      @row-del="rowDel"
@@ -43,23 +44,15 @@
</template>
<script>
// import {
//   getList,
//   getDetail,
//   adddata,
//   update,
//   remove,
// } from "@/api/regulatoryInformation/regulatoryInformation";
import { mapGetters } from "vuex";
import { datasing } from "./dataqualificationExamination";
// import { getList } from "@/api/qualificationExamination/qualificationExamination";
import { getListSecurity } from "@/api/system/user";
import Qs from "qs";
import { getToken } from "@/util/auth";
export default {
  data() {
    return {
      sort: {},
      search: {},
      form: {},
      query: {},
      loading: true,
@@ -76,9 +69,7 @@
        addBtn: false,
        selection: true,
        menu: false,
        searchShowBtn: false,
        align: "center",
        height: "auto",
        calcHeight: 30,
@@ -88,22 +79,20 @@
        index: true,
        viewBtn: true,
        dialogClickModal: false,
        column: [
          {
            label: "保安姓名",
            prop: "realName",
            search: true,
            searchSpan: 4,
            //     hide: true,
            //     editDisplay: false,
            //     addDisplay: false
          },
          {
            label: "保安公司",
            label: "企业名称",
            prop: "deptName",
            minWidth: 110,
            overHidden: true,
            search:true,
            searchSpan:5
          },
          {
            label: "性别",
@@ -133,7 +122,6 @@
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            searchValue: [this.getStartTime(), this.getEndTime()],
            searchRange: true,
            searchSpan: 6,
            searchLabelWidth: 80,
@@ -150,51 +138,16 @@
              },
            ],
          },
          // {
          //   label: "性别",
          //   prop: "sexName",
          //   width: 56,
          //   // type: "select",
          //   // labelWidth: 120,
          //   // // display: false,
          //   // dicData: dic,
          //   // // props: {
          //   // //   label: "label",
          //   // //   value: "value",
          //   // // },
          //   // searchSpan: 5,
          //   // search: true,
          //   // width: 120,
          // },
          {
            label: "身份证号",
            prop: "cardid",
            width: 139,
            // type: "select",
            // labelWidth: 120,
            // // display: false,
            // dicData: dic,
            // // props: {
            // //   label: "label",
            // //   value: "value",
            // // },
            searchSpan: 4,
            search: true,
            // width: 120,
          },
          // {
          //   label: "保安员证",
          //   prop: "certificate",
          //   // labelWidth: 120,
          //   // display: false,
          // },
          {
            label: "年龄",
            prop: "age",
            // display: false,
            // labelWidth: 120,
            // width: 200,
          },
          {
            label: "出生日期",
@@ -202,9 +155,6 @@
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            // display: false,
            // labelWidth: 120,
            // width: 200,
          },
          {
            label: "保安员证编号",
@@ -216,26 +166,17 @@
          {
            label: "联系方式",
            prop: "phone",
            // display: false,
            // labelWidth: 120,
            // width: 200,
          },
          // {
          //   label: "所属角色",
          //   prop: "roleName",
          //   // display: false,
          //   overHidden: true,
          //   // width: 200,
          //   // labelWidth: 120,
          //   // overHidden: true,
          // },
          {
            label: "审查状态",
            prop: "examinationType",
            // overHidden: true,
            sortable: true,
            type: "select",
            dicData: [
              {
                label: "全部",
                value: "2",
              },
              {
                label: "正常",
                value: "0",
@@ -245,39 +186,20 @@
                value: "1",
              },
            ],
            // type: "date",
            // format: "yyyy-MM-dd",
            // valueFormat: "yyyy-MM-dd",
            // mock: {
            //   type: "datetime",
            //   labelWidth: 120,
            //   format: "yyyy-MM-dd",
            // },
            search: true,
            searchSpan: 4,
            // // display: false,
            // width: 180,
          },
          {
            label: "审查明细",
            prop: "examinationMx",
            sortable: true,
            // labelWidth: 120,
            // display: false,
            overHidden: true,
          },
          // {
          //   label: "审查结果",
          //   prop: "results",
          //   // labelWidth: 120,
          //   // display: false,
          // },
          {
            label: "审查时间",
            prop: "reviewTime",
            // labelWidth: 120,
            // display: false,
            hide: true,
            prop: "auditTime",
            // hide: true,
          },
          // {
          //   label: "是否在职",
@@ -286,42 +208,8 @@
          //   // display: false,
          // },
        ],
        // group: [
        //   {
        //     label: "详细信息",
        //     prop: "baseInfo",
        //     icon: "el-icon-user-solid",
        //     column: [
        //       {
        //         label: "公司名称",
        //         prop: "enterprisename",
        //         display: false,
        //       },
        //     ],
        //   },
        //   {
        //     label: "详细信息",
        //     prop: "detailInfo",
        //     icon: "el-icon-s-order",
        //     column: [],
        //   },
        //   {
        //     label: "职责信息",
        //     prop: "dutyInfo",
        //     icon: "el-icon-s-custom",
        //     column: [],
        //   },
        // ],
      },
      data: [
        // {
        //   deptid: "江西众泰保安公司",
        //   punishtype: 2,
        //   punishreason: "非法施工",
        //   punishresult: "没收全部非法所得财产,并罚款3W元",
        //   punishtime: "2021-01-01",
        //   punisnum: 110110110120,
        // },
      ],
    };
  },
@@ -343,6 +231,9 @@
      return ids.join(",");
    },
  },
  created() {
    this.search["examinationType"] = "1";
  },
  methods: {
    //导出
    handleExport() {
@@ -350,133 +241,38 @@
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          //获取查询条件
          // console.log(this.userInfo, 456);
          // console.log(this.query, 456);
          // return;
          var data = {
            cardid: this.query.cardid,
            realName: this.query.realName,
            securitynumber: this.query.securitynumber,
            status: this.query.status,
            endTime: this.query.endTime,
            startTime: this.query.startTime,
            jurisdiction: this.userInfo.jurisdiction,
          };
          //导出
          // if (
          //   this.userInfo.role_name == "保安公司管理员" ||
          //   this.userInfo.role_name == "保安"
          // ) {
          //   //如果是保安公司管理员
          //   data["deptId"] = this.userInfo.dept_id;
          // }
          // if (this.userInfo.role_name == "培训公司管理员") {
          //   //如果是培训公司管理员
          //   data["trainUnitId"] = this.userInfo.dept_id;
          // }
          // data["examType"] = 2;
          //序列号url形式,用&拼接
          data = Qs.stringify(data);
          window.open(`/api/blade-user/export-security?` + data);
        })
        .catch((action) => {
          // this.$message({
          //   type: 'info',
          //   message: action === 'cancel'
          //     ? '放弃保存并离开页面'
          //     : '停留在当前页面'
          // })
        });
    },
    getStartTime() {
      if (
        this.$route.query.startTime != undefined &&
        this.$route.query.startTime != null &&
        this.$route.query.startTime != ""
      ) {
        return this.$route.query.startTime;
      }
      return "";
    },
    getEndTime() {
      if (
        this.$route.query.endTime != undefined &&
        this.$route.query.endTime != null &&
        this.$route.query.endTime != ""
      ) {
        return this.$route.query.endTime;
      }
      return "";
    },
    rowSave(row, done, loading) {
      adddata(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
      }).then(() => {
        //获取查询条件
        const { releaseTimeRange } = this.search;
        if (releaseTimeRange) {
          this.search["startTime"] = releaseTimeRange[0];
          this.search["endTime"] = releaseTimeRange[1];
        }
      );
        var data = {
          cardid: this.search.cardid,
          realName: this.search.realName,
          securitynumber: this.search.securitynumber,
          endTime: this.search.endTime,
          deptName:this.search.deptName,
          startTime: this.search.startTime,
          examinationType:this.search.examinationType,
          jurisdiction: this.userInfo.jurisdiction,
        };
        data["status"] = 1;
        //序列号url形式,用&拼接
        data = Qs.stringify(data);
        window.open(`/api/blade-user/export-security?${
            this.website.tokenHeader
          }=${getToken()}&` + data);
      });
    },
    rowUpdates(row, index, done, loading) {
      // console.log(42342);
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        }
      );
    },
    rowDel(row) {
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(row.id);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
    },
    // beforeOpen(done, type) {
    //   if (["edit", "view"].includes(type)) {
    //     getDetail(this.form.id).then((res) => {
    //       this.form = res.data.data;
    //     });
    //   }
    //   done();
    // },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      params["startTime"] = params.releaseTimeRange[0];
      params["endTime"] = params.releaseTimeRange[1];
      // params["startTime"] = params.releaseTimeRange[0];
      // params["endTime"] = params.releaseTimeRange[1];
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
@@ -511,14 +307,27 @@
      this.onLoad(this.page, this.sort);
    },
    onLoad(page, params = {}) {
      // this.loading = false;
      params = this.search;
      params = Object.assign(params, this.sort);
      this.loading = true;
      // this.loading = true;
      params["status"] = 1;
      let values = {
        ...params,
      };
      const { releaseTimeRange } = this.search;
      if (releaseTimeRange) {
        values = {
          ...params,
          startTime: releaseTimeRange[0],
          endTime: releaseTimeRange[1],
          ...this.query,
        };
        values.releaseTimeRange = null;
      }
      getListSecurity(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
        Object.assign(values, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
@@ -547,40 +356,6 @@
        // this.selectionClear();
      });
    },
    // onLoad(page, params = {}) {
    //   // this.loading = false;
    //   this.loading = true;
    //   //   getListJSON().then((res) => {
    //   //   axios
    //   //     .get(
    //   //       "../../api/qualificationExamination/signQualificationExamination.json"
    //   //     )
    //   //     .then((res) => {
    //   // page.currentPage,
    //   // page.pageSize,
    //   // Object.assign(params, this.query)
    //   if (datasing) {
    //     var res = datasing;
    //     console.log(res, "signQualificationExamination");
    //     const data = res.data;
    //     // this.page.total = data.total;
    //     var d = data.records;
    //     for (var k in d) {
    //       d[k].examination_mx = "正常";
    //       d[k].examination_type = "正常";
    //       d[k]["carid"] = "370111198807051124";
    //       d[k]["certificate"] = "拥有";
    //       d[k]["reviewTime"] = "2021-02-21";
    //       d[k]["results"] = "通过";
    //       d[k]["onjob"] = "是";
    //     }
    //     this.data = d;
    //     this.loading = false;
    //   }
    //   // this.selectionClear();
    //   // });
    // },
    // 行单击
    handleRowClick(row) {
      // delete (row["name"]);
src/views/qualificationExamination/signQualificationExamination.vue
@@ -79,7 +79,7 @@
          {
            label: "性别",
            prop: "sex",
            width:80,
            width:60,
            dicData: [
              {
                label: "男",
@@ -119,7 +119,7 @@
            // search: true,
            searchSpan: 4,
            // display: false,·
            width: 120,
            width: 110,
          },
          {
            label: "考试名称",
@@ -150,7 +150,7 @@
            // search: true,
            // searchSpan: 4,
            // display: false,
            width: 150,
            width: 110,
          },
          {
            label: "考试时间",
src/views/statisticalQueryManagement/businessStatistics.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <basic-container>
    <basic-container class="witerFontColorInput">
      <avue-crud
        :option="tableOption"
        :table-loading="loading"
@@ -8,6 +8,7 @@
        :page.sync="page"
        :permission="permissionList"
        ref="crud"
        :search.sync="search"
        @row-update="rowUpdates"
        @row-save="rowSave"
        @search-change="searchChange"
@@ -19,6 +20,16 @@
        @cell-click="handleRowClick"
        class="businessStatisticsStyle"
      >
      <template slot="menuLeft">
      <el-button
              type="warning"
              size="small"
              plain
              icon="el-icon-download"
              @click="handleExportBusinessStatis"
              >导出
            </el-button>
      </template>
      </avue-crud>
    </basic-container>
    <el-dialog
@@ -59,18 +70,18 @@
  </div>
</template>
<script>
import FileSaver from "file-saver";
import XLSX from "xlsx";
import { mapGetters } from "vuex";
import {
  selectYw,
  dictionaryList,
} from "../../api/statisticalQueryManagement/statisticalQueryManagement";
import { lazyTreeJu, lazyTrees } from "../../api/index/index";
import {  lazyTrees } from "../../api/index/index";
import businessStatisticsDetail from "./businessStatisticsDetail";
import businessStatisticsPq from "./businessStatisticsPq";
import businessStatisticsFwdq from "./businessStatisticsFwdq";
import securityGuardDetail from "./securityGuardDetail";
import Qs from "qs";
import { getToken } from "@/util/auth";
export default {
  name: "业务情况统计",
  components: {
@@ -86,6 +97,7 @@
        currentPage: 1,
        total: 0,
      },
      search:{},
      query: {},
      value1: "",
      value2: "",
@@ -110,7 +122,7 @@
        // }
      ],
      tableOption: {
        excelBtn: true,
        // excelBtn: true,
        delBtn: false,
        editBtn: false,
        addBtn: false,
@@ -241,6 +253,36 @@
    },
  },
  methods: {
    //业务情况统计信息导出
    handleExportBusinessStatis() {
      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.enterpriseName,
          startTime: this.search.startTime,
          endTime: this.search.endTime,
        };
        // console.log(data,123);
        //序列号url形式,用&拼接
        data = Qs.stringify(data);
        window.open(
          `/api/information/export-business-statis?${
            this.website.tokenHeader
          }=${getToken()}&` + data
        );
      });
    },
    getSubOfficeData() {
      lazyTrees().then((res) => {
        if (res.data.code === 200) {
@@ -287,6 +329,7 @@
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      params = this.search;
      this.loading = true;
      let param = {};
      param["jurisdiction"] = params["jurname"] || "";
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,
@@ -222,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
          },
          // {
@@ -258,7 +261,7 @@
          // },
          {
            label: "缴纳社保人数",
            prop: "sbnum",
            prop: "jnsbnum",
            display: false
          }
        ]
@@ -281,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) {
@@ -339,6 +372,7 @@
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      params = this.search;
      this.loading = true;
      let param = {};
      param["jurisdiction"] = params["jurname"] || "";