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}; });