diff --git a/.env.development b/.env.development index a8b3161d..fa714ca5 100644 --- a/.env.development +++ b/.env.development @@ -17,8 +17,8 @@ VITE_API_STATIC_FILE=http://192.168.65.161:3000/static VITE_API_IMAGE_PREVIEW_URL=http://192.168.65.161:3000/imagePreview # 文件预览地址 VITE_API_FILE_PREVIEW_URL=http://192.168.65.161:3000/preview/onlinePreview -# 文件下载地址(暂未使用) -VITE_API_FILE_URL=http://192.168.65.161:7104 +# 文件下载地址 +VITE_API_DOWNLOAD_URL=http://192.168.65.161:9000 # onlyOffice服务 VITE_API_ONLYOFFICE_URL=http://192.168.65.161:18888 # onlyOffice回调服务 diff --git a/.env.eontec b/.env.eontec new file mode 100644 index 00000000..93bf7c03 --- /dev/null +++ b/.env.eontec @@ -0,0 +1,40 @@ +# 测试环境 +NODE_ENV=test +VITE_APP_ENV=test +# 租户 +VITE_API_TENANT_NAME = eontec +# http请求的baseUrl,/api为代理字段 +VITE_API_BASE_URL=/api/simulation +# 本地环境http地址,线上通过nginx转发/api到指定服务地址 +VITE_API_HTTP_URL=http://192.168.65.161:7100 +# ws请求的baseUrl,/wsApi为代理字段 +VITE_API_WS_BASE_URL=/wsApi/simulation +# 本地环境ws地址,线上通过nginx转发/wsApi到指定服务地址 +VITE_API_WS_URL=ws://192.168.65.161:7100 +# 静态资源/usr/local/nginx/html/static +VITE_API_STATIC_FILE=http://192.168.65.161:3000/static +# 图片预览地址 +VITE_API_IMAGE_PREVIEW_URL=http://cidweb.eon.com.cn:3000/imagePreview +# 文件预览地址 +VITE_API_FILE_PREVIEW_URL=http://cidweb.eon.com.cn:3000/preview/onlinePreview +# 文件下载地址 +VITE_API_DOWNLOAD_URL=http://cidweb.eon.com.cn:3000 +# onlyOffice服务 +VITE_API_ONLYOFFICE_URL=http://192.168.65.161:18888 +# onlyOffice回调服务 +VITE_API_ONLYOFFICE_CALLBACK=http://192.168.65.161:3000/api/simulation/data/data/onlyOfficeCallback +# 基线地址,用于onlyOffice预览 +VITE_API_SPDM_URL=http://192.168.65.161:3000/spdm +# CID地址 +VITE_API_CID_URL=http://192.168.65.161:3001 + +VITE_API_PREFIX_APPROVE=/approve/ +VITE_API_PREFIX_CAPABILITY=/capability/ +VITE_API_PREFIX_DATA=/data/ +VITE_API_PREFIX_PBS=/pbs/ +VITE_API_PREFIX_PERFORMANCE=/performance/ +VITE_API_PREFIX_PROJECT=/project/ +VITE_API_PREFIX_SYSTEM=/system/ +VITE_API_PREFIX_TASK=/task/ +VITE_API_PREFIX_APPLICATION=/application/ +VITE_API_PREFIX_FLOWABLE=/flowable/ \ No newline at end of file diff --git a/.env.lyric b/.env.lyric index 5aebdcf9..2897c59b 100644 --- a/.env.lyric +++ b/.env.lyric @@ -17,8 +17,8 @@ VITE_API_STATIC_FILE=http://192.168.30.147:7115/static VITE_API_IMAGE_PREVIEW_URL=http://192.168.30.147:7115/imagePreview # 文件预览地址 VITE_API_FILE_PREVIEW_URL=http://192.168.30.147:7115/preview/onlinePreview -# 文件下载地址(暂未使用) -VITE_API_FILE_URL=http://192.168.30.148:7104 +# 文件下载地址 +VITE_API_DOWNLOAD_URL=http://192.168.30.146:9000 # onlyOffice服务 VITE_API_ONLYOFFICE_URL=http://192.168.30.148:18888 # onlyOffice回调服务 diff --git a/.env.production b/.env.production index 5aa56a0e..6d563bd0 100644 --- a/.env.production +++ b/.env.production @@ -17,8 +17,8 @@ VITE_API_STATIC_FILE=http://192.168.190.161:3000/static VITE_API_IMAGE_PREVIEW_URL=http://192.168.190.161:3000/imagePreview # 文件预览地址 VITE_API_FILE_PREVIEW_URL=http://192.168.190.161:3000/preview/onlinePreview -# 文件下载地址(暂未使用) -VITE_API_FILE_URL=http://192.168.190.161:7104 +# 文件下载地址 +VITE_API_DOWNLOAD_URL=http://192.168.190.161:9000 # onlyOffice服务 VITE_API_ONLYOFFICE_URL=http://192.168.65.161:18888 # onlyOffice回调服务 diff --git a/.env.test b/.env.test index b4a9dcc1..f38e9df5 100644 --- a/.env.test +++ b/.env.test @@ -17,8 +17,8 @@ VITE_API_STATIC_FILE=http://192.168.65.161:3000/static VITE_API_IMAGE_PREVIEW_URL=http://192.168.65.161:3000/imagePreview # 文件预览地址 VITE_API_FILE_PREVIEW_URL=http://192.168.65.161:3000/preview/onlinePreview -# 文件下载地址(暂未使用) -VITE_API_FILE_URL=http://192.168.65.161:7104 +# 文件下载地址 +VITE_API_DOWNLOAD_URL=http://192.168.65.161:9000 # onlyOffice服务 VITE_API_ONLYOFFICE_URL=http://192.168.65.161:18888 # onlyOffice回调服务 diff --git a/package.json b/package.json index 197bdef3..58a19f7a 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "dev": "vite --mode development", "build:dev": "vite build --mode development", "build:lyric": "vite build --mode lyric", + "build:eontec": "vite build --mode eontec", "build:test": "vite build --mode test", "build:prod": "vite build --mode production", "build": "run-p type-check \"build-only {@}\" --", diff --git a/src/components/common/filePreview/index.vue b/src/components/common/filePreview/index.vue index d340a708..35205b24 100644 --- a/src/components/common/filePreview/index.vue +++ b/src/components/common/filePreview/index.vue @@ -105,7 +105,7 @@ const initFun = () => { modeType.value = 'csv'; return; } - if (enableConfigByTenant([TENANT_ENUM.LYRIC])) { + if (enableConfigByTenant([TENANT_ENUM.LYRIC, TENANT_ENUM.EONTEC])) { modeType.value = 'kkFile'; diaVisible.value = true; return; @@ -134,25 +134,31 @@ const getCsvDataFun = () => { current: 1, size: 1, }; - listSimulationKeyResultApi(params).then((res: any) => { - if (res.code === 200) { - csvData.value = res.data?.data[0] || {}; + listSimulationKeyResultApi(params) + .then((res: any) => { + if (res.code === 200) { + csvData.value = res.data?.data[0] || {}; + } + }) + .finally(() => { diaVisible.value = true; - } - }); + }); }; const getOnlyOfficeFun = () => { const params = { fileId: props.fileId, }; - downloadFileForEditApi(params).then((res: any) => { - if (res.code === 200) { - fileData.value = JSON.stringify(res.data); - fileKey.value = `${props.fileId}_${getUserId()}`; + downloadFileForEditApi(params) + .then((res: any) => { + if (res.code === 200) { + fileData.value = JSON.stringify(res.data); + fileKey.value = `${props.fileId}_${getUserId()}`; + } + }) + .finally(() => { diaVisible.value = true; - } - }); + }); }; const closeFun = () => { diff --git a/src/components/common/table/baseTable.vue b/src/components/common/table/baseTable.vue index 781193aa..b06cb1ab 100644 --- a/src/components/common/table/baseTable.vue +++ b/src/components/common/table/baseTable.vue @@ -606,7 +606,6 @@ defineExpose({ setSearchParamsFun, setSearchParamByKeyFun, setOptionsFun, - getTableDataFun, }); diff --git a/src/components/taskDetail/taskInfo.vue b/src/components/taskDetail/taskInfo.vue index 3a7b5ec5..a334354d 100644 --- a/src/components/taskDetail/taskInfo.vue +++ b/src/components/taskDetail/taskInfo.vue @@ -93,6 +93,7 @@ watch( expStatus: localDetail.value.expStatus ? '1' : '0', eMemberList: getMemberListIds(localDetail.value.eMemberList), pMemberList: getMemberListIds(localDetail.value.pMemberList), + planTime: [localDetail.value.beginTime, localDetail.value.endTime], }); standard.value = localDetail.value.standard; if (localDetail.value.flowTemplate) { diff --git a/src/utils/file.ts b/src/utils/file.ts index 2b91812b..7715894f 100644 --- a/src/utils/file.ts +++ b/src/utils/file.ts @@ -223,7 +223,7 @@ export const exportFile = (api: any, tableName: string, fileName: string, params export const downloadFileById = async (fileId: number) => { // 1.点击事件下载 // const link = document.createElement('a'); - // link.href = `${env.VITE_API_FILE_URL}/data/downloadFile?fileId=${fileId}`; + // link.href = `${env.VITE_API_DOWNLOAD_URL}/data/downloadFile?fileId=${fileId}`; // document.body.appendChild(link); // link.click(); // document.body.removeChild(link); @@ -232,7 +232,8 @@ export const downloadFileById = async (fileId: number) => { // 3.浏览器下载 getMinioPresignedUrlApi({ fileId }).then((res: any) => { if (res.code === 200) { - const downloadUrl = res.data.minioDownloadUrl; + const { minioDownloadUrl } = res.data; + const downloadUrl = env.VITE_API_DOWNLOAD_URL + minioDownloadUrl.split(':9000')[1]; window.open(downloadUrl, '_blank'); } }); diff --git a/src/views/data/analysis/index.vue b/src/views/data/analysis/index.vue index 91214a86..fba4890e 100644 --- a/src/views/data/analysis/index.vue +++ b/src/views/data/analysis/index.vue @@ -979,7 +979,7 @@ const updatePerformanceFun = async (data: any) => { const res: any = await editPerformanceApi(data); if (res && res.code === 200) { ElMessage.success('操作成功'); - tableRef.value.getTableDataFun(); + tableRef.value.resetFun(); } }; diff --git a/src/views/data/overview/components/configuration.vue b/src/views/data/overview/components/configuration.vue index d1ecc036..f84279b5 100644 --- a/src/views/data/overview/components/configuration.vue +++ b/src/views/data/overview/components/configuration.vue @@ -22,7 +22,13 @@