From 379f46c79542421758daf5175adead6ff9eac2e9 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Thu, 25 Jan 2024 20:08:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E6=9D=83=E9=99=90&=E4=BF=AE=E6=94=B9bug&=E8=A1=A5=E5=85=85xpac?= =?UTF-8?q?k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/case-management/featureCase.ts | 7 ++ .../requrls/case-management/featureCase.ts | 2 + .../business/ms-case-associate/index.vue | 2 + .../ms-common-script/formApiImportDrawer.vue | 3 + .../ms-common-script/insertCommonScript.vue | 1 + .../ms-personal-drawer/components/apiKey.vue | 13 ++- .../business/ms-personal-drawer/index.vue | 1 + .../components/business/ms-top-menu/index.vue | 19 +++- .../components/pure/ms-menu-panel/index.vue | 9 +- .../src/components/pure/ms-tab-card/index.vue | 10 +- .../src/models/caseManagement/featureCase.ts | 7 ++ .../src/models/setting/serviceIntegration.ts | 1 + .../routes/modules/projectManagement.ts | 4 +- frontend/src/router/routes/modules/setting.ts | 8 +- frontend/src/store/modules/setting/license.ts | 3 +- .../components/associatedFileDrawer.vue | 3 + .../components/caseDetailDrawer.vue | 11 ++- .../components/caseTable.vue | 93 ++++++++++++++----- .../components/recycleCaseTable.vue | 4 + .../components/tabContent/tabCaseReview.vue | 1 + .../tabDependency/preAndPostCaseDrawer.vue | 2 + .../caseManagementFeature/components/utils.ts | 27 ++++++ .../caseManagementFeature/locale/en-US.ts | 1 + .../caseManagementFeature/locale/zh-CN.ts | 1 + .../src/views/login/components/login-form.vue | 8 +- .../project-management/commonScript/index.vue | 1 + .../components/fileDetailDrawer.vue | 13 ++- .../fileManagement/components/rightBox.vue | 9 +- .../components/messageList.vue | 11 ++- .../components/robotList.vue | 11 ++- .../organization/serviceIntegration/index.vue | 36 +++++-- .../serviceIntegration/locale/en-US.ts | 1 + .../serviceIntegration/locale/zh-CN.ts | 1 + .../system/config/components/authConfig.vue | 22 ++++- .../system/config/components/baseConfig.vue | 14 ++- .../system/config/components/pageConfig.vue | 48 ++++++++-- .../src/views/setting/system/config/index.vue | 8 +- .../setting/system/resourcePool/index.vue | 31 +++++-- .../src/views/setting/system/user/index.vue | 23 ++++- .../testPlan/components/allTable.vue | 2 + 40 files changed, 381 insertions(+), 91 deletions(-) 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 }}