终端入网检测详情接口更换

This commit is contained in:
zhujiyan
2024-05-16 18:58:31 +08:00
parent 02fc703a7e
commit 1298993513
3 changed files with 52 additions and 18 deletions

View File

@@ -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
})
}

View File

@@ -130,7 +130,7 @@
<el-row>
<el-col :span="12"></el-col>
<el-col :span="12" class="required_position">
<span class="required_icon" style="color:#fff">*</span>
<span class="required_icon" style="color: #fff">*</span>
<el-form-item label="终端台账信息:">
<el-upload
v-model:file-list="form.deviceFilePath"
@@ -677,7 +677,7 @@
<el-row>
<el-col :span="12" class="required_position">
<span class="required_icon" style="color:#fff">*</span>
<span class="required_icon" style="color: #fff">*</span>
<el-form-item label="验收检验报告:" prop="acceptanceInspectionReport">
<el-upload
v-model:file-list="form.acceptanceInspectionReport"
@@ -697,7 +697,7 @@
</el-form-item>
</el-col>
<el-col :span="12" class="required_position">
<el-col :span="12" class="required_position">
<span class="required_icon">*</span>
<el-form-item label="型式实验报告:" prop="typeExperimentReport" :show-message="false">
<el-upload
@@ -806,7 +806,7 @@ import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
import { queryByAllCode } from '@/api/system-boot/dictTree'
import { useAdminInfo } from '@/stores/adminInfo'
import { uploadFile } from '@/api/system-boot/file'
import { addTerminalFormData } from '@/api/supervision-boot/terminal/index.ts'
import { addTerminalFormData, getSubstationVoltageLevel } from '@/api/supervision-boot/terminal/index'
const emits = defineEmits(['onSubmit'])
const dictData = useDictData()
const dialogFormVisible = ref(false)
@@ -965,7 +965,7 @@ const resetForm = () => {
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()

View File

@@ -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()
})