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