From 56ad892491ec865c4d05801d9a5ce164e8590d95 Mon Sep 17 00:00:00 2001 From: baiqi Date: Fri, 29 Mar 2024 18:00:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E5=9C=BA=E6=99=AF):=20?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E6=93=8D=E4=BD=9C&api=E3=80=81case=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=84=E7=90=86&=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 2 +- frontend/src/App.vue | 4 +- frontend/src/api/modules/api-test/scenario.ts | 9 +- .../business/ms-add-attachment/index.vue | 58 +++++---- .../ms-common-script/scriptDefined.vue | 53 +++------ .../src/components/pure/ms-drawer/index.vue | 1 + .../components/pure/ms-tags-input/index.vue | 3 +- frontend/src/hooks/useOpenNewPage.ts | 13 +- frontend/src/models/apiTest/scenario.ts | 33 ++++-- frontend/src/router/guard/userLoginInfo.ts | 1 - frontend/src/store/modules/setting/license.ts | 3 - frontend/src/store/modules/user/index.ts | 13 +- .../api-test/components/condition/content.vue | 2 +- .../api-test/components/executeButton.vue | 1 + .../components/fastExtraction/index.vue | 3 + .../views/api-test/components/paramTable.vue | 23 ++-- .../components/management/api/index.vue | 7 +- .../components/management/index.vue | 6 +- .../views/api-test/management/locale/en-US.ts | 11 +- .../views/api-test/management/locale/zh-CN.ts | 10 +- .../components/common/customApiDrawer.vue | 22 ++-- .../components/common/customCaseDrawer.vue | 26 ++-- .../common/importApiDrawer/index.vue | 55 +++++++-- .../common/scriptOperationDrawer.vue | 66 +++++++---- .../api-test/scenario/components/config.ts | 5 +- .../step/createAction/useCreateActions.ts | 7 +- .../step/stepNodeComposition/quoteContent.vue | 77 +++++++----- .../scenario/components/step/stepTree.vue | 111 +++++++++++++----- .../src/views/api-test/scenario/index.vue | 5 + .../template/components/addTemplate.vue | 4 +- 30 files changed, 390 insertions(+), 244 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index b118bedf63..39b9284aeb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -49,7 +49,7 @@ "@tiptap/vue-3": "^2.1.13", "@types/color": "^3.0.4", "@types/node": "^20.11.16", - "@vueuse/core": "^10.7.2", + "@vueuse/core": "^10.9.0", "@xmldom/xmldom": "^0.8.10", "ace-builds": "^1.24.2", "ahooks-vue": "^0.15.1", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index c74e5dcbc1..e99f054c10 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -53,7 +53,7 @@ onBeforeMount(async () => { try { - await appStore.initSystemVersion(); // 初始化系统版本 + appStore.initSystemVersion(); // 初始化系统版本 // 企业版才校验license if (appStore.packageType === 'enterprise') { licenseStore.getValidateLicense(); @@ -115,7 +115,7 @@ setLocalStorage('salt', publicKey); }; - onMounted(async () => { + onBeforeMount(async () => { await getPublicKey(); if (WHITE_LIST.find((el) => el.path === window.location.hash.split('#')[1]) === undefined) { await checkIsLogin(); diff --git a/frontend/src/api/modules/api-test/scenario.ts b/frontend/src/api/modules/api-test/scenario.ts index 753fbccbed..fe0e44d78d 100644 --- a/frontend/src/api/modules/api-test/scenario.ts +++ b/frontend/src/api/modules/api-test/scenario.ts @@ -35,6 +35,7 @@ import { UpdateScenarioUrl, } from '@/api/requrls/api-test/scenario'; +import { ExecuteConditionProcessor } from '@/models/apiTest/common'; import { ApiScenarioBatchDeleteParams, ApiScenarioBatchEditParams, @@ -55,6 +56,9 @@ import { } from '@/models/apiTest/scenario'; import { AddModuleParams, CommonList, ModuleTreeNode, MoveModules, TransferFileParams } from '@/models/common'; +import type { RequestParam as CaseRequestParam } from '@/views/api-test/components/requestComposition/index.vue'; +import type { RequestParam } from '@/views/api-test/scenario/components/common/customApiDrawer.vue'; + // 更新模块 export function updateModule(data: ApiScenarioModuleUpdateParams) { return MSR.post({ url: UpdateModuleUrl, data }); @@ -207,7 +211,10 @@ export function getScenarioDetail(id: string) { // 获取场景步骤详情 export function getScenarioStep(stepId: string | number) { - return MSR.get({ url: GetScenarioStepUrl, params: stepId }); + return MSR.get>({ + url: GetScenarioStepUrl, + params: stepId, + }); } // 文件转存 diff --git a/frontend/src/components/business/ms-add-attachment/index.vue b/frontend/src/components/business/ms-add-attachment/index.vue index 7f0314eff9..d8c0c0b86b 100644 --- a/frontend/src/components/business/ms-add-attachment/index.vue +++ b/frontend/src/components/business/ms-add-attachment/index.vue @@ -68,31 +68,31 @@ arrow-class="hidden" :popup-offset="0" > - - - - +
+ + + + +