修改成员时角色项为必填
This commit is contained in:
parent
54f2fdf3ea
commit
03787d12c8
|
@ -78,7 +78,7 @@
|
|||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||
<el-input v-model="form.phone" autocomplete="off" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
|
||||
<el-select v-model="form.roleIds" multiple :placeholder="$t('role.please_choose_role')" class="select-width">
|
||||
<el-option
|
||||
v-for="item in form.allroles"
|
||||
|
@ -175,7 +175,7 @@
|
|||
// 编辑使填充角色信息
|
||||
this.$set(this.form, 'roleIds', roleIds);
|
||||
},
|
||||
updateOrgMember() {
|
||||
updateOrgMember(formName) {
|
||||
let param = {
|
||||
id: this.form.id,
|
||||
name: this.form.name,
|
||||
|
@ -184,11 +184,15 @@
|
|||
roleIds: this.form.roleIds,
|
||||
organizationId: this.currentUser().lastOrganizationId
|
||||
}
|
||||
this.result = this.$post("/organization/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.updateVisible = false;
|
||||
this.initTableData();
|
||||
});
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.result = this.$post("/organization/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.updateVisible = false;
|
||||
this.initTableData();
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
del(row) {
|
||||
this.$confirm(this.$t('member.remove_member'), '', {
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
|
||||
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||
class="select-width">
|
||||
<el-option
|
||||
|
@ -366,7 +366,7 @@
|
|||
this.$info(this.$t('commons.remove_cancel'));
|
||||
});
|
||||
},
|
||||
updateOrgMember() {
|
||||
updateOrgMember(formName) {
|
||||
let param = {
|
||||
id: this.memberForm.id,
|
||||
name: this.memberForm.name,
|
||||
|
@ -375,11 +375,15 @@
|
|||
roleIds: this.memberForm.roleIds,
|
||||
workspaceId: this.currentWorkspaceRow.id
|
||||
}
|
||||
this.result = this.$post("/workspace/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.dialogWsMemberUpdateVisible = false;
|
||||
this.cellClick(this.currentWorkspaceRow);
|
||||
});
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.result = this.$post("/workspace/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.dialogWsMemberUpdateVisible = false;
|
||||
this.cellClick(this.currentWorkspaceRow);
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
buildPagePath(path) {
|
||||
return path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize;
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
|
||||
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||
class="select-width">
|
||||
<el-option
|
||||
|
@ -427,7 +427,7 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
updateOrgMember() {
|
||||
updateOrgMember(formName) {
|
||||
let param = {
|
||||
id: this.memberForm.id,
|
||||
name: this.memberForm.name,
|
||||
|
@ -436,10 +436,14 @@
|
|||
roleIds: this.memberForm.roleIds,
|
||||
organizationId: this.currentRow.id
|
||||
}
|
||||
this.result = this.$post("/organization/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.dialogOrgMemberUpdateVisible = false;
|
||||
this.cellClick(this.currentRow);
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.result = this.$post("/organization/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.dialogOrgMemberUpdateVisible = false;
|
||||
this.cellClick(this.currentRow);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@
|
|||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
|
||||
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||
class="select-width">
|
||||
<el-option
|
||||
|
@ -405,7 +405,7 @@
|
|||
this.$info(this.$t('commons.remove_cancel'));
|
||||
});
|
||||
},
|
||||
updateWorkspaceMember() {
|
||||
updateWorkspaceMember(formName) {
|
||||
let param = {
|
||||
id: this.memberForm.id,
|
||||
name: this.memberForm.name,
|
||||
|
@ -414,10 +414,14 @@
|
|||
roleIds: this.memberForm.roleIds,
|
||||
workspaceId: this.currentWorkspaceRow.id
|
||||
}
|
||||
this.result = this.$post("/workspace/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.dialogWsMemberUpdateVisible = false;
|
||||
this.cellClick(this.currentWorkspaceRow);
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.result = this.$post("/workspace/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.dialogWsMemberUpdateVisible = false;
|
||||
this.cellClick(this.currentWorkspaceRow);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||
<el-input v-model="form.phone" autocomplete="off" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
|
||||
<el-select v-model="form.roleIds" multiple :placeholder="$t('role.please_choose_role')" class="select-width">
|
||||
<el-option
|
||||
v-for="item in form.allroles"
|
||||
|
@ -197,7 +197,7 @@
|
|||
// 编辑使填充角色信息
|
||||
this.$set(this.form, 'roleIds', roleIds);
|
||||
},
|
||||
updateWorkspaceMember() {
|
||||
updateWorkspaceMember(formName) {
|
||||
let param = {
|
||||
id: this.form.id,
|
||||
name: this.form.name,
|
||||
|
@ -206,10 +206,14 @@
|
|||
roleIds: this.form.roleIds,
|
||||
workspaceId: this.currentUser().lastWorkspaceId
|
||||
}
|
||||
this.result = this.$post("/workspace/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.updateVisible = false;
|
||||
this.initTableData();
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.result = this.$post("/workspace/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.updateVisible = false;
|
||||
this.initTableData();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
create() {
|
||||
|
|
Loading…
Reference in New Issue