diff --git a/frontend/src/api/modules/case-management/featureCase.ts b/frontend/src/api/modules/case-management/featureCase.ts index 5b6fb56351..a2bddeac94 100644 --- a/frontend/src/api/modules/case-management/featureCase.ts +++ b/frontend/src/api/modules/case-management/featureCase.ts @@ -27,6 +27,7 @@ import { DetailCaseUrl, DownloadExcelTemplateUrl, DownloadFileUrl, + dragSortUrl, EditorUploadFileUrl, exportExcelCheckUrl, FollowerCaseUrl, @@ -83,6 +84,7 @@ import type { DeleteCaseType, DemandItem, DetailCase, + DragCase, ImportExcelType, ModulesTreeType, OperationFile, @@ -401,4 +403,9 @@ export function importExcelCase(data: { request: ImportExcelType; fileList: File return MSR.uploadFile({ url: importExcelCaseUrl }, { request: data.request, fileList: data.fileList }, ''); } +// 拖拽排序 +export function dragSort(data: DragCase) { + return MSR.post({ url: dragSortUrl, data }); +} + export default {}; diff --git a/frontend/src/api/requrls/case-management/featureCase.ts b/frontend/src/api/requrls/case-management/featureCase.ts index d85dbfc3cb..4265b75e79 100644 --- a/frontend/src/api/requrls/case-management/featureCase.ts +++ b/frontend/src/api/requrls/case-management/featureCase.ts @@ -143,3 +143,5 @@ export const PreviewEditorImageUrl = '/attachment/download/file'; export const exportExcelCheckUrl = '/functional/case/pre-check/excel'; // 导入excel文件 export const importExcelCaseUrl = '/functional/case/import/excel'; +// 用例拖拽排序 +export const dragSortUrl = '/functional/case/edit/pos'; diff --git a/frontend/src/components/business/ms-case-associate/index.vue b/frontend/src/components/business/ms-case-associate/index.vue index 83e8111316..440f0c71d7 100644 --- a/frontend/src/components/business/ms-case-associate/index.vue +++ b/frontend/src/components/business/ms-case-associate/index.vue @@ -313,6 +313,7 @@ showTooltip: true, sortable: { sortDirections: ['ascend', 'descend'], + sorter: true, }, width: 200, }, @@ -321,6 +322,7 @@ dataIndex: 'name', sortable: { sortDirections: ['ascend', 'descend'], + sorter: true, }, showTooltip: true, width: 300, diff --git a/frontend/src/components/business/ms-common-script/formApiImportDrawer.vue b/frontend/src/components/business/ms-common-script/formApiImportDrawer.vue index c78fcd975a..d58552b8ce 100644 --- a/frontend/src/components/business/ms-common-script/formApiImportDrawer.vue +++ b/frontend/src/components/business/ms-common-script/formApiImportDrawer.vue @@ -188,6 +188,7 @@ showTooltip: true, sortable: { sortDirections: ['ascend', 'descend'], + sorter: true, }, width: 200, }, @@ -196,6 +197,7 @@ dataIndex: 'name', sortable: { sortDirections: ['ascend', 'descend'], + sorter: true, }, showTooltip: true, width: 300, @@ -206,6 +208,7 @@ slotName: 'method', sortable: { sortDirections: ['ascend', 'descend'], + sorter: true, }, width: 200, }, diff --git a/frontend/src/components/business/ms-common-script/insertCommonScript.vue b/frontend/src/components/business/ms-common-script/insertCommonScript.vue index 3fb05c7b53..f1239cafb0 100644 --- a/frontend/src/components/business/ms-common-script/insertCommonScript.vue +++ b/frontend/src/components/business/ms-common-script/insertCommonScript.vue @@ -145,6 +145,7 @@ dataIndex: 'createTime', sortable: { sortDirections: ['ascend', 'descend'], + sorter: true, }, showInTable: true, width: 300, diff --git a/frontend/src/components/business/ms-personal-drawer/components/apiKey.vue b/frontend/src/components/business/ms-personal-drawer/components/apiKey.vue index eac1f9ecf2..810754fc1d 100644 --- a/frontend/src/components/business/ms-personal-drawer/components/apiKey.vue +++ b/frontend/src/components/business/ms-personal-drawer/components/apiKey.vue @@ -11,6 +11,7 @@
- + {{ t('common.setting') }}
{{ t('ms.personal.nodata') }} - {{ t('common.new') }} + {{ + t('common.new') + }}
diff --git a/frontend/src/components/business/ms-personal-drawer/index.vue b/frontend/src/components/business/ms-personal-drawer/index.vue index a8d0d1ea75..a47de9dc7d 100644 --- a/frontend/src/components/business/ms-personal-drawer/index.vue +++ b/frontend/src/components/business/ms-personal-drawer/index.vue @@ -87,6 +87,7 @@ name: 'apiKey', title: t('ms.personal.apiKey'), level: 2, + permission: ['SYSTEM_PERSONAL_API_KEY:READ'], }, { name: 'local', diff --git a/frontend/src/components/business/ms-top-menu/index.vue b/frontend/src/components/business/ms-top-menu/index.vue index 4e7cdad313..e43623acf7 100644 --- a/frontend/src/components/business/ms-top-menu/index.vue +++ b/frontend/src/components/business/ms-top-menu/index.vue @@ -21,8 +21,13 @@ import usePermission from '@/hooks/usePermission'; import appClientMenus from '@/router/app-menus'; import { useAppStore } from '@/store'; + import useLicenseStore from '@/store/modules/setting/license'; import { listenerRouteChange } from '@/utils/route-listener'; + import { RouteEnum } from '@/enums/routeEnum'; + + const licenseStore = useLicenseStore(); + const copyRouters = cloneDeep(appClientMenus) as RouteRecordRaw[]; const permission = usePermission(); const appStore = useAppStore(); @@ -79,9 +84,17 @@ (item) => name && item?.name && (name as string).includes(item.name as string) ); } - appStore.setTopMenus( - currentParent?.children?.filter((item) => permission.accessRouter(item) && item.meta?.isTopMenu) - ); + + const filterMenuTopRouter = currentParent?.children + ?.filter((item: any) => permission.accessRouter(item) && item.meta?.isTopMenu) + .filter((item: any) => { + if (item.name === RouteEnum.SETTING_SYSTEM_AUTHORIZED_MANAGEMENT) { + return licenseStore.hasLicense(); + } + return true; + }); + + appStore.setTopMenus(filterMenuTopRouter); setCurrentTopMenu(name as string); return; } diff --git a/frontend/src/components/pure/ms-menu-panel/index.vue b/frontend/src/components/pure/ms-menu-panel/index.vue index b5ca574161..e374bf2002 100644 --- a/frontend/src/components/pure/ms-menu-panel/index.vue +++ b/frontend/src/components/pure/ms-menu-panel/index.vue @@ -4,7 +4,7 @@
{{ props.title }}