Administrator
2021-11-12 6fef81e2e783f2628900a819c99976640d8ad1eb
制证导出修改
4 files modified
73 ■■■■■ changed files
src/views/accreditationRecords/accreditationRecords.vue 24 ●●●●● patch | view | raw | blame | history
src/views/accreditationRecords/accreditationRecordsPaper.vue 33 ●●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 2 ●●● patch | view | raw | blame | history
src/views/system/user.vue 14 ●●●● patch | view | raw | blame | history
src/views/accreditationRecords/accreditationRecords.vue
@@ -86,6 +86,8 @@
import { mapGetters } from "vuex";
import { mapState } from "vuex";
import Qs from "qs";
import website from "@/config/website";
import { getToken } from "@/util/auth";
export default {
  data() {
    return {
@@ -508,6 +510,8 @@
            this.questionBankSearch['endTime'] = releaseTimeRange[1];
        }
        var data = {
          type:1,
          applyUnit:this.questionBankSearch.applyUnit,
          deptName: this.questionBankSearch.deptName,
          idCardNo: this.questionBankSearch.idCardNo,
          realName: this.questionBankSearch.realName,
@@ -516,21 +520,21 @@
          endTime: this.questionBankSearch.endTime,
        };
        //导出
        // if (
        //   this.userInfo.role_name == "保安公司管理员" ||
        //   this.userInfo.role_name == "保安"
        // ) {
        //   //如果是保安公司管理员
        //   data["deptId"] = this.userInfo.dept_id;
        // }
        if (this.userInfo.role_name == "保安公司管理员") {
          //如果是保安公司管理员
          data["deptId"] = this.userInfo.dept_id;
        }
        if (this.userInfo.role_name == "培训公司管理员") {
          //如果是培训公司管理员
          data["trainUnitId"] = this.userInfo.dept_id;
          data["createUser"] = this.userInfo.Id;
        }
        // data["examType"] = 2;
        if (this.userInfo.role_name == "公安管理员") {
          //如果是公安管理员
          data["jurisdiction"] = this.userInfo.jurisdiction;
        }
        //序列号url形式,用&拼接
        data = Qs.stringify(data);
        window.open(`/api/accreditationRecords/export-security-paper?` + data);
        window.open(`/api/accreditationRecords/export-security-paper?${this.website.tokenHeader}=${getToken()}&`+data);
      });
    },
  },
src/views/accreditationRecords/accreditationRecordsPaper.vue
@@ -34,14 +34,13 @@
          >删 除
        </el-button>
        <el-button
          style="display:none"
          type="warning"
          size="small"
          plain
          icon="el-icon-download"
          v-if="permission.accreditationRecords_export"
          v-if="permission.accreditationRecords_paper_export"
          @click="handleExport"
          >保安员证信息导出
          >制证信息导出
        </el-button>
        <el-button
              type="primary"
@@ -193,6 +192,8 @@
import { mapGetters } from "vuex";
import { mapState } from "vuex";
import Qs from "qs";
import website from "@/config/website";
import { getToken } from "@/util/auth";
export default {
  data() {
    return {
@@ -954,7 +955,7 @@
    },
    //保安员证信息导出
    handleExport() {
      this.$confirm("是否导出保安员证信息数据?", "提示", {
      this.$confirm("是否导出证书制证信息数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
@@ -966,6 +967,9 @@
          this.questionBankSearch["endTime"] = releaseTimeRange[1];
        }
        var data = {
          type:2,
          applyUnit:this.questionBankSearch.applyUnit,
          auditStatus:this.questionBankSearch.auditStatus,
          deptName: this.questionBankSearch.deptName,
          idCardNo: this.questionBankSearch.idCardNo,
          realName: this.questionBankSearch.realName,
@@ -973,22 +977,23 @@
          startTime: this.questionBankSearch.startTime,
          endTime: this.questionBankSearch.endTime,
        };
        // data['Blade-Auth'] = getToken;
        //导出
        // if (
        //   this.userInfo.role_name == "保安公司管理员" ||
        //   this.userInfo.role_name == "保安"
        // ) {
        //   //如果是保安公司管理员
        //   data["deptId"] = this.userInfo.dept_id;
        // }
        if (this.userInfo.role_name == "保安公司管理员") {
          //如果是保安公司管理员
          data["deptId"] = this.userInfo.dept_id;
        }
        if (this.userInfo.role_name == "培训公司管理员") {
          //如果是培训公司管理员
          data["trainUnitId"] = this.userInfo.dept_id;
          data["createUser"] = this.userInfo.Id;
        }
        // data["examType"] = 2;
        if (this.userInfo.role_name == "公安管理员") {
          //如果是公安管理员
          data["jurisdiction"] = this.userInfo.jurisdiction;
        }
        //序列号url形式,用&拼接
        data = Qs.stringify(data);
        window.open(`/api/accreditationRecords/export-security-paper?` + data);
        window.open(`/api/accreditationRecords/export-security-book-paper?${this.website.tokenHeader}=${getToken()}&`+data);
      });
    },
  },
src/views/securityGuard/securityGuard.vue
@@ -634,7 +634,7 @@
        searchShow: true,
        reserveSelection: true,
        selectable: (row) => {
          if (row.hold !== "1") {
          if (row.hold !== "1" || row.securitynumber==null || row.securitynumber=='') {
            return false;
          } else {
            return true;
src/views/system/user.vue
@@ -262,7 +262,8 @@
      treeData: [],
      treeOption: {
        nodeKey: "id",
        defaultExpandAll:true,
        defaultExpandedKeys: [],
        // defaultExpandAll:true,
        // lazy: false,
        // treeLoad: "", //处理权限  在created中
        //  function (node, resolve) {
@@ -514,7 +515,6 @@
                  },
                ],
              },
            ],
          },
        ],
@@ -710,6 +710,10 @@
      var  userId = this.userInfo.Id;
      getDeptLazyTree(parentId, userId).then((res) => {
        that.treeData = res.data.data;
        that.treeOption.defaultExpandedKeys = [];
        res.data.data.forEach((item) => {
          that.treeOption.defaultExpandedKeys.push(item.id);
        });
      });
    } else {
      // this.treeOption.treeLoad = function (node, resolve) {
@@ -728,7 +732,6 @@
      getDeptLazyTree(0).then((res) => {
        that.treeData = res.data.data;
      });
      this.treeOption.defaultExpandAll = false;
    }
  },
  mounted() {
@@ -773,7 +776,10 @@
      });
      //公安局进入
    if (this.userInfo.role_name == "公安管理员" || this.userInfo.role_name == "保安公司管理员") {
      if (
        this.userInfo.role_name == "公安管理员" ||
        this.userInfo.role_name == "保安公司管理员"
      ) {
      var  parentId = this.userInfo.dept_id;
      var  userId = this.userInfo.Id;
      getDeptLazyTree(parentId, userId).then((res) => {