zengh
2021-11-02 b61de885365643c1b6849b2dc3246232feeccfb3
src/views/system/user.vue
@@ -203,6 +203,7 @@
  update,
  updatePlatform,
  add,
  securitySave,
  grant,
  resetPassword,
} from "@/api/system/user";
@@ -841,11 +842,63 @@
        this.onLoad(this.page);
      });
    },
    // rowSave(row, done, loading) {
    //   row.deptId = row.deptId.join(",");
    //   row.roleId = row.roleId.join(",");
    //   row.postId = row.postId.join(",");
    //   add(row).then(
    //     () => {
    //       this.initFlag = false;
    //       this.onLoad(this.page);
    //       this.$message({
    //         type: "success",
    //         message: "操作成功!",
    //       });
    //       done();
    //     },
    //     (error) => {
    //       window.console.log(error);
    //       loading();
    //     }
    //   );
    // },
    rowSave(row, done, loading) {
      row.deptId = row.deptId.join(",");
      row.roleId = row.roleId.join(",");
      row.postId = row.postId.join(",");
      add(row).then(
      const userMap = {
        user: {
          account: row.account,
          avatar: row.avatar,
          fingerprint: row.fingerprint,
          healstats: row.healstats,
          address: row.address,
          birthday: row.birthday,
          cardid: row.cardid,
          deptId: row.deptId,
          roleId: row.roleId,
          education: row.education1,
          email: row.email,
          height: row.height,
          hold: row.hold,
          jurisdiction: row.jurisdiction,
          myPicture: row.myPicture,
          name: row.name,
          nation: row.nation,
          nativeplace: row.nativeplace,
          password: row.password,
          password2: row.password2,
          phone: row.phone,
          politicaloutlook: row.politicaloutlook,
          realName: row.realName,
          registered: row.registered,
          rtime: row.rtime,
          securitynumber: row.securitynumber,
          sex: row.sex,
          district: row.district,
        },
      };
      securitySave(userMap).then(
        () => {
          this.initFlag = false;
          this.onLoad(this.page);