Commit 571ff13f authored by wangdanlei's avatar wangdanlei

下载公告方法

parent 808a08da
...@@ -18,6 +18,7 @@ import httpObj from './http' ...@@ -18,6 +18,7 @@ import httpObj from './http'
import _get from 'lodash.get' import _get from 'lodash.get'
import _set from 'lodash.set' import _set from 'lodash.set'
import router from '../router' import router from '../router'
import { downFileByFileId, downFileUseFileId } from '../api/file'
// 限制promise并发数量 // 限制promise并发数量
export function promiseLimit(func, funcParams, limit = 5) { export function promiseLimit(func, funcParams, limit = 5) {
let i = 0 let i = 0
...@@ -1542,6 +1543,13 @@ export function deepClone(obj) { ...@@ -1542,6 +1543,13 @@ export function deepClone(obj) {
} }
return objClone return objClone
} }
export function fileByIdDownload(objName, objId, linkId) {
downFileByFileId(objName, objId, linkId).then(res => {
this.downLoadFile(res)
})
}
export default { export default {
treeFindBackArray, treeFindBackArray,
throttle, throttle,
...@@ -1622,5 +1630,6 @@ export default { ...@@ -1622,5 +1630,6 @@ export default {
getComputeDay, getComputeDay,
groupBy, groupBy,
filterParams, 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