Merge remote-tracking branch 'origin/fourthStage' into fourthStage
This commit is contained in:
@@ -52,21 +52,16 @@
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:file="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="handlePreview(record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
<!--佐证材料-->
|
||||
<template v-slot:file="{text}">
|
||||
<a-button class="table-text" v-if="!!text" type="primary" ghost @click="displayFile(text)">{{ $t('view') }}</a-button>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</template>
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
<div id="images">
|
||||
<div class="image" v-viewer="{movable: false}">
|
||||
<img v-show="image" :src="imageUrl" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<!--佐证材料回显-->
|
||||
<upload-file ref="fileDisplayModal" disabled />
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
@@ -78,12 +73,12 @@ import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '../../../../store/mutation-types'
|
||||
import { downloadFile, getFileAccessHttpUrl } from '../../../../api/manage'
|
||||
import { previewPdf } from '../../../../utils/previewPdf'
|
||||
import { Base64 } from 'js-base64'
|
||||
import { kkFilePreview } from '../../../../utils/kkFilePreview'
|
||||
import UploadFile from '../../../../components/UploadFile'
|
||||
|
||||
export default {
|
||||
name: 'BasisDescriptionModal',
|
||||
components: { JTable },
|
||||
components: { UploadFile, JTable },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
@@ -126,7 +121,8 @@ export default {
|
||||
{
|
||||
dataIndex: 'fileId',
|
||||
title: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
|
||||
width: 120
|
||||
width: 120,
|
||||
scopedSlots: { customRender: 'file' }
|
||||
}
|
||||
],
|
||||
image: false,
|
||||
@@ -201,6 +197,9 @@ export default {
|
||||
}
|
||||
// 如果都不能预览就下载
|
||||
downloadFile(`/sys/common/download/${file.id}`, file.fileName)
|
||||
},
|
||||
displayFile (text) {
|
||||
this.$refs.fileDisplayModal.open(text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user