Administrator
2021-11-16 fefea30dd97f42841509b4b9a60564b9661d5f3d
src/views/accreditationRecords/accreditationRecordsPaper.vue
@@ -40,7 +40,16 @@
          icon="el-icon-download"
          v-if="permission.accreditationRecords_paper_export || check"
          @click="handleExport"
          >制证信息导出
          >制证申请信息导出
        </el-button>
        <el-button
          type="warning"
          size="small"
          plain
          icon="el-icon-download"
          v-if="permission.accreditationRecords_paper_exports || check"
          @click="handleExportPaper"
          >证书打印信息导出
        </el-button>
        <el-button
              type="primary"
@@ -977,6 +986,7 @@
        }
        var data = {
          type:2,
          userType:this.questionBankSearch.userType,
          applyUnit:this.questionBankSearch.applyUnit,
          auditStatus:this.questionBankSearch.auditStatus,
          deptName: this.questionBankSearch.deptName,
@@ -1005,6 +1015,49 @@
        window.open(`/api/accreditationRecords/export-security-book-paper?${this.website.tokenHeader}=${getToken()}&`+data);
      });
    },
    //保安员证信息导出
    handleExportPaper() {
      this.$confirm("是否导出证书打印信息数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        //获取查询条件
        const { releaseTimeRange } = this.questionBankSearch;
        if (releaseTimeRange) {
          this.questionBankSearch["startTime"] = releaseTimeRange[0];
          this.questionBankSearch["endTime"] = releaseTimeRange[1];
        }
        var data = {
          type:2,
          userType:this.questionBankSearch.userType,
          applyUnit:this.questionBankSearch.applyUnit,
          auditStatus:this.questionBankSearch.auditStatus,
          deptName: this.questionBankSearch.deptName,
          idCardNo: this.questionBankSearch.idCardNo,
          realName: this.questionBankSearch.realName,
          securityNumber: this.questionBankSearch.securityNumber,
          startTime: this.questionBankSearch.startTime,
          endTime: this.questionBankSearch.endTime,
        };
        //导出
        if (this.userInfo.role_name == "保安公司管理员") {
          //如果是保安公司管理员
          data["deptId"] = this.userInfo.dept_id;
        }
        if (this.userInfo.role_name == "培训公司管理员") {
          //如果是培训公司管理员
          data["createUser"] = this.userInfo.Id;
        }
        if (this.userInfo.role_name == "公安管理员") {
          //如果是公安管理员
          data["jurisdiction"] = this.userInfo.jurisdiction;
        }
        //序列号url形式,用&拼接
        data = Qs.stringify(data);
        window.open(`/api/accreditationRecords/export-security-book-papers?${this.website.tokenHeader}=${getToken()}&`+data);
      });
    },
  },
};
</script>