Commit 0eaacf60 by lichengming

修改了附件图片预览

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