diff --git a/frontend/src/assets/icon-font/iconfont.css b/frontend/src/assets/icon-font/iconfont.css index bc9ed2e575..2517adc7f3 100644 --- a/frontend/src/assets/icon-font/iconfont.css +++ b/frontend/src/assets/icon-font/iconfont.css @@ -1,7 +1,7 @@ @font-face { font-family: iconfont; /* Project id 3462279 */ - src: url('iconfont.woff2?t=1716970683831') format('woff2'), url('iconfont.woff?t=1716970683831') format('woff'), - url('iconfont.ttf?t=1716970683831') format('truetype'), url('iconfont.svg?t=1716970683831#iconfont') format('svg'); + src: url('iconfont.woff2?t=1717669877554') format('woff2'), url('iconfont.woff?t=1717669877554') format('woff'), + url('iconfont.ttf?t=1717669877554') format('truetype'), url('iconfont.svg?t=1717669877554#iconfont') format('svg'); } .iconfont { font-size: 16px; @@ -10,6 +10,18 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +.icon-icon_title-top-align_outlined1::before { + content: '\e7be'; +} +.icon-icon_title-left-align_outlined1::before { + content: '\e7bf'; +} +.icon-icon_protocol::before { + content: '\e7bd'; +} +.icon-icon_info_outlined1::before { + content: '\e7bc'; +} .icon-icon_github::before { content: '\e7b9'; } diff --git a/frontend/src/assets/icon-font/iconfont.js b/frontend/src/assets/icon-font/iconfont.js index 277b0af043..6d888a12ef 100644 --- a/frontend/src/assets/icon-font/iconfont.js +++ b/frontend/src/assets/icon-font/iconfont.js @@ -1,16 +1,16 @@ (window._iconfont_svg_string_3462279 = - ''), + ''), (function (h) { var a = (a = document.getElementsByTagName('script'))[a.length - 1], l = a.getAttribute('data-injectcss'), a = a.getAttribute('data-disable-injectsvg'); if (!a) { var o, - c, i, + c, v, t, - m = function (a, l) { + z = function (a, l) { l.parentNode.insertBefore(a, l); }; if (l && !h.__iconfont__svg__cssinject__) { @@ -34,26 +34,26 @@ (l.style.height = 0), (l.style.overflow = 'hidden'), (l = l), - (a = document.body).firstChild ? m(l, a.firstChild) : a.appendChild(l)); + (a = document.body).firstChild ? z(l, a.firstChild) : a.appendChild(l)); }), document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) ? setTimeout(o, 0) - : ((c = function () { - document.removeEventListener('DOMContentLoaded', c, !1), o(); + : ((i = function () { + document.removeEventListener('DOMContentLoaded', i, !1), o(); }), - document.addEventListener('DOMContentLoaded', c, !1)) + document.addEventListener('DOMContentLoaded', i, !1)) : document.attachEvent && - ((i = o), + ((c = o), (v = h.document), (t = !1), d(), (v.onreadystatechange = function () { - 'complete' == v.readyState && ((v.onreadystatechange = null), z()); + 'complete' == v.readyState && ((v.onreadystatechange = null), m()); })); } - function z() { - t || ((t = !0), i()); + function m() { + t || ((t = !0), c()); } function d() { try { @@ -61,6 +61,6 @@ } catch (a) { return void setTimeout(d, 50); } - z(); + m(); } })(window); diff --git a/frontend/src/assets/icon-font/iconfont.json b/frontend/src/assets/icon-font/iconfont.json index 016389e620..db2cc77518 100644 --- a/frontend/src/assets/icon-font/iconfont.json +++ b/frontend/src/assets/icon-font/iconfont.json @@ -5,6 +5,34 @@ "css_prefix_text": "icon-", "description": "DE、MS项目icon管理", "glyphs": [ + { + "icon_id": "40628129", + "name": "icon_title-top-align_outlined", + "font_class": "icon_title-top-align_outlined1", + "unicode": "e7be", + "unicode_decimal": 59326 + }, + { + "icon_id": "40628128", + "name": "icon_title-left-align_outlined", + "font_class": "icon_title-left-align_outlined1", + "unicode": "e7bf", + "unicode_decimal": 59327 + }, + { + "icon_id": "40547513", + "name": "icon_protocol", + "font_class": "icon_protocol", + "unicode": "e7bd", + "unicode_decimal": 59325 + }, + { + "icon_id": "40530999", + "name": "icon_info_outlined", + "font_class": "icon_info_outlined1", + "unicode": "e7bc", + "unicode_decimal": 59324 + }, { "icon_id": "40529317", "name": "icon_github", diff --git a/frontend/src/assets/icon-font/iconfont.svg b/frontend/src/assets/icon-font/iconfont.svg index c474346167..29efd28cce 100644 --- a/frontend/src/assets/icon-font/iconfont.svg +++ b/frontend/src/assets/icon-font/iconfont.svg @@ -14,6 +14,14 @@ /> + + + + + + + + diff --git a/frontend/src/assets/icon-font/iconfont.ttf b/frontend/src/assets/icon-font/iconfont.ttf index c3e1d280a7..48dc0a44b2 100644 Binary files a/frontend/src/assets/icon-font/iconfont.ttf and b/frontend/src/assets/icon-font/iconfont.ttf differ diff --git a/frontend/src/assets/icon-font/iconfont.woff b/frontend/src/assets/icon-font/iconfont.woff index addd3fcd6d..10eb6c030c 100644 Binary files a/frontend/src/assets/icon-font/iconfont.woff and b/frontend/src/assets/icon-font/iconfont.woff differ diff --git a/frontend/src/assets/icon-font/iconfont.woff2 b/frontend/src/assets/icon-font/iconfont.woff2 index f01e712853..e67007870a 100644 Binary files a/frontend/src/assets/icon-font/iconfont.woff2 and b/frontend/src/assets/icon-font/iconfont.woff2 differ diff --git a/frontend/src/components/business/ms-folder-all/index.vue b/frontend/src/components/business/ms-folder-all/index.vue index 2d8a87e11a..88c777ff1a 100644 --- a/frontend/src/components/business/ms-folder-all/index.vue +++ b/frontend/src/components/business/ms-folder-all/index.vue @@ -27,7 +27,7 @@ import { addCommasToNumber } from '@/utils'; const props = defineProps<{ - activeFolder: string; // 选中的节点 + activeFolder?: string; // 选中的节点 folderName: string; // 名称 allCount: number; // 总数 }>(); diff --git a/frontend/src/models/apiTest/management.ts b/frontend/src/models/apiTest/management.ts index 70ea274759..3ef5e5f383 100644 --- a/frontend/src/models/apiTest/management.ts +++ b/frontend/src/models/apiTest/management.ts @@ -100,7 +100,8 @@ export interface ApiDefinitionGetModuleParams { filter?: Record; combine?: Record; moduleIds: string[]; - protocol: string; + protocols?: string[]; // TODO 协议 必填 + protocol?: string; // TODO 协议 改完回收站删除这行 projectId: string; versionId?: string; refId?: string; @@ -137,7 +138,7 @@ export interface Environment { export interface ApiDefinitionPageParams extends TableQueryParams { id: string; name: string; - protocol: string; + protocols: string[]; projectId: string; versionId: string; refId: string; @@ -180,7 +181,8 @@ export interface mockParams { } // 批量操作参数 export interface ApiDefinitionBatchParams extends BatchApiParams { - protocol: string; + protocols?: string[]; // TODO 协议 必填 + protocol?: string; // TODO 协议 改完回收站删除这行 } // 批量更新定义参数 export interface ApiDefinitionBatchUpdateParams extends ApiDefinitionBatchParams { @@ -292,7 +294,7 @@ export interface BatchRecoverApiParams extends ApiDefinitionBatchParams { // --------------------用例 // 用例列表查询参数 export interface ApiCasePageParams extends TableQueryParams { - protocol: string; + protocols: string[]; projectId: string; versionId?: string; refId?: string; @@ -332,7 +334,8 @@ export interface ApiCaseDetail extends ExecuteRequestParams { } // 批量操作参数 export interface ApiCaseBatchParams extends BatchApiParams { - protocol: string; + protocols?: string[]; // TODO 协议 必填 + protocol?: string; // TODO 协议 改完回收站删除这行 apiDefinitionId?: string; versionId?: string; } @@ -368,7 +371,7 @@ export interface ApiRunModeRequest { // 接口用例批量执行参数 export interface ApiCaseBatchExecuteParams extends BatchApiParams { apiDefinitionId?: string | number; - protocol: string; + protocols: string[]; versionId?: string; refId?: string; runModeConfig: ApiRunModeRequest; diff --git a/frontend/src/models/apiTest/mock.ts b/frontend/src/models/apiTest/mock.ts index 1b551b2fef..761e9d2472 100644 --- a/frontend/src/models/apiTest/mock.ts +++ b/frontend/src/models/apiTest/mock.ts @@ -91,4 +91,5 @@ export interface BatchEditMockParams extends BatchApiParams { tags: string[]; // 标签 append: boolean; // 是否追加 enable: boolean; // 是否启用 + protocols: string[]; // 协议集合 } diff --git a/frontend/src/models/common.ts b/frontend/src/models/common.ts index 2f337c000c..16b887468d 100644 --- a/frontend/src/models/common.ts +++ b/frontend/src/models/common.ts @@ -50,6 +50,7 @@ export interface BatchApiParams { moduleIds?: (string | number)[]; // 模块 ID 集合 versionId?: string; // 版本 ID refId?: string; // 版本来源 + protocols?: string[]; // 协议集合 } // 移动模块树 diff --git a/frontend/src/views/api-test/components/apiMethodName.vue b/frontend/src/views/api-test/components/apiMethodName.vue index ef07f8d492..7a809e653f 100644 --- a/frontend/src/views/api-test/components/apiMethodName.vue +++ b/frontend/src/views/api-test/components/apiMethodName.vue @@ -37,8 +37,8 @@ const colorMaps = [ { - color: 'rgb(var(--success-6))', - includes: [RequestMethods.GET, RequestMethods.HEAD], + color: 'rgb(var(--success-7))', + includes: [RequestMethods.GET, RequestMethods.HEAD, 'HTTP'], }, { color: 'rgb(var(--warning-7))', diff --git a/frontend/src/views/api-test/components/treeFolderAll.vue b/frontend/src/views/api-test/components/treeFolderAll.vue new file mode 100644 index 0000000000..671785ead1 --- /dev/null +++ b/frontend/src/views/api-test/components/treeFolderAll.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/frontend/src/views/api-test/management/components/addDependencyDrawer.vue b/frontend/src/views/api-test/management/components/addDependencyDrawer.vue index d340a14305..140fd94e78 100644 --- a/frontend/src/views/api-test/management/components/addDependencyDrawer.vue +++ b/frontend/src/views/api-test/management/components/addDependencyDrawer.vue @@ -18,7 +18,7 @@ :active-module="activeModule" :offspring-ids="offspringIds" class="flex-1 overflow-hidden !pl-0 !pr-[16px]" - :protocol="protocol" + :selected-protocols="selectedProtocols" :member-options="memberOptions" read-only /> @@ -50,15 +50,15 @@ const folderTree = ref([]); const activeModule = ref('all'); const offspringIds = ref([]); - const protocol = ref('HTTP'); + const selectedProtocols = ref([]); function handleNodeSelect(keys: string[], _offspringIds: string[]) { [activeModule.value] = keys; offspringIds.value = _offspringIds; } - function handleProtocolChange(val: string) { - protocol.value = val; + function handleProtocolChange(val: string[]) { + selectedProtocols.value = val; } diff --git a/frontend/src/views/api-test/management/components/management/api/apiTable.vue b/frontend/src/views/api-test/management/components/management/api/apiTable.vue index 457e0ad2b7..6fafbd8e81 100644 --- a/frontend/src/views/api-test/management/components/management/api/apiTable.vue +++ b/frontend/src/views/api-test/management/components/management/api/apiTable.vue @@ -31,7 +31,7 @@ @drag-change="handleTableDragSort" @module-change="loadApiList(false)" > - @@ -44,14 +44,14 @@ const folderTree = ref([]); const folderTreePathMap = ref>({}); const offspringIds = ref([]); - const protocol = ref('HTTP'); + const selectedProtocols = ref([]); const activeApi = ref(); const moduleTreeRef = ref>(); const managementRef = ref>(); - function handleModuleInit(tree: ModuleTreeNode[], _protocol: string, pathMap: Record) { + function handleModuleInit(tree: ModuleTreeNode[], _protocol: string[], pathMap: Record) { folderTree.value = tree; - protocol.value = _protocol; + selectedProtocols.value = _protocol; folderTreePathMap.value = pathMap; } @@ -60,8 +60,8 @@ offspringIds.value = _offspringIds; } - function handleProtocolChange(val: string) { - protocol.value = val; + function handleProtocolChange(val: string[]) { + selectedProtocols.value = val; } function refreshModuleTree() { diff --git a/frontend/src/views/test-plan/testPlan/detail/apiCase/components/caseTree.vue b/frontend/src/views/test-plan/testPlan/detail/apiCase/components/caseTree.vue index 642cdce8b5..2d3624ef91 100644 --- a/frontend/src/views/test-plan/testPlan/detail/apiCase/components/caseTree.vue +++ b/frontend/src/views/test-plan/testPlan/detail/apiCase/components/caseTree.vue @@ -7,11 +7,13 @@ class="mb-[8px]" :max-length="255" /> - @@ -50,9 +52,9 @@ import { useRoute } from 'vue-router'; import { useVModel } from '@vueuse/core'; - import MsFolderAll from '@/components/business/ms-folder-all/index.vue'; import MsTree from '@/components/business/ms-tree/index.vue'; import type { MsTreeNodeData } from '@/components/business/ms-tree/types'; + import TreeFolderAll from '@/views/api-test/components/treeFolderAll.vue'; import { getFeatureCaseModule } from '@/api/modules/test-plan/testPlan'; import { useI18n } from '@/hooks/useI18n'; @@ -94,6 +96,7 @@ const folderTree = ref([]); const loading = ref(false); const selectedKeys = useVModel(props, 'selectedKeys', emit); + const selectedProtocols = ref([]); // 初始化模块树 async function initModules() {