终端检测取消限制上传文件格式&详情展示文件错误修改

This commit is contained in:
zhujiyan
2024-05-30 16:08:07 +08:00
parent ce87ee5c00
commit 0473a4f9f3
5 changed files with 102 additions and 119 deletions

View File

@@ -23,14 +23,6 @@
}}
</el-descriptions-item>
<!--文件地址-->
<el-descriptions-item label="终端台账信息" v-if="detailData.lineFilePath">
<el-icon>
<Link />
</el-icon>
<a :href="detailData?.lineFilePath.url">
{{ detailData?.lineFilePath.name }}
</a>
</el-descriptions-item>
<el-descriptions-item label="所属供电公司">
{{ detailData.supervisionTempDeviceReport?.powerCompany }}
</el-descriptions-item>
@@ -113,12 +105,12 @@
<el-descriptions-item label="终端秘钥">
{{ detailData.supervisionTempDeviceReport?.terminalSecretKey }}
</el-descriptions-item>
<el-descriptions-item label="经度">
<!-- <el-descriptions-item label="经度">
{{ detailData.supervisionTempDeviceReport?.longitude }}
</el-descriptions-item>
<el-descriptions-item label="纬度">
{{ detailData.supervisionTempDeviceReport?.latitude }}
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item label="终端模型">
{{
terminalModelList.find(item => {
@@ -193,57 +185,53 @@
<el-descriptions-item label="合同号">
{{ detailData.supervisionTempDeviceReport?.contractNumber }}
</el-descriptions-item>
<el-descriptions-item label="监测点台账信息" v-if="detailData.factoryInspectionReport">
<el-descriptions-item label="信息安全检测报告" v-if="detailData?.informationSecurityTestReport">
<el-icon>
<Link />
</el-icon>
<a :href="detailData?.factoryInspectionReport.url">
{{ detailData?.factoryInspectionReport.name }}
</a>
</el-descriptions-item>
<el-descriptions-item label="验收检验报告单" v-if="detailData?.informationSecurityTestReport">
<el-icon>
<Link />
</el-icon>
<a :href="detailData?.informationSecurityTestReport.url">
<a target="_blank":href="detailData?.informationSecurityTestReport.url">
{{ detailData?.informationSecurityTestReport.name }}
</a>
</el-descriptions-item>
<el-descriptions-item label="验收检验报告" v-if="detailData?.otherAttachments">
<el-descriptions-item label="验收检验报告" v-if="detailData?.acceptanceInspectionReportSingle">
<el-icon>
<Link />
</el-icon>
<a :href="detailData?.otherAttachments.url">{{ detailData?.otherAttachments.name }}</a>
<a target="_blank":href="detailData?.acceptanceInspectionReportSingle.url">
{{ detailData?.acceptanceInspectionReportSingle.name }}
</a>
</el-descriptions-item>
<el-descriptions-item label="型式实验报告" v-if="detailData?.performanceTestReport">
<el-descriptions-item label="验收检验报告" v-if="detailData?.acceptanceInspectionReport">
<el-icon>
<Link />
</el-icon>
<a :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
<a target="_blank":href="detailData?.acceptanceInspectionReport.url">{{ detailData?.acceptanceInspectionReport.name }}</a>
</el-descriptions-item>
<el-descriptions-item label="出厂检验报告" v-if="detailData?.typeExperimentReport">
<el-descriptions-item label="型式实验报告" v-if="detailData?.typeExperimentReport">
<el-icon>
<Link />
</el-icon>
<a :href="detailData?.typeExperimentReport.url">{{ detailData?.typeExperimentReport.name }}</a>
<a target="_blank":href="detailData?.typeExperimentReport.url">{{ detailData?.typeExperimentReport.name }}</a>
</el-descriptions-item>
<el-descriptions-item label="出厂检验报告" v-if="detailData?.factoryInspectionReport">
<el-icon>
<Link />
</el-icon>
<a target="_blank":href="detailData?.factoryInspectionReport.url">{{ detailData?.factoryInspectionReport.name }}</a>
</el-descriptions-item>
<el-descriptions-item label="性能检测报告" v-if="detailData?.performanceTestReport">
<el-icon>
<Link />
</el-icon>
<a :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
<a target="_blank":href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
</el-descriptions-item>
<el-descriptions-item label="信息安全检测报告" v-if="detailData?.typeExperimentReport">
<el-descriptions-item label="其他附件" v-if="detailData?.otherAttachments">
<el-icon>
<Link />
</el-icon>
<a :href="detailData?.typeExperimentReport.url">{{ detailData?.typeExperimentReport.name }}</a>
</el-descriptions-item>
<el-descriptions-item label="其他附件" v-if="detailData?.additionalAttachments">
<el-icon>
<Link />
</el-icon>
<a :href="detailData?.additionalAttachments.url">{{ detailData?.additionalAttachments.name }}</a>
<a target="_blank":href="detailData?.otherAttachments.url">{{ detailData?.otherAttachments.name }}</a>
</el-descriptions-item>
</el-descriptions>
</template>
@@ -342,7 +330,20 @@ const communicationStatusList = [
//字典获取监测点电压等级
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
//字典获取数据类型
const dataTypeList = dictData.getBasicData('System_Type')
const dataTypeList = [
{
id: '0',
name: '暂态系统'
},
{
id: '1',
name: '稳态系统'
},
{
id: '2',
name: '两个系统'
}
]
//字典获取终端型号
const terminalTypeList = dictData.getBasicData('Dev_Type')
//字典获取电压互感器类型
@@ -374,60 +375,48 @@ const getFrontEndMachineList = () => {
}
getFrontEndMachineList()
const getFileName = async () => {
//验收检验报告
if (detailData.value.acceptanceInspectionReport) {
await getFileNamePath(detailData.value.acceptanceInspectionReport, 'acceptanceInspectionReport')
//信息安全检测报告
if (detailData.value.informationSecurityTestReport) {
await getFileNamePath(detailData.value.informationSecurityTestReport, 'informationSecurityTestReport')
}
//验收检验报告单
if (detailData.value.acceptanceInspectionReportSingle) {
await getFileNamePath(detailData.value.acceptanceInspectionReportSingle, 'acceptanceInspectionReportSingle')
}
//验收检验报告
if (detailData.value.acceptanceInspectionReport) {
await getFileNamePath(detailData.value.acceptanceInspectionReport, 'acceptanceInspectionReport')
}
//型式实验报告
if (detailData.value.typeExperimentReport) {
await getFileNamePath(detailData.value.typeExperimentReport, 'typeExperimentReport')
}
//出厂检验报告
if (detailData.value.factoryInspectionReport) {
await getFileNamePath(detailData.value.factoryInspectionReport, 'factoryInspectionReport')
}
//信息安全检测报告
if (detailData.value.informationSecurityTestReport) {
await getFileNamePath(detailData.value.informationSecurityTestReport, 'informationSecurityTestReport')
}
//监测点台账信息
if (detailData.value.lineFilePath) {
await getFileNamePath(detailData.value.lineFilePath, 'lineFilePath')
}
//其他附件
if (detailData.value.otherAttachments) {
await getFileNamePath(detailData.value.otherAttachments, 'otherAttachments')
}
//性能检测报告
if (detailData.value.performanceTestReport) {
await getFileNamePath(detailData.value.performanceTestReport, 'performanceTestReport')
}
//型式实验报告
if (detailData.value.typeExperimentReport) {
await getFileNamePath(detailData.value.typeExperimentReport, 'typeExperimentReport')
}
//其他附件
// if (detailData.value.additionalAttachments) {
// getFileNamePath(detailData.value.additionalAttachments, 'additionalAttachments')
// }
if (detailData.value.otherAttachments) {
await getFileNamePath(detailData.value.otherAttachments, 'otherAttachments')
}
}
//根据文件名请求
const getFileNamePath = async (val: any, pathName: any) => {
await getFileNameAndFilePath({ filePath: val }).then(res => {
if (res.data) {
//可研报告
if (pathName == 'acceptanceInspectionReport' && detailData.value.acceptanceInspectionReport) {
detailData.value.acceptanceInspectionReport = {
//信息安全检测报告
if (pathName == 'informationSecurityTestReport' && detailData.value.informationSecurityTestReport) {
detailData.value.informationSecurityTestReport = {
name: res.data.fileName,
url: res.data.url
}
}
//终端台账信息
//验收检验报告单
else if (
pathName == 'acceptanceInspectionReportSingle' &&
detailData.value.acceptanceInspectionReportSingle
@@ -437,51 +426,38 @@ const getFileNamePath = async (val: any, pathName: any) => {
url: res.data.url
}
}
//预测评估报告
else if (pathName == 'factoryInspectionReport' && detailData.value.factoryInspectionReport) {
detailData.value.factoryInspectionReport = {
//验收检验报告
else if (pathName == 'acceptanceInspectionReport' && detailData.value.acceptanceInspectionReport) {
detailData.value.acceptanceInspectionReport = {
name: res.data.fileName,
url: res.data.url
}
}
//预测评估评审意见报告
else if (pathName == 'informationSecurityTestReport' && detailData.value.informationSecurityTestReport) {
detailData.value.informationSecurityTestReport = {
name: res.data.fileName,
url: res.data.url
}
}
//用户接入变电站主接线示意图
else if (pathName == 'lineFilePath' && detailData.value.lineFilePath) {
detailData.value.lineFilePath = {
name: res.data.fileName,
url: res.data.url
}
}
//主要敏感设备清单
else if (pathName == 'otherAttachments' && detailData.value.otherAttachments) {
detailData.value.otherAttachments = {
name: res.data.fileName,
url: res.data.url
}
}
//抗扰度测试报告
else if (pathName == 'performanceTestReport' && detailData.value.performanceTestReport) {
detailData.value.performanceTestReport = {
name: res.data.fileName,
url: res.data.url
}
}
//背景电能质量测试报告
//型式实验报告
else if (pathName == 'typeExperimentReport' && detailData.value.typeExperimentReport) {
detailData.value.typeExperimentReport = {
name: res.data.fileName,
url: res.data.url
}
}
//出场检验报告
else if (pathName == 'factoryInspectionReport' && detailData.value.factoryInspectionReport) {
detailData.value.factoryInspectionReport = {
name: res.data.fileName,
url: res.data.url
}
}
//性能检测报告
else if (pathName == 'performanceTestReport' && detailData.value.performanceTestReport) {
detailData.value.performanceTestReport = {
name: res.data.fileName,
url: res.data.url
}
}
//其他附件
else if (pathName == 'additionalAttachments' && detailData.value.additionalAttachments) {
detailData.value.additionalAttachments = {
else if (pathName == 'otherAttachments' && detailData.value.otherAttachments) {
detailData.value.otherAttachments = {
name: res.data.fileName,
url: res.data.url
}