liuyg
2021-09-27 8c6cf205affbbc8ada74f00a7ca25ebca867e9ed
src/views/securityGuard/securityGuard.vue
@@ -131,7 +131,7 @@
              :size="size"
              :type="type"
              v-if="permission.securityGuard_delete && row.status != 2"
              @click.stop="rowDel(row)"
              @click.stop="rowStatus(row)"
              >离职登记
            </el-button>
            <el-button
@@ -310,6 +310,7 @@
import { mapState } from "vuex";
export default {
  data() {
    const validatePass = (rule, value, callback) => {
      if (value === "") {
@@ -344,14 +345,15 @@
      }
    };
    const validatePassPhone = (rule, value, callback) => {
      var test =
        /^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/g;
      var test = /^(13[0-9]|14[0-9]|15[0-9]|17[0-9]|18[0-9])\d{8}$/g;
      if (!test.test(value)) {
        callback(new Error("请输入正确手机号码"));
      } else {
        callback();
      }
    };
    console.log(this.userInfo,123);
    return {
      securityid: "",
      excelBox1: false,
@@ -373,7 +375,7 @@
              res: "data",
            },
            tip: "请上传 .xls,.xlsx 标准格式文件",
            action: "/api/blade-user/import-user",
            action: "/api/blade-user/import-user?deptId="+this.deptIds,
          },
          {
            label: "模板下载",
@@ -398,12 +400,11 @@
            propsHttp: {
              res: "data",
            },
            tip: "请上传 zip 压缩文件",
            tip: "请上传 zip 压缩文件,照片文件名以身份证号码命名",
            action: "/api/blade-resource/oss/endpoint/put-file-zip",
          },
        ],
      },
      form: {},
      search: {},
      roleBox: false,
@@ -421,6 +422,7 @@
      },
      roleId: "1412226235153731586",
      deptId: "1413470343230877697",
      deptIds:"",
      platformPage: {
        pageSize: 10,
        currentPage: 1,
@@ -474,12 +476,11 @@
        searchMenuSpan: 6,
        stripe: true,
        border: true,
        delBtn: false,
        delBtn: true,
        align: "center",
        index: true,
        delBtnText: "注销",
        menuWidth: 271,
        menuWidth: 327,
        selection: true,
        viewBtn: true,
        defaultExpandAll: true,
@@ -590,7 +591,7 @@
                },
                action: "/api/blade-resource/oss/endpoint/put-files",
                tip: "只能上传jpg/png个人头像,且不超过500kb",
                span: 10,
                span: 12,
                // row: true,
                prop: "avatar",
              },
@@ -608,7 +609,7 @@
                },
                action: "/api/blade-resource/oss/endpoint/put-files",
                tip: "只能上传jpg/png指纹信息,且不超过500kb",
                span: 10,
                span: 12,
                // row: true,
                prop: "fingerprint",
              },
@@ -766,6 +767,13 @@
                  //   label: "未知",
                  //   value: 3,
                  // },
                ],
                rules: [
                  {
                    required: true,
                    message: "请选择性别",
                    trigger: "blur",
                  },
                ],
              },
              // {
@@ -962,6 +970,7 @@
    }
    console.log(this.search, 111);
    this.search["status"] = 1;
    this.deptIds = this.userInfo.dept_id;
  },
  methods: {
    handleImport1() {
@@ -1121,7 +1130,7 @@
        }
      );
    },
    rowDel(row) {
    rowStatus(row) {
      this.$prompt("离职原因", "提示", {
        confirmButtonText: "确定离职",
        cancelButtonText: "取消",
@@ -1142,6 +1151,23 @@
          this.refreshChange();
        })
        .catch(() => {});
    },
    rowDel(row) {
      this.$confirm("确定注销当前用户?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(row.id);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
    },
    rowCheck(row) {
      this.$confirm("确定审查异常标记?", {
@@ -1340,6 +1366,13 @@
            that.isSecurity = false;
            //如果是保安公司管理员
            params["deptId"] = that.userInfo.dept_id;
            //导入action 修改
            const importColumn = that.findObject(that.excelOption1.column, "excelFile");
            importColumn.action =
              "/api/blade-user/import-user?deptId="+this.deptIds;
          } else if (roleAlias == "公安管理员") {
            params["jurisdiction"] = that.userInfo.jurisdiction;
            var columnDept = that.findObject(that.option.column, "deptId");