diff --git a/src/commonMethods/useMergeTableRow.ts b/src/commonMethods/useMergeTableRow.ts index 13f6131..6e86139 100644 --- a/src/commonMethods/useMergeTableRow.ts +++ b/src/commonMethods/useMergeTableRow.ts @@ -67,3 +67,15 @@ } return result } +export function initTableLastRow(data: any) { + const tableData = data + if (!tableData.length) { + return tableData + } + for (const i in tableData[tableData.length - 1]) { + if (i.includes('-span')) { + tableData[tableData.length - 1][i] = undefined + } + } + return tableData +} diff --git a/src/commonMethods/useMergeTableRow.ts b/src/commonMethods/useMergeTableRow.ts index 13f6131..6e86139 100644 --- a/src/commonMethods/useMergeTableRow.ts +++ b/src/commonMethods/useMergeTableRow.ts @@ -67,3 +67,15 @@ } return result } +export function initTableLastRow(data: any) { + const tableData = data + if (!tableData.length) { + return tableData + } + for (const i in tableData[tableData.length - 1]) { + if (i.includes('-span')) { + tableData[tableData.length - 1][i] = undefined + } + } + return tableData +} diff --git a/src/components/DetailPage/DetailBlock.vue b/src/components/DetailPage/DetailBlock.vue index c9c8a1f..86d14c1 100644 --- a/src/components/DetailPage/DetailBlock.vue +++ b/src/components/DetailPage/DetailBlock.vue @@ -6,7 +6,7 @@ }, titleMenus: { type: Array as () => string[], - required: true, + // required: true, default: () => [], }, }) diff --git a/src/commonMethods/useMergeTableRow.ts b/src/commonMethods/useMergeTableRow.ts index 13f6131..6e86139 100644 --- a/src/commonMethods/useMergeTableRow.ts +++ b/src/commonMethods/useMergeTableRow.ts @@ -67,3 +67,15 @@ } return result } +export function initTableLastRow(data: any) { + const tableData = data + if (!tableData.length) { + return tableData + } + for (const i in tableData[tableData.length - 1]) { + if (i.includes('-span')) { + tableData[tableData.length - 1][i] = undefined + } + } + return tableData +} diff --git a/src/components/DetailPage/DetailBlock.vue b/src/components/DetailPage/DetailBlock.vue index c9c8a1f..86d14c1 100644 --- a/src/components/DetailPage/DetailBlock.vue +++ b/src/components/DetailPage/DetailBlock.vue @@ -6,7 +6,7 @@ }, titleMenus: { type: Array as () => string[], - required: true, + // required: true, default: () => [], }, }) diff --git a/src/views/business/measure/item/components/second/templateDetail.vue b/src/views/business/measure/item/components/second/templateDetail.vue index b3226c5..b14b937 100644 --- a/src/views/business/measure/item/components/second/templateDetail.vue +++ b/src/views/business/measure/item/components/second/templateDetail.vue @@ -83,6 +83,13 @@ }, { deep: true, }) +watch(() => form.value.technicalIndexSymbol, (newVal) => { + if (newVal) { + for (const i in listDict.value) { + listDict.value[i] = listDict.value[i].map((item: any) => ({ ...item, technicalIndexSymbol: newVal })) + } + } +}) // 清空所有数据 function clearAllList() { list.value = [] diff --git a/src/commonMethods/useMergeTableRow.ts b/src/commonMethods/useMergeTableRow.ts index 13f6131..6e86139 100644 --- a/src/commonMethods/useMergeTableRow.ts +++ b/src/commonMethods/useMergeTableRow.ts @@ -67,3 +67,15 @@ } return result } +export function initTableLastRow(data: any) { + const tableData = data + if (!tableData.length) { + return tableData + } + for (const i in tableData[tableData.length - 1]) { + if (i.includes('-span')) { + tableData[tableData.length - 1][i] = undefined + } + } + return tableData +} diff --git a/src/components/DetailPage/DetailBlock.vue b/src/components/DetailPage/DetailBlock.vue index c9c8a1f..86d14c1 100644 --- a/src/components/DetailPage/DetailBlock.vue +++ b/src/components/DetailPage/DetailBlock.vue @@ -6,7 +6,7 @@ }, titleMenus: { type: Array as () => string[], - required: true, + // required: true, default: () => [], }, }) diff --git a/src/views/business/measure/item/components/second/templateDetail.vue b/src/views/business/measure/item/components/second/templateDetail.vue index b3226c5..b14b937 100644 --- a/src/views/business/measure/item/components/second/templateDetail.vue +++ b/src/views/business/measure/item/components/second/templateDetail.vue @@ -83,6 +83,13 @@ }, { deep: true, }) +watch(() => form.value.technicalIndexSymbol, (newVal) => { + if (newVal) { + for (const i in listDict.value) { + listDict.value[i] = listDict.value[i].map((item: any) => ({ ...item, technicalIndexSymbol: newVal })) + } + } +}) // 清空所有数据 function clearAllList() { list.value = [] diff --git a/src/views/business/measure/item/components/second/templateTable.vue b/src/views/business/measure/item/components/second/templateTable.vue index 4d8037d..369a040 100644 --- a/src/views/business/measure/item/components/second/templateTable.vue +++ b/src/views/business/measure/item/components/second/templateTable.vue @@ -215,10 +215,13 @@ if (newValue) { if (Array.isArray(newValue) && newValue?.length) { const data = newValue[newValue.length - 1] + if (isMerge(data)) { + console.log('isMerge') return } } + console.log('要合并了') useMergeTableRow(newValue, props.needMergeCells) } }, { @@ -340,7 +343,7 @@ /> - + @@ -380,15 +383,15 @@ .radio { :deep(.el-radio__label) { - display: none !important; + display: block !important; } } - + --> diff --git a/src/commonMethods/useMergeTableRow.ts b/src/commonMethods/useMergeTableRow.ts index 13f6131..6e86139 100644 --- a/src/commonMethods/useMergeTableRow.ts +++ b/src/commonMethods/useMergeTableRow.ts @@ -67,3 +67,15 @@ } return result } +export function initTableLastRow(data: any) { + const tableData = data + if (!tableData.length) { + return tableData + } + for (const i in tableData[tableData.length - 1]) { + if (i.includes('-span')) { + tableData[tableData.length - 1][i] = undefined + } + } + return tableData +} diff --git a/src/components/DetailPage/DetailBlock.vue b/src/components/DetailPage/DetailBlock.vue index c9c8a1f..86d14c1 100644 --- a/src/components/DetailPage/DetailBlock.vue +++ b/src/components/DetailPage/DetailBlock.vue @@ -6,7 +6,7 @@ }, titleMenus: { type: Array as () => string[], - required: true, + // required: true, default: () => [], }, }) diff --git a/src/views/business/measure/item/components/second/templateDetail.vue b/src/views/business/measure/item/components/second/templateDetail.vue index b3226c5..b14b937 100644 --- a/src/views/business/measure/item/components/second/templateDetail.vue +++ b/src/views/business/measure/item/components/second/templateDetail.vue @@ -83,6 +83,13 @@ }, { deep: true, }) +watch(() => form.value.technicalIndexSymbol, (newVal) => { + if (newVal) { + for (const i in listDict.value) { + listDict.value[i] = listDict.value[i].map((item: any) => ({ ...item, technicalIndexSymbol: newVal })) + } + } +}) // 清空所有数据 function clearAllList() { list.value = [] diff --git a/src/views/business/measure/item/components/second/templateTable.vue b/src/views/business/measure/item/components/second/templateTable.vue index 4d8037d..369a040 100644 --- a/src/views/business/measure/item/components/second/templateTable.vue +++ b/src/views/business/measure/item/components/second/templateTable.vue @@ -215,10 +215,13 @@ if (newValue) { if (Array.isArray(newValue) && newValue?.length) { const data = newValue[newValue.length - 1] + if (isMerge(data)) { + console.log('isMerge') return } } + console.log('要合并了') useMergeTableRow(newValue, props.needMergeCells) } }, { @@ -340,7 +343,7 @@ /> - + @@ -380,15 +383,15 @@ .radio { :deep(.el-radio__label) { - display: none !important; + display: block !important; } } - + --> diff --git a/src/views/business/taskMeasure/measureData/components/second/second-interface.ts b/src/views/business/taskMeasure/measureData/components/second/second-interface.ts index 13b0ac0..5ec5148 100644 --- a/src/views/business/taskMeasure/measureData/components/second/second-interface.ts +++ b/src/views/business/taskMeasure/measureData/components/second/second-interface.ts @@ -47,14 +47,14 @@ belongStandardEquipment: string // 标准装置code belongStandardEquipmentName: string // 标准装置名称 appearanceRemark: string // 外观(1/string | numberr) - appearanceFunctionCheck: string | numberr // 外观 - voltageRegulation: string | numberr // 电源电压调整率 - loadRegulation: string | numberr // 负载调整率 - voltageRepresentError: string | numberr // 电压表示值误差 - currentRepresentErrorDirect: string | numberr // 电流表示值误差(直接测量) - currentRepresentErrorIndirect: string | numberr // 电流表示值误差(间接测量) - rippleVoltage: string | numberr // 纹波电压 - voltageOutputStability: string | numberr // 输出电压短期稳定性 + appearanceFunctionCheck: string | number // 外观 + voltageRegulation: string | number // 电源电压调整率 + loadRegulation: string | number // 负载调整率 + voltageRepresentError: string | number // 电压表示值误差 + currentRepresentErrorDirect: string | number // 电流表示值误差(直接测量) + currentRepresentErrorIndirect: string | number // 电流表示值误差(间接测量) + rippleVoltage: string | number // 纹波电压 + voltageOutputStability: string | number // 输出电压短期稳定性 remark: string // 情况说明 conclusion: string // 检验结论 diff --git a/src/commonMethods/useMergeTableRow.ts b/src/commonMethods/useMergeTableRow.ts index 13f6131..6e86139 100644 --- a/src/commonMethods/useMergeTableRow.ts +++ b/src/commonMethods/useMergeTableRow.ts @@ -67,3 +67,15 @@ } return result } +export function initTableLastRow(data: any) { + const tableData = data + if (!tableData.length) { + return tableData + } + for (const i in tableData[tableData.length - 1]) { + if (i.includes('-span')) { + tableData[tableData.length - 1][i] = undefined + } + } + return tableData +} diff --git a/src/components/DetailPage/DetailBlock.vue b/src/components/DetailPage/DetailBlock.vue index c9c8a1f..86d14c1 100644 --- a/src/components/DetailPage/DetailBlock.vue +++ b/src/components/DetailPage/DetailBlock.vue @@ -6,7 +6,7 @@ }, titleMenus: { type: Array as () => string[], - required: true, + // required: true, default: () => [], }, }) diff --git a/src/views/business/measure/item/components/second/templateDetail.vue b/src/views/business/measure/item/components/second/templateDetail.vue index b3226c5..b14b937 100644 --- a/src/views/business/measure/item/components/second/templateDetail.vue +++ b/src/views/business/measure/item/components/second/templateDetail.vue @@ -83,6 +83,13 @@ }, { deep: true, }) +watch(() => form.value.technicalIndexSymbol, (newVal) => { + if (newVal) { + for (const i in listDict.value) { + listDict.value[i] = listDict.value[i].map((item: any) => ({ ...item, technicalIndexSymbol: newVal })) + } + } +}) // 清空所有数据 function clearAllList() { list.value = [] diff --git a/src/views/business/measure/item/components/second/templateTable.vue b/src/views/business/measure/item/components/second/templateTable.vue index 4d8037d..369a040 100644 --- a/src/views/business/measure/item/components/second/templateTable.vue +++ b/src/views/business/measure/item/components/second/templateTable.vue @@ -215,10 +215,13 @@ if (newValue) { if (Array.isArray(newValue) && newValue?.length) { const data = newValue[newValue.length - 1] + if (isMerge(data)) { + console.log('isMerge') return } } + console.log('要合并了') useMergeTableRow(newValue, props.needMergeCells) } }, { @@ -340,7 +343,7 @@ /> - + @@ -380,15 +383,15 @@ .radio { :deep(.el-radio__label) { - display: none !important; + display: block !important; } } - + --> diff --git a/src/views/business/taskMeasure/measureData/components/second/second-interface.ts b/src/views/business/taskMeasure/measureData/components/second/second-interface.ts index 13b0ac0..5ec5148 100644 --- a/src/views/business/taskMeasure/measureData/components/second/second-interface.ts +++ b/src/views/business/taskMeasure/measureData/components/second/second-interface.ts @@ -47,14 +47,14 @@ belongStandardEquipment: string // 标准装置code belongStandardEquipmentName: string // 标准装置名称 appearanceRemark: string // 外观(1/string | numberr) - appearanceFunctionCheck: string | numberr // 外观 - voltageRegulation: string | numberr // 电源电压调整率 - loadRegulation: string | numberr // 负载调整率 - voltageRepresentError: string | numberr // 电压表示值误差 - currentRepresentErrorDirect: string | numberr // 电流表示值误差(直接测量) - currentRepresentErrorIndirect: string | numberr // 电流表示值误差(间接测量) - rippleVoltage: string | numberr // 纹波电压 - voltageOutputStability: string | numberr // 输出电压短期稳定性 + appearanceFunctionCheck: string | number // 外观 + voltageRegulation: string | number // 电源电压调整率 + loadRegulation: string | number // 负载调整率 + voltageRepresentError: string | number // 电压表示值误差 + currentRepresentErrorDirect: string | number // 电流表示值误差(直接测量) + currentRepresentErrorIndirect: string | number // 电流表示值误差(间接测量) + rippleVoltage: string | number // 纹波电压 + voltageOutputStability: string | number // 输出电压短期稳定性 remark: string // 情况说明 conclusion: string // 检验结论 diff --git a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue index 5d7a853..f76d20a 100644 --- a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue @@ -19,7 +19,7 @@ import { useCheckList } from '@/commonMethods/useCheckList' import { calc } from '@/utils/useCalc' import templateTable from '@/views/business/measure/item/components/second/templateTable.vue' -import { initTableRow } from '@/commonMethods/useMergeTableRow' +import { initTableLastRow, initTableRow } from '@/commonMethods/useMergeTableRow' import { differenceArray } from '@/utils/Array' const props = defineProps({ infoId: String, // id @@ -170,7 +170,7 @@ const addRow = () => { if (!checkList(outputVoltageStabilityList.value, columns_output_voltage_stability.value, '输出电压短期稳定性')) { return } // 增加行 - outputVoltageStabilityList.value.push(outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1]) + outputVoltageStabilityList.value.push({ ...outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1] }) // 初始化数据 outputVoltageStabilityList.value = initTableRow(outputVoltageStabilityList.value) } @@ -209,8 +209,10 @@ // 有关于检定项的数据 itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查 initInputData(res.data.measureDataDcPowerList) + console.log(1111111) // =======================================表单公共组件数据处理======================================================= useSolveFormData(res, templateFormAndTableRef.value) + console.log(222222) // ==================================检定数据======================================================================== infoId.value = res.data.id emits('giveInfoId', infoId.value) diff --git a/src/commonMethods/useMergeTableRow.ts b/src/commonMethods/useMergeTableRow.ts index 13f6131..6e86139 100644 --- a/src/commonMethods/useMergeTableRow.ts +++ b/src/commonMethods/useMergeTableRow.ts @@ -67,3 +67,15 @@ } return result } +export function initTableLastRow(data: any) { + const tableData = data + if (!tableData.length) { + return tableData + } + for (const i in tableData[tableData.length - 1]) { + if (i.includes('-span')) { + tableData[tableData.length - 1][i] = undefined + } + } + return tableData +} diff --git a/src/components/DetailPage/DetailBlock.vue b/src/components/DetailPage/DetailBlock.vue index c9c8a1f..86d14c1 100644 --- a/src/components/DetailPage/DetailBlock.vue +++ b/src/components/DetailPage/DetailBlock.vue @@ -6,7 +6,7 @@ }, titleMenus: { type: Array as () => string[], - required: true, + // required: true, default: () => [], }, }) diff --git a/src/views/business/measure/item/components/second/templateDetail.vue b/src/views/business/measure/item/components/second/templateDetail.vue index b3226c5..b14b937 100644 --- a/src/views/business/measure/item/components/second/templateDetail.vue +++ b/src/views/business/measure/item/components/second/templateDetail.vue @@ -83,6 +83,13 @@ }, { deep: true, }) +watch(() => form.value.technicalIndexSymbol, (newVal) => { + if (newVal) { + for (const i in listDict.value) { + listDict.value[i] = listDict.value[i].map((item: any) => ({ ...item, technicalIndexSymbol: newVal })) + } + } +}) // 清空所有数据 function clearAllList() { list.value = [] diff --git a/src/views/business/measure/item/components/second/templateTable.vue b/src/views/business/measure/item/components/second/templateTable.vue index 4d8037d..369a040 100644 --- a/src/views/business/measure/item/components/second/templateTable.vue +++ b/src/views/business/measure/item/components/second/templateTable.vue @@ -215,10 +215,13 @@ if (newValue) { if (Array.isArray(newValue) && newValue?.length) { const data = newValue[newValue.length - 1] + if (isMerge(data)) { + console.log('isMerge') return } } + console.log('要合并了') useMergeTableRow(newValue, props.needMergeCells) } }, { @@ -340,7 +343,7 @@ /> - + @@ -380,15 +383,15 @@ .radio { :deep(.el-radio__label) { - display: none !important; + display: block !important; } } - + --> diff --git a/src/views/business/taskMeasure/measureData/components/second/second-interface.ts b/src/views/business/taskMeasure/measureData/components/second/second-interface.ts index 13b0ac0..5ec5148 100644 --- a/src/views/business/taskMeasure/measureData/components/second/second-interface.ts +++ b/src/views/business/taskMeasure/measureData/components/second/second-interface.ts @@ -47,14 +47,14 @@ belongStandardEquipment: string // 标准装置code belongStandardEquipmentName: string // 标准装置名称 appearanceRemark: string // 外观(1/string | numberr) - appearanceFunctionCheck: string | numberr // 外观 - voltageRegulation: string | numberr // 电源电压调整率 - loadRegulation: string | numberr // 负载调整率 - voltageRepresentError: string | numberr // 电压表示值误差 - currentRepresentErrorDirect: string | numberr // 电流表示值误差(直接测量) - currentRepresentErrorIndirect: string | numberr // 电流表示值误差(间接测量) - rippleVoltage: string | numberr // 纹波电压 - voltageOutputStability: string | numberr // 输出电压短期稳定性 + appearanceFunctionCheck: string | number // 外观 + voltageRegulation: string | number // 电源电压调整率 + loadRegulation: string | number // 负载调整率 + voltageRepresentError: string | number // 电压表示值误差 + currentRepresentErrorDirect: string | number // 电流表示值误差(直接测量) + currentRepresentErrorIndirect: string | number // 电流表示值误差(间接测量) + rippleVoltage: string | number // 纹波电压 + voltageOutputStability: string | number // 输出电压短期稳定性 remark: string // 情况说明 conclusion: string // 检验结论 diff --git a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue index 5d7a853..f76d20a 100644 --- a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue @@ -19,7 +19,7 @@ import { useCheckList } from '@/commonMethods/useCheckList' import { calc } from '@/utils/useCalc' import templateTable from '@/views/business/measure/item/components/second/templateTable.vue' -import { initTableRow } from '@/commonMethods/useMergeTableRow' +import { initTableLastRow, initTableRow } from '@/commonMethods/useMergeTableRow' import { differenceArray } from '@/utils/Array' const props = defineProps({ infoId: String, // id @@ -170,7 +170,7 @@ const addRow = () => { if (!checkList(outputVoltageStabilityList.value, columns_output_voltage_stability.value, '输出电压短期稳定性')) { return } // 增加行 - outputVoltageStabilityList.value.push(outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1]) + outputVoltageStabilityList.value.push({ ...outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1] }) // 初始化数据 outputVoltageStabilityList.value = initTableRow(outputVoltageStabilityList.value) } @@ -209,8 +209,10 @@ // 有关于检定项的数据 itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查 initInputData(res.data.measureDataDcPowerList) + console.log(1111111) // =======================================表单公共组件数据处理======================================================= useSolveFormData(res, templateFormAndTableRef.value) + console.log(222222) // ==================================检定数据======================================================================== infoId.value = res.data.id emits('giveInfoId', infoId.value) diff --git a/src/views/equipement/standard/checkData/components/second/checkDataCom.vue b/src/views/equipement/standard/checkData/components/second/checkDataCom.vue index d80daad..65a8349 100644 --- a/src/views/equipement/standard/checkData/components/second/checkDataCom.vue +++ b/src/views/equipement/standard/checkData/components/second/checkDataCom.vue @@ -2,6 +2,7 @@