文件服务下载改为数据流
新建文件夹&删除文件夹
This commit is contained in:
@@ -47,3 +47,33 @@ export function uploadDeviceFile(data) {
|
||||
data: form
|
||||
})
|
||||
}
|
||||
|
||||
//新建文件夹目录
|
||||
export function addDeviceDir(data) {
|
||||
let form = new FormData()
|
||||
form.append('nDid', data.nDid)
|
||||
form.append('path', data.path)
|
||||
return createAxios({
|
||||
url: `/access-boot/askDeviceData/createFolder`,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: form
|
||||
})
|
||||
}
|
||||
|
||||
//删除文件/文件夹
|
||||
export function delDeviceDir(data) {
|
||||
let form = new FormData()
|
||||
form.append('nDid', data.nDid)
|
||||
form.append('path', data.path)
|
||||
return createAxios({
|
||||
url: `/access-boot/askDeviceData/deleteFolder`,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: form
|
||||
})
|
||||
}
|
||||
|
||||
@@ -8,3 +8,13 @@ export function auditFeedBack(data:any) {
|
||||
params:data
|
||||
})
|
||||
}
|
||||
|
||||
//下载文件
|
||||
export function downLoadFile(filePath:any){
|
||||
return createAxios({
|
||||
url: '/system-boot/file/download',
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
params:{filePath:filePath}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user