Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b53f07cae6
|
@ -123,6 +123,10 @@ public class OrganizationService {
|
|||
list.add(r.getParentId());
|
||||
}
|
||||
});
|
||||
|
||||
// ignore list size is 0
|
||||
list.add("no_such_id");
|
||||
|
||||
OrganizationExample organizationExample = new OrganizationExample();
|
||||
organizationExample.createCriteria().andIdIn(list);
|
||||
return organizationMapper.selectByExample(organizationExample);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<ms-main-container v-loading="result.loading">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<ms-performance-report-recent-list/>
|
||||
<ms-performance-test-recent-list/>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<ms-performance-test-recent-list/>
|
||||
<ms-performance-report-recent-list/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
|
|
|
@ -301,9 +301,6 @@
|
|||
});
|
||||
},
|
||||
createTestResourcePool(createTestResourcePoolForm) {
|
||||
if (this.result.loading) {
|
||||
return;
|
||||
}
|
||||
this.$refs[createTestResourcePoolForm].validate(valid => {
|
||||
if (valid) {
|
||||
let vri = this.validateResourceInfo();
|
||||
|
@ -340,9 +337,6 @@
|
|||
this.form.resources = resources;
|
||||
},
|
||||
updateTestResourcePool(updateTestResourcePoolForm) {
|
||||
if (this.result.loading) {
|
||||
return;
|
||||
}
|
||||
this.$refs[updateTestResourcePoolForm].validate(valid => {
|
||||
if (valid) {
|
||||
let vri = this.validateResourceInfo();
|
||||
|
|
|
@ -336,11 +336,11 @@
|
|||
rule: {
|
||||
id: [
|
||||
{required: true, message: this.$t('user.input_id'), trigger: 'blur'},
|
||||
{min: 2, max: 20, message: this.$t('commons.input_limit', [2, 20]), trigger: 'blur'}
|
||||
{min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'}
|
||||
],
|
||||
name: [
|
||||
{required: true, message: this.$t('user.input_name'), trigger: 'blur'},
|
||||
{min: 2, max: 20, message: this.$t('commons.input_limit', [2, 20]), trigger: 'blur'},
|
||||
{min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'},
|
||||
{
|
||||
required: true,
|
||||
pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<el-dialog width="30%" :title="$t('test_track.case.import.case_import')" :visible.sync="dialogVisible"
|
||||
<el-dialog class="testcase-import" :title="$t('test_track.case.import.case_import')" :visible.sync="dialogVisible"
|
||||
@close="init">
|
||||
|
||||
<el-row>
|
||||
|
@ -126,4 +126,9 @@
|
|||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.testcase-import >>> .el-dialog {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -18,6 +18,8 @@ export default {
|
|||
let login = function () {
|
||||
MessageBox.alert(i18n.t('commons.tips'), i18n.t('commons.prompt'), {
|
||||
callback: () => {
|
||||
axios.get("/signout");
|
||||
localStorage.setItem('Admin-Token', "{}");
|
||||
window.location.href = "/login"
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue