diff --git a/src/components/doctorCheck/ButtonList.vue b/src/components/doctorCheck/ButtonList.vue index 48eda28..685c27a 100644 --- a/src/components/doctorCheck/ButtonList.vue +++ b/src/components/doctorCheck/ButtonList.vue @@ -378,5 +378,6 @@ export default { \ No newline at end of file diff --git a/src/components/doctorCheck/PatientRegisterBase.vue b/src/components/doctorCheck/PatientRegisterBase.vue index 1fb8390..8dea414 100644 --- a/src/components/doctorCheck/PatientRegisterBase.vue +++ b/src/components/doctorCheck/PatientRegisterBase.vue @@ -3,68 +3,68 @@
条码号 -
档案号 -
姓名 - +
性别 - +
体检次数 - +
婚姻 - +
体检日期 + style="width: 120px;margin-left:10px" size="small" disabled>
单位 - +
部门 - +
体检类别 - +
人员类别 - +
民族 - +
手机 - +
@@ -181,5 +181,6 @@ export default { diff --git a/src/store/index.js b/src/store/index.js index 13e4fc2..f0652a5 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -7,6 +7,7 @@ Vue.use(Vuex); export default new Vuex.Store({ state: { + changepassword:'',//用户密码 set: "qqqq", customerOrg: { //体检单位设置 diff --git a/src/views/Home.vue b/src/views/Home.vue index 682357f..eff1147 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -263,13 +263,33 @@ 退出登录 - 修改密码 + 修改密码 + + - + + + + + + + + + + + + 取 消 + 确 定 + + - + @@ -194,6 +197,25 @@ > + + + + + + @@ -299,6 +321,20 @@ > + + + + @@ -370,6 +406,24 @@ 确 定 + + + + + + + + + 取 消 + 确 定 + + @@ -388,22 +442,31 @@ import { reverseselection, usersinits, selectbinding, + lognis, } from "../../request/ruquset"; -let validatePassword = (rule, value, callback) => { - var reg1 = - /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*.])[\da-zA-Z~!@#$%^&*.]{6,}$/; //密码必须是8位以上、必须含有字母、数字、特殊符号 - var reg2 = /(123|234|345|456|567|678|789|012)/; //不能有3个连续数字 - if (!reg1.test(value)) { - callback(new Error("密码必须是6位以上、必须含有字母、数字、特殊符号")); - } else if (reg2.test(value)) { - callback(new Error("不能有3个连续数字")); - } else { - callback(); - } -}; +import { mapState } from "vuex"; +import { getapi, postapi } from "@/api/api"; +// let validatePassword = (rule, value, callback) => { +// var reg1 = +// /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*.])[\da-zA-Z~!@#$%^&*.]{6,}$/; //密码必须是8位以上、必须含有字母、数字、特殊符号 +// var reg2 = /(123|234|345|456|567|678|789|012)/; //不能有3个连续数字 +// if (!reg1.test(value)) { +// callback(new Error("密码必须是6位以上、必须含有字母、数字、特殊符号")); +// } else if (reg2.test(value)) { +// callback(new Error("不能有3个连续数字")); +// } else { +// callback(); +// } +// }; +let validatePassword = /^[a-zA-Z]\w{5,8}$/; export default { data() { return { + defaultchekedKeys:[],//默认选中的科室 + department: [], //选中的科室 + setupdepartments: [], //设置科室 + newPassWord: "", //新密码 + editpassworddialogVisible: false, //修改密码 nodekes: [], activeName: "first", chaxunform: { @@ -493,15 +556,46 @@ export default { defaultKeys: [], //选中的 newachitecture: [], //新增弹框获取组织数据 // customer:[] + password: "", + passwordid: "", + newdepartment: [], //新增科室 }; }, - + computed: { + ...mapState(["changepassword"]), + }, created() { + this.password = this.changepassword; + console.log(this.password); this.getlist(); this.idkes = localStorage.getItem("dataidkes"); }, methods: { + iscrentddepartment() { + this.department = this.$refs.department.getCheckedKeys(true); + console.log(this.department, "www"); + }, + //修改密码确定按钮 + Changepassword() { + if (this.newPassWord == "") { + this.$message.warning("请输入新密码"); + } else { + postapi("/api/identity/users/resetpassword", { + userId: this.passwordid, + newPassWord: this.newPassWord, + }).then((res) => { + this.$message.success("修改成功"); + this.editpassworddialogVisible = false; + }); + } + console.log(this.newPassWord); + }, + //修改密码 + editpassword(row) { + this.editpassworddialogVisible = true; + this.passwordid = row.id; + }, //新增选择的 ischesc() { console.log("333", this.$refs.tree.getCheckedKeys(true)); @@ -652,6 +746,7 @@ export default { }); organizationtree().then((res) => { this.newachitecture = res.data; + this.newdepartment = res.data; console.log(res, "1w"); }); console.log(this.title); @@ -728,7 +823,12 @@ export default { console.log(res); // this.$message.success("修改绑定组织成功"); }); - + postapi( + `/api/app/abpuserdepartment/createmany?UserId=${this.form.id}`, + this.department + ).then((res) => { + // this.$message.success("操作成功"); + }); console.log("aaaaaa"); } }); @@ -742,8 +842,12 @@ export default { //删除方法 deleates(row) { let id = row.id; - delestsid(id).then((res) => { - console.log(res); + // delestsid(id).then((res) => { + // console.log(res); + // this.getlist(); + // this.$message.success("删除成功"); + // }); + postapi(`/api/identity/users/delete?id=${row.id}`).then((res) => { this.getlist(); this.$message.success("删除成功"); }); @@ -761,14 +865,16 @@ export default { if (this.title == 2) { // row里面没有roleNames字段 const form = JSON.parse(JSON.stringify(row)); - + console.log(form, "form"); this.form = { ...form, roleNames: [], }; this.form.roleNames = []; + //获取组织架构 organizationtree().then((res) => { this.organizationalstructure = res.data; + this.setupdepartments = res.data; console.log(res, "sssssss"); }); useraffiliation(this.form.id).then((res) => { @@ -782,6 +888,14 @@ export default { this.$set(this.form, "roleNames", []); } }); + //科室编辑 + getapi( + `/api/app/abpuserdepartment/getuserdepartment?UserId=${row.id}` + ).then((res) => { + // default-checked-keys + this.defaultchekedKeys=res.data + console.log(res, "科室"); + }); } // useraffiliation(row.id).then((res) => {