Administrator
2022-03-07 35561f8d95a610d0be66c784e8781730f00512d0
axios 拦截修改,保安员新增,修改响应修改
2 files modified
74 ■■■■ changed files
src/router/axios.js 2 ●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 72 ●●●● patch | view | raw | blame | history
src/router/axios.js
@@ -65,7 +65,7 @@
  //如果是401则跳转到登录页面
  if (status === 401) store.dispatch('FedLogOut').then(() => router.push({path: '/login'}));
  // 如果请求为非200否者默认统一处理
  if (status !== 200) {
  if (status !== 200 & status !== 201) {
    // Message({
    //   message: message,
    //   type: 'error'
src/views/securityGuard/securityGuard.vue
@@ -1542,7 +1542,7 @@
          "securitynumber"
        );
        // var emailcolumn = this.findObject(this.option.group, "email");
        console.log(val,1234);
        console.log(val, 1234);
        if (val == 1) {
          securitynumbercolumn.display = true;
          securitynumbercolumn.rules = [
@@ -2204,14 +2204,14 @@
      this.formSecurityCheckApply = {
        id: null,
        realName: row.realName,
        userId:row.id
        userId: row.id,
      };
      this.securityCheckApplyvisible = true;
    },
    //证件核实申请提交
    submitSecurityCheckApply(row, done, loading) {
      var that = this;
      row['createUser'] = this.userInfo.Id;
      row["createUser"] = this.userInfo.Id;
      add(row).then(() => {
        that.$refs.formSecurityCheckApply.resetFields();
        this.$message({
@@ -2336,19 +2336,36 @@
      };
      securitySave(userMap).then(
        () => {
        (res) => {
          // console.log(res.data,111111111111111111);
          this.initFlag = false;
          this.$alert("账号为身份证号码,密码为身份证后六位", "温馨提示", {
            confirmButtonText: "确定",
            callback: (action) => {
              this.$message({
                type: "success",
                message: `操作成功`,
              });
              this.onLoad(this.page);
              done();
            },
          });
          if (res.data.code == 200) {
            this.$alert("账号为身份证号码,密码为身份证后六位", "温馨提示", {
              confirmButtonText: "确定",
              callback: (action) => {
                this.$message({
                  type: "success",
                  message: `操作成功`,
                });
                this.onLoad(this.page);
                done();
              },
            });
          }
          //保安员证编号不匹配的情况
          if (res.data.code == 201) {
            this.$alert("用户新增成功!账号为身份证号码,密码为身份证后六位!注:当前保安证编号不匹配,请核实!也可通过提供保安证件信息提交核实申请!", "温馨提示", {
              confirmButtonText: "确定",
              callback: (action) => {
                this.$message({
                  type: "success",
                  message: `操作成功`,
                });
                this.onLoad(this.page);
                done();
              },
            });
          }
        },
        (error) => {
          window.console.log(error);
@@ -2376,13 +2393,28 @@
        row["cell"] = this.nowCell;
      }
      update(row).then(
        () => {
        (res) => {
          this.initFlag = false;
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          if (res.data.code == 200) {
            this.$message({
              type: "success",
              message: "操作成功!",
            });
          }
          if (res.data.code == 201) {
            this.$alert("修改成功!注:当前保安证编号不匹配,请核实!也可通过提供保安证件信息提交核实申请!", "温馨提示", {
              confirmButtonText: "确定",
              callback: (action) => {
                this.$message({
                  type: "success",
                  message: `操作成功`,
                });
                this.onLoad(this.page);
                done();
              },
            });
          }
          done();
        },
        (error) => {