[update] 标准法规符合性排查中佐证材料查看改成弹框查看
This commit is contained in:
+8
-46
@@ -86,20 +86,13 @@
|
||||
|
||||
<!-- 佐证材料 -->
|
||||
<template v-slot:material="text, record">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? record.material_dictText : global.emptyLine }}</template>
|
||||
<a v-if="text" class="link-a" @click="previewFile(record)">{{ record.material_dictText }}</a>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
<a v-if="text" class="link-a" @click="handleMaterialClick(record)">{{ $t('view') }}</a>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<!-- 预览图片的容器 -->
|
||||
<div id="images">
|
||||
<div class="image" v-viewer="{movable: false}">
|
||||
<img v-show="image" :src="imageUrl">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件列表查看 -->
|
||||
<upload-file ref="uploadFile" disabled></upload-file>
|
||||
|
||||
</j-modal>
|
||||
</template>
|
||||
@@ -112,6 +105,7 @@ import { kkFilePreview } from '@/utils/kkFilePreview'
|
||||
import { downloadFile, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { queryDepartTreeList } from '../../../../api/api'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import UploadFile from '@/components/UploadFile'
|
||||
|
||||
// 支持预览的文件后缀
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
|
||||
@@ -120,6 +114,7 @@ const FILE_TYPE_PDF = 'pdf'
|
||||
|
||||
export default {
|
||||
name: 'AssessmentLookModal',
|
||||
components: { UploadFile },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
@@ -274,41 +269,8 @@ export default {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
previewFile (record) {
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = record.material_dictText ? record.material_dictText.split('.')[record.material_dictText.split('.').length - 1].toLowerCase() : ''
|
||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
|
||||
// 判断是否为可预览格式的文件
|
||||
if (!canPreview) {
|
||||
this.$message.loading('该文件类型不支持预览,正在为您准备下载...').then(() => {
|
||||
this.handleDownload(record)
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.material}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.material_dictText}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||
this.imageUrl = getFileAccessHttpUrl(record.material)
|
||||
// 获取viewer实例
|
||||
const viewer = this.$el.querySelector('.image').$viewer
|
||||
// 调用show方法进行显示预览图
|
||||
viewer.show()
|
||||
// this.$refs.imagePreviewModal.open(file)
|
||||
return
|
||||
}
|
||||
// pdf预览
|
||||
if (canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
|
||||
const url = previewPdf(record.material)
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
// 其余可预览文件仍使用KKFile进行预览
|
||||
kkFilePreview(fileFullUrl)
|
||||
},
|
||||
// 下载
|
||||
handleDownload (record) {
|
||||
// 下载文件
|
||||
downloadFile(`/sys/common/download/${record.material}`, record.material_dictText)
|
||||
handleMaterialClick (record) {
|
||||
this.$refs.uploadFile.open(record.material)
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
|
||||
+11
-7
@@ -15,24 +15,25 @@
|
||||
|
||||
<!-- 佐证材料 -->
|
||||
<template v-slot:material="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? record.material_dictText : global.emptyLine }}</template>
|
||||
<a v-if="text" class="link-a" @click="previewFile(record)">{{ record.material_dictText }}</a>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
<a v-if="text" class="link-a" @click="handleMaterialClick(record)">{{ $t('view') }}</a>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
<!-- 文件列表查看 -->
|
||||
<upload-file ref="uploadFile" disabled></upload-file>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import UploadFile from '@/components/UploadFile'
|
||||
|
||||
export default {
|
||||
name: 'FinishAuditBaseInfo',
|
||||
components: {
|
||||
JTable
|
||||
JTable,
|
||||
UploadFile
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
@@ -185,10 +186,13 @@ export default {
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
async getDataValidate () {
|
||||
let data = {}
|
||||
const data = {}
|
||||
data.detailInfoList = JSON.parse(JSON.stringify(this.dataSource))
|
||||
return data
|
||||
},
|
||||
handleMaterialClick (record) {
|
||||
this.$refs.uploadFile.open(record.material)
|
||||
},
|
||||
handleTableChange (pagination, filters, sorter) {
|
||||
// 分页、排序、筛选变化时触发
|
||||
this.ipagination = pagination
|
||||
|
||||
+9
-6
@@ -22,11 +22,8 @@
|
||||
|
||||
<!-- 佐证材料 -->
|
||||
<template v-slot:material="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? record.material_dictText : global.emptyLine }}</template>
|
||||
<a v-if="text" class="link-a" @click="previewFile(record)">{{ record.material_dictText }}</a>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
<a v-if="text" class="link-a" @click="handleMaterialClick(record)">{{ $t('view') }}</a>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</template>
|
||||
|
||||
<!-- 操作栏 -->
|
||||
@@ -96,6 +93,8 @@
|
||||
</a-form-model>
|
||||
<!-- 编辑弹框 -->
|
||||
<main-finder-collect-edit-modal ref="editRef" @ok="editOk"/>
|
||||
<!-- 文件列表查看 -->
|
||||
<upload-file ref="uploadFile" disabled></upload-file>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -104,10 +103,11 @@ import JTable from '@/components/jero/JTable'
|
||||
import UserSelection from '@/components/selection/UserSelection'
|
||||
import { downFile } from '../../../../api/manage'
|
||||
import MainFinderCollectEditModal from './MainFinderCollectEditModal'
|
||||
import UploadFile from '@/components/UploadFile'
|
||||
|
||||
export default {
|
||||
name: 'MainFinderCollectBaseInfo',
|
||||
components: { JTable, UserSelection, MainFinderCollectEditModal },
|
||||
components: { JTable, UserSelection, MainFinderCollectEditModal, UploadFile },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
@@ -319,6 +319,9 @@ export default {
|
||||
handleTableChange (pagination) {
|
||||
this.ipagination = pagination
|
||||
},
|
||||
handleMaterialClick (record) {
|
||||
this.$refs.uploadFile.open(record.material)
|
||||
},
|
||||
handleExportXls (fileName, fileSuffix = '.xls') {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = this.$t('exportFile')
|
||||
|
||||
+11
-7
@@ -22,25 +22,26 @@
|
||||
|
||||
<!-- 佐证材料 -->
|
||||
<template v-slot:material="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? record.material_dictText : global.emptyLine }}</template>
|
||||
<a v-if="text" class="link-a" @click="previewFile(record)">{{ record.material_dictText }}</a>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
<a v-if="text" class="link-a" @click="handleMaterialClick(record)">{{ $t('view') }}</a>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
<!-- 文件列表查看 -->
|
||||
<upload-file ref="uploadFile" disabled></upload-file>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import { downFile } from '../../../../api/manage'
|
||||
import UploadFile from '@/components/UploadFile'
|
||||
|
||||
export default {
|
||||
name: 'MainFinderSingleAuditBaseInfo',
|
||||
components: {
|
||||
JTable
|
||||
JTable,
|
||||
UploadFile
|
||||
},
|
||||
props: {
|
||||
disabled: {
|
||||
@@ -203,13 +204,16 @@ export default {
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
async getDataValidate () {
|
||||
let data = {}
|
||||
const data = {}
|
||||
data.detailInfoList = JSON.parse(JSON.stringify(this.dataSource))
|
||||
return data
|
||||
},
|
||||
handleTableChange (pagination) {
|
||||
this.ipagination = pagination
|
||||
},
|
||||
handleMaterialClick (record) {
|
||||
this.$refs.uploadFile.open(record.material)
|
||||
},
|
||||
handleExportXls (fileName, fileSuffix = '.xls') {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = this.$t('exportFile')
|
||||
|
||||
Reference in New Issue
Block a user