pm添加用户参数变更
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-08-26 10:19:44 +08:00
parent 1c5e8edc15
commit 9cdfb65a7b
1 changed files with 11 additions and 0 deletions

View File

@ -60,6 +60,7 @@ const formDataDefault = () => {
LastName: null, LastName: null,
FirstName: null, FirstName: null,
UserTypeId: "", UserTypeId: "",
UserRoleList: [],
Phone: null, Phone: null,
Email: null, Email: null,
IsSendEmail: false, IsSendEmail: false,
@ -128,6 +129,7 @@ export default {
Email: null, Email: null,
IsSendEmail: false, IsSendEmail: false,
Sex: "9", Sex: "9",
UserRoleList: [],
IsZhiZhun: "", IsZhiZhun: "",
HospitalGroupldList: [], HospitalGroupldList: [],
OrganizationName: "", OrganizationName: "",
@ -200,7 +202,14 @@ export default {
}, },
"form.UserTypeId": { "form.UserTypeId": {
handler() { handler() {
this.form.UserRoleList = []
if (this.form.UserTypeId) { if (this.form.UserTypeId) {
let data = this.userTypeOptions.find((d) => d.Id === this.form.UserTypeId)
this.form.UserRoleList.push({
UserTypeEnum: data.UserTypeEnum,
UserTypeId: data.Id,
IsUserRoleDisabled: false,
})
let name = this.getUserType(this.form.UserTypeId); let name = this.getUserType(this.form.UserTypeId);
if (["PM", "PI", "SR", "OA"].includes(name)) { if (["PM", "PI", "SR", "OA"].includes(name)) {
this.form.IsZhiZhun = true; this.form.IsZhiZhun = true;
@ -210,6 +219,7 @@ export default {
} }
this.form.IsZhiZhun = false; this.form.IsZhiZhun = false;
this.form.OrganizationName = null; this.form.OrganizationName = null;
}, },
deep: true, deep: true,
immediate: true, immediate: true,
@ -261,6 +271,7 @@ export default {
this.form.UserTypeEnum = selectedUserType[0].UserTypeEnum; this.form.UserTypeEnum = selectedUserType[0].UserTypeEnum;
} }
this.form.TrialId = this.$route.query.trialId this.form.TrialId = this.$route.query.trialId
console.log(this.form, 'this.form')
addUser(this.form, true) addUser(this.form, true)
.then((res) => { .then((res) => {
this.btnLoading = false; this.btnLoading = false;