diff --git a/src/common/preview/index.js b/src/common/preview/index.js index 626d94777..4176911a2 100644 --- a/src/common/preview/index.js +++ b/src/common/preview/index.js @@ -5,7 +5,14 @@ import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig' import { getBusStandFileByAttId } from 'api/process' let Base64 = require('js-base64').Base64; import store from '@/store' +import { Loading } from "element-ui"; + export default attId => { + const loading = Loading.service({ + lock: true, + text: '正在加载文件', + spinner: 'el-icon-loading', + }) getBusStandFileByAttId({ attId }).then(res => { @@ -22,6 +29,7 @@ export default attId => { } } - }).catch(e => { + }).finally(() => { + loading.close() }) }