<template>
    <div class="default-main">
         <div v-if="detailLoading" class="loading">
            <el-spin description="加载中..." />
        </div>
        <div v-else>
        <div style="display: flex; justify-content: space-between">
            <el-descriptions :column="1" border style="flex: 1" class="mr20" title="变更前">
                <el-descriptions-item label="填报人">
                    {{ detailData.reporter }}
                </el-descriptions-item>
                <el-descriptions-item label="填报日期">
                    {{ formatDate(detailData.reportDate, 'YYYY-MM-DD') }}
                </el-descriptions-item>
                <el-descriptions-item label="填报部门">
                    {{ detailData.orgName }}
                </el-descriptions-item>
                <el-descriptions-item label="工程预期投产日期">
                    {{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
                </el-descriptions-item>
                <el-descriptions-item label="用户性质">
                    {{
                        userTypeList.find(item => {
                            return item.value == detailData.userType
                        })?.label
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="所在地市">
                    {{ detailData.city }}
                </el-descriptions-item>
                <el-descriptions-item label="归口管理部门">
                    {{ detailData.responsibleDepartment }}
                </el-descriptions-item>
                <el-descriptions-item label="用户状态">
                    {{
                        userStateList.find(item => {
                            return item.value == detailData.userStatus
                        })?.label
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="变电站">
                    {{ detailData.substation }}
                </el-descriptions-item>
                <el-descriptions-item label="工程名">
                    {{ detailData.projectName }}
                </el-descriptions-item>
                <el-descriptions-item label="电压等级">
                    {{
                        voltageLevelList.find(item => {
                            return item.id == detailData.voltageLevel
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="非线性终端类型" v-if="detailData.userType == 0 || detailData.userType == 1">
                    {{ proviteData.nonlinearDeviceType ? proviteData.nonlinearDeviceType : '-' }}
                </el-descriptions-item>
                <el-descriptions-item label="预测评估单位">
                    {{ detailData.evaluationDept }}
                </el-descriptions-item>
                <el-descriptions-item label="预测评估结论" :span="2">
                    {{ detailData.evaluationConclusion }}
                </el-descriptions-item>
                <el-descriptions-item :label="detailData.userType == '4' || detailData.userType == '5'
                    ? '非线性设备类型: '
                    : '非线性负荷类型：'
                    " v-if="
                        detailData.userType == '2' ||
                        detailData.userType == '3' ||
                        detailData.userType == '4' ||
                        detailData.userType == '5'
                    ">
                    {{ proviteData.nonlinearLoadType }}
                </el-descriptions-item>
                <el-descriptions-item label="是否需要治理">
                    <span v-if="detailData.userType == 0 || detailData.userType == 1">
                        {{ proviteData.needGovernance == 0 ? '否' : '是' }}
                    </span>
                    <span v-if="
                        detailData.userType == 2 ||
                        detailData.userType == 3 ||
                        detailData.userType == 4 ||
                        detailData.userType == 5
                    ">
                        {{ proviteData.needGovernance == 0 ? '否' : '是' }}
                    </span>
                    <span v-if="detailData.userType == 6">{{ proviteData.needGovernance == 0 ? '否' : '是' }}</span>
                </el-descriptions-item>
                <el-descriptions-item label="是否开展背景测试">
                    <span v-if="detailData.userType == 0 || detailData.userType == 1">
                        {{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
                    </span>
                    <span v-if="
                        detailData.userType == 2 ||
                        detailData.userType == 3 ||
                        detailData.userType == 4 ||
                        detailData.userType == 5
                    ">
                        {{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
                    </span>
                    <span v-if="detailData.userType == 6">
                        {{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
                    </span>
                </el-descriptions-item>
                <el-descriptions-item label="是否开展抗扰度测试" v-if="detailData.userType == 6">
                    <span>
                        {{ proviteData.antiInterferenceTest == 0 ? '否' : '是' }}
                    </span>
                </el-descriptions-item>
                <el-descriptions-item label="用户协议容量（MVA）" v-if="detailData.userType == 0 || detailData.userType == 1">
                    {{ proviteData.agreementCapacity }}
                </el-descriptions-item>
                <el-descriptions-item label="PCC供电设备容量（MVA）" v-if="
                    detailData.userType == '2' ||
                    detailData.userType == '3' ||
                    detailData.userType == '4' ||
                    detailData.userType == '5'
                ">
                    {{ proviteData.pccEquipmentCapacity }}
                </el-descriptions-item>
                <el-descriptions-item label="基准短路容量（MVA）" v-if="
                    detailData.userType == '2' ||
                    detailData.userType == '3' ||
                    detailData.userType == '4' ||
                    detailData.userType == '5'
                ">
                    {{ proviteData.baseShortCircuitCapacity }}
                </el-descriptions-item>
                <el-descriptions-item label="系统最小短路容量（MVA）" v-if="
                    detailData.userType == '2' ||
                    detailData.userType == '3' ||
                    detailData.userType == '4' ||
                    detailData.userType == '5'
                ">
                    {{ proviteData?.minShortCircuitCapacity }}
                </el-descriptions-item>
                <el-descriptions-item label="用户用电协议容量（MVA）" v-if="
                    detailData.userType == '2' ||
                    detailData.userType == '3' ||
                    detailData.userType == '4' ||
                    detailData.userType == '5'
                ">
                    {{ proviteData?.userAgreementCapacity }}
                </el-descriptions-item>
                <el-descriptions-item label="PCC点" v-if="detailData.userType != 0 && detailData.userType != 1">
                    {{ proviteData?.pccPoint }}
                </el-descriptions-item>
                <el-descriptions-item label="评估类型" v-if="detailData.userType != 0 && detailData.userType != 1">
                    {{
                        evaluationTypeList.find(item => {
                            return item.id == proviteData?.evaluationType
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="预测评估评审单位" v-if="detailData.userType != 0 && detailData.userType != 1">
                    {{ proviteData?.evaluationChekDept }}
                </el-descriptions-item>
                <el-descriptions-item label="行业" v-if="detailData.userType == 6">
                    {{
                        industryList.find(item => {
                            return item.id == proviteData.industry
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="敏感终端名称" v-if="detailData.userType == 6">
                    {{ proviteData.deviceName }}
                </el-descriptions-item>
                <!--            <el-descriptions-item label="供电电源数量" v-if="detailData.userType == 6">-->
                <!--                {{ proviteData.powerSupplyCount }}-->
                <!--            </el-descriptions-item>-->
                <el-descriptions-item label="供电电源情况" v-if="detailData.userType == 6">
                    {{
                        powerSupplyInfoOptionList.find(item => {
                            return item.id == proviteData.powerSupplyInfo
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="供电电源" :span="2" v-if="detailData.userType == 6">
                    {{ proviteData.powerSupply }}
                </el-descriptions-item>
                <el-descriptions-item label="负荷级别" v-if="detailData.userType == 6">
                    {{
                        loadLevelOptionList.find(item => {
                            return item.id == proviteData.loadLevel
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="敏感电能质量指标" v-if="detailData.userType == 6">
                    {{
                        energyQualityIndexList.find(item => {
                            return item.id == proviteData.energyQualityIndex
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="可研报告">
                    <span v-if="detailData.userType == 0 || detailData.userType == 1">
                        <el-icon class="elView" v-if="proviteData?.feasibilityReport?.name ">
                            <View @click="openFile(proviteData?.feasibilityReport?.name)" />
                        </el-icon>
                        <span  class="aLoad" @click="download(proviteData.feasibilityReport.keyName)" rel="nofollow">
                            {{ proviteData.feasibilityReport?.name }}
                        </span >
                    </span>
                    <span v-if="
                        detailData.userType == 2 ||
                        detailData.userType == 3 ||
                        detailData.userType == 4 ||
                        detailData.userType == 5
                    ">
                        <el-icon class="elView" v-if="proviteData?.feasibilityReport?.name ">
                            <View @click="openFile(proviteData?.feasibilityReport?.name)" />
                        </el-icon>
                        <span   class="aLoad" @click="download(proviteData.feasibilityReport.keyName)">
                            {{ proviteData.feasibilityReport?.name }}
                        </span >
                    </span>
                    <span v-if="detailData.userType == 6">
                        <el-icon class="elView" v-if="proviteData?.feasibilityReport?.name ">
                            <View @click="openFile(proviteData?.feasibilityReport?.name)" />
                        </el-icon>
                        <span  class="aLoad" @click="download(proviteData.feasibilityReport.keyName)">
                            {{ proviteData.feasibilityReport?.name }}
                        </span >
                    </span>
                </el-descriptions-item>
                <el-descriptions-item label="项目初步设计说明书">
                    <el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription?.name ">
                        <View @click="openFile(proviteData?.preliminaryDesignDescription?.name)" />
                    </el-icon>

                    <span  class="aLoad" @click="download(proviteData.preliminaryDesignDescription.keyName)">
                        {{ proviteData?.preliminaryDesignDescription?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="预测评估报告">
                    <el-icon class="elView" v-if="proviteData?.predictionEvaluationReport?.name ">
                        <View @click="openFile(proviteData?.predictionEvaluationReport?.name)" />
                    </el-icon>
                    <span   class="aLoad" @click="download(proviteData.predictionEvaluationReport.keyName)">
                        {{ proviteData?.predictionEvaluationReport?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="预测评估评审意见报告">
                    <el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions?.name ">
                        <View @click="openFile(proviteData?.predictionEvaluationReviewOpinions?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.predictionEvaluationReviewOpinions.keyName)">
                        {{ proviteData?.predictionEvaluationReviewOpinions?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="用户接入变电站主接线示意图" v-if="detailData.userType != 0 && detailData.userType != 1">
                    <el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram?.name ">
                        <View @click="openFile(proviteData?.substationMainWiringDiagram?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.substationMainWiringDiagram.keyName)">
                        {{ proviteData?.substationMainWiringDiagram?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="主要敏感终端清单" v-if="detailData.userType == 6">
                    <el-icon class="elView" v-if="proviteData?.sensitiveDevices?.name ">
                        <View @click="openFile(proviteData?.sensitiveDevices?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.sensitiveDevices.keyName)">
                        {{ proviteData?.sensitiveDevices?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6">
                    <el-icon class="elView" v-if="proviteData?.antiInterferenceReport?.name">
                        <View @click="openFile(proviteData?.antiInterferenceReport?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.antiInterferenceReport.keyName)">
                        {{ proviteData?.antiInterferenceReport?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="背景电能质量测试报告" v-if="detailData.userType == 6">
                    <el-icon class="elView" v-if="proviteData?.powerQualityReport?.name ">
                        <View @click="openFile(proviteData?.powerQualityReport?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.powerQualityReport.keyName)">
                        {{ proviteData?.powerQualityReport?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="其他附件"
                    v-if="proviteData?.additionalAttachments && proviteData?.additionalAttachments?.url">
                    <el-icon class="elView" v-if="proviteData?.additionalAttachments?.name ">
                        <View @click="openFile(proviteData?.additionalAttachments?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.additionalAttachments.keyName)">
                        {{ proviteData?.additionalAttachments?.name }}
                    </span >
                </el-descriptions-item>
            </el-descriptions>
            <el-descriptions :column="1" border style="flex: 1" title="变更后">
                <el-descriptions-item label="填报人" :label-class-name="changeTheField?.reporter ? 'my-content' : ''"
                    :class-name="changeTheField?.reporter ? 'my-content' : ''">
                    {{ detailData1.reporter }}
                </el-descriptions-item>
                <el-descriptions-item label="填报日期" :label-class-name="changeTheField?.reportDate ? 'my-content' : ''"
                    :class-name="changeTheField?.reportDate ? 'my-content' : ''">
                    {{ formatDate(detailData1.reportDate, 'YYYY-MM-DD') }}
                </el-descriptions-item>
                <el-descriptions-item label="填报部门" :label-class-name="changeTheField?.orgName ? 'my-content' : ''"
                    :class-name="changeTheField?.orgName ? 'my-content' : ''">
                    {{ detailData1.orgName }}
                </el-descriptions-item>
                <el-descriptions-item label="工程预期投产日期"
                    :label-class-name="changeTheField?.expectedProductionDate ? 'my-content' : ''"
                    :class-name="changeTheField?.expectedProductionDate ? 'my-content' : ''">
                    {{ formatDate(detailData1.expectedProductionDate, 'YYYY-MM-DD') }}
                </el-descriptions-item>
                <el-descriptions-item label="用户性质" :label-class-name="changeTheField?.userType ? 'my-content' : ''"
                    :class-name="changeTheField?.userType ? 'my-content' : ''">
                    {{
                        userTypeList.find(item => {
                            return item.value == detailData1.userType
                        })?.label
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="所在地市" :label-class-name="changeTheField?.city ? 'my-content' : ''"
                    :class-name="changeTheField?.city ? 'my-content' : ''">
                    {{ detailData1.city }}
                </el-descriptions-item>
                <el-descriptions-item label="归口管理部门"
                    :label-class-name="changeTheField?.responsibleDepartment ? 'my-content' : ''"
                    :class-name="changeTheField?.responsibleDepartment ? 'my-content' : ''">
                    {{ detailData1.responsibleDepartment }}
                </el-descriptions-item>
                <el-descriptions-item label="用户状态" :label-class-name="changeTheField?.userStatus ? 'my-content' : ''"
                    :class-name="changeTheField?.userStatus ? 'my-content' : ''">
                    {{
                        userStateList.find(item => {
                            return item.value == detailData1.userStatus
                        })?.label
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="变电站" :label-class-name="changeTheField?.substation ? 'my-content' : ''"
                    :class-name="changeTheField?.substation ? 'my-content' : ''">
                    {{ detailData1.substation }}
                </el-descriptions-item>
                <el-descriptions-item label="工程名" :label-class-name="changeTheField?.projectName ? 'my-content' : ''"
                    :class-name="changeTheField?.projectName ? 'my-content' : ''">
                    {{ detailData1.projectName }}
                </el-descriptions-item>
                <el-descriptions-item label="电压等级" :label-class-name="changeTheField?.voltageLevel ? 'my-content' : ''"
                    :class-name="changeTheField?.voltageLevel ? 'my-content' : ''">
                    {{
                        voltageLevelList.find(item => {
                            return item.id == detailData1.voltageLevel
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="非线性终端类型" v-if="detailData1.userType == 0 || detailData1.userType == 1"
                    :label-class-name="changeTheField?.nonlinearDeviceType ? 'my-content' : ''"
                    :class-name="changeTheField?.nonlinearDeviceType ? 'my-content' : ''">
                    {{ proviteData1.nonlinearDeviceType ? proviteData1.nonlinearDeviceType : '-' }}
                </el-descriptions-item>
                <el-descriptions-item label="预测评估单位"
                    :label-class-name="changeTheField?.evaluationDept ? 'my-content' : ''"
                    :class-name="changeTheField?.evaluationDept ? 'my-content' : ''">
                    {{ detailData1.evaluationDept }}
                </el-descriptions-item>
                <el-descriptions-item label="预测评估结论" :span="2"
                    :label-class-name="changeTheField?.evaluationConclusion ? 'my-content' : ''"
                    :class-name="changeTheField?.evaluationConclusion ? 'my-content' : ''">
                    {{ detailData1.evaluationConclusion }}
                </el-descriptions-item>
                <el-descriptions-item :label="detailData1.userType == '4' || detailData1.userType == '5'
                    ? '非线性设备类型: '
                    : '非线性负荷类型：'
                    " v-if="
                        detailData1.userType == '2' ||
                        detailData1.userType == '3' ||
                        detailData1.userType == '4' ||
                        detailData1.userType == '5'
                    " :label-class-name="changeTheField?.nonlinearLoadType ? 'my-content' : ''"
                    :class-name="changeTheField?.nonlinearLoadType ? 'my-content' : ''">
                    {{ proviteData1.nonlinearLoadType }}
                </el-descriptions-item>
                <el-descriptions-item label="是否需要治理"
                    :label-class-name="changeTheField?.needGovernance ? 'my-content' : ''"
                    :class-name="changeTheField?.needGovernance ? 'my-content' : ''">
                    <span v-if="detailData1.userType == 0 || detailData1.userType == 1">
                        {{ proviteData1.needGovernance == 0 ? '否' : '是' }}
                    </span>
                    <span v-if="
                        detailData1.userType == 2 ||
                        detailData1.userType == 3 ||
                        detailData1.userType == 4 ||
                        detailData1.userType == 5
                    ">
                        {{ proviteData1.needGovernance == 0 ? '否' : '是' }}
                    </span>
                    <span v-if="detailData1.userType == 6">{{ proviteData1.needGovernance == 0 ? '否' : '是' }}</span>
                </el-descriptions-item>
                <el-descriptions-item label="是否开展背景测试"
                    :label-class-name="changeTheField?.backgroundTestPerformed ? 'my-content' : ''"
                    :class-name="changeTheField?.backgroundTestPerformed ? 'my-content' : ''">
                    <span v-if="detailData1.userType == 0 || detailData1.userType == 1">
                        {{ proviteData1.backgroundTestPerformed == 0 ? '否' : '是' }}
                    </span>
                    <span v-if="
                        detailData1.userType == 2 ||
                        detailData1.userType == 3 ||
                        detailData1.userType == 4 ||
                        detailData1.userType == 5
                    ">
                        {{ proviteData1.backgroundTestPerformed == 0 ? '否' : '是' }}
                    </span>
                    <span v-if="detailData1.userType == 6">
                        {{ proviteData1.backgroundTestPerformed == 0 ? '否' : '是' }}
                    </span>
                </el-descriptions-item>
                <el-descriptions-item label="是否开展抗扰度测试" v-if="detailData1.userType == 6"
                    :label-class-name="changeTheField?.antiInterferenceTest ? 'my-content' : ''"
                    :class-name="changeTheField?.antiInterferenceTest ? 'my-content' : ''">
                    <span>
                        {{ proviteData1.antiInterferenceTest == 0 ? '否' : '是' }}
                    </span>
                </el-descriptions-item>
                <el-descriptions-item label="用户协议容量（MVA）" v-if="detailData1.userType == 0 || detailData1.userType == 1"
                    :label-class-name="changeTheField?.agreementCapacity ? 'my-content' : ''"
                    :class-name="changeTheField?.agreementCapacity ? 'my-content' : ''">
                    {{ proviteData1.agreementCapacity }}
                </el-descriptions-item>
                <el-descriptions-item label="PCC供电设备容量（MVA）" v-if="
                    detailData1.userType == '2' ||
                    detailData1.userType == '3' ||
                    detailData1.userType == '4' ||
                    detailData1.userType == '5'
                " :label-class-name="changeTheField?.pccEquipmentCapacity ? 'my-content' : ''"
                    :class-name="changeTheField?.pccEquipmentCapacity ? 'my-content' : ''">
                    {{ proviteData1.pccEquipmentCapacity }}
                </el-descriptions-item>
                <el-descriptions-item label="基准短路容量（MVA）" v-if="
                    detailData1.userType == '2' ||
                    detailData1.userType == '3' ||
                    detailData1.userType == '4' ||
                    detailData1.userType == '5'
                " :label-class-name="changeTheField?.baseShortCircuitCapacity ? 'my-content' : ''"
                    :class-name="changeTheField?.baseShortCircuitCapacity ? 'my-content' : ''">
                    {{ proviteData1.baseShortCircuitCapacity }}
                </el-descriptions-item>
                <el-descriptions-item label="系统最小短路容量（MVA）" v-if="
                    detailData1.userType == '2' ||
                    detailData1.userType == '3' ||
                    detailData1.userType == '4' ||
                    detailData1.userType == '5'
                " :label-class-name="changeTheField?.minShortCircuitCapacity ? 'my-content' : ''"
                    :class-name="changeTheField?.minShortCircuitCapacity ? 'my-content' : ''">
                    {{ proviteData1?.minShortCircuitCapacity }}
                </el-descriptions-item>
                <el-descriptions-item label="用户用电协议容量（MVA）" v-if="
                    detailData1.userType == '2' ||
                    detailData1.userType == '3' ||
                    detailData1.userType == '4' ||
                    detailData1.userType == '5'
                " :label-class-name="changeTheField?.userAgreementCapacity ? 'my-content' : ''"
                    :class-name="changeTheField?.userAgreementCapacity ? 'my-content' : ''">
                    {{ proviteData1?.userAgreementCapacity }}
                </el-descriptions-item>
                <el-descriptions-item label="PCC点" v-if="detailData1.userType != 0 && detailData1.userType != 1"
                    :label-class-name="changeTheField?.pccPoint ? 'my-content' : ''"
                    :class-name="changeTheField?.pccPoint ? 'my-content' : ''">
                    {{ proviteData1?.pccPoint }}
                </el-descriptions-item>
                <el-descriptions-item label="评估类型" v-if="detailData1.userType != 0 && detailData1.userType != 1"
                    :label-class-name="changeTheField?.evaluationType ? 'my-content' : ''"
                    :class-name="changeTheField?.evaluationType ? 'my-content' : ''">
                    {{
                        evaluationTypeList.find(item => {
                            return item.id == proviteData1?.evaluationType
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="预测评估评审单位" v-if="detailData1.userType != 0 && detailData1.userType != 1"
                    :label-class-name="changeTheField?.evaluationChekDept ? 'my-content' : ''"
                    :class-name="changeTheField?.evaluationChekDept ? 'my-content' : ''">
                    {{ proviteData1?.evaluationChekDept }}
                </el-descriptions-item>
                <el-descriptions-item label="行业" v-if="detailData1.userType == 6"
                    :label-class-name="changeTheField?.industry ? 'my-content' : ''"
                    :class-name="changeTheField?.industry ? 'my-content' : ''">
                    {{
                        industryList.find(item => {
                            return item.id == proviteData1.industry
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="敏感终端名称" v-if="detailData1.userType == 6"
                    :label-class-name="changeTheField?.deviceName ? 'my-content' : ''"
                    :class-name="changeTheField?.deviceName ? 'my-content' : ''">
                    {{ proviteData1.deviceName }}
                </el-descriptions-item>
                <!--            <el-descriptions-item label="供电电源数量" v-if="detailData1.userType == 6">-->
                <!--                {{ proviteData1.powerSupplyCount }}-->
                <!--            </el-descriptions-item>-->
                <el-descriptions-item label="供电电源情况" v-if="detailData1.userType == 6"
                    :label-class-name="changeTheField?.powerSupplyInfo ? 'my-content' : ''"
                    :class-name="changeTheField?.powerSupplyInfo ? 'my-content' : ''">
                    {{
                        powerSupplyInfoOptionList.find(item => {
                            return item.id == proviteData1.powerSupplyInfo
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="供电电源" :span="2" v-if="detailData1.userType == 6"
                    :label-class-name="changeTheField?.powerSupply ? 'my-content' : ''"
                    :class-name="changeTheField?.powerSupply ? 'my-content' : ''">
                    {{ proviteData1.powerSupply }}
                </el-descriptions-item>
                <el-descriptions-item label="负荷级别" v-if="detailData1.userType == 6"
                    :label-class-name="changeTheField?.loadLevel ? 'my-content' : ''"
                    :class-name="changeTheField?.loadLevel ? 'my-content' : ''">
                    {{
                        loadLevelOptionList.find(item => {
                            return item.id == proviteData1.loadLevel
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="敏感电能质量指标" v-if="detailData1.userType == 6"
                    :label-class-name="changeTheField?.energyQualityIndex ? 'my-content' : ''"
                    :class-name="changeTheField?.energyQualityIndex ? 'my-content' : ''">
                    {{
                        energyQualityIndexList.find(item => {
                            return item.id == proviteData1.energyQualityIndex
                        })?.name
                    }}
                </el-descriptions-item>
                <el-descriptions-item label="可研报告"
                    :label-class-name="changeTheField?.feasibilityReport ? 'my-content' : ''"
                    :class-name="changeTheField?.feasibilityReport ? 'my-content' : ''">
                    <span v-if="detailData1.userType == 0 || detailData1.userType == 1"
                        :label-class-name="changeTheField?.feasibilityReport ? 'my-content' : ''"
                        :class-name="changeTheField?.feasibilityReport ? 'my-content' : ''">
                        <el-icon class="elView" v-if="proviteData1?.feasibilityReport?.name ">
                            <View @click="openFile(proviteData1?.feasibilityReport?.name)" />
                        </el-icon>
                        <span  class="aLoad" @click="download(proviteData.feasibilityReport.keyName)" rel="nofollow">
                            {{ proviteData1.feasibilityReport?.name }}
                        </span >
                    </span>
                    <span v-if="
                        detailData1.userType == 2 ||
                        detailData1.userType == 3 ||
                        detailData1.userType == 4 ||
                        detailData1.userType == 5
                    ">
                        <el-icon class="elView" v-if="proviteData1?.feasibilityReport?.name ">
                            <View @click="openFile(proviteData1?.feasibilityReport?.name)" />
                        </el-icon>
                        <span  class="aLoad" @click="download(proviteData.feasibilityReport.keyName)">
                            {{ proviteData1.feasibilityReport?.name }}
                        </span >
                    </span>
                    <span v-if="detailData1.userType == 6"
                        :label-class-name="changeTheField?.feasibilityReport ? 'my-content' : ''"
                        :class-name="changeTheField?.feasibilityReport ? 'my-content' : ''">
                        <el-icon class="elView" v-if="proviteData1?.feasibilityReport?.name ">
                            <View @click="openFile(proviteData1?.feasibilityReport?.name)" />
                        </el-icon>
                        <span  class="aLoad" @click="download(proviteData.feasibilityReport.keyName)">
                            {{ proviteData1.feasibilityReport?.name }}
                        </span >
                    </span>
                </el-descriptions-item>
                <el-descriptions-item label="项目初步设计说明书"
                    :label-class-name="changeTheField?.preliminaryDesignDescription ? 'my-content' : ''"
                    :class-name="changeTheField?.preliminaryDesignDescription ? 'my-content' : ''">
                    <el-icon class="elView" v-if="proviteData1?.preliminaryDesignDescription?.name ">
                        <View @click="openFile(proviteData1?.preliminaryDesignDescription?.name)" />
                    </el-icon>

                    <span  class="aLoad" @click="download(proviteData.preliminaryDesignDescription.keyName)">
                        {{ proviteData1?.preliminaryDesignDescription?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="预测评估报告"
                    :label-class-name="changeTheField?.predictionEvaluationReport ? 'my-content' : ''"
                    :class-name="changeTheField?.predictionEvaluationReport ? 'my-content' : ''">
                    <el-icon class="elView" v-if="proviteData1?.predictionEvaluationReport?.name ">
                        <View @click="openFile(proviteData1?.predictionEvaluationReport?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.predictionEvaluationReport.keyName)">
                        {{ proviteData1?.predictionEvaluationReport?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="预测评估评审意见报告"
                    :label-class-name="changeTheField?.predictionEvaluationReviewOpinions ? 'my-content' : ''"
                    :class-name="changeTheField?.predictionEvaluationReviewOpinions ? 'my-content' : ''">
                    <el-icon class="elView" v-if="proviteData1?.predictionEvaluationReviewOpinions?.name ">
                        <View @click="openFile(proviteData1?.predictionEvaluationReviewOpinions?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.predictionEvaluationReviewOpinions.keyName)">
                        {{ proviteData1?.predictionEvaluationReviewOpinions?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="用户接入变电站主接线示意图" v-if="detailData.userType != 0 && detailData.userType != 1"
                    :label-class-name="changeTheField?.substationMainWiringDiagram ? 'my-content' : ''"
                    :class-name="changeTheField?.substationMainWiringDiagram ? 'my-content' : ''">
                    <el-icon class="elView" v-if="proviteData1?.substationMainWiringDiagram?.name ">
                        <View @click="openFile(proviteData1?.substationMainWiringDiagram?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.substationMainWiringDiagram.keyName)">
                        {{ proviteData1?.substationMainWiringDiagram?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="主要敏感终端清单" v-if="detailData.userType == 6"
                    :label-class-name="changeTheField?.sensitiveDevices ? 'my-content' : ''"
                    :class-name="changeTheField?.sensitiveDevices ? 'my-content' : ''">
                    <el-icon class="elView" v-if="proviteData1?.sensitiveDevices?.name ">
                        <View @click="openFile(proviteData1?.sensitiveDevices?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.sensitiveDevices.keyName)">
                        {{ proviteData1?.sensitiveDevices?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6"
                    :label-class-name="changeTheField?.antiInterferenceReport ? 'my-content' : ''"
                    :class-name="changeTheField?.antiInterferenceReport ? 'my-content' : ''">
                    <el-icon class="elView" v-if="proviteData1?.antiInterferenceReport?.name ">
                        <View @click="openFile(proviteData1?.antiInterferenceReport?.name)" />
                    </el-icon>
                    <span   class="aLoad" @click="download(proviteData.antiInterferenceReport.keyName)">
                        {{ proviteData1?.antiInterferenceReport?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="背景电能质量测试报告" v-if="detailData.userType == 6"
                    :label-class-name="changeTheField?.powerQualityReport ? 'my-content' : ''"
                    :class-name="changeTheField?.powerQualityReport ? 'my-content' : ''">
                    <el-icon class="elView" v-if="proviteData1?.powerQualityReport?.name ">
                        <View @click="openFile(proviteData1?.powerQualityReport?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.powerQualityReport.keyName)">
                        {{ proviteData1?.powerQualityReport?.name }}
                    </span >
                </el-descriptions-item>
                <el-descriptions-item label="其他附件"
                    v-if="proviteData1?.additionalAttachments && proviteData1?.additionalAttachments?.url"
                    :label-class-name="changeTheField?.additionalAttachments ? 'my-content' : ''"
                    :class-name="changeTheField?.additionalAttachments ? 'my-content' : ''">
                    <el-icon class="elView" v-if="proviteData1?.additionalAttachments?.name ">
                        <View @click="openFile(proviteData1?.additionalAttachments?.name)" />
                    </el-icon>
                    <span  class="aLoad" @click="download(proviteData.additionalAttachments.keyName)">
                        {{ proviteData1?.additionalAttachments?.name }}
                    </span >
                </el-descriptions-item>
            </el-descriptions>
        </div>
        </div>
    </div>
</template>
<script lang="ts" setup>
import { onMounted, ref, reactive, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { formatDate } from '@/utils/formatTime'
import { propTypes } from '@/utils/propTypes'
import { getUserReportById, getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
import { getDictTreeById } from '@/api/system-boot/dictTree'
import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { Link, View } from '@element-plus/icons-vue'
import PreviewFile from '@/components/PreviewFile/index.vue'
import { download} from '@/utils/fileDownLoad'
defineOptions({ name: 'BpmUserReportDetail' })

const { query } = useRoute() // 查询参数

const props = defineProps({
    id: propTypes.string.def(undefined),
    update: {
        type: Boolean,
        default: false
    }
})

const detailLoading = ref(false) // 表单的加载中
const detailData = ref<any>({}) // 详情数据
const detailData1 = ref<any>({}) // 详情数据
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
const openFile = (name: any) => {
    window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
}
//用户性质数组
const userTypeList = reactive([
    {
        label: '新建电网工程',
        value: '0'
    },
    {
        label: '扩建电网工程',
        value: '1'
    },
    {
        label: '新建非线性负荷用户',
        value: '2'
    },
    {
        label: '扩建非线性负荷用户',
        value: '3'
    },
    {
        label: '新建新能源发电站',
        value: '4'
    },
    {
        label: '扩建新能源发电站',
        value: '5'
    },
    {
        label: '敏感及重要用户',
        value: '6'
    }
])
//用户状态数组
const userStateList = reactive([
    {
        label: '可研',
        value: '0'
    },
    {
        label: '建设',
        value: '1'
    },
    {
        label: '运行',
        value: '2'
    },
    {
        label: '退运',
        value: '3'
    }
])

const dictData = useDictData()
//字典获取所在地市
const areaOptionList = dictData.getBasicData('jibei_area')
//字典获取敏感电能质量指标
const energyQualityIndexList = dictData.getBasicData('Indicator_Type')
//字典获取行业类型
const industryList = dictData.getBasicData('industry_type_jb')
//字典电压等级
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
//字典评估类型
const evaluationTypeList = dictData.getBasicData('Evaluation_Type')
//字典预测评估单位
const evaluationDeptList = dictData.getBasicData('evaluation_dept')
const loadLevelOptionList = dictData.getBasicData('load_level')
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
const changeTheField: any = ref({})
/** 获得数据 */
const getInfo = async () => {
    detailLoading.value = true
    let obj1: any = {}
    let obj2: any = {}
    try {
        await getUserReportUpdateById(props.id || queryId).then(res => {
            obj1 = JSON.parse(JSON.stringify(res.data.userReportMessageJson))
            detailData1.value = JSON.parse(JSON.stringify(res.data.userReportMessageJson))
            getProviteData1()
        })

        await getUserReportById(props.id || queryId).then(res => {
            obj2 = JSON.parse(JSON.stringify(res.data))
            detailData.value = JSON.parse(JSON.stringify(res.data))
            getProviteData()
        })
    } finally {
        detailLoading.value = false

        changeTheField.value = compareObjects({
            ...obj1, ...obj1.userReportProjectPO, ...obj1.userReportSensitivePO, ...obj1.userReportSubstationPO

        }, { ...obj2, ...obj2.userReportProjectPO, ...obj2.userReportSensitivePO, ...obj2.userReportSubstationPO })

    }
}
const compareObjects = (obj1: any, obj2: any) => {

    const differences: any = {};

    for (const key in obj1) {
        if (obj1.hasOwnProperty(key)) {
            if (obj1[key] !== obj2[key]) {
                differences[key] = { obj1: obj1[key], obj2: obj2[key] };
            }
        }
    }

    for (const key in obj2) {
        if (obj2.hasOwnProperty(key) && !obj1.hasOwnProperty(key)) {
            differences[key] = { obj1: undefined, obj2: obj2[key] };
        }
    }

    return differences;
}
// const compareObjects = (obj1: any, obj2: any) => {
//     const differences: any = {};

//     function findDifferences(o1, o2, path = '') {
//         for (const key in o1) {
//             if (o1.hasOwnProperty(key)) {
//                 const newPath = path ? `${path}.${key}` : key;
//                 if (typeof o1[key] === 'object' && o1[key] !== null && typeof o2[key] === 'object' && o2[key] !== null) {
//                     findDifferences(o1[key], o2[key], newPath);
//                 } else if (o1[key] !== o2[key]) {
//                     differences[newPath] = { obj1: o1[key], obj2: o2[key] };
//                 }
//             }
//         }

//         for (const key in o2) {
//             if (o2.hasOwnProperty(key) && !o1.hasOwnProperty(key)) {
//                 const newPath = path ? `${path}.${key}` : key;
//                 differences[newPath] = { obj1: undefined, obj2: o2[key] };
//             }
//         }
//     }

//     findDifferences(obj1, obj2);
//     return differences;
// }
const proviteData = ref()
const proviteData1 = ref()

//判断userType选择取用的对象
const getProviteData = async () => {
    if (detailData.value.userType == '0' || detailData.value.userType == '1') {
        proviteData.value = detailData.value.userReportProjectPO
        //查询非线性终端类型
        await getDictTreeById(proviteData.value.nonlinearDeviceType).then(res => {
            proviteData.value.nonlinearDeviceType = res.data?.name
        })
    } else if (
        detailData.value.userType == '2' ||
        detailData.value.userType == '3' ||
        detailData.value.userType == '4' ||
        detailData.value.userType == '5'
    ) {
        proviteData.value = detailData.value.userReportSubstationPO
        //查询非线性负荷类型
        await getDictTreeById(proviteData.value.nonlinearLoadType).then(res => {
            proviteData.value.nonlinearLoadType = res.data?.name
        })
    } else {
        proviteData.value = detailData.value.userReportSensitivePO
    }
    //可研报告
    if (proviteData.value.feasibilityReport) {
        await getFileNamePath(proviteData.value.feasibilityReport, 'feasibilityReport')
    }
    //项目初步设计说明书
    if (proviteData.value.preliminaryDesignDescription) {
        await getFileNamePath(proviteData.value.preliminaryDesignDescription, 'preliminaryDesignDescription')
    }
    //预测评估报告
    if (proviteData.value.predictionEvaluationReport) {
        await getFileNamePath(proviteData.value.predictionEvaluationReport, 'predictionEvaluationReport')
    }

    //预测评估评审意见报告
    if (proviteData.value.predictionEvaluationReviewOpinions) {
        await getFileNamePath(
            proviteData.value.predictionEvaluationReviewOpinions,
            'predictionEvaluationReviewOpinions'
        )
    }
    //用户接入变电站主接线示意图
    if (proviteData.value.substationMainWiringDiagram) {
        await getFileNamePath(proviteData.value.substationMainWiringDiagram, 'substationMainWiringDiagram')
    }

    //主要敏感终端清单
    if (proviteData.value.sensitiveDevices) {
        await getFileNamePath(proviteData.value.sensitiveDevices, 'sensitiveDevices')
    }

    //抗扰度测试报告
    if (proviteData.value.antiInterferenceReport) {
        await getFileNamePath(proviteData.value.antiInterferenceReport, 'antiInterferenceReport')
    }

    //背景电能质量测试报告
    if (proviteData.value.powerQualityReport) {
        await getFileNamePath(proviteData.value.powerQualityReport, 'powerQualityReport')
    }

    //其他附件
    if (proviteData.value.additionalAttachments) {
        getFileNamePath(proviteData.value.additionalAttachments, 'additionalAttachments')
    }
}
//判断userType选择取用的对象
const getProviteData1 = async () => {
    if (detailData1.value.userType == '0' || detailData1.value.userType == '1') {
        proviteData1.value = detailData1.value.userReportProjectPO
        //查询非线性终端类型
        await getDictTreeById(proviteData1.value.nonlinearDeviceType).then(res => {
            proviteData1.value.nonlinearDeviceType = res.data?.name
        })
    } else if (
        detailData1.value.userType == '2' ||
        detailData1.value.userType == '3' ||
        detailData1.value.userType == '4' ||
        detailData1.value.userType == '5'
    ) {
        proviteData1.value = detailData1.value.userReportSubstationPO
        //查询非线性负荷类型
        await getDictTreeById(proviteData1.value.nonlinearLoadType).then(res => {
            proviteData1.value.nonlinearLoadType = res.data?.name
        })
    } else {
        proviteData1.value = detailData1.value.userReportSensitivePO
    }
    //可研报告
    if (proviteData1.value.feasibilityReport) {
        await getFileNamePath1(proviteData1.value.feasibilityReport, 'feasibilityReport')
    }
    //项目初步设计说明书
    if (proviteData1.value.preliminaryDesignDescription) {
        await getFileNamePath1(proviteData1.value.preliminaryDesignDescription, 'preliminaryDesignDescription')
    }
    //预测评估报告
    if (proviteData1.value.predictionEvaluationReport) {
        await getFileNamePath1(proviteData1.value.predictionEvaluationReport, 'predictionEvaluationReport')
    }

    //预测评估评审意见报告
    if (proviteData1.value.predictionEvaluationReviewOpinions) {
        await getFileNamePath1(
            proviteData1.value.predictionEvaluationReviewOpinions,
            'predictionEvaluationReviewOpinions'
        )
    }
    //用户接入变电站主接线示意图
    if (proviteData1.value.substationMainWiringDiagram) {
        await getFileNamePath1(proviteData1.value.substationMainWiringDiagram, 'substationMainWiringDiagram')
    }

    //主要敏感终端清单
    if (proviteData1.value.sensitiveDevices) {
        await getFileNamePath1(proviteData1.value.sensitiveDevices, 'sensitiveDevices')
    }

    //抗扰度测试报告
    if (proviteData1.value.antiInterferenceReport) {
        await getFileNamePath1(proviteData1.value.antiInterferenceReport, 'antiInterferenceReport')
    }

    //背景电能质量测试报告
    if (proviteData1.value.powerQualityReport) {
        await getFileNamePath1(proviteData1.value.powerQualityReport, 'powerQualityReport')
    }

    //其他附件
    if (proviteData1.value.additionalAttachments) {
        getFileNamePath1(proviteData1.value.additionalAttachments, 'additionalAttachments')
    }
}
//根据文件名请求
const getFileNamePath = async (val: any, pathName: any) => {
    await getFileNameAndFilePath({ filePath: val }).then(res => {
        if (res.data && res.data.name && res.data.url) {
            //可研报告
            if (pathName == 'feasibilityReport' && proviteData.value.feasibilityReport) {
                proviteData.value.feasibilityReport = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //项目初步设计说明书
            else if (pathName == 'preliminaryDesignDescription' && proviteData.value.preliminaryDesignDescription) {
                proviteData.value.preliminaryDesignDescription = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //预测评估报告
            else if (pathName == 'predictionEvaluationReport' && proviteData.value.predictionEvaluationReport) {
                proviteData.value.predictionEvaluationReport = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //预测评估评审意见报告
            else if (
                pathName == 'predictionEvaluationReviewOpinions' &&
                proviteData.value.predictionEvaluationReviewOpinions
            ) {
                proviteData.value.predictionEvaluationReviewOpinions = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //用户接入变电站主接线示意图
            else if (pathName == 'substationMainWiringDiagram' && proviteData.value.substationMainWiringDiagram) {
                proviteData.value.substationMainWiringDiagram = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //主要敏感终端清单
            else if (pathName == 'sensitiveDevices' && proviteData.value.sensitiveDevices) {
                proviteData.value.sensitiveDevices = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //抗扰度测试报告
            else if (pathName == 'antiInterferenceReport' && proviteData.value.antiInterferenceReport) {
                proviteData.value.antiInterferenceReport = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //背景电能质量测试报告
            else if (pathName == 'powerQualityReport' && proviteData.value.powerQualityReport) {
                proviteData.value.powerQualityReport = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //其他附件
            else if (pathName == 'additionalAttachments' && proviteData.value.additionalAttachments) {
                proviteData.value.additionalAttachments = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
        }
    })
}
//根据文件名请求
const getFileNamePath1 = async (val: any, pathName: any) => {
    await getFileNameAndFilePath({ filePath: val }).then(res => {
        if (res.data && res.data.name && res.data.url) {
            //可研报告
            if (pathName == 'feasibilityReport' && proviteData1.value.feasibilityReport) {
                proviteData1.value.feasibilityReport = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //项目初步设计说明书
            else if (pathName == 'preliminaryDesignDescription' && proviteData1.value.preliminaryDesignDescription) {
                proviteData1.value.preliminaryDesignDescription = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //预测评估报告
            else if (pathName == 'predictionEvaluationReport' && proviteData1.value.predictionEvaluationReport) {
                proviteData1.value.predictionEvaluationReport = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //预测评估评审意见报告
            else if (
                pathName == 'predictionEvaluationReviewOpinions' &&
                proviteData1.value.predictionEvaluationReviewOpinions
            ) {
                proviteData1.value.predictionEvaluationReviewOpinions = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //用户接入变电站主接线示意图
            else if (pathName == 'substationMainWiringDiagram' && proviteData1.value.substationMainWiringDiagram) {
                proviteData1.value.substationMainWiringDiagram = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //主要敏感终端清单
            else if (pathName == 'sensitiveDevices' && proviteData1.value.sensitiveDevices) {
                proviteData1.value.sensitiveDevices = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //抗扰度测试报告
            else if (pathName == 'antiInterferenceReport' && proviteData1.value.antiInterferenceReport) {
                proviteData1.value.antiInterferenceReport = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //背景电能质量测试报告
            else if (pathName == 'powerQualityReport' && proviteData1.value.powerQualityReport) {
                proviteData1.value.powerQualityReport = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
            //其他附件
            else if (pathName == 'additionalAttachments' && proviteData1.value.additionalAttachments) {
                proviteData1.value.additionalAttachments = {
                    name: res.data.fileName,
                    keyName: res.data.name,
                    url: res.data.url
                }
            }
        }
    })
}
defineExpose({ open: getInfo }) // 提供 open 方法，用于打开弹窗

watch(
    () => props.id,
    (val, oldVal) => {
        val && getInfo()
    }
)
/** 初始化 **/
onMounted(() => {
    getInfo()
})
</script>
<style lang="scss">
::v-deep.el-icon svg {
    // margin: 5px !important;
    // position: absolute !important;
    // top: 20px !important;
    // float: right;
}

// .el-icon {
//     float: left;
// }
// a {
//     display: block;
//     width: 200px;
//     float: right;
// }
.elView {
    cursor: pointer;
    margin-right: 10px;
}
</style>
<style scoped>
:deep(.my-content) {
    background: var(--el-color-success-light-7) !important;
}
</style>
