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

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' 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', 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

@@ -806,7 +806,7 @@ import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
import { queryByAllCode } from '@/api/system-boot/dictTree' import { queryByAllCode } from '@/api/system-boot/dictTree'
import { useAdminInfo } from '@/stores/adminInfo' import { useAdminInfo } from '@/stores/adminInfo'
import { uploadFile } from '@/api/system-boot/file' 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 emits = defineEmits(['onSubmit'])
const dictData = useDictData() const dictData = useDictData()
const dialogFormVisible = ref(false) const dialogFormVisible = ref(false)
@@ -965,7 +965,7 @@ const resetForm = () => {
terminalType: terminalTypeList[0].id, // 终端型号 terminalType: terminalTypeList[0].id, // 终端型号
terminalWiringMethodType: terminalWiringMethodTypeList[0].id, // 终端接线方式类型 terminalWiringMethodType: terminalWiringMethodTypeList[0].id, // 终端接线方式类型
timeSyncFunction: '0', // 对时功能 timeSyncFunction: '0', // 对时功能
voltageTransformerType: voltageTransformerTypeList[0].id, //电压互感器类型 voltageTransformerType: voltageTransformerTypeList[0].id //电压互感器类型
} }
form.value.reporter = adminInfo.$state.name form.value.reporter = adminInfo.$state.name
@@ -1302,7 +1302,7 @@ const rules = ref({
message: '请输入合同号', message: '请输入合同号',
trigger: 'blur' trigger: 'blur'
} }
], ]
}) })
watch( watch(
() => form.value, () => form.value,
@@ -1318,12 +1318,11 @@ watch(
} }
} }
//处理填报日期时间格式 //处理填报日期时间格式
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) // console.log('处理好的表单++++++++++>',devReportForm.value)
} }
//监测点信息 //监测点信息
else { else {
} }
}, },
{ {
@@ -1346,6 +1345,13 @@ onMounted(() => {
console.log() console.log()
}) })
//获取变电站与电压等级
const findSubstationVoltageLevel = () => {
getSubstationVoltageLevel({ orgIds: [adminInfo.$state.deptId] }).then(res => {
console.log(res, '获取变电站电压等级')
})
}
findSubstationVoltageLevel()
// 上传报告 // 上传报告
const uploadRef = ref() const uploadRef = ref()
const handleExceed: UploadProps['onExceed'] = files => { const handleExceed: UploadProps['onExceed'] = files => {
@@ -1500,11 +1506,11 @@ const confirmForm = () => {
lineFilePath: lineFilePath?.value, //监测点台账信息 lineFilePath: lineFilePath?.value, //监测点台账信息
performanceTestReport: performanceTestReport.value, //性能检测报告 performanceTestReport: performanceTestReport.value, //性能检测报告
typeExperimentReport: typeExperimentReport.value, //型式实验报告 typeExperimentReport: typeExperimentReport.value, //型式实验报告
otherAttachments: otherAttachments?.value, //其他附件 otherAttachments: otherAttachments?.value //其他附件
} }
console.log(confirmFormData,"打印提交表单111111111111") console.log(confirmFormData, '打印提交表单111111111111')
addTerminalFormData(confirmFormData).then(res => { addTerminalFormData(confirmFormData).then(res => {
console.log(res,"打印提交结果222222222222+++++++++") console.log(res, '打印提交结果222222222222+++++++++')
ruleFormRef.value.resetFields() ruleFormRef.value.resetFields()
resetForm() resetForm()
close() close()

View File

@@ -95,7 +95,7 @@ import { onMounted, ref, reactive } from 'vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { propTypes } from '@/utils/propTypes' 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 { getDictTreeById } from '@/api/system-boot/dictTree'
import { useDictData } from '@/stores/dictData' import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file' import { getFileNameAndFilePath } from '@/api/system-boot/file'
@@ -178,7 +178,7 @@ const evaluationDeptList = dictData.getBasicData('evaluation_dept')
const getInfo = async () => { const getInfo = async () => {
detailLoading.value = true detailLoading.value = true
try { try {
await getUserReportById(props.id || queryId).then(res => { await getTerminalDetailsById({id:props.id || queryId}).then(res => {
detailData.value = res.data detailData.value = res.data
getProviteData() getProviteData()
}) })