From dd97da9e434d4043dcea0dde69615a8b0fd07631 Mon Sep 17 00:00:00 2001 From: baiqi Date: Thu, 16 May 2024 14:14:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=20csv=E5=8F=82=E6=95=B0=E8=A1=A8=E6=A0=BC&mock=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/ms-add-attachment/index.vue | 2 +- .../business/ms-link-file/linkFileTable.vue | 2 +- .../src/components/business/ms-menu/index.vue | 7 +- .../business/ms-minders/featureCaseMinder.vue | 24 +- .../pure/ms-minder-editor/minderEditor.vue | 114 ++++++---- .../components/pure/ms-minder-editor/props.ts | 1 + frontend/src/components/pure/ms-tab/index.vue | 50 ++++- .../components/pure/ms-table/base-table.vue | 4 +- frontend/src/models/apiTest/scenario.ts | 4 +- .../src/views/api-test/components/config.ts | 6 +- .../views/api-test/components/paramTable.vue | 78 ++++++- .../components/requestComposition/header.vue | 2 +- .../api-test/debug/components/moduleTree.vue | 2 +- .../components/management/api/index.vue | 16 +- .../components/management/case/caseDetail.vue | 6 +- .../management/mock/mockDetailDrawer.vue | 208 +++++++++--------- .../management/mock/mockResponse.vue | 15 +- .../management/components/moduleTree.vue | 10 +- .../api-test/scenario/components/params.vue | 102 ++++++--- .../components/scenarioModuleTree.vue | 2 +- .../components/caseTable.vue | 4 +- .../src/views/login/components/login-form.vue | 8 +- 22 files changed, 457 insertions(+), 210 deletions(-) diff --git a/frontend/src/components/business/ms-add-attachment/index.vue b/frontend/src/components/business/ms-add-attachment/index.vue index 8d4f4a3eac..b926a1bde1 100644 --- a/frontend/src/components/business/ms-add-attachment/index.vue +++ b/frontend/src/components/business/ms-add-attachment/index.vue @@ -93,7 +93,7 @@ class="m-0 border-none p-0" :self-style="{ backgroundColor: 'transparent !important' }" :closable="data.value !== '__arco__more' && !props.disabled" - @close="handleClose(data)" + @close="() => handleClose(data)" > {{ data.value === '__arco__more' ? data.label.replace('...', '') : data.label }} diff --git a/frontend/src/components/business/ms-link-file/linkFileTable.vue b/frontend/src/components/business/ms-link-file/linkFileTable.vue index 880e20cbdb..ba340d2302 100644 --- a/frontend/src/components/business/ms-link-file/linkFileTable.vue +++ b/frontend/src/components/business/ms-link-file/linkFileTable.vue @@ -121,7 +121,7 @@ { title: 'project.fileManagement.type', dataIndex: 'fileType', - width: 90, + width: 100, }, { title: 'project.fileManagement.size', diff --git a/frontend/src/components/business/ms-menu/index.vue b/frontend/src/components/business/ms-menu/index.vue index e1b96681ca..a52e57d75f 100644 --- a/frontend/src/components/business/ms-menu/index.vue +++ b/frontend/src/components/business/ms-menu/index.vue @@ -148,8 +148,11 @@ personalMenusVisible.value = false; orgKeyword.value = ''; await userStore.isLogin(true); - if (!appStore.currentProjectId || appStore.currentProjectId === 'no_such_project') { - // 没有项目权限(组织没有项目, 或项目全被禁用) + if ( + (!appStore.currentProjectId || appStore.currentProjectId === 'no_such_project') && + !(route.name as string).startsWith(SettingRouteEnum.SETTING) + ) { + // 没有项目权限(组织没有项目, 或项目全被禁用)且访问的页面非系统菜单模块,则重定向到无项目权限页面 router.push({ name: NO_PROJECT_ROUTE_NAME, }); diff --git a/frontend/src/components/business/ms-minders/featureCaseMinder.vue b/frontend/src/components/business/ms-minders/featureCaseMinder.vue index 1553de372b..b61c828196 100644 --- a/frontend/src/components/business/ms-minders/featureCaseMinder.vue +++ b/frontend/src/components/business/ms-minders/featureCaseMinder.vue @@ -1,17 +1,18 @@ diff --git a/frontend/src/views/api-test/management/components/management/mock/mockResponse.vue b/frontend/src/views/api-test/management/components/management/mock/mockResponse.vue index 0e4203c4cd..cf6ea03ff9 100644 --- a/frontend/src/views/api-test/management/components/management/mock/mockResponse.vue +++ b/frontend/src/views/api-test/management/components/management/mock/mockResponse.vue @@ -163,7 +163,7 @@ diff --git a/frontend/src/views/api-test/management/components/moduleTree.vue b/frontend/src/views/api-test/management/components/moduleTree.vue index 9ba1d81895..6611a289c7 100644 --- a/frontend/src/views/api-test/management/components/moduleTree.vue +++ b/frontend/src/views/api-test/management/components/moduleTree.vue @@ -299,7 +299,7 @@ }; }); - const moduleKeyword = ref(''); + const moduleKeyword = ref(''); // 只用于前端过滤树节点,不传入后台查询!!! const folderTree = ref([]); const focusNodeKey = ref(''); const selectedKeys = ref>([props.activeModule]); @@ -371,7 +371,7 @@ const isExpandApi = ref(false); const lastModuleCountParam = ref({ projectId: appStore.currentProjectId, - keyword: moduleKeyword.value, + keyword: '', protocol: moduleProtocol.value, moduleIds: [], }); @@ -427,7 +427,7 @@ if (props.trash) { res = await getTrashModuleTree({ // 回收站下的模块 - keyword: moduleKeyword.value, + keyword: '', protocol: moduleProtocol.value, projectId: appStore.currentProjectId, moduleIds: [], @@ -435,7 +435,7 @@ } else if (isExpandApi.value && !props.readOnly) { // 查看模块及模块下的请求 res = await getModuleTree({ - keyword: moduleKeyword.value, + keyword: '', protocol: moduleProtocol.value, projectId: appStore.currentProjectId, moduleIds: [], @@ -443,7 +443,7 @@ } else { res = await getModuleTreeOnlyModules({ // 只查看模块 - keyword: moduleKeyword.value, + keyword: '', protocol: moduleProtocol.value, projectId: appStore.currentProjectId, moduleIds: [], diff --git a/frontend/src/views/api-test/scenario/components/params.vue b/frontend/src/views/api-test/scenario/components/params.vue index adb93e90aa..55c3cf2313 100644 --- a/frontend/src/views/api-test/scenario/components/params.vue +++ b/frontend/src/views/api-test/scenario/components/params.vue @@ -27,8 +27,8 @@ :default-param-item="defaultNormalParamItem" :draggable="false" :selectable="false" - @change="handleParamTableChange" - @batch-add="batchAddKeyValVisible = true" + @change="handleCommonVariablesChange" + @batch-add="() => (batchAddKeyValVisible = true)" />