From 09466ec80cad424903d638b3f7aac2ce7cf9b8df Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 7 Dec 2020 17:25:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dv-xpack=E6=8C=87?= =?UTF-8?q?=E4=BB=A4=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/business/permission.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/business/permission.js b/frontend/src/business/permission.js index 8229c0e2f9..c8d98f5bb6 100644 --- a/frontend/src/business/permission.js +++ b/frontend/src/business/permission.js @@ -28,7 +28,7 @@ export const xpack = { function checkLicense(el, binding, type) { let v = hasLicense() - if (v) { + if (!v) { el.parentNode && el.parentNode.removeChild(el) } } From 48c82d2852e8e981b61dbbf47de7dbe37083ab75 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 7 Dec 2020 17:28:04 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):?= =?UTF-8?q?=20=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E8=87=B3=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ProjectController.java | 6 + .../components/api/head/ApiHeaderMenus.vue | 24 ++-- .../common/components/MsTableHeader.vue | 2 +- .../components/common/head/ProjectMenu.vue | 28 +++++ .../components/common/head/SearchList.vue | 107 ++++++++++++++++++ .../components/common/head/ShowAll.vue | 10 +- .../head/PerformanceHeaderMenus.vue | 22 ++-- .../business/components/project/MsProject.vue | 32 +++--- .../components/settings/SettingMenu.vue | 9 ++ .../components/settings/project/Project.vue | 26 +++++ .../business/components/settings/router.js | 5 + .../track/head/TrackHeaderMenus.vue | 20 ++-- 12 files changed, 238 insertions(+), 53 deletions(-) create mode 100644 frontend/src/business/components/common/head/ProjectMenu.vue create mode 100644 frontend/src/business/components/common/head/SearchList.vue create mode 100644 frontend/src/business/components/settings/project/Project.vue diff --git a/backend/src/main/java/io/metersphere/controller/ProjectController.java b/backend/src/main/java/io/metersphere/controller/ProjectController.java index 9b3940b79e..3750e8fd41 100644 --- a/backend/src/main/java/io/metersphere/controller/ProjectController.java +++ b/backend/src/main/java/io/metersphere/controller/ProjectController.java @@ -83,4 +83,10 @@ public class ProjectController { public void updateProject(@RequestBody Project Project) { projectService.updateProject(Project); } + + @PostMapping("/search") + public List searchProject(@RequestBody ProjectRequest projectRequest) { + projectRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); + return projectService.getProjectList(projectRequest); + } } diff --git a/frontend/src/business/components/api/head/ApiHeaderMenus.vue b/frontend/src/business/components/api/head/ApiHeaderMenus.vue index 6450671fe2..35252b17c9 100644 --- a/frontend/src/business/components/api/head/ApiHeaderMenus.vue +++ b/frontend/src/business/components/api/head/ApiHeaderMenus.vue @@ -3,6 +3,18 @@ + + + + + + + + 创建项目 + + + + {{ $t("i18n.home") }} @@ -15,15 +27,6 @@ {{ $t("i18n.automation") }} - - - - - - - - @@ -65,10 +68,11 @@ import MsShowAll from "../../common/head/ShowAll"; import MsCreateButton from "../../common/head/CreateButton"; import MsCreateTest from "../../common/head/CreateTest"; import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent"; +import SearchList from "@/business/components/common/head/SearchList"; export default { name: "MsApiHeaderMenus", - components: {MsCreateTest, MsCreateButton, MsShowAll, MsRecentList}, + components: {SearchList, MsCreateTest, MsCreateButton, MsShowAll, MsRecentList}, data() { return { projectRecent: { diff --git a/frontend/src/business/components/common/components/MsTableHeader.vue b/frontend/src/business/components/common/components/MsTableHeader.vue index e48db2f2b0..65e824c8ca 100644 --- a/frontend/src/business/components/common/components/MsTableHeader.vue +++ b/frontend/src/business/components/common/components/MsTableHeader.vue @@ -1,7 +1,7 @@