|
|
|
@ -60,7 +60,7 @@ |
|
|
|
{{ scope.row.lastModificationTime | dateFormat }} |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
<el-table-column label="操作" width="330"> |
|
|
|
<el-table-column label="操作" width="430"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" @click="deleates(scope.row)" |
|
|
|
>删除</el-button |
|
|
|
@ -74,6 +74,9 @@ |
|
|
|
<el-button type="primary" @click="bandinuser(scope.row)" |
|
|
|
>绑定角色</el-button |
|
|
|
> |
|
|
|
<el-button type="primary" @click="editpassword(scope.row)" |
|
|
|
>修改密码</el-button |
|
|
|
> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -194,6 +197,25 @@ |
|
|
|
> |
|
|
|
</el-tree> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="科室设置"> |
|
|
|
<!-- :default-checked-keys="defaultKeys" /api/app/abpuserdepartment/createmany--> |
|
|
|
|
|
|
|
<el-tree |
|
|
|
:props="{ |
|
|
|
label: 'displayName', |
|
|
|
children: 'treeChildren', |
|
|
|
}" |
|
|
|
|
|
|
|
:default-checked-keys="defaultchekedKeys" |
|
|
|
:default-expand-all="true" |
|
|
|
show-checkbox |
|
|
|
:data="setupdepartments" |
|
|
|
node-key="id" |
|
|
|
@check="iscrentddepartment" |
|
|
|
ref="department" |
|
|
|
> |
|
|
|
</el-tree> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
<!-- //新增 --> |
|
|
|
|
|
|
|
@ -299,6 +321,20 @@ |
|
|
|
> |
|
|
|
</el-tree> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="科室设置"> |
|
|
|
<el-tree |
|
|
|
:data="newdepartment" |
|
|
|
show-checkbox |
|
|
|
:default-expand-all="true" |
|
|
|
@check="ischesc" |
|
|
|
node-key="id" |
|
|
|
ref="tree" |
|
|
|
:default-expanded-keys="nodekes" |
|
|
|
:default-checked-keys="[5]" |
|
|
|
:props="{ label: 'displayName', children: 'treeChildren' }" |
|
|
|
> |
|
|
|
</el-tree> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
@ -370,6 +406,24 @@ |
|
|
|
<el-button type="primary" @click="Identifyusers">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<!-- 修改密码弹框 --> |
|
|
|
<el-dialog |
|
|
|
title="修改密码" |
|
|
|
:visible.sync="editpassworddialogVisible" |
|
|
|
width="30%" |
|
|
|
> |
|
|
|
<el-form ref="form" :model="form" label-width="80px"> |
|
|
|
<el-form-item label="新密码"> |
|
|
|
<el-input v-model="newPassWord"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="editpassworddialogVisible = false" |
|
|
|
>取 消</el-button |
|
|
|
> |
|
|
|
<el-button type="primary" @click="Changepassword">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -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) => { |
|
|
|
|