From 4305aa9add9af3d0682f99ebadec50234e3878e9 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Thu, 25 Jan 2024 11:26:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E5=AF=BC=E5=85=A5=E8=81=94=E8=B0=83&bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9&=E9=83=A8=E5=88=86=E6=9D=83=E9=99=90&?= =?UTF-8?q?=E9=9D=9E=E8=B7=AF=E7=94=B1xpack=E5=85=A5=E5=8F=A3=E6=8E=A7?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.vue | 4 +- .../modules/case-management/featureCase.ts | 5 ++ .../requrls/case-management/featureCase.ts | 2 + .../business/ms-add-attachment/index.vue | 13 +++-- .../ms-common-script/ms-addScriptDrawer.vue | 10 ++-- .../src/components/business/ms-menu/index.vue | 26 ++++++---- .../ms-remove-button/MsRemoveButton.vue | 26 +++++----- .../router/routes/modules/caseManagement.ts | 2 +- .../routes/modules/projectManagement.ts | 8 ++-- frontend/src/router/routes/modules/setting.ts | 14 ++++-- .../src/router/routes/modules/testPlan.ts | 2 +- .../src/store/modules/case/featureCase.ts | 11 ++--- frontend/src/store/modules/setting/license.ts | 3 +- .../components/caseDetailDrawer.vue | 23 ++++++--- .../components/caseTable.vue | 36 ++++++++------ .../components/caseTemplateDetail.vue | 32 ++++++++----- .../components/caseTree.vue | 5 +- .../components/export/exportCaseModal.vue | 31 +++++++----- .../components/export/validateResult.vue | 9 ++-- .../components/recycleCaseTable.vue | 15 +++--- .../components/tabContent/settingDrawer.vue | 21 +++++++-- .../tabContent/tabBug/tabDefect.vue | 4 +- .../tabContent/tabCase/tabCaseTable.vue | 16 +++++++ .../tabDemand/associatedDemandTable.vue | 2 +- .../tabDependency/preAndPostCaseDrawer.vue | 22 ++++++++- .../tabDependency/tabDependency.vue | 2 +- .../components/tabContent/tabDetail.vue | 32 +++++++------ .../caseManagementFeature/index.vue | 47 ++++++++++++++++--- .../caseManagementFeature/locale/en-US.ts | 1 + .../caseManagementFeature/locale/zh-CN.ts | 1 + .../src/views/login/components/login-form.vue | 2 +- .../project-management/commonScript/index.vue | 7 ++- .../projectAndPermission/basicInfos/index.vue | 10 ++-- .../projectAndPermission/index.vue | 23 ++++++--- .../projectAndPermission/member/index.vue | 7 ++- .../components/templateManagement.vue | 26 ++++++++-- .../setting/organization/member/index.vue | 17 +++++-- .../components/serviceList.vue | 23 +++++++-- .../template/components/templateItem.vue | 8 +++- .../components/templateManagement.vue | 26 ++++++++-- .../system/authorizedManagement/index.vue | 2 +- .../system/config/components/baseConfig.vue | 32 +++++++++---- .../src/views/setting/system/config/index.vue | 11 +++-- .../pluginManager/components/pluginTable.vue | 14 ++++-- .../setting/system/resourcePool/detail.vue | 12 +++-- .../setting/system/resourcePool/index.vue | 7 ++- .../testPlan/components/allTable.vue | 8 +++- .../src/views/test-plan/testPlan/index.vue | 2 +- 48 files changed, 468 insertions(+), 194 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 25ca9381e1..e4ae180274 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -53,8 +53,10 @@ onBeforeMount(async () => { try { appStore.initSystemVersion(); // 初始化系统版本 - appStore.initPageConfig(); // 初始化页面配置 licenseStore.getValidateLicense(); // 初始化校验license + if (licenseStore.hasLicense()) { + appStore.initPageConfig(); // 初始化页面配置 + } // 项目初始化时需要获取基础设置信息,看当前站点 url是否为系统内置默认地址,如果是需要替换为当前项目部署的 url 地址 const isInitUrl = getLocalStorage('isInitUrl'); // 是否已经初始化过 url if (isInitUrl === 'true') return; diff --git a/frontend/src/api/modules/case-management/featureCase.ts b/frontend/src/api/modules/case-management/featureCase.ts index bf5dd89623..5b6fb56351 100644 --- a/frontend/src/api/modules/case-management/featureCase.ts +++ b/frontend/src/api/modules/case-management/featureCase.ts @@ -55,6 +55,7 @@ import { GetSearchCustomFieldsUrl, getTransferTreeUrl, GetTrashCaseModuleTreeUrl, + importExcelCaseUrl, MoveCaseModuleTreeUrl, PreviewEditorImageUrl, PreviewFileUrl, @@ -395,5 +396,9 @@ export function editorUploadFile(data: { fileList: File[] }) { export function editorPreviewImages(data: PreviewImages) { return MSR.post({ url: PreviewEditorImageUrl, data }); } +// 导入excel +export function importExcelCase(data: { request: ImportExcelType; fileList: File[] }) { + return MSR.uploadFile({ url: importExcelCaseUrl }, { request: data.request, fileList: data.fileList }, ''); +} export default {}; diff --git a/frontend/src/api/requrls/case-management/featureCase.ts b/frontend/src/api/requrls/case-management/featureCase.ts index 0c489eb60d..d85dbfc3cb 100644 --- a/frontend/src/api/requrls/case-management/featureCase.ts +++ b/frontend/src/api/requrls/case-management/featureCase.ts @@ -141,3 +141,5 @@ export const EditorUploadFileUrl = '/attachment/upload/temp/file'; export const PreviewEditorImageUrl = '/attachment/download/file'; // 导入excel文件检查 export const exportExcelCheckUrl = '/functional/case/pre-check/excel'; +// 导入excel文件 +export const importExcelCaseUrl = '/functional/case/import/excel'; diff --git a/frontend/src/components/business/ms-add-attachment/index.vue b/frontend/src/components/business/ms-add-attachment/index.vue index becb62310c..0d66b62562 100644 --- a/frontend/src/components/business/ms-add-attachment/index.vue +++ b/frontend/src/components/business/ms-add-attachment/index.vue @@ -10,7 +10,7 @@ --> @@ -810,10 +815,6 @@ } } - function getCaseLevel(record: CaseManagementTable): CaseLevel { - const caseLevelItem = record.customFields.find((it: any) => it.fieldName === '用例等级'); - return caseLevelItem?.options.find((it: any) => it.value === caseLevelItem.defaultValue).text; - } onMounted(() => { getDefaultFields(); initFilter(); diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/settingDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/settingDrawer.vue index 67d754e7b2..ef56069840 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/settingDrawer.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/settingDrawer.vue @@ -53,9 +53,11 @@ import { useI18n } from '@/hooks/useI18n'; import { useAppStore } from '@/store'; import useFeatureCaseStore from '@/store/modules/case/featureCase'; + import useLicenseStore from '@/store/modules/setting/license'; import type { TabItemType } from '@/models/caseManagement/featureCase'; + const licenseStore = useLicenseStore(); const { t } = useI18n(); const featureCaseStore = useFeatureCaseStore(); @@ -98,6 +100,19 @@ let buggerTab: TabItemType[] = []; let testPlanTab: TabItemType[] = []; + + function getTabList() { + if (licenseStore.hasLicense()) { + return [ + { + key: 'changeHistory', + title: 'caseManagement.featureCase.changeHistory', + enable: true, + }, + ]; + } + return []; + } const tabDefaultSettingList = ref([ { key: 'case', @@ -119,11 +134,7 @@ title: 'caseManagement.featureCase.comments', enable: true, }, - { - key: 'changeHistory', - title: 'caseManagement.featureCase.changeHistory', - enable: true, - }, + ...getTabList(), ]); async function getTabModule() { buggerTab = []; diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue index 9054036a15..4c44babd1d 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue @@ -49,7 +49,7 @@ {{ t('caseManagement.featureCase.cancelLink') }} diff --git a/frontend/src/views/setting/system/resourcePool/detail.vue b/frontend/src/views/setting/system/resourcePool/detail.vue index c0718c424a..6d44d1e3a9 100644 --- a/frontend/src/views/setting/system/resourcePool/detail.vue +++ b/frontend/src/views/setting/system/resourcePool/detail.vue @@ -136,7 +136,7 @@ Node - Kubernetes + Kubernetes