From 12989935135995ab6fed2b46540ce5e898df6e00 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Thu, 16 May 2024 18:58:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=88=E7=AB=AF=E5=85=A5=E7=BD=91=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/supervision-boot/terminal/index.ts | 30 +++++++++++++++- .../components/terminainal/addForm.vue | 36 +++++++++++-------- .../components/terminainal/detail.vue | 4 +-- 3 files changed, 52 insertions(+), 18 deletions(-) diff --git a/src/api/supervision-boot/terminal/index.ts b/src/api/supervision-boot/terminal/index.ts index e9207b87..be667482 100644 --- a/src/api/supervision-boot/terminal/index.ts +++ b/src/api/supervision-boot/terminal/index.ts @@ -2,7 +2,7 @@ import createAxios from '@/utils/request' import { SUPERVISION_BOOT } from '@/utils/constantRequest' -const MAPPING_PATH = SUPERVISION_BOOT + '/workflow/wfForm' +const MAPPING_PATH = SUPERVISION_BOOT + '/deVReport' /** * 提交终端信息表单数据 @@ -24,3 +24,31 @@ export const getDeviceList = () => { method: 'POST', }) } + + + +/** + * 获取电站和电压等级 + */ +export const getSubstationVoltageLevel = (obj:any) => { + return createAxios({ + url: '/device-boot/commTerminal/tagOrIdGetSub', + method: 'POST', + data:obj + }) +} + + +/** + * 根据id获取终端录入的详细数据 + */ +export const getTerminalDetailsById = (obj: any) => { + let form = new FormData() + form.append('id', obj.id) + return createAxios({ + url:MAPPING_PATH + '/queryDeviceDetail', + method: 'POST', + data:form + }) +} + diff --git a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue index ef0416e6..533821c3 100644 --- a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue +++ b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue @@ -130,7 +130,7 @@ - * + * - * + * - + * { terminalType: terminalTypeList[0].id, // 终端型号 terminalWiringMethodType: terminalWiringMethodTypeList[0].id, // 终端接线方式类型 timeSyncFunction: '0', // 对时功能 - voltageTransformerType: voltageTransformerTypeList[0].id, //电压互感器类型 + voltageTransformerType: voltageTransformerTypeList[0].id //电压互感器类型 } form.value.reporter = adminInfo.$state.name @@ -1302,7 +1302,7 @@ const rules = ref({ message: '请输入合同号', trigger: 'blur' } - ], + ] }) watch( () => form.value, @@ -1313,17 +1313,16 @@ watch( for (let key in val) { if (devReportForm.value.hasOwnProperty(key)) { devReportForm.value[key] = val[key] // 对相同的key进行赋值 - }else if(devReportForm.value.supervisionTempDeviceReportParam.hasOwnProperty(key)){ + } else if (devReportForm.value.supervisionTempDeviceReportParam.hasOwnProperty(key)) { devReportForm.value.supervisionTempDeviceReportParam[key] = val[key] } } //处理填报日期时间格式 - devReportForm.value.reportDate = window.XEUtils.toDateString(form.value.reportDate, 'yyyy-MM-dd'); + devReportForm.value.reportDate = window.XEUtils.toDateString(form.value.reportDate, 'yyyy-MM-dd') // console.log('处理好的表单++++++++++>',devReportForm.value) } //监测点信息 else { - } }, { @@ -1346,6 +1345,13 @@ onMounted(() => { console.log() }) +//获取变电站与电压等级 +const findSubstationVoltageLevel = () => { + getSubstationVoltageLevel({ orgIds: [adminInfo.$state.deptId] }).then(res => { + console.log(res, '获取变电站电压等级') + }) +} +findSubstationVoltageLevel() // 上传报告 const uploadRef = ref() const handleExceed: UploadProps['onExceed'] = files => { @@ -1490,21 +1496,21 @@ const confirmForm = () => { }) } //提交终端信息 - confirmFormData={ + confirmFormData = { ...confirmFormData, acceptanceInspectionReport: acceptanceInspectionReport.value, //验收检验报告 acceptanceInspectionReportSingle: acceptanceInspectionReportSingle.value, //验收检验报告单 deviceFilePath: deviceFilePath?.value, //终端台账信息 factoryInspectionReport: factoryInspectionReport.value, //出厂检验报告 - informationSecurityTestReport:informationSecurityTestReport.value , //信息安全检测报告 + informationSecurityTestReport: informationSecurityTestReport.value, //信息安全检测报告 lineFilePath: lineFilePath?.value, //监测点台账信息 - performanceTestReport:performanceTestReport.value , //性能检测报告 + performanceTestReport: performanceTestReport.value, //性能检测报告 typeExperimentReport: typeExperimentReport.value, //型式实验报告 - otherAttachments: otherAttachments?.value, //其他附件 + otherAttachments: otherAttachments?.value //其他附件 } - console.log(confirmFormData,"打印提交表单111111111111") + console.log(confirmFormData, '打印提交表单111111111111') addTerminalFormData(confirmFormData).then(res => { - console.log(res,"打印提交结果222222222222+++++++++") + console.log(res, '打印提交结果222222222222+++++++++') ruleFormRef.value.resetFields() resetForm() close() diff --git a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/detail.vue b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/detail.vue index 44988865..fdc0ba8a 100644 --- a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/detail.vue +++ b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/detail.vue @@ -95,7 +95,7 @@ import { onMounted, ref, reactive } from 'vue' import { useRoute } from 'vue-router' import { formatDate } from '@/utils/formatTime' import { propTypes } from '@/utils/propTypes' -import { getUserReportById } from '@/api/supervision-boot/userReport/form' +import { getTerminalDetailsById } from '@/api/supervision-boot/terminal/index' import { getDictTreeById } from '@/api/system-boot/dictTree' import { useDictData } from '@/stores/dictData' import { getFileNameAndFilePath } from '@/api/system-boot/file' @@ -178,7 +178,7 @@ const evaluationDeptList = dictData.getBasicData('evaluation_dept') const getInfo = async () => { detailLoading.value = true try { - await getUserReportById(props.id || queryId).then(res => { + await getTerminalDetailsById({id:props.id || queryId}).then(res => { detailData.value = res.data getProviteData() })