From 05af9a0f3d3f69d5f6d80038d3dd25209bc9473d Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 8 Jun 2020 15:21:34 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E9=98=BB=E6=AD=A2=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E7=8A=B6=E6=80=81=E7=82=B9=E5=87=BB=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=86=92=E6=B3=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/plan/components/TestPlanList.vue | 35 ++++++++++--------- .../view/comonents/TestPlanTestCaseList.vue | 4 ++- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/frontend/src/business/components/track/plan/components/TestPlanList.vue b/frontend/src/business/components/track/plan/components/TestPlanList.vue index 905b0997b3..0353e3d3cd 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanList.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanList.vue @@ -29,23 +29,24 @@ :label="$t('test_track.plan.plan_status')" show-overflow-tooltip> From 66ecbc26f059a58ba77c2c04b45892148eae0d58 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 8 Jun 2020 16:00:20 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E6=A1=86link=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/plan/view/comonents/TestPlanTestCaseEdit.vue | 5 ++--- frontend/src/common/css/main.css | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseEdit.vue b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseEdit.vue index c9d758f1aa..ed584bdca3 100644 --- a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseEdit.vue +++ b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseEdit.vue @@ -167,7 +167,7 @@ - + @@ -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; } - diff --git a/frontend/src/common/css/main.css b/frontend/src/common/css/main.css index 72c8d9710c..2e459aba95 100644 --- a/frontend/src/common/css/main.css +++ b/frontend/src/common/css/main.css @@ -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; From c14a8b24c3a38f11047a5be31a972e1dba2e1ea0 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 8 Jun 2020 16:08:53 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E6=97=B6=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=B8=85=E7=A9=BAlastWsId=E5=92=8ClastOrgId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/service/UserService.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index 00388570b0..2c8815b1db 100644 --- a/backend/src/main/java/io/metersphere/service/UserService.java +++ b/backend/src/main/java/io/metersphere/service/UserService.java @@ -195,6 +195,17 @@ public class UserService { String userId = user.getId(); UserRoleExample userRoleExample = new UserRoleExample(); userRoleExample.createCriteria().andUserIdEqualTo(userId); + List userRoles = userRoleMapper.selectByExample(userRoleExample); + List 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> 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); } From b130c1ffa4df3dabc5a7b05000f295b87088c6ce Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 8 Jun 2020 16:08:59 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dsql=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/metersphere/service/OrganizationService.java | 4 ++++ frontend/src/business/components/settings/system/User.vue | 4 ++-- frontend/src/common/js/ajax.js | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/service/OrganizationService.java b/backend/src/main/java/io/metersphere/service/OrganizationService.java index 0d354c7f39..a88e4f7b31 100644 --- a/backend/src/main/java/io/metersphere/service/OrganizationService.java +++ b/backend/src/main/java/io/metersphere/service/OrganizationService.java @@ -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); diff --git a/frontend/src/business/components/settings/system/User.vue b/frontend/src/business/components/settings/system/User.vue index 44080272a7..3881cac0c7 100644 --- a/frontend/src/business/components/settings/system/User.vue +++ b/frontend/src/business/components/settings/system/User.vue @@ -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.·-]+$/, diff --git a/frontend/src/common/js/ajax.js b/frontend/src/common/js/ajax.js index 3ce85b05e0..af0021d005 100644 --- a/frontend/src/common/js/ajax.js +++ b/frontend/src/common/js/ajax.js @@ -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" } }); From 2a8fab75f06e8f5df6f72014e31229d74944d2d4 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 8 Jun 2020 16:15:13 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=94=A8=E5=88=B0=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/settings/system/TestResourcePool.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/frontend/src/business/components/settings/system/TestResourcePool.vue b/frontend/src/business/components/settings/system/TestResourcePool.vue index f502006d92..40ad3daf11 100644 --- a/frontend/src/business/components/settings/system/TestResourcePool.vue +++ b/frontend/src/business/components/settings/system/TestResourcePool.vue @@ -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(); From af481eb14a9829504e4faa1f0d46bbdecb896e5a Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 8 Jun 2020 16:34:01 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E7=94=A8=E4=BE=8B=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/track/case/components/TestCaseImport.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/track/case/components/TestCaseImport.vue b/frontend/src/business/components/track/case/components/TestCaseImport.vue index be3fa862d9..9088499638 100644 --- a/frontend/src/business/components/track/case/components/TestCaseImport.vue +++ b/frontend/src/business/components/track/case/components/TestCaseImport.vue @@ -1,5 +1,5 @@