From 2e529d07f458b8c3d14184865c9c283a84a4435d Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Thu, 14 Dec 2023 14:05:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E4=BA=BA=E4=B8=8B=E6=8B=89=E6=A1=86=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1033540 --user=王旭 [系统设置]github#27900项目管理列表中创建人筛选条件数据不对 https://www.tapd.cn/55049933/s/1443790 --- .../components/search/search-components.js | 24 +++++++++++++++++++ .../business/workspace/project/MsProject.vue | 8 +++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/search/search-components.js b/framework/sdk-parent/frontend/src/components/search/search-components.js index 560cba3b57..e0adfa6bf5 100644 --- a/framework/sdk-parent/frontend/src/components/search/search-components.js +++ b/framework/sdk-parent/frontend/src/components/search/search-components.js @@ -380,6 +380,28 @@ export const CREATOR = { } } +export const WS_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_USER_OPTIONS, + props: { + multiple: true + }, + isShow: operator => { + return operator !== OPERATORS.CURRENT_USER.value; + } +} + + // 创建人(仅当前项目) export const PROJECT_CREATOR = { key: "creator", @@ -952,6 +974,8 @@ export const TEST_CONFIGS = [ID, NAME, UPDATE_TIME, CREATE_TIME, STATUS, CREATOR export const PROJECT_CONFIGS = [NAME, UPDATE_TIME, CREATE_TIME, CREATOR]; +export const PROJECT_MANAGE_CONFIGS = [NAME, UPDATE_TIME, CREATE_TIME, WS_CREATOR]; + export const REPORT_SCENARIO_CONFIGS = [NAME, TEST_NAME, CREATE_TIME, STATUS, CREATOR, TRIGGER_MODE]; export const REPORT_CONFIGS = [NAME, TEST_NAME, CREATE_TIME, PERFORMANCE_REPORT_STATUS, CREATOR, TRIGGER_MODE]; diff --git a/system-setting/frontend/src/business/workspace/project/MsProject.vue b/system-setting/frontend/src/business/workspace/project/MsProject.vue index 48fc523e27..e3e382ec66 100644 --- a/system-setting/frontend/src/business/workspace/project/MsProject.vue +++ b/system-setting/frontend/src/business/workspace/project/MsProject.vue @@ -196,7 +196,7 @@ import MsTableOperatorButton from "metersphere-frontend/src/components/MsTableOp import {GROUP_PROJECT, PROJECT_ID} from "metersphere-frontend/src/utils/constants"; import MsTableButton from "metersphere-frontend/src/components/MsTableButton"; import {_filter, _sort} from "metersphere-frontend/src/utils/tableUtils"; -import {PROJECT_CONFIGS} from "metersphere-frontend/src/components/search/search-components"; +import {PROJECT_MANAGE_CONFIGS} from "metersphere-frontend/src/components/search/search-components"; import MsRolesTag from "metersphere-frontend/src/components/MsRolesTag"; import MsInstructionsIcon from "metersphere-frontend/src/components/MsInstructionsIcon"; import AddMember from "../../common/AddMember"; @@ -204,7 +204,7 @@ import {isSuperUser} from "metersphere-frontend/src/api/user.js"; import { addProjectMember, delProjectMember, - getCurrentProjectUserList, + getWorkspaceMemberSpecial, getProjectMemberPages, updateCurrentUser } from "../../../api/user"; @@ -244,7 +244,7 @@ export default { memberTableLoading: false, btnTips: this.$t('project.create'), title: this.$t('project.create'), - condition: {components: PROJECT_CONFIGS}, + condition: {components: PROJECT_MANAGE_CONFIGS}, items: [], form: {}, currentPage: 1, @@ -337,7 +337,7 @@ export default { }) }, getMaintainerOptions() { - getCurrentProjectUserList().then(res => { + getWorkspaceMemberSpecial({name: '', workspaceId: getCurrentWorkspaceId()}).then(res => { this.userFilters = res.data.map(u => { return {text: u.name, value: u.id}; });