Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
q4speed 2020-05-22 17:50:03 +08:00
commit 907da39d8d
3 changed files with 21 additions and 21 deletions

View File

@ -45,11 +45,11 @@ public class UserRoleService {
for (int i = 0; i < collect.size(); i++) { for (int i = 0; i < collect.size(); i++) {
Map<String, Object> map = new HashMap<>(2); Map<String, Object> map = new HashMap<>(2);
map.put("id", collect.get(i)); map.put("id", collect.get(i));
map.put("Ids", new ArrayList<>()); map.put("ids", new ArrayList<>());
for (int j = 0; j < userRoles.size(); j++) { for (int j = 0; j < userRoles.size(); j++) {
String role = userRoles.get(j).getRoleId(); String role = userRoles.get(j).getRoleId();
if (StringUtils.equals(role, collect.get(i))) { if (StringUtils.equals(role, collect.get(i))) {
List ids = (List) map.get("Ids"); List ids = (List) map.get("ids");
ids.add(userRoles.get(j).getSourceId()); ids.add(userRoles.get(j).getSourceId());
} }
} }

View File

@ -80,10 +80,10 @@ public class UserService {
userRole.setSourceId("adminSourceId"); userRole.setSourceId("adminSourceId");
userRoleMapper.insertSelective(userRole); userRoleMapper.insertSelective(userRole);
} else { } else {
// if (!map.keySet().contains("Ids")) { // if (!map.keySet().contains("ids")) {
// MSException.throwException(role + " no source id"); // MSException.throwException(role + " no source id");
// } // }
List<String> list = (List<String>) map.get("Ids"); List<String> list = (List<String>) map.get("ids");
for (int j = 0; j < list.size(); j++) { for (int j = 0; j < list.size(); j++) {
UserRole userRole1 = new UserRole(); UserRole userRole1 = new UserRole();
userRole1.setId(UUID.randomUUID().toString()); userRole1.setId(UUID.randomUUID().toString());

View File

@ -87,10 +87,10 @@
</el-form-item> </el-form-item>
<div v-if="role.id === 'org_admin'"> <div v-if="role.id === 'org_admin'">
<el-form-item label="选择组织" <el-form-item label="选择组织"
:prop="'roles.' + index + '.Ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: '请选择组织', trigger: 'change'}" :rules="{required: true, message: '请选择组织', trigger: 'change'}"
> >
<el-select v-model="role.Ids" placeholder="选择组织" multiple> <el-select v-model="role.ids" placeholder="选择组织" multiple>
<el-option <el-option
v-for="item in form.orgList" v-for="item in form.orgList"
:key="item.id" :key="item.id"
@ -102,10 +102,10 @@
</div> </div>
<div v-if="role.id === 'test_manager'"> <div v-if="role.id === 'test_manager'">
<el-form-item label="选择工作空间" <el-form-item label="选择工作空间"
:prop="'roles.' + index + '.Ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}" :rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
> >
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple> <el-select v-model="role.ids" placeholder="选择工作空间" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"
@ -117,10 +117,10 @@
</div> </div>
<div v-if="role.id ==='test_user'"> <div v-if="role.id ==='test_user'">
<el-form-item label="选择工作空间" <el-form-item label="选择工作空间"
:prop="'roles.' + index + '.Ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}" :rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
> >
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple> <el-select v-model="role.ids" placeholder="选择工作空间" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"
@ -132,10 +132,10 @@
</div> </div>
<div v-if="role.id ==='test_viewer'"> <div v-if="role.id ==='test_viewer'">
<el-form-item label="选择工作空间" <el-form-item label="选择工作空间"
:prop="'roles.' + index + '.Ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}" :rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
> >
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple> <el-select v-model="role.ids" placeholder="选择工作空间" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"
@ -181,7 +181,7 @@
:prop="'roles.' + index + '.id'" :prop="'roles.' + index + '.id'"
:rules="{required: true, message: '请选择角色', trigger: 'change'}" :rules="{required: true, message: '请选择角色', trigger: 'change'}"
> >
<el-select v-model="role.id" placeholder="选择角色类型"> <el-select v-model="role.id" placeholder="选择角色类型" :disabled="!!role.id">
<el-option <el-option
v-for="item in activeRole(role)" v-for="item in activeRole(role)"
:key="item.id" :key="item.id"
@ -194,10 +194,10 @@
</el-form-item> </el-form-item>
<div v-if="role.id === 'org_admin'"> <div v-if="role.id === 'org_admin'">
<el-form-item label="选择组织" <el-form-item label="选择组织"
:prop="'roles.' + index + '.Ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: '请选择组织', trigger: 'change'}" :rules="{required: true, message: '请选择组织', trigger: 'change'}"
> >
<el-select v-model="role.Ids" placeholder="选择组织" multiple> <el-select v-model="role.ids" placeholder="选择组织" multiple>
<el-option <el-option
v-for="item in form.orgList" v-for="item in form.orgList"
:key="item.id" :key="item.id"
@ -209,10 +209,10 @@
</div> </div>
<div v-if="role.id === 'test_manager'"> <div v-if="role.id === 'test_manager'">
<el-form-item label="选择工作空间" <el-form-item label="选择工作空间"
:prop="'roles.' + index + '.Ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}" :rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
> >
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple> <el-select v-model="role.ids" placeholder="选择工作空间" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"
@ -224,10 +224,10 @@
</div> </div>
<div v-if="role.id ==='test_user'"> <div v-if="role.id ==='test_user'">
<el-form-item label="选择工作空间" <el-form-item label="选择工作空间"
:prop="'roles.' + index + '.Ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}" :rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
> >
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple> <el-select v-model="role.ids" placeholder="选择工作空间" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"
@ -239,10 +239,10 @@
</div> </div>
<div v-if="role.id ==='test_viewer'"> <div v-if="role.id ==='test_viewer'">
<el-form-item label="选择工作空间" <el-form-item label="选择工作空间"
:prop="'roles.' + index + '.Ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}" :rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
> >
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple> <el-select v-model="role.ids" placeholder="选择工作空间" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"