|
@@ -57,6 +57,7 @@ import AudioPlayer from './audio'
|
|
|
import VideoPlayer from './video'
|
|
import VideoPlayer from './video'
|
|
|
import officeViewer from './viewFile'
|
|
import officeViewer from './viewFile'
|
|
|
import { previewFile } from '@/api/platform/file/attachment'
|
|
import { previewFile } from '@/api/platform/file/attachment'
|
|
|
|
|
+import { dbSqlConfig } from '@/constant'
|
|
|
import {
|
|
import {
|
|
|
officeType,
|
|
officeType,
|
|
|
pdfType,
|
|
pdfType,
|
|
@@ -135,7 +136,7 @@ export default {
|
|
|
this.loadViewer()
|
|
this.loadViewer()
|
|
|
},
|
|
},
|
|
|
immediate: true,
|
|
immediate: true,
|
|
|
- deep:true
|
|
|
|
|
|
|
+ deep: true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// beforeDestroy() {
|
|
// beforeDestroy() {
|
|
@@ -177,18 +178,25 @@ export default {
|
|
|
this.fileType = 'word'
|
|
this.fileType = 'word'
|
|
|
this.getFile()
|
|
this.getFile()
|
|
|
},
|
|
},
|
|
|
- getFile() {
|
|
|
|
|
- console.log(this.file,'filefilefile')
|
|
|
|
|
|
|
+ async getFile() {
|
|
|
|
|
+ console.log(this.file, 'filefilefile')
|
|
|
// 1、获取文件数据 及下载流接口
|
|
// 1、获取文件数据 及下载流接口
|
|
|
// 下载地址
|
|
// 下载地址
|
|
|
|
|
+ const sql = `select * from t_ipcc where id_ = '1'`
|
|
|
|
|
+ let ipccUrl = ''
|
|
|
|
|
+ await this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'getIpConfig', params: [null] } : sql).then(res => {
|
|
|
|
|
+ const datas = res.variables.data
|
|
|
|
|
+ const ip = datas[0].nei_rong_
|
|
|
|
|
+ ipccUrl = ip + '/ibps'
|
|
|
|
|
+ })
|
|
|
this.option.url =
|
|
this.option.url =
|
|
|
- BASE_API() +
|
|
|
|
|
|
|
+ (BASE_API() === ipccUrl ? BASE_API() : ipccUrl) +
|
|
|
SYSTEM_URL() +
|
|
SYSTEM_URL() +
|
|
|
'/file/download?attachmentId=' +
|
|
'/file/download?attachmentId=' +
|
|
|
this.file.id
|
|
this.file.id
|
|
|
// 回调接口url
|
|
// 回调接口url
|
|
|
this.option.editUrl =
|
|
this.option.editUrl =
|
|
|
- BASE_API() +
|
|
|
|
|
|
|
+ (BASE_API() === ipccUrl ? BASE_API() : ipccUrl) +
|
|
|
SYSTEM_URL() +
|
|
SYSTEM_URL() +
|
|
|
'/file/editCallback?fileName=' +
|
|
'/file/editCallback?fileName=' +
|
|
|
this.file.fileName +
|
|
this.file.fileName +
|
|
@@ -197,7 +205,7 @@ export default {
|
|
|
this.option.title = this.file.fileName // 文件名称
|
|
this.option.title = this.file.fileName // 文件名称
|
|
|
this.option.fileType = this.file.ext // 类型
|
|
this.option.fileType = this.file.ext // 类型
|
|
|
this.option.data = this.file // 记录编制的位置,需要替换。
|
|
this.option.data = this.file // 记录编制的位置,需要替换。
|
|
|
- console.log(this.option,'3123213131313123')
|
|
|
|
|
|
|
+ console.log(this.option, '3123213131313123')
|
|
|
},
|
|
},
|
|
|
closeDialog() {
|
|
closeDialog() {
|
|
|
this.fileType = ''
|
|
this.fileType = ''
|