终端检测取消限制上传文件格式&详情展示文件错误修改
This commit is contained in:
@@ -324,7 +324,7 @@
|
||||
v-model:file-list="form.mainWiringDiagram"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
@@ -361,6 +361,8 @@ const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
const form: any = ref({})
|
||||
const ruleFormRef = ref(null)
|
||||
// acceptType .doc,.docx,.xlsx,.xls,.pdf
|
||||
const acceptType=''
|
||||
//字典获取所属地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
//字典获取监测点电压等级
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="detailData?.mainWiringDiagram.url">
|
||||
<a target="_blank"href="detailData?.mainWiringDiagram.url">
|
||||
{{ detailData?.mainWiringDiagram.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
v-model:file-list="form.deviceFilePath"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls,.xlsx"
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
@@ -441,7 +441,7 @@
|
||||
v-model:file-list="form.informationSecurityTestReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls,.xlsx"
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
@@ -458,7 +458,7 @@
|
||||
v-model:file-list="form.acceptanceInspectionReportSingle"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls,.xlsx"
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
@@ -475,7 +475,7 @@
|
||||
v-model:file-list="form.acceptanceInspectionReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls,.xlsx"
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
@@ -492,7 +492,7 @@
|
||||
v-model:file-list="form.typeExperimentReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls,.xlsx"
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
@@ -509,7 +509,7 @@
|
||||
v-model:file-list="form.factoryInspectionReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls,.xlsx"
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
@@ -526,7 +526,7 @@
|
||||
v-model:file-list="form.performanceTestReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls,.xlsx"
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
@@ -543,7 +543,7 @@
|
||||
v-model:file-list="form.otherAttachments"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls,.xlsx"
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
@@ -585,6 +585,8 @@ const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
const form: any = ref({})
|
||||
const ruleFormRef = ref(null)
|
||||
// acceptType .xls,.xlsx
|
||||
const acceptType=''
|
||||
//字典获取所属地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
//字典获取电压互感器类型
|
||||
@@ -749,7 +751,6 @@ const resetForm = async () => {
|
||||
deviceFilePath: [], //终端台账信息
|
||||
factoryInspectionReport: [], //出厂检验报告
|
||||
informationSecurityTestReport: [], //信息安全检测报告
|
||||
lineFilePath: [], //监测点台账信息
|
||||
otherAttachments: [], //其他附件
|
||||
performanceTestReport: [], //性能检测报告
|
||||
typeExperimentReport: [], //型式实验报告
|
||||
@@ -807,7 +808,6 @@ const devReportForm = ref({
|
||||
deviceFilePath: [], //终端台账信息
|
||||
factoryInspectionReport: [], //出厂检验报告
|
||||
informationSecurityTestReport: [], //信息安全检测报告
|
||||
lineFilePath: [], //监测点台账信息
|
||||
otherAttachments: [], //其他附件
|
||||
performanceTestReport: [], //性能检测报告
|
||||
typeExperimentReport: [], //型式实验报告
|
||||
@@ -1224,8 +1224,6 @@ const uploadFileName = val => {
|
||||
}
|
||||
// 终端台账信息
|
||||
const deviceFilePath = ref('')
|
||||
//监测点台账信息
|
||||
const lineFilePath = ref('')
|
||||
//验收检验报告单
|
||||
const acceptanceInspectionReportSingle = ref('')
|
||||
//验收检验报告
|
||||
@@ -1246,10 +1244,6 @@ const choose = (e: any) => {
|
||||
if (uploadName.value == 'deviceFilePath') {
|
||||
deviceFilePath.value = res.data.name
|
||||
}
|
||||
//监测点台账信息
|
||||
else if (uploadName.value == 'lineFilePath') {
|
||||
lineFilePath.value = res.data.name
|
||||
}
|
||||
//验收检验报告单
|
||||
else if (uploadName.value == 'acceptanceInspectionReportSingle') {
|
||||
acceptanceInspectionReportSingle.value = res.data.name
|
||||
@@ -1351,7 +1345,6 @@ const confirmForm = () => {
|
||||
deviceFilePath: deviceFilePath?.value, //终端台账信息
|
||||
factoryInspectionReport: factoryInspectionReport.value, //出厂检验报告
|
||||
informationSecurityTestReport: informationSecurityTestReport.value, //信息安全检测报告
|
||||
lineFilePath: lineFilePath?.value, //监测点台账信息
|
||||
performanceTestReport: performanceTestReport.value, //性能检测报告
|
||||
typeExperimentReport: typeExperimentReport.value, //型式实验报告
|
||||
otherAttachments: otherAttachments?.value //其他附件
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user