董国庆
2025-09-12 527efb36f35b471710e445972673abff45bacdac
laboratory/src/views/reportLibrary/verificationRelease/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"
        @close="handleClose">
        <div class="approval-dialog" :style="{ height: obj.isDetail ? '50vh' : '40vh' }">
    <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" top="5vh" @open="open" po
        :close-on-click-modal="false" @close="handleClose">
        <div class="approval-dialog" :style="{ height: obj.isDetail ? '80vh' : '60vh' }">
            <!-- 左侧审批内容 -->
            <div class="approval-content">
                <Card class="approval-content-card">
@@ -63,10 +63,7 @@
                                </div>
                            </div>
                            <el-form-item prop="feasibilityReportFiles" style="margin-top: -18px">
                                <el-upload
                                disabled
                                    :file-list="fileList"
                                />
                                <el-upload disabled :on-preview="handlePreview" :file-list="fileList" />
                            </el-form-item>
                        </el-form>
@@ -117,7 +114,8 @@
import ApprovalProcess from '@/components/approvalProcess'
import AiEditor from '@/components/AiEditor'
import { getDetail } from '../../service';
import { customUploadRequest, getFullUrl } from "@/utils/utils";
import { customUploadRequest, getFullUrl, getAllocateIp } from "@/utils/utils";
import apiConfig from '@/utils/baseurl';
export default {
@@ -157,10 +155,10 @@
                updateBy: "",
                auditRemark: "",
                auditPersonName: "",
                feasibilityReportFiles:[],
                feasibilityReportFiles: [],
                auditTime: ""
            },
            fileList:[],
            fileList: [],
            tableData: [],
            rules: {},
            status: "2",
@@ -174,6 +172,17 @@
    },
    methods: {
        getFullUrl,
        handlePreview(file) {
            console.log('url', file)
            if (file && file.url) {
                if (file.url && file.url.startsWith(getAllocateIp())) {
                    window.open(file.url, '_blank');
                } else {
                    let newUrl = getAllocateIp() + file.url;
                    window.open(newUrl, '_blank');
                }
            }
        },
        open() {
            if (!this.obj.id) {
                this.$message.error('缺少必要参数');
@@ -192,22 +201,22 @@
                    processData: []
                };
                if (
            data.feasibilityReportFiles &&
            data.feasibilityReportFiles.length > 0
          ) {
            this.fileList =
              data.feasibilityReportFiles.map((file) => {
                return {
                  name: file.fileName,
                  url: getFullUrl(file.fileUrl),
                  uid: file.id,
                };
              });
            this.form.feasibilityReportFiles =data.feasibilityReportFiles
          } else {
            this.fileList = [];
            this.form.feasibilityReportFiles = [];
          }
                    data.feasibilityReportFiles &&
                    data.feasibilityReportFiles.length > 0
                ) {
                    this.fileList =
                        data.feasibilityReportFiles.map((file) => {
                            return {
                                name: file.fileName,
                                url: getFullUrl(file.fileUrl),
                                uid: file.id,
                            };
                        });
                    this.form.feasibilityReportFiles = data.feasibilityReportFiles
                } else {
                    this.fileList = [];
                    this.form.feasibilityReportFiles = [];
                }
                this.tableData = data.projectTeam ?
                    [{ ...data.projectTeam, staffName: data.staffNames || '' }] :
@@ -224,7 +233,7 @@
                    ]
                });
                if (data.status == 2 || data.status == 4|| data.status==3) {
                if (data.status == 2 || data.status == 4 || data.status == 3) {
                    processData.push({
                        type: "primary",
                        mode: "list",
@@ -302,7 +311,9 @@
.approval-dialog {
    display: flex;
    height: 40vh;
    // height: 40vh;
    min-height: 60vh;
    max-height: 80vh;
    .approval-content {
        flex: 3;
@@ -313,9 +324,9 @@
    }
    .approval-flow {
        padding: 40px 20px;
        // width: 405px;
        flex: 2;
        padding: 20px 10px;
        width: 305px;
        // flex: 2;
        background: #ffffff;
        box-shadow: 0px 4px 12px 4px rgba(0, 0, 0, 0.08);
        border-radius: 10px;
@@ -339,7 +350,7 @@
}
.approval-content-card {
    height: calc(100% - 100px) !important;
    height: calc(100% - 10px) !important;
    box-shadow: none !important;
}
@@ -418,7 +429,7 @@
}
.approval-dialog-approve {
    padding: 38px 20px;
    padding: 18px 10px;
    // display: flex;
    align-content: center;