From d6332fd1f8a6d14d5cc245b3493e4be7a7efd1ec Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Wed, 18 Sep 2024 19:11:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86&?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B):=20=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E7=BC=96=E8=BE=91&=E8=AF=A6=E6=83=85=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E4=BD=8D=E7=BD=AE=E8=B0=83=E6=95=B4&?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=93=8D=E4=BD=9C=E6=9D=83=E9=99=90=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/pure/ms-upload/fileList.vue | 2 +- .../components/bugDetailTab.vue | 50 +++++++++-- frontend/src/views/bug-management/edit.vue | 51 +++++++++-- frontend/src/views/bug-management/index.vue | 12 +++ .../components/caseTemplateDetail.vue | 57 +++++++++---- .../components/tabContent/tabDetail.vue | 84 ++++++++++++++++--- .../components/addDefectDrawer/index.vue | 2 +- .../components/linkDefectDrawer.vue | 7 +- 8 files changed, 216 insertions(+), 49 deletions(-) diff --git a/frontend/src/components/pure/ms-upload/fileList.vue b/frontend/src/components/pure/ms-upload/fileList.vue index f9d8adc6ab..240a20a9df 100644 --- a/frontend/src/components/pure/ms-upload/fileList.vue +++ b/frontend/src/components/pure/ms-upload/fileList.vue @@ -43,7 +43,7 @@
-
+
{{ item.file.name.slice(0, item.file.name.indexOf('.')) }}
diff --git a/frontend/src/views/bug-management/components/bugDetailTab.vue b/frontend/src/views/bug-management/components/bugDetailTab.vue index b77419887c..5abd2684e0 100644 --- a/frontend/src/views/bug-management/components/bugDetailTab.vue +++ b/frontend/src/views/bug-management/components/bugDetailTab.vue @@ -85,28 +85,32 @@ }" :upload-func="uploadOrAssociationFile" :handle-delete="deleteFileHandler" - :show-delete="props.allowEdit" :init-file-save-tips="t('ms.upload.waiting_save')" + :show-delete="false" @finish="uploadFileOver" > diff --git a/frontend/src/views/bug-management/edit.vue b/frontend/src/views/bug-management/edit.vue index 06a98fda7c..a651b809cc 100644 --- a/frontend/src/views/bug-management/edit.vue +++ b/frontend/src/views/bug-management/edit.vue @@ -59,24 +59,26 @@ v-model:file-list="fileList" :init-file-save-tips="t('ms.upload.waiting_save')" mode="static" + :show-delete="false" > @@ -789,6 +815,13 @@ } }; + function deleteFile(item: MsFileItem) { + const index = fileList.value.findIndex((e) => e.uid === item.uid); + if (index !== -1) { + fileList.value.splice(index, 1); + } + } + // 监视自定义字段改变处理formCreate watch( () => formRules.value, diff --git a/frontend/src/views/bug-management/index.vue b/frontend/src/views/bug-management/index.vue index 3f9f37b12a..9558c7c096 100644 --- a/frontend/src/views/bug-management/index.vue +++ b/frontend/src/views/bug-management/index.vue @@ -79,6 +79,14 @@
+
@@ -765,6 +773,10 @@ } else { item.showInTable = false; } + if (item.title === '内容') { + item.slotName = 'description'; + item.showTooltip = false; + } }); } catch (error) { // eslint-disable-next-line no-console diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue index 3ff8f68a22..541ae796ea 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue @@ -67,19 +67,21 @@ mode="static" :init-file-save-tips="t('ms.upload.waiting_save')" :show-upload-type-desc="true" + :show-delete="false" > @@ -611,6 +631,13 @@ featureCaseStore.setModuleId([value]); } + function deleteFile(item: MsFileItem) { + const index = fileList.value.findIndex((e) => e.uid === item.uid); + if (index !== -1) { + fileList.value.splice(index, 1); + } + } + // 监视文件列表处理关联和本地文件 watch( () => fileList.value, diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue index f16697faa5..d84ef667e9 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue @@ -113,23 +113,23 @@ projectId: currentProjectId, }" :upload-func="uploadOrAssociationFile" - :handle-delete="deleteFileHandler" - :show-delete="props.allowEdit && !props.isTestPlan" + :show-delete="false" @finish="uploadFileOver" > @@ -262,6 +319,7 @@ import useAppStore from '@/store/modules/app'; import { characterLimit, downloadByteFile, getGenerateId, sleep } from '@/utils'; import { scrollIntoView } from '@/utils/dom'; + import { hasAllPermission } from '@/utils/permission'; import type { AssociatedList, DetailCase, StepList } from '@/models/caseManagement/featureCase'; import type { TableQueryParams } from '@/models/common'; diff --git a/frontend/src/views/case-management/components/addDefectDrawer/index.vue b/frontend/src/views/case-management/components/addDefectDrawer/index.vue index 1c5060410f..6585e2b253 100644 --- a/frontend/src/views/case-management/components/addDefectDrawer/index.vue +++ b/frontend/src/views/case-management/components/addDefectDrawer/index.vue @@ -2,7 +2,7 @@ + @@ -142,7 +147,7 @@ }, { title: 'caseManagement.featureCase.tableColumnCreateUser', - slotName: 'createUser', + slotName: 'createUserName', dataIndex: 'createUser', showInTable: true, showTooltip: true,