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

This commit is contained in:
Captain.B 2020-06-08 16:10:25 +08:00
commit cc7efe9497
5 changed files with 54 additions and 23 deletions

View File

@ -195,6 +195,17 @@ public class UserService {
String userId = user.getId();
UserRoleExample userRoleExample = new UserRoleExample();
userRoleExample.createCriteria().andUserIdEqualTo(userId);
List<UserRole> userRoles = userRoleMapper.selectByExample(userRoleExample);
List<String> list = userRoles.stream().map(UserRole::getSourceId).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(list)) {
if (list.contains(user.getLastWorkspaceId()) || list.contains(user.getLastOrganizationId())) {
user.setLastOrganizationId("");
user.setLastWorkspaceId("");
userMapper.updateByPrimaryKeySelective(user);
}
}
userRoleMapper.deleteByExample(userRoleExample);
List<Map<String, Object>> roles = user.getRoles();
if (!roles.isEmpty()) {
@ -275,6 +286,14 @@ public class UserService {
UserRoleExample example = new UserRoleExample();
example.createCriteria().andRoleIdLike("%test%")
.andUserIdEqualTo(userId).andSourceIdEqualTo(workspaceId);
User user = userMapper.selectByPrimaryKey(userId);
if (StringUtils.equals(workspaceId, user.getLastWorkspaceId())) {
user.setLastWorkspaceId("");
user.setLastOrganizationId("");
userMapper.updateByPrimaryKeySelective(user);
}
userRoleMapper.deleteByExample(example);
}
@ -305,6 +324,14 @@ public class UserService {
public void delOrganizationMember(String organizationId, String userId) {
UserRoleExample userRoleExample = new UserRoleExample();
userRoleExample.createCriteria().andRoleIdLike("%org%").andUserIdEqualTo(userId).andSourceIdEqualTo(organizationId);
User user = userMapper.selectByPrimaryKey(userId);
if (StringUtils.equals(organizationId, user.getLastOrganizationId())) {
user.setLastWorkspaceId("");
user.setLastOrganizationId("");
userMapper.updateByPrimaryKeySelective(user);
}
userRoleMapper.deleteByExample(userRoleExample);
}

View File

@ -29,23 +29,24 @@
:label="$t('test_track.plan.plan_status')"
show-overflow-tooltip>
<template v-slot:default="scope">
<el-dropdown class="test-case-status" @command="statusChange">
<span class="el-dropdown-link">
<plan-status-table-item :value="scope.row.status"/>
</span>
<el-dropdown-menu slot="dropdown" chang>
<el-dropdown-item :command="{id: scope.row.id, status: 'Prepare'}">
{{$t('test_track.plan.plan_status_prepare')}}
</el-dropdown-item>
<el-dropdown-item :command="{id: scope.row.id, status: 'Underway'}">
{{$t('test_track.plan.plan_status_running')}}
</el-dropdown-item>
<el-dropdown-item :command="{id: scope.row.id, status: 'Completed'}">
{{$t('test_track.plan.plan_status_completed')}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<div @click.stop="false">
<el-dropdown class="test-case-status" @command="statusChange">
<span class="el-dropdown-link">
<plan-status-table-item :value="scope.row.status"/>
</span>
<el-dropdown-menu slot="dropdown" chang>
<el-dropdown-item :command="{id: scope.row.id, status: 'Prepare'}">
{{$t('test_track.plan.plan_status_prepare')}}
</el-dropdown-item>
<el-dropdown-item :command="{id: scope.row.id, status: 'Underway'}">
{{$t('test_track.plan.plan_status_running')}}
</el-dropdown-item>
<el-dropdown-item :command="{id: scope.row.id, status: 'Completed'}">
{{$t('test_track.plan.plan_status_completed')}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
<el-table-column

View File

@ -167,7 +167,7 @@
</el-row>
<el-row v-if="testCase.issues && testCase.issues.hasIssues">
<el-col :span="20" :offset="1" class="step-edit">
<el-col :span="20" :offset="1" class="issues-edit">
<ckeditor :editor="editor" :disabled="isReadOnly" :config="editorConfig" v-model="testCase.issues.content"/>
</el-col>
</el-row>
@ -425,7 +425,7 @@
line-height: 50px;
}
.step-edit >>> p {
.issues-edit >>> p {
line-height: 16px;
}
@ -456,5 +456,4 @@
.el-switch >>> .el-switch__label.is-active {
color: #409EFF;
}
</style>

View File

@ -86,7 +86,8 @@
column-key="status"
:label="$t('test_track.plan_view.execute_result')">
<template v-slot:default="scope">
<el-dropdown class="test-case-status" @command="statusChange">
<div @click.stop="false">
<el-dropdown class="test-case-status" @command="statusChange" >
<span class="el-dropdown-link">
<status-table-item :value="scope.row.status"/>
</span>
@ -105,6 +106,7 @@
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>

View File

@ -33,8 +33,10 @@ body {
clear: both;
}
/*解决富文本框中link显示问题*/
.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners {
z-index: 10055 !important;
}
.table-card > .el-card__body {
padding-top: 0;