puzhibing
6 天以前 0db8c9b94a9ac655549d5eba5c2a6c92ac386c06
culture/src/views/strainReportLibrary/reportLibraryOneFour/components/approval/index.vue
@@ -1,7 +1,7 @@
<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">
@@ -58,9 +58,8 @@
                            </el-form-item>
                            <el-form-item prop="name" style="margin-top: 38px">
                                <el-upload action="#" :file-list="fileList" disabled list-type="text" :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>
@@ -144,7 +143,7 @@
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="handleClose">{{ obj.isDetail ? '关闭' : '取 消' }}</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">审核</el-button>
        </div>
    </el-dialog>
</template>
@@ -153,7 +152,7 @@
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 {
@@ -292,11 +291,9 @@
                    // 图片文件:使用 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 {
                    // 非图片文件:使用下载方式
@@ -319,7 +316,7 @@
                };
                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