修改组织菜单新建成员中的问题

This commit is contained in:
shiziyuan9527 2020-02-27 18:45:58 +08:00
parent 8383b67948
commit bb23e9b246
2 changed files with 9 additions and 5 deletions

View File

@ -46,7 +46,7 @@
</select>
<select id="getOrgMemberList" resultType="io.metersphere.base.domain.User">
SELECT `user`.* FROM user_role JOIN `user` ON user_role.user_id = `user`.id
SELECT distinct `user`.* FROM user_role JOIN `user` ON user_role.user_id = `user`.id
WHERE user_role.source_id = #{orgMember.organizationId}
<if test="orgMember.name != null">
AND `user`.name like CONCAT('%', #{orgMember.name},'%')

View File

@ -49,7 +49,7 @@
</div>
</el-card>
<el-dialog title="添加成员" :visible.sync="createVisible" width="30%">
<el-dialog title="添加成员" :visible.sync="createVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
<el-form :model="form" ref="form" :rules="rules" label-position="left" label-width="100px" size="small">
<el-form-item label="成员" prop="userIds">
<el-select v-model="form.userIds" multiple placeholder="请选择成员" class="select-width">
@ -100,10 +100,10 @@
tableData: [],
rules: {
userIds: [
{required: true, message: '请选择成员', trigger: ['blur', 'change']}
{required: true, message: '请选择成员', trigger: ['blur']}
],
roleIds: [
{required: true, message: '请选择角色', trigger: ['blur', 'change']}
{required: true, message: '请选择角色', trigger: ['blur']}
]
},
multipleSelection: [],
@ -141,6 +141,9 @@
search() {
this.initTableData();
},
closeFunc() {
this.form = {};
},
handleSizeChange(size) {
this.pageSize = size;
this.initTableData();
@ -170,8 +173,9 @@
});
},
create() {
this.form = {};
this.result = this.$get('/user/list', response => {
this.createVisible = true;
this.createVisible = true;
this.$set(this.form, "userList", response.data);
});
this.result = this.$get('/role/list/org', response => {