2021-01-16 11:29:42 +08:00
|
|
|
import { isEmpty } from '@/utils/CommonUtils';
|
2020-12-23 11:14:35 +08:00
|
|
|
/*
|
|
|
|
* @Author: liqiang
|
|
|
|
* @Date: 2020-12-14 10:13:59
|
2021-01-16 11:29:42 +08:00
|
|
|
* @LastEditTime: 2020-12-30 16:54:33
|
2020-12-23 11:14:35 +08:00
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
|
* @Description: In User Settings Edit
|
|
|
|
* @FilePath: \ebtp-cloud-frontend\src\utils\DownloadUtils.ts
|
|
|
|
*/
|
2021-01-16 11:29:42 +08:00
|
|
|
/**
|
|
|
|
* 下载接口路径(bid)
|
|
|
|
*/
|
|
|
|
export const downloadAttachmentPath = '/api/core-service-ebtp-updownload/v1/attachment/download/bid/';
|
|
|
|
/**
|
|
|
|
* 下载接口路径(oid)
|
|
|
|
*/
|
|
|
|
export const downloadAttachmentPathOId = '/api/core-service-ebtp-updownload/v1/attachment/download/oid/';
|
|
|
|
/**
|
|
|
|
* 获取上传内容数据
|
|
|
|
* @param data
|
|
|
|
*/
|
|
|
|
export function getUploadContent(data:any){
|
|
|
|
if(isEmpty(data)){
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
let file = data.file;
|
|
|
|
return {
|
|
|
|
id:file.response.oid,
|
|
|
|
name:file.name
|
|
|
|
}
|
|
|
|
}
|