-
-
-
-
-
-
-
-
-
- {{ $t('api_test.definition.request.title') }}
- {{ $t('api_test.definition.request.fast_debug') }}
- {{ $t('api_test.api_import.label') }}
-
-
-
- {{ $t('report.export') }}
-
-
-
- {{ $t('report.export_to_ms_format') }}
-
- {{ $t('report.export_to_swagger3_format') }}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -60,14 +37,54 @@ import ApiImport from "../import/ApiImport";
import ModuleTrashButton from "./ModuleTrashButton";
import {buildNodePath} from "@/business/components/api/definition/model/NodeTree";
import TemplateComponent from "../../../../track/plan/view/comonents/report/TemplateComponent/TemplateComponent";
+import MsSearchBar from "@/business/components/common/components/search/MsSearchBar";
export default {
name: "ApiModuleHeader",
- components: {TemplateComponent, ModuleTrashButton, ApiImport, MsAddBasisApi},
+ components: {MsSearchBar, TemplateComponent, ModuleTrashButton, ApiImport, MsAddBasisApi},
data() {
return {
options: OPTIONS,
- moduleOptions: {}
+ moduleOptions: {},
+ operators: [
+ {
+ label: this.$t('api_test.definition.request.title'),
+ callback: this.addApi
+ },
+ {
+ label: this.$t('api_test.definition.request.fast_debug'),
+ callback: () => {this.$emit('debug')}
+ },
+ {
+ label: this.$t('api_test.api_import.label'),
+ callback: this.handleImport
+ },
+ {
+ label: this.$t('report.export'),
+ children: [
+ {
+ label: this.$t('report.export_to_ms_format') ,
+ callback: () => {
+ if (!this.projectId) {
+ this.$warning(this.$t('commons.check_project_tip'));
+ return;
+ }
+ this.$emit('exportAPI', 'MS');
+ }
+ },
+ {
+ label: this.$t('report.export_to_swagger3_format'),
+ callback: () => {
+ if (!this.projectId) {
+ this.$warning(this.$t('commons.check_project_tip'));
+ return;
+ }
+ this.$emit('exportAPI', 'Swagger');
+ }
+ }
+ ]
+ }
+ ]
}
},
props: {
@@ -96,50 +113,23 @@ export default {
},
},
methods: {
-
- handleCommand(e) {
- switch (e) {
- case "debug":
- this.$emit('debug');
- break;
- case "add-api":
- this.addApi();
- break;
- case "add-module":
- break;
- case "import":
- if (!this.projectId) {
- this.$warning(this.$t('commons.check_project_tip'));
- return;
- }
- this.protocol = "HTTP";
- this.result = this.$get("/api/module/list/" + this.projectId + "/" + this.condition.protocol, response => {
- if (response.data != undefined && response.data != null) {
- this.data = response.data;
- let moduleOptions = [];
- this.data.forEach(node => {
- buildNodePath(node, {path: ''}, moduleOptions);
- });
- this.moduleOptions = moduleOptions
- }
- this.$refs.apiImport.open(this.moduleOptions);
- });
- break;
- }
- },
- chooseExportType(e) {
+ handleImport() {
if (!this.projectId) {
this.$warning(this.$t('commons.check_project_tip'));
return;
}
- switch (e) {
- case "export-MS":
- this.$emit('exportAPI', 'MS');
- break;
- case "export-Swagger":
- this.$emit('exportAPI', 'Swagger');
- break;
- }
+ this.protocol = "HTTP";
+ this.result = this.$get("/api/module/list/" + this.projectId + "/" + this.condition.protocol, response => {
+ if (response.data != undefined && response.data != null) {
+ this.data = response.data;
+ let moduleOptions = [];
+ this.data.forEach(node => {
+ buildNodePath(node, {path: ''}, moduleOptions);
+ });
+ this.moduleOptions = moduleOptions
+ }
+ this.$refs.apiImport.open(this.moduleOptions);
+ });
},
addApi() {
if (!this.projectId) {
@@ -168,6 +158,10 @@ export default {
height: 30px;
}
+.protocol-col {
+ min-width: 93px;
+}
+
.read-only {
width: 150px !important;
}
@@ -176,5 +170,4 @@ export default {
width: 174px;
padding-left: 3px;
}
-
diff --git a/frontend/src/business/components/common/components/MsModuleMinder.vue b/frontend/src/business/components/common/components/MsModuleMinder.vue
index e13ea1f363..f0b4d03f19 100644
--- a/frontend/src/business/components/common/components/MsModuleMinder.vue
+++ b/frontend/src/business/components/common/components/MsModuleMinder.vue
@@ -155,7 +155,7 @@ export default {
width: 100%;
background: white;
height: 100vh;
- z-index: 999999;
+ z-index: 2;
}
.full-screen >>> .minder-container {
diff --git a/frontend/src/business/components/common/components/search/MsSearchBar.vue b/frontend/src/business/components/common/components/search/MsSearchBar.vue
new file mode 100644
index 0000000000..43188da64f
--- /dev/null
+++ b/frontend/src/business/components/common/components/search/MsSearchBar.vue
@@ -0,0 +1,78 @@
+
+
+
+
+
+ {{ $t('commons.more_operator') }}
+
+
+
+
+
+ {{ item.label }}
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ {{child.label}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/track/common/TestCaseNodeTree.vue b/frontend/src/business/components/track/common/TestCaseNodeTree.vue
index 44907cc490..64c1186200 100644
--- a/frontend/src/business/components/track/common/TestCaseNodeTree.vue
+++ b/frontend/src/business/components/track/common/TestCaseNodeTree.vue
@@ -14,22 +14,9 @@
@refresh="list"
ref="nodeTree">
-
-
-
-
-
- {{ $t('test_track.case.create') }}
- {{ $t('api_test.api_import.label') }}
- {{ $t('api_test.export_config') }}
-
-
-
-
-
+
@@ -49,10 +36,11 @@ import NodeEdit from "./NodeEdit";
import MsNodeTree from "./NodeTree";
import TestCaseCreate from "@/business/components/track/case/components/TestCaseCreate";
import TestCaseImport from "@/business/components/track/case/components/TestCaseImport";
+import MsSearchBar from "@/business/components/common/components/search/MsSearchBar";
export default {
name: "TestCaseNodeTree",
- components: {TestCaseImport, TestCaseCreate, MsNodeTree, NodeEdit},
+ components: {MsSearchBar, TestCaseImport, TestCaseCreate, MsNodeTree, NodeEdit},
data() {
return {
defaultProps: {
@@ -65,6 +53,20 @@ export default {
filterText: "",
trashEnable: false
},
+ operators: [
+ {
+ label: this.$t('test_track.case.create'),
+ callback: this.addTestCase
+ },
+ {
+ label: this.$t('api_test.api_import.label'),
+ callback: this.handleImport
+ },
+ {
+ label: this.$t('api_test.export_config'),
+ callback: () => {this.$emit('exportTestCase')}
+ }
+ ]
};
},
props: {
@@ -109,24 +111,6 @@ export default {
refreshAll() {
this.$emit('refreshAll');
},
- handleCommand(e) {
- switch (e) {
- case "add-testcase":
- this.addTestCase();
- break;
- case "import":
- if (!this.projectId) {
- this.$warning(this.$t('commons.check_project_tip'));
- return;
- }
- this.$refs.testCaseImport.open();
- break;
- case "export":
- this.$emit('exportTestCase')
- break;
-
- }
- },
list() {
if (this.projectId) {
this.result = this.$get("/case/node/list/" + this.projectId, response => {
@@ -156,6 +140,13 @@ export default {
this.list();
});
},
+ handleImport() {
+ if (!this.projectId) {
+ this.$warning(this.$t('commons.check_project_tip'));
+ return;
+ }
+ this.$refs.testCaseImport.open();
+ },
remove(nodeIds) {
this.$post("/case/node/delete", nodeIds, () => {
this.list();
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js
index 5a07ed91a0..f18927ae8c 100644
--- a/frontend/src/i18n/en-US.js
+++ b/frontend/src/i18n/en-US.js
@@ -145,6 +145,7 @@ export default {
auth_redirect_tip: 'Jump to the authentication source page for authentication',
tag_tip: "Enter Enter to Add Label",
node_name_tip: "The name cannot contain'\\'",
+ more_operator: "More operator",
table: {
select_tip: "Item {0} data is selected"
},
diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js
index 9cd32e01de..7fc3c87f60 100644
--- a/frontend/src/i18n/zh-CN.js
+++ b/frontend/src/i18n/zh-CN.js
@@ -146,6 +146,7 @@ export default {
auth_redirect_tip: '即将跳转到认证源页面进行认证',
tag_tip: "输入回车添加标签",
node_name_tip: "名称不能包含'\\'",
+ more_operator: "更多操作",
table: {
select_tip: "已选中 {0} 条数据"
},
diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js
index 2bbcc4c701..fa27161d11 100644
--- a/frontend/src/i18n/zh-TW.js
+++ b/frontend/src/i18n/zh-TW.js
@@ -146,6 +146,7 @@ export default {
auth_redirect_tip: '即將跳轉到認證源頁面進行認證',
tag_tip: "輸入回車添加標簽",
node_name_tip: "名稱不能包含'\\'",
+ more_operator: "更多操作",
table: {
select_tip: "已选中 {0} 条数据"
},