Commit 571ff13f authored by wangdanlei's avatar wangdanlei

下载公告方法

parent 808a08da
......@@ -18,6 +18,7 @@ import httpObj from './http'
import _get from 'lodash.get'
import _set from 'lodash.set'
import router from '../router'
import { downFileByFileId, downFileUseFileId } from '../api/file'
// 限制promise并发数量
export function promiseLimit(func, funcParams, limit = 5) {
let i = 0
......@@ -1542,6 +1543,13 @@ export function deepClone(obj) {
}
return objClone
}
export function fileByIdDownload(objName, objId, linkId) {
downFileByFileId(objName, objId, linkId).then(res => {
this.downLoadFile(res)
})
}
export default {
treeFindBackArray,
throttle,
......@@ -1622,5 +1630,6 @@ export default {
getComputeDay,
groupBy,
filterParams,
deepClone
deepClone,
fileByIdDownload
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment