dengjunjie
2024-10-30 680ccbedf08839143215f40dea5273dc2819100c
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Client/src/extension/system/Sys_User/Sys_UserGridHeader.vue
@@ -32,15 +32,8 @@
        />
      </div>
      <template #footer>
        <el-button
          type="primary"
          @click="savePwd()"
          >修改密码</el-button
        >
        <el-button
          @click="model = false"
          >关闭</el-button
        >
        <el-button type="primary" @click="savePwd()">修改密码</el-button>
        <el-button @click="model = false">关闭</el-button>
      </template>
    </vol-box>
  </div>
@@ -49,13 +42,13 @@
import { defineComponent, defineAsyncComponent } from "vue";
export default defineComponent({
  components: {
    VolBox: defineAsyncComponent(() => import("@/components/basic/VolBox.vue"))
    VolBox: defineAsyncComponent(() => import("@/components/basic/VolBox.vue")),
  },
  data() {
    return {
      row: {},
      password: "",
      newPwd:"",
      newPwd: "",
      model: false,
    };
  },
@@ -67,14 +60,15 @@
      this.model = true;
    },
    savePwd() {
      if (!this.password||!this.newPwd) return this.$Message.error("请输入密码");
      if (this.password.length < 6||this.newPwd.length<6)
      if (!this.password || !this.newPwd)
        return this.$Message.error("请输入密码");
      if (this.password.length < 6 || this.newPwd.length < 6)
        return this.$Message.error("密码长度至少6位");
      let url =
        "/api/user/ModifyPwd?oldPwd=" +
        this.password +
        "&newPwd=" +
        this.newPwd+
        this.newPwd +
        "&userName=" +
        this.row.userName;
      this.http.post(url, {}, true).then((x) => {
@@ -87,7 +81,7 @@
    },
  },
  created() {},
})
});
</script>
<style lang="less" scoped>
h3 {