fix(功能用例): 补充遗落国际化和去掉域名
This commit is contained in:
parent
0549a16d2b
commit
1721410efa
|
@ -12,8 +12,10 @@ import {
|
|||
CreateCaseUrl,
|
||||
DeleteCaseModuleTreeUrl,
|
||||
DeleteCaseUrl,
|
||||
deleteFileOrCancelAssociationUrl,
|
||||
DeleteRecycleCaseListUrl,
|
||||
DetailCaseUrl,
|
||||
DownloadFileUrl,
|
||||
FollowerCaseUrl,
|
||||
GetAssociatedFilePageUrl,
|
||||
GetCaseListUrl,
|
||||
|
@ -25,11 +27,14 @@ import {
|
|||
GetRecycleCaseModulesCountUrl,
|
||||
GetTrashCaseModuleTreeUrl,
|
||||
MoveCaseModuleTreeUrl,
|
||||
PreviewFileUrl,
|
||||
RecoverRecycleCaseListUrl,
|
||||
RestoreCaseListUrl,
|
||||
TransferFileUrl,
|
||||
UpdateCaseModuleTreeUrl,
|
||||
UpdateCaseUrl,
|
||||
UpdateDemandUrl,
|
||||
UploadOrAssociationFileUrl,
|
||||
} from '@/api/requrls/case-management/featureCase';
|
||||
|
||||
import type {
|
||||
|
@ -45,6 +50,7 @@ import type {
|
|||
DemandItem,
|
||||
ModulesTreeType,
|
||||
MoveModules,
|
||||
OperationFile,
|
||||
UpdateModule,
|
||||
} from '@/models/caseManagement/featureCase';
|
||||
import type { CommonList, TableQueryParams } from '@/models/common';
|
||||
|
@ -185,4 +191,34 @@ export function cancelAssociationDemand(id: string) {
|
|||
return MSR.get({ url: `${CancelAssociationDemandUrl}/${id}` });
|
||||
}
|
||||
|
||||
// 附件
|
||||
|
||||
// 上传文件并关联用例
|
||||
export function uploadOrAssociationFile(data: Record<string, any>) {
|
||||
return MSR.uploadFile(
|
||||
{ url: UploadOrAssociationFileUrl },
|
||||
{ request: data.request, fileList: data.fileList },
|
||||
'file'
|
||||
);
|
||||
}
|
||||
// 转存文件
|
||||
export function transferFile(data: OperationFile) {
|
||||
return MSR.post({ url: TransferFileUrl, data });
|
||||
}
|
||||
|
||||
// 预览文件
|
||||
export function previewFile(data: OperationFile) {
|
||||
return MSR.post({ url: PreviewFileUrl, data });
|
||||
}
|
||||
|
||||
// 下载文件
|
||||
export function downloadFile(data: OperationFile) {
|
||||
return MSR.post({ url: DownloadFileUrl, data });
|
||||
}
|
||||
|
||||
// 删除文件或取消关联用例文件
|
||||
export function deleteFileOrCancelAssociation(data: any) {
|
||||
return MSR.post({ url: DownloadFileUrl, data });
|
||||
}
|
||||
|
||||
export default {};
|
||||
|
|
|
@ -212,5 +212,12 @@ export interface CreateOrUpdateDemand {
|
|||
demandList?: DemandFormList[];
|
||||
[key: string]: any;
|
||||
}
|
||||
// 转存文件
|
||||
export interface OperationFile {
|
||||
projectId: string;
|
||||
caseId: string;
|
||||
fileId: string; // 文件id
|
||||
local: boolean; // 是否是本地
|
||||
}
|
||||
|
||||
export type DemandList = DemandItem[];
|
||||
|
|
|
@ -118,6 +118,8 @@
|
|||
} else {
|
||||
title.value = t('caseManagement.featureCase.creatingCase');
|
||||
}
|
||||
const gatewayAddress = `${window.location.protocol}//${window.location.hostname}:${window.location.port}`;
|
||||
console.log(gatewayAddress);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<MsDrawer
|
||||
v-model:visible="showSettingVisible"
|
||||
:mask="false"
|
||||
:title="t('caseManagement.featureCase.displaySetting')"
|
||||
:title="t('caseManagement.featureCase.detailDisplaySetting')"
|
||||
:width="480"
|
||||
unmount-on-close
|
||||
:footer="false"
|
||||
>
|
||||
<div class="header mb-1 flex h-[22px] items-center justify-between">
|
||||
<div class="flex items-center text-[var(--color-text-4)]"
|
||||
>{{ t('caseManagement.featureCase.displaySetting') }}
|
||||
>{{ t('caseManagement.featureCase.detailDisplaySetting') }}
|
||||
|
||||
<a-tooltip>
|
||||
<template #content>
|
||||
|
|
|
@ -99,6 +99,7 @@ export function getReviewStatusClass(status: keyof typeof StatusType) {
|
|||
*/
|
||||
|
||||
export function convertToFile(fileInfo: AssociatedList): MsFileItem {
|
||||
const gatewayAddress = `${window.location.protocol}//${window.location.hostname}:${window.location.port}`;
|
||||
const fileName = fileInfo.fileType ? `${fileInfo.name}.${fileInfo.fileType || ''}` : `${fileInfo.name}`;
|
||||
const type = fileName.split('.')[1];
|
||||
const file = new File([new Blob()], `${fileName}`, {
|
||||
|
@ -112,9 +113,8 @@ export function convertToFile(fileInfo: AssociatedList): MsFileItem {
|
|||
percent: 0,
|
||||
status: 'done',
|
||||
uid: fileInfo.id,
|
||||
url: `http://172.16.200.18:8081/${fileInfo.filePath || ''}`,
|
||||
url: `${gatewayAddress}/${fileInfo.filePath || ''}`,
|
||||
local: fileInfo.local,
|
||||
};
|
||||
}
|
||||
|
||||
export default {};
|
||||
|
|
|
@ -121,7 +121,7 @@ export default {
|
|||
'caseManagement.featureCase.addDemand': '添加需求',
|
||||
'caseManagement.featureCase.updateDemand': '更新需求 ({name})',
|
||||
'caseManagement.featureCase.updateUser': '处理人',
|
||||
'caseManagement.featureCase.showSetting': '显示设置',
|
||||
'caseManagement.featureCase.displaySetting': '显示设置',
|
||||
'caseManagement.featureCase.tabShowSetting': 'tab 显示设置',
|
||||
'caseManagement.featureCase.closeModuleTab': '关闭: 在抽屉内不展示相关模块',
|
||||
'caseManagement.featureCase.enableModuleTab': '开启: 在抽屉内展示相关模块',
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div v-for="item of filterList" :key="item.id" class="item">
|
||||
<div class="flex">
|
||||
<span class="icon float-left mr-2 h-[40px] w-[40px] rounded">
|
||||
<img class="rounded" :src="`http://172.16.200.18:8081${item.logo}`" alt="log" />
|
||||
<img class="rounded" :src="`${gatewayAddress}${item.logo}`" alt="log" />
|
||||
</span>
|
||||
<div class="flex flex-col justify-start">
|
||||
<p>
|
||||
|
@ -94,7 +94,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-empty v-if="filterList.length < 1" class="mt-20"> </a-empty>
|
||||
<a-empty v-if="filterList.length" class="mt-20"> </a-empty>
|
||||
</a-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -135,6 +135,7 @@
|
|||
const filterList = ref<ServiceList>([]);
|
||||
const data = ref<ServiceList>([]);
|
||||
const loading = ref<boolean>(false);
|
||||
const gatewayAddress = `${window.location.protocol}//${window.location.hostname}:${window.location.port}`;
|
||||
|
||||
// 集成列表
|
||||
const loadList = async () => {
|
||||
|
|
Loading…
Reference in New Issue