Commit 0eaacf60 by lichengming

修改了附件图片预览

parent e788fe57
......@@ -17,7 +17,7 @@
</Col>
<!--列表-->
<Col span="24">
<FilesList ref="fileModal" :fileName="fileName" @on-result-change="_fileData"></FilesList>
<FilesList ref="fileModal" :fileName="fileName" :viewUrl="urlData.downloadFileUrl" @on-result-change="_fileData"></FilesList>
</Col>
</Row>
<!--删除提示框-->
......
......@@ -60,7 +60,7 @@
fixed="right">
<template slot-scope="scope">
<VXEIconList
:msg="iconMsg"
:msg="scope.row.type === 'jpg'||scope.row.type === 'pdf'||scope.row.type === 'png' ?iconMsgJpg:iconMsg"
@on-result-change="_iconClick" :rowData="scope.row"></VXEIconList>
</template>
</vxe-table-column>
......@@ -145,7 +145,8 @@ import BatchUploadSample from './BatchUploadSample'
export default {
components: { BatchUpload, BatchUploadSample },
props: {
fileName: null
fileName: null,
viewUrl: null
},
data() {
return {
......@@ -193,7 +194,7 @@ export default {
Ids: [],
smallUrl: global.staticURL + '/img/smallfile/',
bigUrl: global.staticURL + '/img/bigfile/',
imgUrl: global.baseURL + '/soil/v1/entrust_annex/download/',
imgUrl: '',
action: '',
dataObj: {
file: ''
......@@ -234,6 +235,7 @@ export default {
this.idsObj = idsObj
this.urlData = data
this.action = global.baseURL + data.uploadFileUrl + data.id
this.imgUrl = global.baseURL + data.downloadFileUrl
this.downloadFileUrlFile = data.downloadFileUrl
this.$nextTick(() => {
this._page()
......@@ -328,6 +330,12 @@ export default {
case 'pdf':
this.$pdfView(data.objectKey)
break
case 'png':
const pngViewList = []
pngViewList.push(global.baseURL + this.downloadFileUrlFile + data.id)
this.imgViewList = pngViewList
this.imgViewIndex = 0
break
}
// console.log(data)
// if (this.urlData.viewUri === '/meter/v1/entrust_attachment/preview/') {
......
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