Administrator
2021-11-22 0450d4dca0c99f694ea804ec2008b0766e6d6dd4
src/views/securityGuard/securityGuard.vue
@@ -75,6 +75,14 @@
              @click="handleSecurityPaperApply"
            >证书制证申请
            </el-button>
            <el-button
              type="warning"
              size="small"
              plain
              icon="el-icon-download"
              @click="handleExportSecurityInfo"
              >保安信息导出
            </el-button>
            <el-button
              type="danger"
@@ -171,6 +179,7 @@
            </el-button>
            <el-button
              icon="el-icon-edit"
              style="display:none"
              :size="size"
              :type="type"
              v-if="permission.securityGuard_paper"
@@ -407,6 +416,7 @@
import {getToken} from "@/util/auth";
import {securityFormPageColumn} from "./data";
import {mapState} from "vuex";
import Qs from "qs";
//加载指纹类
import Client from "./Client";
@@ -1224,9 +1234,8 @@
  beforeCreate() {
  },
  created() {
    console.log(this.userInfo, 9999);
    // console.log(this.userInfo, 9999);
    if (this.userInfo.role_name == "办证管理员") {
      console.log(this.userInfo.role_name, 5555225);
      this.search["userType"] = 7;
      this.search["hold"] = "1";
    }
@@ -1662,6 +1671,46 @@
          });
        });
    },
    //保安员信息导出
    handleExportSecurityInfo() {
      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 = {
          cardid:this.search.cardid,
          deptId:this.search.deptId,
          hold:this.search.hold,
          realName: this.search.realName,
          securitynumber: this.search.securitynumber,
          status: this.search.status,
          userType: this.search.startTime,
        };
        //导出
        if (this.userInfo.role_name == "保安公司管理员") {
          //如果是保安公司管理员
          data["deptId"] = this.userInfo.dept_id;
        }
        if (this.userInfo.role_name == "培训公司管理员") {
          //如果是培训公司管理员
          data["trainingUnitId"] = this.userInfo.Id;
        }
        if (this.userInfo.role_name == "公安管理员") {
          //如果是公安管理员
          data["jurisdiction"] = this.userInfo.jurisdiction;
        }
        //序列号url形式,用&拼接
        data = Qs.stringify(data);
        window.open(`/api/blade-user/export-security-info?${this.website.tokenHeader}=${getToken()}&`+data);
      });
    },
    rowSave(row, done, loading) {
      // var dom = document.getElementById("zhiwenOur");
      // window.frames["iframe的name值"].document.getElementById("iframe中控件的ID").click();
@@ -1714,6 +1763,7 @@
          rtime: row.rtime,
          securitynumber: row.securitynumber,
          sex: row.sex,
          guncode: row.guncode,
        },
      };
@@ -2009,7 +2059,7 @@
      roleIds.forEach((roleId) => {
        getRoleDetail(roleId).then((res) => {
          var roleAlias = res.data.data.roleAlias;
          if (roleAlias == "保安公司管理员" || roleAlias == "保安") {
          if (roleAlias == "保安公司管理员" || roleAlias == "保安" || roleAlias == "分公司管理员") {
            //去除保安公司查询
            const column = that.findObject(that.option.column, "deptId");
            column.search = false;
@@ -2030,7 +2080,7 @@
            );
            importColumn.action =
              "/api/blade-user/import-security?deptId=" + this.deptIds;
          } else if (roleAlias == "公安管理员") {
          } else if (roleAlias == "公安管理员" || roleAlias == "administrator") {
            params["jurisdiction"] = that.userInfo.jurisdiction;
            var columnDept = that.findObject(that.option.column, "deptId");
            columnDept.dicUrl =
@@ -2040,9 +2090,14 @@
            ColumnDeptUpdate.dicUrl =
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697&jurisdiction=" +
              that.userInfo.jurisdiction;
            //审查状态查询开启
            var columnExaminationType = that.findObject(that.option.column, "examinationType");
            columnExaminationType.search = true;
            columnExaminationType.hide = false;
          } else if (roleAlias == "培训公司管理员") {
            //如果是保安公司管理员
            params["trainingUnitId"] = that.userInfo.dept_id;
            //如果是培训公司管理员
            // params["trainingUnitId"] = that.userInfo.dept_id;
            var columnDept2 = that.findObject(that.option.column, "deptId");
            columnDept2.dicUrl =
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
@@ -2063,6 +2118,7 @@
            ColumnDeptUpdate1.dicUrl =
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
          }
          let values = {
            ...params,
@@ -2296,7 +2352,7 @@
// 抬头名字
.security_m_l_titleName {
  position: absolute;
  top: 35px;
  top: 38px;
  left: 121px;
  right: 0;
  line-height: 45px;
@@ -2304,7 +2360,7 @@
}
//发证时间
$timeTop: 310px; //整体高度
$timeTop: 315px; //整体高度
//年
.security_m_l_titlepaperTimenian {
  position: absolute;
@@ -2341,7 +2397,7 @@
$centerLeft: 458px;
.security_m_r_o_right {
  position: absolute;
  top: $downTop + $lineHigeht * 0-12px;
  top: $downTop + $lineHigeht * 0+18px;
  left: $centerLeft;
  // width: $rightWidth;
}
@@ -2349,7 +2405,7 @@
// 生日
.security_m_r_o_rightbirthday {
  position: absolute;
  top: $downTop + $lineHigeht * 1-14px;
  top: $downTop + $lineHigeht * 1+0px;
  left: $centerLeft;
  // width: $rightWidth;
}
@@ -2357,7 +2413,7 @@
// 地址
.security_m_r_o_rightaddress {
  position: absolute;
  top: $downTop + $lineHigeht * 2 -16px;
  top: $downTop + $lineHigeht * 2+0px;
  left: $centerLeft;
  width: 185px;
}
@@ -2365,7 +2421,7 @@
// 身份证
.security_m_r_o_rightcardid {
  position: absolute;
  top: $downTop + $lineHigeht * 4 +0px;
  top: $downTop + $lineHigeht * 4 +10px;
  left: $centerLeft;
  // width: $rightWidth;
}