终端入网检测详情接口更换
This commit is contained in:
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12"></el-col>
|
<el-col :span="12"></el-col>
|
||||||
<el-col :span="12" class="required_position">
|
<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-form-item label="终端台账信息:">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="form.deviceFilePath"
|
v-model:file-list="form.deviceFilePath"
|
||||||
@@ -677,7 +677,7 @@
|
|||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" class="required_position">
|
<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-form-item label="验收检验报告:" prop="acceptanceInspectionReport">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="form.acceptanceInspectionReport"
|
v-model:file-list="form.acceptanceInspectionReport"
|
||||||
@@ -697,7 +697,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12" class="required_position">
|
<el-col :span="12" class="required_position">
|
||||||
<span class="required_icon">*</span>
|
<span class="required_icon">*</span>
|
||||||
<el-form-item label="型式实验报告:" prop="typeExperimentReport" :show-message="false">
|
<el-form-item label="型式实验报告:" prop="typeExperimentReport" :show-message="false">
|
||||||
<el-upload
|
<el-upload
|
||||||
@@ -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,
|
||||||
@@ -1313,17 +1313,16 @@ watch(
|
|||||||
for (let key in val) {
|
for (let key in val) {
|
||||||
if (devReportForm.value.hasOwnProperty(key)) {
|
if (devReportForm.value.hasOwnProperty(key)) {
|
||||||
devReportForm.value[key] = val[key] // 对相同的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.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)
|
// 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 => {
|
||||||
@@ -1490,21 +1496,21 @@ const confirmForm = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
//提交终端信息
|
//提交终端信息
|
||||||
confirmFormData={
|
confirmFormData = {
|
||||||
...confirmFormData,
|
...confirmFormData,
|
||||||
acceptanceInspectionReport: acceptanceInspectionReport.value, //验收检验报告
|
acceptanceInspectionReport: acceptanceInspectionReport.value, //验收检验报告
|
||||||
acceptanceInspectionReportSingle: acceptanceInspectionReportSingle.value, //验收检验报告单
|
acceptanceInspectionReportSingle: acceptanceInspectionReportSingle.value, //验收检验报告单
|
||||||
deviceFilePath: deviceFilePath?.value, //终端台账信息
|
deviceFilePath: deviceFilePath?.value, //终端台账信息
|
||||||
factoryInspectionReport: factoryInspectionReport.value, //出厂检验报告
|
factoryInspectionReport: factoryInspectionReport.value, //出厂检验报告
|
||||||
informationSecurityTestReport:informationSecurityTestReport.value , //信息安全检测报告
|
informationSecurityTestReport: informationSecurityTestReport.value, //信息安全检测报告
|
||||||
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()
|
||||||
|
|||||||
@@ -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()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user