From dac0d9360895e292574adce06f7a0227dedd9500 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 13 Mar 2024 20:24:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A2=9E=E5=8A=A0=E9=9C=80=E6=B1=82=E6=9C=AA?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E9=9C=80=E6=B1=82URL=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1036101 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001036101 --bug=1037142 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037142 --bug=1037145 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037145 --- .../FunctionalCaseDemandController.java | 2 +- .../tabContent/tabComment/tabCommentIndex.vue | 35 +++++++++++-------- .../tabContent/tabDemand/addDemandModal.vue | 26 ++++++++++++-- .../tabContent/tabDemand/demand.vue | 14 ++++++-- .../tabDependency/tabDependency.vue | 10 ++++-- .../caseManagementFeature/locale/en-US.ts | 1 + .../caseManagementFeature/locale/zh-CN.ts | 1 + .../case-management/caseReview/detail.vue | 2 +- 8 files changed, 67 insertions(+), 24 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseDemandController.java b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseDemandController.java index c29579ce44..156d6a2074 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseDemandController.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseDemandController.java @@ -76,7 +76,7 @@ public class FunctionalCaseDemandController { @PostMapping("/third/list/page") @Operation(summary = "用例管理-功能用例-关联需求-获取三方需求列表") - @RequiresPermissions(value = {PermissionConstants.FUNCTIONAL_CASE_READ_ADD, PermissionConstants.FUNCTIONAL_CASE_READ_UPDATE, PermissionConstants.FUNCTIONAL_CASE_READ_DELETE}, logical = Logical.OR) + @RequiresPermissions(value = {PermissionConstants.FUNCTIONAL_CASE_READ, PermissionConstants.FUNCTIONAL_CASE_READ_ADD, PermissionConstants.FUNCTIONAL_CASE_READ_UPDATE, PermissionConstants.FUNCTIONAL_CASE_READ_DELETE}, logical = Logical.OR) public PluginPager pageDemand(@RequestBody @Validated FunctionalThirdDemandPageRequest request) { return functionalCaseDemandService.pageDemand(request); } diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabComment/tabCommentIndex.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabComment/tabCommentIndex.vue index 82b5f36f85..65082dbf1f 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabComment/tabCommentIndex.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabComment/tabCommentIndex.vue @@ -80,6 +80,7 @@ import { useI18n } from '@/hooks/useI18n'; import useModal from '@/hooks/useModal'; import useFeatureCaseStore from '@/store/modules/case/featureCase'; + import { hasAnyPermission } from '@/utils/permission'; import { CaseManagementRouteEnum } from '@/enums/routeEnum'; @@ -119,21 +120,25 @@ } async function getAllCommentList() { - switch (activeComment.value) { - case 'caseComment': - await initCommentList(); - featureCaseStore.getCaseCounts(props.caseId); - break; - case 'reviewComment': - await initReviewCommentList(); - featureCaseStore.getCaseCounts(props.caseId); - break; - case 'executiveComment': - await initCommentList(); - featureCaseStore.getCaseCounts(props.caseId); - break; - default: - break; + if (hasAnyPermission(['FUNCTIONAL_CASE:READ+COMMENT'])) { + switch (activeComment.value) { + case 'caseComment': + await initCommentList(); + featureCaseStore.getCaseCounts(props.caseId); + break; + case 'reviewComment': + await initReviewCommentList(); + featureCaseStore.getCaseCounts(props.caseId); + break; + case 'executiveComment': + await initCommentList(); + featureCaseStore.getCaseCounts(props.caseId); + break; + default: + break; + } + } else { + Message.error(t('common.noPermission')); } } diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/addDemandModal.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/addDemandModal.vue index bf4834fb56..11335a2354 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/addDemandModal.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/addDemandModal.vue @@ -12,6 +12,7 @@ {{ characterLimit(title) }} +
@@ -33,7 +34,26 @@ :placeholder="t('caseManagement.featureCase.pleaseEnterTitle')" /> - + import { ref } from 'vue'; - import { FormInstance, Message, ValidatedError } from '@arco-design/web-vue'; + import { FormInstance, ValidatedError } from '@arco-design/web-vue'; import { useI18n } from '@/hooks/useI18n'; import { useAppStore } from '@/store'; - import { characterLimit } from '@/utils'; + import { characterLimit, regexUrl } from '@/utils'; import type { CreateOrUpdateDemand, DemandFormList, DemandItem } from '@/models/caseManagement/featureCase'; diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/demand.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/demand.vue index 05858175aa..44fca6c879 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/demand.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/demand.vue @@ -2,10 +2,20 @@
- + {{ t('caseManagement.featureCase.associatedDemand') }} - + {{ t('caseManagement.featureCase.addDemand') }}
diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDependency/tabDependency.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDependency/tabDependency.vue index 14a4efc99e..4c784b242f 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDependency/tabDependency.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDependency/tabDependency.vue @@ -2,10 +2,16 @@
- + {{ t('caseManagement.featureCase.addPresetCase') }} - + {{ t('caseManagement.featureCase.addPostCase') }}
diff --git a/frontend/src/views/case-management/caseManagementFeature/locale/en-US.ts b/frontend/src/views/case-management/caseManagementFeature/locale/en-US.ts index 5059ddf13b..b78e0a8a51 100644 --- a/frontend/src/views/case-management/caseManagementFeature/locale/en-US.ts +++ b/frontend/src/views/case-management/caseManagementFeature/locale/en-US.ts @@ -156,6 +156,7 @@ export default { 'caseManagement.featureCase.pleaseEnterTitle': 'Please enter a requirement title', 'caseManagement.featureCase.requirementUrl': 'Demand url', 'caseManagement.featureCase.pleaseEnterRequirementUrl': 'Please input requirements url', + 'caseManagement.featureCase.pleaseEnterCorrectURLFormat': 'Please enter the correct URL format', 'caseManagement.featureCase.cancelAssociation': 'Cancel Association', 'caseManagement.featureCase.caseDetailTitle': '【{id}】{name}', 'caseManagement.featureCase.share': 'share', diff --git a/frontend/src/views/case-management/caseManagementFeature/locale/zh-CN.ts b/frontend/src/views/case-management/caseManagementFeature/locale/zh-CN.ts index b3bfe0af10..eb5c22db37 100644 --- a/frontend/src/views/case-management/caseManagementFeature/locale/zh-CN.ts +++ b/frontend/src/views/case-management/caseManagementFeature/locale/zh-CN.ts @@ -155,6 +155,7 @@ export default { 'caseManagement.featureCase.pleaseEnterTitle': '请输入需求标题', 'caseManagement.featureCase.requirementUrl': '需求地址', 'caseManagement.featureCase.pleaseEnterRequirementUrl': '请输入需求地址', + 'caseManagement.featureCase.pleaseEnterCorrectURLFormat': '请输入正确的URL格式', 'caseManagement.featureCase.cancelAssociation': '取消关联', 'caseManagement.featureCase.caseDetailTitle': '【{id}】{name}', 'caseManagement.featureCase.share': '分享', diff --git a/frontend/src/views/case-management/caseReview/detail.vue b/frontend/src/views/case-management/caseReview/detail.vue index e1493d7ee2..71f0415ee9 100644 --- a/frontend/src/views/case-management/caseReview/detail.vue +++ b/frontend/src/views/case-management/caseReview/detail.vue @@ -49,7 +49,7 @@ {{ t('common.copy') }} - +