update 标准法规入库/变更流程-流程详情
This commit is contained in:
@@ -57,7 +57,9 @@
|
||||
<div class="detail-page-process-manuscript-item" v-for="(formItem, formIndex) in form[part]" :key="formItem.id">
|
||||
<div class="detail-page-process-manuscript-title">
|
||||
<span>{{ formItem.dbFieldTxt }}</span>
|
||||
<a-button v-if="formIndex === 0" type="primary" ghost icon="file-text">{{ $t('enterpriseStandardLibrary.standard.standardResolutionSheet') }}</a-button>
|
||||
<a-button v-if="formIndex === 0" type="primary" ghost icon="file-text">{{ $t('enterpriseStandardLibrary.standard.standardResolutionSheet')
|
||||
}}
|
||||
</a-button>
|
||||
</div>
|
||||
<template v-if="detailData[formItem.dbFieldName]">
|
||||
<div class="detail-page-process-manuscript-file" v-for="file in detailData[formItem.dbFieldName + 'List']" :key="file.id">
|
||||
@@ -130,6 +132,8 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { previewPdf } from '@/utils/previewPdf'
|
||||
import { getFileInfo } from '../../../../api/api'
|
||||
|
||||
// 支持预览的文件后缀
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'raw', 'pdf', 'docx', 'doc']
|
||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||
const FILE_TYPE_PDF = 'pdf'
|
||||
const Base64 = require('js-base64').Base64
|
||||
@@ -240,7 +244,7 @@ export default {
|
||||
}
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = file.fileName ? file.fileName.split('.')[file.fileName.split('.').length - 1] : ''
|
||||
const canPreview = FILE_TYPE_IMGS.some(tt => fileSuffix.toLowerCase() === tt) || fileSuffix.toLowerCase() === FILE_TYPE_PDF
|
||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
|
||||
// 判断是否为可预览格式的文件
|
||||
if (!canPreview) {
|
||||
this.$message.loading('该文件类型不支持预览,正在为您准备下载...').then(() => {
|
||||
@@ -296,13 +300,14 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
// 单独设置此页面一行三个的label
|
||||
.detail-page-part-form-item label {
|
||||
.detail-page-part-form-item label {
|
||||
width: 8.5em;
|
||||
}
|
||||
|
||||
.detail-page-part-table {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.file-box {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
|
||||
Reference in New Issue
Block a user