|
@@ -318,7 +318,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="编号" prop="num">
|
|
|
<el-input
|
|
|
- type="password"
|
|
|
+ :disabled="true"
|
|
|
v-model="ruleUserForm.num"
|
|
|
placeholder="请输入编号"
|
|
|
></el-input>
|
|
@@ -479,6 +479,9 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
+ id: "",
|
|
|
+ role: "",
|
|
|
+ queryPassword: "",
|
|
|
//人机对话
|
|
|
rjdhUrl: "rjdh1.png",
|
|
|
rjdh: true,
|
|
@@ -590,8 +593,30 @@ export default {
|
|
|
this.userType = parseInt(this.userType);
|
|
|
|
|
|
this.$root.topPageFlag = true;
|
|
|
+ //根据用户编号查询用户信息
|
|
|
},
|
|
|
methods: {
|
|
|
+ //根据用户编号查询用户信息
|
|
|
+ // queryUserMessage(){
|
|
|
+ // let that=this;
|
|
|
+ // that.$http.get(
|
|
|
+ // `v1/user/getUser/${that.acount}`,
|
|
|
+ // {
|
|
|
+ // identifier: that.acount,
|
|
|
+
|
|
|
+ // },
|
|
|
+ // (res) => {
|
|
|
+ // if (res.data.code == 200) {
|
|
|
+ // that.centerDialogPass = false;
|
|
|
+ // that.$message.success("修改成功");
|
|
|
+ // that.$router.push("/");
|
|
|
+ // } else {
|
|
|
+ // this.$message.error("访问服务器失败!");
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // );
|
|
|
+ // },
|
|
|
+
|
|
|
menuManageClick(val) {
|
|
|
if (val == "yhgl") {
|
|
|
this.yhglUrl = "yhgl1.png";
|
|
@@ -796,20 +821,23 @@ export default {
|
|
|
if (valid) {
|
|
|
//修改个人信息
|
|
|
that.$http.post(
|
|
|
- `v1/user/change/user`,
|
|
|
+ `v1/user/update`,
|
|
|
{
|
|
|
- name: that.ruleUserForm.name,
|
|
|
- num: that.ruleUserForm.num,
|
|
|
- unit: that.ruleUserForm.unit,
|
|
|
+ userName: that.ruleUserForm.name,
|
|
|
+ identifier: that.ruleUserForm.num,
|
|
|
+ profession: that.ruleUserForm.unit,
|
|
|
age: that.ruleUserForm.age,
|
|
|
- sex: that.ruleUserForm.sex,
|
|
|
+ gender: that.ruleUserForm.sex == "男" ? "1" : "0",
|
|
|
marriageSituation: that.ruleUserForm.marriageSituation,
|
|
|
+ id: that.id,
|
|
|
+ role: that.role + "",
|
|
|
+ password: that.queryPassword,
|
|
|
},
|
|
|
(res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
that.centerDialogPass = false;
|
|
|
that.$message.success("修改成功");
|
|
|
- that.$router.push("/");
|
|
|
+ // that.$router.push("/");
|
|
|
} else {
|
|
|
this.$message.error("访问服务器失败!");
|
|
|
}
|
|
@@ -821,16 +849,25 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
queryUserInfo() {
|
|
|
- let that =this;
|
|
|
- that.$http.post(
|
|
|
- `v1/user/change/user`,
|
|
|
+ let that = this;
|
|
|
+ that.$http.get(
|
|
|
+ `v1/user/getUser/${that.acount}`,
|
|
|
{
|
|
|
- num: that.ruleUserForm.num,
|
|
|
+ identifier: that.acount,
|
|
|
},
|
|
|
(res) => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- //修改文本
|
|
|
- //将data赋予给数据
|
|
|
+ if (res.code == 200) {
|
|
|
+ that.ruleUserForm.name = res.data.userName;
|
|
|
+ that.ruleUserForm.num = res.data.identifier;
|
|
|
+ that.ruleUserForm.age = res.data.age;
|
|
|
+ that.ruleUserForm.unit = res.data.profession;
|
|
|
+ that.ruleUserForm.sex = res.data.gender == "1" ? "男" : "女";
|
|
|
+ that.ruleUserForm.marriageSituation = res.data.marriageSituation;
|
|
|
+ that.id = res.data.id;
|
|
|
+ that.role = res.data.role;
|
|
|
+ that.queryPassword = res.data.password;
|
|
|
+ //修改文本
|
|
|
+ //将data赋予给数据
|
|
|
} else {
|
|
|
this.$message.error("访问服务器失败!");
|
|
|
}
|
|
@@ -839,8 +876,14 @@ export default {
|
|
|
},
|
|
|
updatePass() {
|
|
|
//调用查询用户信息的方法
|
|
|
+ let that = this;
|
|
|
this.queryUserInfo();
|
|
|
+ //将校验去掉
|
|
|
this.centerDialogPass = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ that.$refs["ruleUserForm"].resetFields();
|
|
|
+ that.$refs["ruleForm"].resetFields();
|
|
|
+ });
|
|
|
},
|
|
|
//销毁所有定时器
|
|
|
desTimer() {
|