| | |
| | | <template> |
| | | <el-dialog :title="dialogTitle" :visible.sync="visible" width="80%" @open="open" po :close-on-click-modal="false" |
| | | <el-dialog :title="dialogTitle" :visible.sync="visible" width="94%" @open="open" :close-on-click-modal="false" |
| | | @close="handleClose"> |
| | | <div class="approval-dialog" :style="{ height: obj?.isDetail ? '50vh' : '40vh' }"> |
| | | <div class="approval-dialog" :style="{ height: obj?.isDetail ? '68vh' : '60vh' }"> |
| | | <!-- 左侧审批内容 --> |
| | | <div class="approval-content"> |
| | | <Card class="approval-content-card"> |
| | |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="name" style="margin-top: 38px"> |
| | | <el-upload action="#" :file-list="fileList" :disabled="roleType == 2" :before-upload="beforeUpload" :on-preview="handlePreview"> |
| | | <el-button size="small" type="primary" v-if="roleType != 2">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">支持 Word、Excel 和所有图片格式,禁止 PPT、PDF、CAJ</div> |
| | | <el-upload action="#" :file-list="fileList" disabled list-type="text" :on-preview="handlePreview"> |
| | | <span v-if="!fileList.length">暂无附件</span> |
| | | </el-upload> |
| | | </el-form-item> |
| | | |
| | |
| | | import ApprovalProcess from '@/components/approvalProcess' |
| | | import AiEditor from '@/components/AiEditor' |
| | | import { getDetail } from '../../service'; |
| | | import { getAllocateIp, downloadFileByUrl, isImageFile } from '@/utils/utils'; |
| | | import { getAllocateIp, getFullUrl, downloadFileByUrl, isImageFile, normalizeFileList } from '@/utils/utils'; |
| | | |
| | | |
| | | export default { |
| | |
| | | // 图片文件:使用 window.open 预览 |
| | | if (file.url && file.url.startsWith('http')) { |
| | | console.log('图片链接', file.url) |
| | | window.open(file.url, '_blank'); |
| | | window.open(getFullUrl(file.url), '_blank'); |
| | | } else { |
| | | let newUrl = getAllocateIp() + file.url; |
| | | console.log('图片链接', newUrl) |
| | | window.open(newUrl, '_blank'); |
| | | window.open(getFullUrl(file.url), '_blank'); |
| | | } |
| | | } else { |
| | | // 非图片文件:使用下载方式 |
| | |
| | | }; |
| | | |
| | | let arr = (data.evaluate || '').split(',') |
| | | this.fileList = data.enclosureUrl ? JSON.parse(data.enclosureUrl) : [] |
| | | this.fileList = normalizeFileList(data.enclosureUrl) |
| | | this.assessmentTable = this.assessmentTable.map((item, index) => { |
| | | item.selectedScore = Number(arr[index]) |
| | | return item |