From 8ae4c91500120e9494d085229a7beeabeceb22be Mon Sep 17 00:00:00 2001 From: baiqi Date: Fri, 7 Jun 2024 18:42:11 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=91=E5=9B=BE):=20=E8=84=91=E5=9B=BE?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E8=8F=9C=E5=8D=95&=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E8=8A=82=E7=82=B9&=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E6=9C=AA=E8=AF=84=E5=AE=A1=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/case-management/featureCase.ts | 6 + .../requrls/case-management/featureCase.ts | 1 + frontend/src/assets/icon-font/iconfont.css | 4 +- frontend/src/assets/style/arco-reset.less | 4 + .../ms-minders/featureCaseMinder/index.vue | 541 ++++++++++++++---- .../business/ms-minders/locale/en-US.ts | 1 + .../business/ms-minders/locale/zh-CN.ts | 1 + .../hooks/useMinderEventListener.ts | 19 +- .../pure/ms-minder-editor/locale/en-US.ts | 5 +- .../pure/ms-minder-editor/locale/zh-CN.ts | 5 +- .../pure/ms-minder-editor/main/header.vue | 127 ++-- .../pure/ms-minder-editor/main/mainEditor.vue | 235 +++----- .../ms-minder-editor/menu/edit/editDel.vue | 7 +- .../ms-minder-editor/menu/edit/tagBox.vue | 2 +- .../ms-minder-editor/menu/nodeFloatMenu.vue | 420 ++++++++++++++ .../pure/ms-minder-editor/minderEditor.vue | 110 ++-- .../components/pure/ms-minder-editor/props.ts | 64 ++- .../ms-minder-editor/script/runtime/hotbox.ts | 7 +- .../ms-minder-editor/script/tool/utils.ts | 17 + frontend/src/config/caseManagement.ts | 1 + frontend/src/enums/minderEnum.ts | 5 +- frontend/src/hooks/useFullScreen.ts | 2 +- .../src/models/caseManagement/caseReview.ts | 1 + .../modules/components/minder-editor/index.ts | 14 +- .../modules/components/minder-editor/types.ts | 10 + frontend/src/utils/index.ts | 35 +- .../scenario/components/scenarioTable.vue | 3 - .../components/caseTable.vue | 6 +- .../tabDependency/preAndPostCaseDrawer.vue | 2 - .../caseReview/components/passRateLine.vue | 9 + 30 files changed, 1205 insertions(+), 459 deletions(-) create mode 100644 frontend/src/components/pure/ms-minder-editor/menu/nodeFloatMenu.vue diff --git a/frontend/src/api/modules/case-management/featureCase.ts b/frontend/src/api/modules/case-management/featureCase.ts index 56992bc400..52db7e0249 100644 --- a/frontend/src/api/modules/case-management/featureCase.ts +++ b/frontend/src/api/modules/case-management/featureCase.ts @@ -42,6 +42,7 @@ import { GetAssociationPublicCasePageUrl, GetAssociationPublicModuleTreeUrl, GetCaseListUrl, + GetCaseMinderTreeUrl, GetCaseMinderUrl, GetCaseModulesCountUrl, GetCaseModuleTreeUrl, @@ -191,6 +192,11 @@ export function getCaseMinder(data: { projectId: string; moduleId: string }) { return MSR.post({ url: `${GetCaseMinderUrl}`, data }); } +// 获取脑图模块树(包含文本节点) +export function getCaseMinderTree(data: { projectId: string; moduleId: string }) { + return MSR.post({ url: `${GetCaseMinderTreeUrl}`, data }); +} + // 回收站 // 回收站用例分页表 diff --git a/frontend/src/api/requrls/case-management/featureCase.ts b/frontend/src/api/requrls/case-management/featureCase.ts index ef3f005f0f..873c4efc6b 100644 --- a/frontend/src/api/requrls/case-management/featureCase.ts +++ b/frontend/src/api/requrls/case-management/featureCase.ts @@ -28,6 +28,7 @@ export const GetSearchCustomFieldsUrl = '/functional/case/custom/field'; export const GetAssociatedFilePageUrl = '/attachment/page'; export const SaveCaseMinderUrl = '/functional/mind/case/edit'; // 保存用例脑图 export const GetCaseMinderUrl = '/functional/mind/case/list'; // 获取脑图数据 +export const GetCaseMinderTreeUrl = '/functional/mind/case/tree'; // 获取脑图模块树(含文本节点) // 获取模块树 export const GetCaseModuleTreeUrl = '/functional/case/module/tree'; diff --git a/frontend/src/assets/icon-font/iconfont.css b/frontend/src/assets/icon-font/iconfont.css index 2517adc7f3..564b89f1b6 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=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'); + src: url('iconfont.woff2?t=1717664244652') format('woff2'), url('iconfont.woff?t=1717664244652') format('woff'), + url('iconfont.ttf?t=1717664244652') format('truetype'), url('iconfont.svg?t=1717664244652#iconfont') format('svg'); } .iconfont { font-size: 16px; diff --git a/frontend/src/assets/style/arco-reset.less b/frontend/src/assets/style/arco-reset.less index c718106916..abb8ac5b25 100644 --- a/frontend/src/assets/style/arco-reset.less +++ b/frontend/src/assets/style/arco-reset.less @@ -469,6 +469,10 @@ /** radio **/ .arco-radio-group-button { + .arco-radio-button-content { + @apply break-keep; + } + background-color: var(--color-text-n8); .arco-radio-button { @apply bg-transparent; diff --git a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue index 97cb7e97cf..4d55571ace 100644 --- a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue +++ b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue @@ -3,13 +3,20 @@ v-model:activeExtraKey="activeExtraKey" v-model:extra-visible="extraVisible" v-model:loading="loading" + v-model:import-json="importJson" :tags="[]" - :import-json="importJson" :replaceable-tags="replaceableTags" :insert-node="insertNode" :priority-disable-check="priorityDisableCheck" :after-tag-edit="afterTagEdit" :extract-content-tab-list="extractContentTabList" + :can-show-enter-node="canShowEnterNode" + :insert-sibling-menus="insertSiblingMenus" + :insert-son-menus="insertSonMenus" + :can-show-paste-menu="!stopPaste()" + :can-show-more-menu="canShowMoreMenu()" + :can-show-priority-menu="canShowPriorityMenu()" + :priority-tooltip="t('caseManagement.caseReview.caseLevel')" single-tag tag-enable sequence-enable @@ -19,6 +26,18 @@ @before-exec-command="handleBeforeExecCommand" @save="handleMinderSave" > +