From 5ceec82c42474e9edf84f11649d45d199391193b Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Thu, 14 Mar 2024 11:39:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D&=E7=94=A8=E4=BE=8B=E7=B4=A7=E6=80=A5bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/modules/bug-management/index.ts | 5 +++ frontend/src/api/requrls/bug-management.ts | 3 ++ .../components/business/ms-comment/input.vue | 6 +-- .../components/pure/ms-table/base-table.vue | 18 ++++++++ .../components/bug-detail-drawer.vue | 16 +++++-- .../bug-management/components/bugCaseTab.vue | 23 +++++++--- .../components/bugDetailTab.vue | 4 +- .../components/bugHistoryTab.vue | 3 +- frontend/src/views/bug-management/edit.vue | 7 ++- frontend/src/views/bug-management/index.vue | 23 +++++++--- .../components/caseDetailDrawer.vue | 3 ++ .../components/caseTemplateDetail.vue | 2 +- .../tabContent/tabBug/tabDefect.vue | 44 +++++++++++-------- .../caseManagementFeature/components/utils.ts | 2 +- 14 files changed, 114 insertions(+), 45 deletions(-) diff --git a/frontend/src/api/modules/bug-management/index.ts b/frontend/src/api/modules/bug-management/index.ts index 90b0968c27..e9f8fd64eb 100644 --- a/frontend/src/api/modules/bug-management/index.ts +++ b/frontend/src/api/modules/bug-management/index.ts @@ -239,3 +239,8 @@ export function cancelAssociation(id: string) { export function getChangeHistoryList(data: TableQueryParams) { return MSR.post({ url: bugURL.getChangeHistoryListUrl, data }); } + +// 校验跳转用例权限 +export function checkCasePermission(projectId: string, caseType: string) { + return MSR.get({ url: `${bugURL.checkCasePermissionUrl}/${projectId}/${caseType}` }); +} diff --git a/frontend/src/api/requrls/bug-management.ts b/frontend/src/api/requrls/bug-management.ts index 44b5f3518a..f3f7befcd9 100644 --- a/frontend/src/api/requrls/bug-management.ts +++ b/frontend/src/api/requrls/bug-management.ts @@ -73,3 +73,6 @@ export const getUnrelatedModuleTreeCountUrl = '/bug/case/un-relate/module/count' // 缺陷管理-变更历史-列表 export const getChangeHistoryListUrl = '/bug/history/page'; + +// 缺陷用例跳转用例是否具备权限 +export const checkCasePermissionUrl = '/bug/case/check-permission'; diff --git a/frontend/src/components/business/ms-comment/input.vue b/frontend/src/components/business/ms-comment/input.vue index 791c69d73f..017046709c 100644 --- a/frontend/src/components/business/ms-comment/input.vue +++ b/frontend/src/components/business/ms-comment/input.vue @@ -6,7 +6,7 @@ 'commentWrapper': props.isUseBottom, }" > -
+
(); const currentContent = defineModel('defaultValue', { default: '' }); - const commentIds = defineModel('noticeUserIds', { default: [] }); - + const userStore = useUserStore(); const emit = defineEmits<{ (event: 'publish', value: string): void; (event: 'cancel'): void; diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue index 826226c27f..fd78592fea 100644 --- a/frontend/src/components/pure/ms-table/base-table.vue +++ b/frontend/src/components/pure/ms-table/base-table.vue @@ -279,6 +279,7 @@ } from './type'; import type { TableChangeExtra, TableColumnData, TableData } from '@arco-design/web-vue'; import type { TableOperationColumn } from '@arco-design/web-vue/es/table/interface'; + import { log } from 'console'; const batchLeft = ref('10px'); const { t } = useI18n(); @@ -398,6 +399,23 @@ tmpArr = props.columns; } currentColumns.value = arr || tmpArr; + // 如果是完全没有列展示除了固定列需要对操作列宽度进行限制和浮动位置限制 + if (props.showSetting) { + const isNoDragColumns = currentColumns.value.filter((item) => item.showDrag).length; + if (!isNoDragColumns) { + currentColumns.value = tmpArr.map((item: any) => { + if (item.slotName === SpecialColumnEnum.OPERATION || item.slotName === SpecialColumnEnum.ACTION) { + return { + ...item, + fixed: '', + }; + } + return { + ...item, + }; + }); + } + } } catch (error) { // eslint-disable-next-line no-console console.error('InitColumn failed', error); diff --git a/frontend/src/views/bug-management/components/bug-detail-drawer.vue b/frontend/src/views/bug-management/components/bug-detail-drawer.vue index f7889a3db4..9b277d02bf 100644 --- a/frontend/src/views/bug-management/components/bug-detail-drawer.vue +++ b/frontend/src/views/bug-management/components/bug-detail-drawer.vue @@ -19,33 +19,36 @@