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

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>
<select id="getOrgMemberList" resultType="io.metersphere.base.domain.User"> <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} WHERE user_role.source_id = #{orgMember.organizationId}
<if test="orgMember.name != null"> <if test="orgMember.name != null">
AND `user`.name like CONCAT('%', #{orgMember.name},'%') AND `user`.name like CONCAT('%', #{orgMember.name},'%')

View File

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