dengjunjie
2024-10-30 810fe2bcf1888eacd926f3caa604f033483d20c9
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSClient/src/extension/system/Sys_User/Sys_UserGridHeader.vue
@@ -9,22 +9,14 @@
    >
      <el-alert type="success">
        <h3>
          <span>帐号:{{ row.UserName }}</span>
          <span>用户:{{ row.UserTrueName }}</span>
          <span>帐号:{{ row.userName }}</span>
          <span>用户:{{ row.userTrueName }}</span>
        </h3>
      </el-alert>
      <div>
        <el-input
          placeholder="请输入旧密码"
          v-model="oldPwd"
          size="large"
          style="width: 100%; margin-top: 15px"
        />
      </div>
      <div>
        <el-input
          placeholder="请输入新密码"
          v-model="newPwd"
          placeholder="请输入密码"
          v-model="password"
          size="large"
          style="width: 100%; margin-top: 15px"
        />
@@ -52,28 +44,25 @@
  data() {
    return {
      row: {},
      newPwd: "",
      oldPwd:"",
      password: "",
      model: false,
    };
  },
  methods: {
    open(row) {
      this.newPwd = "";
      this.oldPwd = "";
      this.password = "";
      this.row = row;
      this.model = true;
    },
    savePwd() {
      console.log(this.newPwd,this.oldPwd);
      if (!this.newPwd&&!this.oldPwd) return this.$Message.error("请输密码");
      if (this.newPwd.length < 6&&this.oldPwd.length<6)
      if (!this.password) return this.$Message.error("请输密码");
      if (this.password.length < 6)
        return this.$Message.error("密码长度至少6位");
      let url =
        "/api/Sys_user/modifyPwd?oldPwd=" +
        this.oldPwd +
        "&newPwd=" +
        this.newPwd;
        "/api/user/modifyUserPwd?password=" +
        this.password +
        "&userName=" +
        this.row.UserName;
      this.http.post(url, {}, true).then((x) => {
        if (!x.status) {
          return this.$message.error(x.message);