From 069c747ab8823420626a10a18432f30f930311c0 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 14 Sep 2021 18:27:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20groovy=E8=AF=B7=E6=B1=82=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E6=A8=A1=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/module/ApiModule.vue | 7 + .../components/module/ApiModuleHeader.vue | 7 +- .../project/function/ApiFuncRelevance.vue | 201 ++++++++++++++++++ .../project/function/EditFunction.vue | 93 +++++++- .../project/function/custom-function.js | 48 ++++- .../business/components/task/TaskCenter.vue | 2 +- 6 files changed, 343 insertions(+), 15 deletions(-) create mode 100644 frontend/src/business/components/settings/project/function/ApiFuncRelevance.vue diff --git a/frontend/src/business/components/api/definition/components/module/ApiModule.vue b/frontend/src/business/components/api/definition/components/module/ApiModule.vue index d2bbb4d9e8..afe4efc286 100644 --- a/frontend/src/business/components/api/definition/components/module/ApiModule.vue +++ b/frontend/src/business/components/api/definition/components/module/ApiModule.vue @@ -29,6 +29,7 @@ :current-module="currentModule" :is-read-only="isReadOnly" :moduleOptions="data" + :options="options" @exportAPI="exportAPI" @saveAsEdit="saveAsEdit" @refreshTable="$emit('refreshTable')" @@ -87,6 +88,12 @@ relevanceProjectId: String, reviewId: String, pageSource:String, + options: { + type: Array, + default() { + return OPTIONS; + } + } }, computed: { isPlanModel() { diff --git a/frontend/src/business/components/api/definition/components/module/ApiModuleHeader.vue b/frontend/src/business/components/api/definition/components/module/ApiModuleHeader.vue index 20e6048e9c..cc6ba34ae5 100644 --- a/frontend/src/business/components/api/definition/components/module/ApiModuleHeader.vue +++ b/frontend/src/business/components/api/definition/components/module/ApiModuleHeader.vue @@ -46,7 +46,6 @@ export default { components: {MsSearchBar, TemplateComponent, ModuleTrashButton, ApiImport, MsAddBasisApi}, data() { return { - options: OPTIONS, operators: [ { label: this.$t('api_test.definition.request.title'), @@ -123,6 +122,12 @@ export default { return false; } }, + options: { + type: Array, + default() { + return OPTIONS; + } + } }, computed: { projectId() { diff --git a/frontend/src/business/components/settings/project/function/ApiFuncRelevance.vue b/frontend/src/business/components/settings/project/function/ApiFuncRelevance.vue new file mode 100644 index 0000000000..7da93181e2 --- /dev/null +++ b/frontend/src/business/components/settings/project/function/ApiFuncRelevance.vue @@ -0,0 +1,201 @@ + + + + + diff --git a/frontend/src/business/components/settings/project/function/EditFunction.vue b/frontend/src/business/components/settings/project/function/EditFunction.vue index a9ea8ba6ed..67cce432b4 100644 --- a/frontend/src/business/components/settings/project/function/EditFunction.vue +++ b/frontend/src/business/components/settings/project/function/EditFunction.vue @@ -2,7 +2,8 @@
- + @@ -45,7 +46,8 @@
- +
@@ -55,7 +57,9 @@
- 测试 + 测试 +
{{ $t('api_test.request.processor.code_template') }}
@@ -76,6 +80,8 @@ + +