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 @@
diff --git a/frontend/src/views/bug-management/components/bugHistoryTab.vue b/frontend/src/views/bug-management/components/bugHistoryTab.vue
index 865a1d99e7..0f3f2d2ff1 100644
--- a/frontend/src/views/bug-management/components/bugHistoryTab.vue
+++ b/frontend/src/views/bug-management/components/bugHistoryTab.vue
@@ -48,12 +48,11 @@
];
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(getChangeHistoryList, {
- heightUsed: 240,
+ heightUsed: 380,
columns,
scroll: { x: '100%' },
selectable: false,
noDisable: false,
- pageSimple: true,
debug: true,
});
diff --git a/frontend/src/views/bug-management/edit.vue b/frontend/src/views/bug-management/edit.vue
index 8eff3ee125..cdcdfe2178 100644
--- a/frontend/src/views/bug-management/edit.vue
+++ b/frontend/src/views/bug-management/edit.vue
@@ -393,6 +393,7 @@
}
const res = await getTemplateById(param);
await getFormRules(res.customFields);
+ isLoading.value = false;
isPlatformDefaultTemplate.value = res.platformDefault;
if (isPlatformDefaultTemplate.value) {
const systemFields = res.customFields.filter((field) => field.platformSystemField);
@@ -402,16 +403,18 @@
});
}
getFormRules(res.customFields.filter((field) => !field.platformSystemField));
- isLoading.value = false;
} catch (error) {
// eslint-disable-next-line no-console
console.log(error);
+ } finally {
+ loading.value = false;
}
}
};
const getTemplateOptions = async () => {
try {
+ loading.value = true;
const res = await getTemplateOption(appStore.currentProjectId);
templateOption.value = res.map((item) => {
if (item.enableDefault && !isEdit.value) {
@@ -427,6 +430,8 @@
} catch (error) {
// eslint-disable-next-line no-console
console.log(error);
+ } finally {
+ loading.value = false;
}
};
diff --git a/frontend/src/views/bug-management/index.vue b/frontend/src/views/bug-management/index.vue
index f358267954..654a0117a5 100644
--- a/frontend/src/views/bug-management/index.vue
+++ b/frontend/src/views/bug-management/index.vue
@@ -211,7 +211,6 @@
import { BackEndEnum, FilterFormItem, FilterResult, FilterType } from '@/components/pure/ms-advance-filter/type';
import MsButton from '@/components/pure/ms-button/index.vue';
import MsCard from '@/components/pure/ms-card/index.vue';
- import MsExportDrawer from '@/components/pure/ms-export-drawer/index.vue';
import { MsExportDrawerMap, MsExportDrawerOption } from '@/components/pure/ms-export-drawer/types';
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
import { BatchActionParams, BatchActionQueryParams, MsTableColumn } from '@/components/pure/ms-table/type';
@@ -220,7 +219,6 @@
import { ActionsItem } from '@/components/pure/ms-table-more-action/types';
import BatchEditModal from './components/batchEditModal.vue';
import BugDetailDrawer from './components/bug-detail-drawer.vue';
- import DeleteModal from './components/deleteModal.vue';
import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue';
import {
@@ -246,12 +244,17 @@
downloadByteFile,
tableParamsToRequestParams,
} from '@/utils';
+ import { hasAnyPermission } from '@/utils/permission';
import { BugEditCustomField, BugListItem, BugOptionItem } from '@/models/bug-management';
import { RouteEnum } from '@/enums/routeEnum';
import { TableKeyEnum } from '@/enums/tableEnum';
+ import { log } from 'console';
+
const { t } = useI18n();
+ const MsExportDrawer = defineAsyncComponent(() => import('@/components/pure/ms-export-drawer/index.vue'));
+ const DeleteModal = defineAsyncComponent(() => import('./components/deleteModal.vue'));
const tableStore = useTableStore();
const appStore = useAppStore();
@@ -355,7 +358,7 @@
title: 'bugManagement.ID',
dataIndex: 'num',
slotName: 'num',
- width: 80,
+ width: 200,
sortable: {
sortDirections: ['ascend', 'descend'],
sorter: true,
@@ -366,7 +369,7 @@
{
title: 'bugManagement.bugName',
dataIndex: 'title',
- width: 200,
+ width: 300,
showTooltip: true,
sortable: {
sortDirections: ['ascend', 'descend'],
@@ -484,6 +487,7 @@
showJumpMethod: true,
noDisable: false,
showSetting: true,
+ heightUsed: 380,
},
(record: TableData) => ({
...record,
@@ -576,8 +580,15 @@
};
const checkSyncStatus = async () => {
- const { complete } = await getSyncStatus(appStore.currentProjectId);
- isComplete.value = complete;
+ if (!hasAnyPermission(['PROJECT_BUG:READ+UPDATE'])) {
+ return;
+ }
+ try {
+ const { complete } = await getSyncStatus(appStore.currentProjectId);
+ isComplete.value = complete;
+ } catch (error) {
+ console.log(error);
+ }
};
/** 同步缺陷 */
const { pause, resume } = useIntervalFn(() => {
diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue
index 8245be602e..de4751fb39 100644
--- a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue
+++ b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue
@@ -24,6 +24,7 @@