From 24b2183600a9140d3966c07cb31a64aa68693e76 Mon Sep 17 00:00:00 2001 From: "nathan.liu" Date: Thu, 21 Jul 2022 14:00:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(UI=E8=87=AA=E5=8A=A8=E5=8C=96):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=AB=98=E7=BA=A7=E6=90=9C=E7=B4=A0=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E4=BA=BA=E5=88=97=E8=A1=A8=E5=8F=AA=E5=B1=95=E7=A4=BA=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1014881 --user=刘瑶 【UI测试】场景列表/回收站列表/测试报告-高级搜索创建人未显示有该项目权限用户 https://www.tapd.cn/55049933/s/1205959 --- backend/src/main/java/io/metersphere/xpack | 2 +- .../components/search/search-components.js | 37 ++++++++++++++++++- frontend/src/business/components/xpack | 2 +- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 27c5c3d5b2..d39f3b38d7 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 27c5c3d5b2cc823dfabd50bb039847d340dfddfe +Subproject commit d39f3b38d753ce678c355b9bf2822c41f593a753 diff --git a/frontend/src/business/components/common/components/search/search-components.js b/frontend/src/business/components/common/components/search/search-components.js index c67872dc76..6034fcbd4a 100644 --- a/frontend/src/business/components/common/components/search/search-components.js +++ b/frontend/src/business/components/common/components/search/search-components.js @@ -64,7 +64,7 @@ export const OPERATORS = { }, } -const MS_USER_OPTIONS = { // 获取当前项目的用户列表 +const MS_USER_OPTIONS = { // 获取当前工作空间的用户列表 url: "/user/ws/current/member/list", labelKey: "name", valueKey: "id", @@ -73,6 +73,16 @@ const MS_USER_OPTIONS = { // 获取当前项目的用户列表 } } +// 获取当前项目的用户列表 +const MS_PROJECT_USER_OPTIONS = { + url: "/user/project/member/list", + labelKey: "name", + valueKey: "id", + showLabel: option => { + return option.label + "(" + option.value + ")"; + } +} + // 名称 export const NAME = { key: "name", // 返回结果Map的key @@ -284,6 +294,29 @@ export const CREATOR = { return operator !== OPERATORS.CURRENT_USER.value; } } + +// 创建人(仅当前项目) +export const PROJECT_CREATOR = { + key: "creator", + name: 'MsTableSearchSelect', + label: 'api_test.creator', + operator: { + options: [OPERATORS.IN, OPERATORS.NOT_IN, OPERATORS.CURRENT_USER], + change: function (component, value) { // 运算符change事件 + if (value === OPERATORS.CURRENT_USER.value) { + component.value = value; + } + } + }, + options: MS_PROJECT_USER_OPTIONS, + props: { + multiple: true + }, + isShow: operator => { + return operator !== OPERATORS.CURRENT_USER.value; + } +} + // 执行人 export const EXECUTOR = { key: "executor", @@ -731,7 +764,7 @@ export const REPORT_CONFIGS = [NAME, TEST_NAME, CREATE_TIME, STATUS, CREATOR, TR export const REPORT_CASE_CONFIGS = [NAME, CREATE_TIME, STATUS, CREATOR, TRIGGER_MODE]; -export const UI_REPORT_CONFIGS = [NAME, TEST_NAME, CREATE_TIME, UI_REPORT_STATUS, CREATOR, UI_TRIGGER_MODE, UI_MODULE_TREE]; +export const UI_REPORT_CONFIGS = [NAME, TEST_NAME, CREATE_TIME, UI_REPORT_STATUS, PROJECT_CREATOR, UI_TRIGGER_MODE, UI_MODULE_TREE]; // 测试跟踪-测试用例 列表 export const TEST_CASE_CONFIGS = [ID, NAME, TAGS, TEST_CASE_MODULE_TREE, CREATE_TIME, UPDATE_TIME, CREATOR, CASE_REVIEW_STATUS, FOLLOW_PEOPLE, CASE_DEMAND]; diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 9c9fc93f55..f2c87424ad 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 9c9fc93f55d1a48d00de550c51b2af173e49b93a +Subproject commit f2c87424ad62a875c50bedba6153eaf28000ee18