From 86cbd0efbb1aac4f99b9e0e2df74ea428f7f8559 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Thu, 13 Jun 2024 15:35:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=81=97=E7=95=99?= =?UTF-8?q?=E4=B8=AD=E9=AB=98=E7=BA=A7bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/ms-associate-case/caseTree.vue | 2 +- .../pure/ms-rich-text/MsRichText.vue | 6 +++-- .../components/pure/ms-split-box/index.vue | 2 +- .../src/store/modules/case/featureCase.ts | 2 +- .../components/bugDetailTab.vue | 6 +++-- .../components/caseTable.vue | 6 ++--- .../components/caseTree.vue | 26 ++++++++++--------- .../components/export/validateResult.vue | 1 + .../caseManagementFeature/index.vue | 7 ++--- .../components/detail/caseTable.vue | 1 + .../caseReview/components/reviewForm.vue | 1 + .../fileManagement/components/rightBox.vue | 2 +- .../pluginManager/components/uploadModel.vue | 16 +++--------- .../system/pluginManager/locale/en-US.ts | 2 +- .../system/pluginManager/locale/zh-CN.ts | 2 +- .../featureCase/components/executeForm.vue | 1 + 16 files changed, 42 insertions(+), 41 deletions(-) diff --git a/frontend/src/components/business/ms-associate-case/caseTree.vue b/frontend/src/components/business/ms-associate-case/caseTree.vue index 825821572b..db1a73df07 100644 --- a/frontend/src/components/business/ms-associate-case/caseTree.vue +++ b/frontend/src/components/business/ms-associate-case/caseTree.vue @@ -17,7 +17,7 @@ allow-clear :max-length="255" /> - + Promise; maxHeight?: string; + autoHeight?: boolean; filedIds?: string[]; commentIds?: string[]; wrapperClass?: string; @@ -96,6 +97,7 @@ uploadImage: undefined, placeholder: 'editor.placeholder', draggable: false, + autoHeight: true, } ); @@ -438,7 +440,7 @@ const contentStyles = computed(() => { return { - maxHeight: props.maxHeight || '200px', + maxHeight: props.autoHeight ? '800px' : props.maxHeight || '260px', overflow: 'auto', }; }); @@ -520,7 +522,7 @@ @apply relative overflow-hidden; :deep(.halo-rich-text-editor .ProseMirror) { padding: 16px !important; - height: 130px; + min-height: 130px; p:first-child { margin-top: 0; } diff --git a/frontend/src/components/pure/ms-split-box/index.vue b/frontend/src/components/pure/ms-split-box/index.vue index 529739d9fb..014e2e4a0e 100644 --- a/frontend/src/components/pure/ms-split-box/index.vue +++ b/frontend/src/components/pure/ms-split-box/index.vue @@ -85,7 +85,7 @@ }>(), { size: '300px', - min: '250px', + min: '300px', max: 0.5, direction: 'horizontal', expandDirection: 'left', diff --git a/frontend/src/store/modules/case/featureCase.ts b/frontend/src/store/modules/case/featureCase.ts index 45a43e343e..6385d49499 100644 --- a/frontend/src/store/modules/case/featureCase.ts +++ b/frontend/src/store/modules/case/featureCase.ts @@ -50,7 +50,7 @@ const useFeatureCaseStore = defineStore('featureCase', { // 设置选择moduleId setModuleId(currentModuleId: string[]) { if (['all', 'recycle'].includes(currentModuleId[0])) { - this.moduleId = ['root']; + this.moduleId = []; } else { this.moduleId = currentModuleId; } diff --git a/frontend/src/views/bug-management/components/bugDetailTab.vue b/frontend/src/views/bug-management/components/bugDetailTab.vue index 9dbbb26b2a..110f8bb471 100644 --- a/frontend/src/views/bug-management/components/bugDetailTab.vue +++ b/frontend/src/views/bug-management/components/bugDetailTab.vue @@ -17,7 +17,7 @@ {{ t('bugManagement.edit.content') }} -
+
@@ -43,12 +44,13 @@

{{ item.fieldName }}

-
+
{ return props.activeFolder === 'all' ? t('caseManagement.featureCase.allCase') - : findNodeByKey>(caseTreeData.value, featureCaseStore.moduleId[0], 'id')?.name; + : findNodeByKey>(caseTreeData.value, props.activeFolder, 'id')?.name; }); // 获取对应模块name function getModules(moduleIds: string) { diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseTree.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseTree.vue index f6ac213ad0..3024c2c2b7 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseTree.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseTree.vue @@ -183,13 +183,20 @@ }); featureCaseStore.setModulesTree(caseTree.value); featureCaseStore.setModuleId(['all']); + if (isSetDefaultKey) { selectedNodeKeys.value = [caseTree.value[0].id]; + const offspringIds: string[] = []; + mapTree(caseTree.value[0].children || [], (e) => { + offspringIds.push(e.id); + return e; + }); + + emits('caseNodeSelect', selectedNodeKeys.value, offspringIds); } emits( 'init', - caseTree.value.map((e) => e.name), - isSetDefaultKey + caseTree.value.map((e) => e.name) ); } catch (error) { // eslint-disable-next-line no-console @@ -214,7 +221,11 @@ try { await deleteCaseModuleTree(node.id); Message.success(t('caseManagement.featureCase.deleteSuccess')); - initModules(true); + emits( + 'init', + caseTree.value.map((e) => e.name), + true + ); } catch (error) { console.log(error); } @@ -369,15 +380,6 @@ }; }); - watch( - () => props.activeFolder, - (val) => { - if (val === 'all') { - initModules(); - } - } - ); - /** * 初始化模块文件数量 */ diff --git a/frontend/src/views/case-management/caseManagementFeature/components/export/validateResult.vue b/frontend/src/views/case-management/caseManagementFeature/components/export/validateResult.vue index 9f1f1534fc..e19ca6b872 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/export/validateResult.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/export/validateResult.vue @@ -74,6 +74,7 @@ v-if="validateResultInfo.successCount" type="text" class="ml-[8px]" + :disabled="props.importLoading" :loading="props.importLoading" @click="confirmImport" > diff --git a/frontend/src/views/case-management/caseManagementFeature/index.vue b/frontend/src/views/case-management/caseManagementFeature/index.vue index cf9fa99108..efa858eeaa 100644 --- a/frontend/src/views/case-management/caseManagementFeature/index.vue +++ b/frontend/src/views/case-management/caseManagementFeature/index.vue @@ -260,10 +260,11 @@ * 设置根模块名称列表 * @param names 根模块名称列表 */ - function setRootModules(names: string[], isSetDefaultKey: boolean) { + function setRootModules(names: string[], isDelete = false) { rootModulesName.value = names; - if (isSetDefaultKey) { - activeFolder.value = 'all'; + if (isDelete) { + caseTreeRef.value?.initModules(true); + caseTableRef.value?.initData(); } } diff --git a/frontend/src/views/case-management/caseReview/components/detail/caseTable.vue b/frontend/src/views/case-management/caseReview/components/detail/caseTable.vue index 2cc1a63df4..016d420219 100644 --- a/frontend/src/views/case-management/caseReview/components/detail/caseTable.vue +++ b/frontend/src/views/case-management/caseReview/components/detail/caseTable.vue @@ -180,6 +180,7 @@ v-model:raw="dialogForm.reason" v-model:commentIds="dialogForm.commentIds" :upload-image="handleUploadImage" + :auto-height="false" :preview-url="PreviewEditorImageUrl" class="w-full" /> diff --git a/frontend/src/views/case-management/caseReview/components/reviewForm.vue b/frontend/src/views/case-management/caseReview/components/reviewForm.vue index 3d32eac34c..f39c7653c0 100644 --- a/frontend/src/views/case-management/caseReview/components/reviewForm.vue +++ b/frontend/src/views/case-management/caseReview/components/reviewForm.vue @@ -72,6 +72,7 @@ v-model:raw="caseResultForm.reason" v-model:commentIds="caseResultForm.commentIds" v-model:filed-ids="caseResultForm.fileList" + :auto-height="false" :upload-image="handleUploadImage" :preview-url="PreviewEditorImageUrl" class="w-full" diff --git a/frontend/src/views/project-management/fileManagement/components/rightBox.vue b/frontend/src/views/project-management/fileManagement/components/rightBox.vue index 45acc8dd5e..37df2c8277 100644 --- a/frontend/src/views/project-management/fileManagement/components/rightBox.vue +++ b/frontend/src/views/project-management/fileManagement/components/rightBox.vue @@ -194,7 +194,7 @@ @change="enableAllJar" > {{ t('project.fileManagement.enableAll') }} - +
diff --git a/frontend/src/views/setting/system/pluginManager/components/uploadModel.vue b/frontend/src/views/setting/system/pluginManager/components/uploadModel.vue index e7bfaeaead..ad1123927f 100644 --- a/frontend/src/views/setting/system/pluginManager/components/uploadModel.vue +++ b/frontend/src/views/setting/system/pluginManager/components/uploadModel.vue @@ -18,19 +18,9 @@ allow-clear /> - {{ + {{ t('system.plugin.getPlugin') - }} - - - - - - + }} diff --git a/frontend/src/views/setting/system/pluginManager/locale/en-US.ts b/frontend/src/views/setting/system/pluginManager/locale/en-US.ts index 42fdf57b6d..36cbbb7d73 100644 --- a/frontend/src/views/setting/system/pluginManager/locale/en-US.ts +++ b/frontend/src/views/setting/system/pluginManager/locale/en-US.ts @@ -58,7 +58,7 @@ export default { 'system.plugin.selectOrganizeTip': 'Please Choose Organization', 'system.plugin.selectOrganization': 'Choose Organization', 'system.plugin.infoTip': 'Jump to the Github download plug-in', - 'system.plugin.getPlugin': 'Gets the open source plug-in', + 'system.plugin.getPlugin': 'Get more plugins', 'system.plugin.afterSecond': 'Return to the list of plug-ins after the second', 'system.plugin.uploadSuccess': 'Upload Success!', 'system.plugin.uploadSuccessAfter': 'After successful upload, must arrive', diff --git a/frontend/src/views/setting/system/pluginManager/locale/zh-CN.ts b/frontend/src/views/setting/system/pluginManager/locale/zh-CN.ts index 3b7fa73c48..13d7d09601 100644 --- a/frontend/src/views/setting/system/pluginManager/locale/zh-CN.ts +++ b/frontend/src/views/setting/system/pluginManager/locale/zh-CN.ts @@ -45,7 +45,7 @@ export default { 'system.plugin.selectOrganizeTip': '请选择组织', 'system.plugin.selectOrganization': '选择组织', 'system.plugin.infoTip': '跳转至 GitHub 下载插件', - 'system.plugin.getPlugin': '获取开源插件', + 'system.plugin.getPlugin': '获取更多插件', 'system.plugin.afterSecond': '秒后回到插件列表', 'system.plugin.uploadSuccess': '上传成功!', 'system.plugin.uploadSuccessAfter': '上传成功后,须到', diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/executeForm.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/executeForm.vue index 334192252e..cc1775e621 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/executeForm.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/executeForm.vue @@ -15,6 +15,7 @@ v-model:filedIds="form.planCommentFileIds" :upload-image="handleUploadImage" :preview-url="PreviewEditorImageUrl" + :auto-height="false" class="w-full" :placeholder=" props.isDblclickPlaceholder