更新版本库
This commit is contained in:
45
src/services/untilService.ts
Normal file
45
src/services/untilService.ts
Normal file
@ -0,0 +1,45 @@
|
||||
import request from '@/utils/request';
|
||||
import {doc} from "prettier";
|
||||
/*雪花id获取*/
|
||||
export async function SnowflakeID() {
|
||||
return request('/api/core-service-ebtp-updownload/v1/business/id', {method: 'get'})
|
||||
}
|
||||
/*文档中心 根据bid获取文件列表 直接返回 upload组件 fileList 格式*/
|
||||
export async function getFileBidList(BidID: any) {
|
||||
if(BidID==null||BidID==""||BidID==undefined){
|
||||
return ;
|
||||
}
|
||||
const Msg = <any>[];
|
||||
await request('/api/core-service-ebtp-updownload/v1/attachment/find',
|
||||
{
|
||||
method: 'post',
|
||||
data: {
|
||||
"bidList": [BidID]
|
||||
}
|
||||
}
|
||||
).then(res => {
|
||||
if (res[BidID].length > 0) {
|
||||
for (const f in res[BidID]) {
|
||||
Msg.push(
|
||||
{
|
||||
uid: res[BidID][f].id,
|
||||
name: res[BidID][f].filename,
|
||||
status: 'done',
|
||||
url: '/api/core-service-ebtp-updownload/v1/attachment/download/oid/' + res[BidID][f].id,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
return Msg;
|
||||
}
|
||||
/*文档中心 逻辑删除 根据objectid */
|
||||
export async function deleteFileObjId(ObjId: any) {
|
||||
request('/api/core-service-ebtp-updownload/v1/attachment/item/'+ObjId,
|
||||
{
|
||||
method: 'delete',
|
||||
}
|
||||
)
|
||||
|
||||
}
|
Reference in New Issue
Block a user