<!-- 核查数据管理详情--核查项---第13套:示波器 --> <script lang="ts" setup name="checkDataDetail"> import { ref, watch } from 'vue' import { ElLoading, ElMessage } from 'element-plus' import saveCheckRecord from '../../dialog/saveCheckRecord.vue' import type { IList } from './thirteenth-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import useUserStore from '@/store/modules/user' import type { dictType } from '@/global' import { getDictByCode } from '@/api/system/dict' import multiTable from '@/components/MultiHeaderTable/index.vue' // import { getCheckItemDetail, getJobInstructionList } from '@/api/equipment/standard/book' // import { addCheckData, calculateHandle, getInfo, updateCheckData } from '@/api/equipment/standard/checkData' const user = useUserStore() // 用户信息 const $router = useRouter() // 关闭页面使用 const $route = useRoute() // 路由参数 const pageType = ref('add') // 页面类型: add, edit, detail const infoId = ref('') const belongStandardEquipment = ref('9') const itemCategoryId = ref('') // 核查项分类id const itemCategoryName = ref('') // 核查项分类名称 // ----------------------------------路由参数------------------------------------------------ if ($route.params && $route.params.type) { pageType.value = $route.params.type as string console.log(pageType.value) if ($route.params.id) { infoId.value = $route.params.id as string } } // ----------------------------------------核查数据---------------------------------------------- const radioMenus = ref([ // 标签内容 { name: '重复性', value: 'repeatability' }, { name: '稳定性', value: 'stability' }, ]) const current = ref('repeatability') // 选择的tab 默认基本信息 const columns_repeatability_timeMark = ref<TableColumn[]>([ // 重复性表头--时标、方波电压(50Ω)、方波电压(1Ω)、直流电压(50Ω)、直流电压(1Ω)、输入阻抗 { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '核查点', value: 'checkPointDefineFront', align: 'center', required: true, type: 'text' }, { text: '测量值', value: 'indicatingValue', align: 'center', required: true, width: '160', children: [ { text: 'X1', value: 'testValueOne', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: 'X2', value: 'testValueTwo', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: 'X3', value: 'testValueThree', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: 'X4', value: 'testValueFour', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: 'X5', value: 'testValueFive', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: 'X6', value: 'testValueSix', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: 'X7', value: 'testValueSeven', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: 'X8', value: 'testValueEight', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: 'X9', value: 'testValueNine', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: 'X10', value: 'testValueTen', align: 'center', required: true, width: '180', type: 'inputNumber' }, ], }, { text: '平均值', value: 'averageValue', align: 'center', required: true, type: 'text' }, { text: '重复性S(x)', value: 'standardDeviation', align: 'center', required: true, type: 'text' }, ]) const columns_repeatability_voltage_flatness = ref<TableColumn[]>([ // 重复性表头--稳幅正弦信号电压平坦度 { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '类型', value: 'typeValue', align: 'center', required: true, type: 'text' }, { text: '核查点', value: 'checkPoint', align: 'center', required: true, type: 'text' }, { text: '测量值单位', value: 'testValueUnit', align: 'center', required: true, type: 'text' }, { text: '转换为电压值单位', value: 'convertVoltageUnit', align: 'center', required: true, type: 'text' }, { text: 'X1', value: '-', align: 'center', required: true, width: '180', children: [ { text: '测量值', value: 'testValueOne', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '转换为电压值', value: 'convertVoltageOne', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '平坦度/%', value: 'flatnessOne', align: 'center', required: true, width: '180', type: 'inputNumber' }, ], }, { text: 'X2', value: '-', align: 'center', required: true, width: '180', children: [ { text: '测量值', value: 'testValueTwo', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '转换为电压值', value: 'convertVoltageTwo', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '平坦度/%', value: 'flatnessTwo', align: 'center', required: true, width: '180', type: 'inputNumber' }, ], }, { text: 'X3', value: '-', align: 'center', required: true, width: '180', children: [ { text: '测量值', value: 'testValueThree', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '转换为电压值', value: 'convertVoltageThree', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '平坦度/%', value: 'flatnessThree', align: 'center', required: true, width: '180', type: 'inputNumber' }, ], }, { text: 'X4', value: '-', align: 'center', required: true, width: '180', children: [ { text: '测量值', value: 'testValueFour', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '转换为电压值', value: 'convertVoltageFour', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '平坦度/%', value: 'flatnessFour', align: 'center', required: true, width: '180', type: 'inputNumber' }, ], }, { text: 'X5', value: '-', align: 'center', required: true, width: '180', children: [ { text: '测量值', value: 'testValueFive', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '转换为电压值', value: 'convertVoltageFive', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '平坦度/%', value: 'flatnessFive', align: 'center', required: true, width: '180', type: 'inputNumber' }, ], }, { text: 'X6', value: '-', align: 'center', required: true, width: '180', children: [ { text: '测量值', value: 'testValueSix', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '转换为电压值', value: 'convertVoltageSix', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '平坦度/%', value: 'flatnessSix', align: 'center', required: true, width: '180', type: 'inputNumber' }, ], }, { text: 'X7', value: '-', align: 'center', required: true, width: '180', children: [ { text: '测量值', value: 'testValueSeven', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '转换为电压值', value: 'convertVoltageSeven', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '平坦度/%', value: 'flatnessSeven', align: 'center', required: true, width: '180', type: 'inputNumber' }, ], }, { text: 'X8', value: '-', align: 'center', required: true, width: '180', children: [ { text: '测量值', value: 'testValueEight', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '转换为电压值', value: 'convertVoltageEight', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '平坦度/%', value: 'flatnessEight', align: 'center', required: true, width: '180', type: 'inputNumber' }, ], }, { text: 'X9', value: '-', align: 'center', required: true, width: '180', children: [ { text: '测量值', value: 'testValueNine', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '转换为电压值', value: 'convertVoltageNine', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '平坦度/%', value: 'flatnessNine', align: 'center', required: true, width: '180', type: 'inputNumber' }, ], }, { text: 'X10', value: '-', align: 'center', required: true, width: '180', children: [ { text: '测量值', value: 'testValueTen', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '转换为电压值', value: 'convertVoltageTen', align: 'center', required: true, width: '180', type: 'inputNumber' }, { text: '平坦度/%', value: 'flatnessTen', align: 'center', required: true, width: '180', type: 'inputNumber' }, ], }, { text: '平均值', value: 'averageValue', align: 'center', required: true, type: 'text' }, { text: '重复性S(x)', value: 'standardDeviation', align: 'center', required: true, type: 'text' }, ]) const columns_repeatability_risetime = ref<TableColumn[]>([ // 重复性表头--上升时间 { text: '核查项目', value: 'params', align: 'center', required: false }, { text: '快沿', value: 'checkPoint', align: 'center', required: false }, { text: '探头出厂编号', value: 'manufactureNo', align: 'center', required: false }, { text: '探头设备名称', value: 'equipmentName', align: 'center', required: false }, { text: '探头规格型号', value: 'model', align: 'center', required: false }, { text: '测量值', value: 'testValueOne', align: 'center', required: true }, ]) const columns_stability_timeMark = ref<TableColumn[]>([ // 稳定性表头--时标 { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '核查点', value: 'checkPointDefineFront', align: 'center', required: true, type: 'text' }, { text: '核查点均值', value: '-', align: 'center', required: true, width: '180', children: [ { width: '180', text: '-', value: 'testValueOne', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueTwo', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueThree', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFour', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFive', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueSix', align: 'center', required: false, type: 'text', customHeader: true }, ], }, { text: '平均值', value: 'averageValue', align: 'center', required: true, type: 'text' }, { text: '稳定性', value: 'stability', align: 'center', required: true, type: 'text' }, { text: '最大允许误差的绝对值', value: 'maximumErrorAbsoluteDefineFront', align: 'center', required: true, type: 'text' }, { text: '结论', value: 'conclusion', align: 'center', required: true, type: 'text' }, ]) // 方波电压(50Ω)--稳定性 const columns_stability_squareWaveVoltage50Ω = ref<TableColumn[]>([ { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '核查点', value: 'checkPointDefineFront', align: 'center', required: true, type: 'text' }, { text: '核查点均值', value: 'indicatingValue', align: 'center', required: true, width: '180', children: [ { width: '180', text: '-', value: 'testValueOne', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueTwo', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueThree', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFour', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFive', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueSix', align: 'center', required: false, type: 'text', customHeader: true }, ], }, { text: '平均值', value: 'averageValue', align: 'center', required: true, type: 'text' }, { text: '稳定性', value: 'stability', align: 'center', required: true, type: 'text' }, { text: '最大允许误差的绝对值', value: 'maximumErrorAbsoluteDefineFront', align: 'center', required: true, type: 'text' }, { text: '结论', value: 'conclusion', align: 'center', required: true, type: 'text' }, ]) // 方波电压(1MΩ)--稳定性 const columns_stability_squareWaveVoltage1MΩ = ref<TableColumn[]>([ { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '核查点', value: 'checkPointDefineFront', align: 'center', required: true, type: 'text' }, { text: '核查点均值', value: 'indicatingValue', align: 'center', required: true, width: '180', children: [ { width: '180', text: '-', value: 'testValueOne', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueTwo', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueThree', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFour', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFive', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueSix', align: 'center', required: false, type: 'text', customHeader: true }, ], }, { text: '平均值', value: 'averageValue', align: 'center', required: true, type: 'text' }, { text: '稳定性', value: 'stability', align: 'center', required: true, type: 'text' }, { text: '最大允许误差的绝对值', value: 'maximumErrorAbsoluteDefineFront', align: 'center', required: true, type: 'text' }, { text: '结论', value: 'conclusion', align: 'center', required: true, type: 'text' }, ]) // 直流电压(50Ω)--稳定性 const columns_stability_directVoltage50Ω = ref<TableColumn[]>([ { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '核查点', value: 'checkPointDefineFront', align: 'center', required: true, type: 'text' }, { text: '核查点均值', value: 'indicatingValue', align: 'center', required: true, width: '180', children: [ { width: '180', text: '-', value: 'testValueOne', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueTwo', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueThree', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFour', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFive', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueSix', align: 'center', required: false, type: 'text', customHeader: true }, ], }, { text: '平均值', value: 'averageValue', align: 'center', required: true, type: 'text' }, { text: '稳定性', value: 'stability', align: 'center', required: true, type: 'text' }, { text: '最大允许误差的绝对值', value: 'maximumErrorAbsoluteDefineFront', align: 'center', required: true, type: 'text' }, { text: '结论', value: 'conclusion', align: 'center', required: true, type: 'text' }, ]) // 直流电压(1MΩ)--稳定性 const columns_stability_directVoltage1MΩ = ref<TableColumn[]>([ { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '核查点', value: 'checkPointDefineFront', align: 'center', required: true, type: 'text' }, { text: '核查点均值', value: 'indicatingValue', align: 'center', required: true, width: '180', children: [ { width: '180', text: '-', value: 'testValueOne', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueTwo', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueThree', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFour', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFive', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueSix', align: 'center', required: false, type: 'text', customHeader: true }, ], }, { text: '平均值', value: 'averageValue', align: 'center', required: true, type: 'text' }, { text: '稳定性', value: 'stability', align: 'center', required: true, type: 'text' }, { text: '最大允许误差的绝对值', value: 'maximumErrorAbsoluteDefineFront', align: 'center', required: true, type: 'text' }, { text: '结论', value: 'conclusion', align: 'center', required: true, type: 'text' }, ]) // 输入阻抗--稳定性 const columns_stability_inputImpedance = ref<TableColumn[]>([ { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '核查点', value: 'checkPointDefineFront', align: 'center', required: true, type: 'text' }, { text: '核查点均值', value: 'indicatingValue', align: 'center', required: true, width: '180', children: [ { width: '180', text: '-', value: 'testValueOne', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueTwo', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueThree', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFour', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFive', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueSix', align: 'center', required: false, type: 'text', customHeader: true }, ], }, { text: '平均值', value: 'averageValue', align: 'center', required: true, type: 'text' }, { text: '稳定性', value: 'stability', align: 'center', required: true, type: 'text' }, { text: '最大允许误差的绝对值', value: 'maximumErrorAbsoluteDefineFront', align: 'center', required: true, type: 'text' }, { text: '结论', value: 'conclusion', align: 'center', required: true, type: 'text' }, ]) // 稳幅正弦信号电压平坦度--稳定性 const columns_stability_voltage_flatness = ref<TableColumn[]>([ // 稳定性表头--稳幅正弦信号电压平坦度 { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '类型', value: 'typeValue', align: 'center', required: true, type: 'text' }, { text: '核查点', value: 'checkPointDefineFront', align: 'center', required: true, type: 'text' }, { text: '核查点均值', value: '-', align: 'center', required: true, width: '160', children: [ { width: '180', text: '-', value: 'testValueOne', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueTwo', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueThree', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFour', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueFive', align: 'center', required: false, type: 'text', customHeader: true }, { width: '180', text: '-', value: 'testValueSix', align: 'center', required: false, type: 'text', customHeader: true }, ], }, { text: '平均值', value: 'averageValue', align: 'center', required: true, type: 'text' }, { text: '稳定性', value: 'stability', align: 'center', required: true, type: 'text' }, { text: '最大允许误差的绝对值', value: 'maximumErrorAbsoluteDefineFront', align: 'center', required: true, type: 'text' }, { text: '结论', value: 'conclusion', align: 'center', required: true, type: 'text' }, ]) // 上升时间--稳定性 const columns_stability_risetime = ref<TableColumn[]>([ // 稳定性表头--上升时间 { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '快沿', value: 'checkPointDefineFront', align: 'center', required: true, type: 'text' }, { text: '探头出厂编号', value: 'manufactureNo', align: 'center', required: true, type: 'text' }, { text: '探头设备名称', value: 'equipmentName', align: 'center', required: true, type: 'text' }, { text: '探头规格型号', value: 'model', align: 'center', required: true, type: 'text' }, { text: '测量值', value: 'testValueOne', align: 'center', required: true, type: 'text' }, { text: '技术指标', value: 'technicalIndexDefineFront', align: 'center', required: true, type: 'text' }, { text: '结论', value: 'conclusion', align: 'center', required: true, type: 'text' }, ]) const listTimeMarkRepeatability = ref<IList[]>([]) // 时标-重复性 const listSquareWaveVoltage50ΩRepeatability = ref<IList[]>([]) // 方波电压(50Ω)-重复性 const listSquareWaveVoltage1MΩRepeatability = ref<IList[]>([]) // 方波电压(1MΩ)-重复性 const listDirectVoltage50ΩRepeatability = ref<IList[]>([]) // 直流电压(50Ω)-重复性 const listDirectVoltage1MΩRepeatability = ref<IList[]>([]) // 直流电压(1MΩ)-重复性 const listInputImpedanceRepeatability = ref<IList[]>([]) // 输入阻抗-重复性 const listVoltageFlatnessRepeatability = ref<IList[]>([]) // 稳幅正弦信号电压平坦度-重复性 const listRisetimeRepeatability = ref<IList[]>([]) // 上升时间-重复性 const listTimeMarkRepeatabilityLoading = ref<IList[]>([]) // 时标-重复性Loading const listSquareWaveVoltage50ΩRepeatabilityLoading = ref<IList[]>([]) // 方波电压(50Ω)-重复性Loading const listSquareWaveVoltage1MΩRepeatabilityLoading = ref<IList[]>([]) // 方波电压(1MΩ)-重复性Loading const listDirectVoltage50ΩRepeatabilityLoading = ref<IList[]>([]) // 直流电压(50Ω)-重复性Loading const listDirectVoltage1MΩRepeatabilityLoading = ref<IList[]>([]) // 直流电压(1MΩ)-重复性Loading const listInputImpedanceRepeatabilityLoading = ref<IList[]>([]) // 输入阻抗-重复性Loading const listVoltageFlatnessRepeatabilityLoading = ref<IList[]>([]) // 稳幅正弦信号电压平坦度-重复性Loading const listRisetimeRepeatabilityLoading = ref<IList[]>([]) // 上升时间-重复性Loading const listTimeMarkStability = ref<IList[]>([]) // 时标-稳定性 const listSquareWaveVoltage50ΩStability = ref<IList[]>([]) // 方波电压(50Ω)-稳定性 const listSquareWaveVoltage1MΩStability = ref<IList[]>([]) // 方波电压(1MΩ)-稳定性 const listDirectVoltage50ΩStability = ref<IList[]>([]) // 直流电压(50Ω)-稳定性 const listDirectVoltage1MΩStability = ref<IList[]>([]) // 直流电压(1MΩ)-稳定性 const listInputImpedanceStability = ref<IList[]>([]) // 输入阻抗-稳定性 const listVoltageFlatnessStability = ref<IList[]>([]) // 稳幅正弦信号电压平坦度-稳定性 const listRisetimeStability = ref<IList[]>([]) // 上升时间-稳定性 const listTimeMarkStabilityLoading = ref<IList[]>([]) // 时标-稳定性Loading const listSquareWaveVoltage50ΩStabilityLoading = ref<IList[]>([]) // 方波电压(50Ω)-稳定性Loading const listSquareWaveVoltage1MΩStabilityLoading = ref<IList[]>([]) // 方波电压(1MΩ)-稳定性Loading const listDirectVoltage50ΩStabilityLoading = ref<IList[]>([]) // 直流电压(50Ω)-稳定性Loading const listDirectVoltage1MΩStabilityLoading = ref<IList[]>([]) // 直流电压(1MΩ)-稳定性Loading const listInputImpedanceStabilityLoading = ref<IList[]>([]) // 输入阻抗-稳定性Loading const listVoltageFlatnessStabilityLoading = ref<IList[]>([]) // 稳幅正弦信号电压平坦度-稳定性Loading const listRisetimeStabilityLoading = ref<IList[]>([]) // 上升时间-稳定性Loading // 获取配置详情 function fetchCheckItemDetail(equipmentId: string, belongStandardEquipmentParam: string, itemCategoryIdParam: string, itemCategoryNameParam: string) { belongStandardEquipment.value = belongStandardEquipmentParam // 检校标准装置 itemCategoryId.value = itemCategoryIdParam // 核查分类id itemCategoryName.value = itemCategoryNameParam // 核查分类名称 const loading = ElLoading.service({ lock: true, background: 'rgba(255, 255, 255, 0.8)', }) const params = { equipmentId, // 设备id belongStandardEquipment: belongStandardEquipment.value, // 检校标准装置code itemCategoryId: itemCategoryId.value, // 核查项分类id itemCategoryName: itemCategoryName.value, // 核查项分类名称 } getCheckItemDetail(params).then((res) => { loading.close() handleData(res.data.checkItemDataResistanceThermometerList) fetchHistoryIndication() // 获取稳定性 }) } // 初始化数据(查询配置检定项) function handleData(list: any, type = 'edit') { const listSquareWaveVoltage1MΩRepeatability = ref<IList[]>([]) // 方波电压(1MΩ)-重复性 const listDirectVoltage50ΩRepeatability = ref<IList[]>([]) // 直流电压(50Ω)-重复性 const listDirectVoltage1MΩRepeatability = ref<IList[]>([]) // 直流电压(1MΩ)-重复性 const listInputImpedanceRepeatability = ref<IList[]>([]) // 输入阻抗-重复性 const listVoltageFlatnessRepeatability = ref<IList[]>([]) // 稳幅正弦信号电压平坦度-重复性 const listRisetimeRepeatability = ref<IList[]>([]) // 上升时间-重复性 // 时标 listTimeMarkRepeatability.value = list.filter((item: { params: string }) => item.params === '时标') // 时标重复性 listTimeMarkRepeatability.value = listTimeMarkRepeatability.value.map((e: any) => { return { editable: type === 'edit', dataId: e.id, // 核查数据管理基础信息表id id: '', // id,更新/删除使用参数 checkType: '重复性', params: e.params, // 核查项目 checkPoint: e.checkPoint, unit: e.unit, // 单位(直接存字典value) checkPointDefineFront: e.checkPoint + e.unit, // 核查点 averageValue: '', // 平均值 standardDeviation: '', // 重复性 maximumErrorAbsolute: e.maximumErrorAbsolute, // 最大允许误差的绝对值 maximumErrorAbsoluteUnit: e.maximumErrorAbsoluteUnit, // 最大允许误差的绝对值单位 maximumErrorAbsoluteUnitDefineFront: e.maximumErrorAbsolute + e.maximumErrorAbsoluteUnit, } }) // 时标稳定性 listTimeMarkStability.value = listTimeMarkRepeatability.value.map((e) => { return { editable: props.pageType !== 'detail', dataId: e.dataId, // 核查数据管理基础信息表id id: '', // id,更新/删除使用参数 params: e.params, // 核查项目 checkPoint: e.checkPoint, unit: e.unit, // 单位(直接存字典value) checkPointDefineFront: e.checkPoint + e.unit, // 核查点 checkType: '稳定性', averageValue: '', // 平均值 stability: '', // 稳定性 maximumErrorAbsolute: e.maximumErrorAbsolute, // 最大允许误差的绝对值 maximumErrorAbsoluteUnit: e.maximumErrorAbsoluteUnit, // 最大允许误差的绝对值单位 maximumErrorAbsoluteUnitDefineFront: e.maximumErrorAbsolute + e.maximumErrorAbsoluteUnit, conclusion: '', // 结论 } }) // 方波电压(50Ω) listSquareWaveVoltage50ΩRepeatability.value = list.filter((item: { params: string }) => item.params === '方波电压(50Ω)') // 方波电压(50Ω)重复性 listSquareWaveVoltage50ΩRepeatability.value = listSquareWaveVoltage50ΩRepeatability.value.map((e: any) => { return { editable: type === 'edit', dataId: e.id, // 核查数据管理基础信息表id id: '', // id,更新/删除使用参数 checkType: '重复性', params: e.params, // 核查项目 checkPoint: e.checkPoint, unit: e.unit, // 单位(直接存字典value) checkPointDefineFront: e.checkPoint + e.unit, // 核查点 urel: e.urel, // 扩展不确定度U averageValue: '', // 平均值 standardDeviation: '', // 重复性 maximumErrorAbsolute: e.maximumErrorAbsolute, // 最大允许误差的绝对值 maximumErrorAbsoluteUnit: e.maximumErrorAbsoluteUnit, // 最大允许误差的绝对值单位 maximumErrorAbsoluteUnitDefineFront: e.maximumErrorAbsolute + e.maximumErrorAbsoluteUnit, } }) // 方波电压(50Ω)稳定性 listSquareWaveVoltage50ΩStability.value = listSquareWaveVoltage50ΩRepeatability.value.map((e) => { return { editable: props.pageType !== 'detail', dataId: e.dataId, // 核查数据管理基础信息表id id: '', // id,更新/删除使用参数 params: e.params, // 核查项目 checkPoint: e.checkPoint, unit: e.unit, // 单位(直接存字典value) checkPointDefineFront: e.checkPoint + e.unit, // 核查点 checkType: '稳定性', averageValue: '', // 平均值 stability: '', // 稳定性 maximumErrorAbsolute: e.maximumErrorAbsolute, // 最大允许误差的绝对值 maximumErrorAbsoluteUnit: e.maximumErrorAbsoluteUnit, // 最大允许误差的绝对值单位 maximumErrorAbsoluteUnitDefineFront: e.maximumErrorAbsolute + e.maximumErrorAbsoluteUnit, conclusion: '', // 结论 } }) // 方波电压(1MΩ) listSquareWaveVoltage1MΩRepeatability.value = list.filter((item: { params: string }) => item.params === '方波电压(1MΩ)') // 方波电压(1MΩ)重复性 listSquareWaveVoltage1MΩRepeatability.value = listSquareWaveVoltage1MΩRepeatability.value.map((e: any) => { return { editable: type === 'edit', dataId: e.id, // 核查数据管理基础信息表id id: '', // id,更新/删除使用参数 checkType: '重复性', params: e.params, // 核查项目 checkPoint: e.checkPoint, unit: e.unit, // 单位(直接存字典value) checkPointDefineFront: e.checkPoint + e.unit, // 核查点 averageValue: '', // 平均值 standardDeviation: '', // 重复性 maximumErrorAbsolute: e.maximumErrorAbsolute, // 最大允许误差的绝对值 maximumErrorAbsoluteUnit: e.maximumErrorAbsoluteUnit, // 最大允许误差的绝对值单位 maximumErrorAbsoluteUnitDefineFront: e.maximumErrorAbsolute + e.maximumErrorAbsoluteUnit, } }) // 方波电压(1MΩ)稳定性 listSquareWaveVoltage1MΩStability.value = listSquareWaveVoltage1MΩRepeatability.value.map((e) => { return { editable: props.pageType !== 'detail', dataId: e.dataId, // 核查数据管理基础信息表id id: '', // id,更新/删除使用参数 params: e.params, // 核查项目 checkPoint: e.checkPoint, unit: e.unit, // 单位(直接存字典value) checkPointDefineFront: e.checkPoint + e.unit, // 核查点 checkType: '稳定性', averageValue: '', // 平均值 stability: '', // 稳定性 maximumErrorAbsolute: e.maximumErrorAbsolute, // 最大允许误差的绝对值 maximumErrorAbsoluteUnit: e.maximumErrorAbsoluteUnit, // 最大允许误差的绝对值单位 maximumErrorAbsoluteUnitDefineFront: e.maximumErrorAbsolute + e.maximumErrorAbsoluteUnit, conclusion: '', // 结论 } }) } // 点击生成结果处理 const createResult = () => { // } // ------------------------------------------------------------------------------------------ // 获取详情 function fetchInfo() { // const loading = ElLoading.service({ // lock: true, // background: 'rgba(255, 255, 255, 0.8)', // }) // getInfo({ id: infoId.value }).then((res) => { // form.value = { ...res.data } // list.value = res.data.checkDataPistonGaugeList.map((item: any) => { // return { // ...item, // editable: pageType.value !== 'detail', // } // }) // loading.close() // }) } // -------------------------------------钩子----------------------------------------------------- onMounted(async () => { if (pageType.value !== 'add') { // fetchInfo() } }) defineExpose({ fetchCheckItemDetail }) </script> <template> <!-- 核查数据 --> <detail-block title="核查数据"> <div style="display: flex;justify-content: space-between;"> <el-radio-group v-model="current" style="margin-bottom: 20px;"> <el-radio-button v-for="item in radioMenus" :key="item.value" :label="item.value"> {{ item.name }} </el-radio-button> </el-radio-group> </div> <!-- 时标 --> <div style="display: flex;justify-content: space-between;align-items: center;"> <h5>时标</h5> <el-button v-if="pageType !== 'detail'" type="primary" @click="createResult"> 计算结果 </el-button> </div> <multi-table :table-data="current === 'repeatability' ? listTimeMarkRepeatability : listTimeMarkStability" :table-header="current === 'repeatability' ? columns_repeatability_timeMark : columns_stability_timeMark" :merge-rows="[]" :need-index="true" /> <!-- 方波电压(50Ω) --> <div style="display: flex;justify-content: space-between;align-items: center;"> <h5>方波电压(50Ω)</h5> <el-button v-if="pageType !== 'detail'" type="primary" @click="createResult"> 计算结果 </el-button> </div> <multi-table :table-data="current === 'repeatability' ? listSquareWaveVoltage50ΩRepeatability : listSquareWaveVoltage50ΩStability" :table-header="current === 'repeatability' ? columns_repeatability_timeMark : columns_stability_timeMark" :merge-rows="[]" :need-index="true" /> <!-- 方波电压(10Ω) --> <div style="display: flex;justify-content: space-between;align-items: center;"> <h5>方波电压(10Ω)</h5> <el-button v-if="pageType !== 'detail'" type="primary" @click="createResult"> 计算结果 </el-button> </div> <multi-table :table-data="current === 'repeatability' ? listSquareWaveVoltage1MΩRepeatability : listSquareWaveVoltage1MΩStability" :table-header="current === 'repeatability' ? columns_repeatability_timeMark : columns_stability_timeMark" :merge-rows="[]" :need-index="true" /> <!-- 方波电压(1MΩ) --> <div style="display: flex;justify-content: space-between;align-items: center;"> <h5>方波电压(1MΩ)</h5> <el-button v-if="pageType !== 'detail'" type="primary" @click="createResult"> 计算结果 </el-button> </div> <multi-table :table-data="current === 'repeatability' ? listSquareWaveVoltage1MΩRepeatability : listSquareWaveVoltage1MΩStability" :table-header="current === 'repeatability' ? columns_repeatability_timeMark : columns_stability_timeMark" :merge-rows="[]" :need-index="true" /> <!-- 直流电压(50Ω) --> <div style="display: flex;justify-content: space-between;align-items: center;"> <h5>直流电压(50Ω)</h5> <el-button v-if="pageType !== 'detail'" type="primary" @click="createResult"> 计算结果 </el-button> </div> <multi-table :table-data="current === 'repeatability' ? listDirectVoltage50ΩRepeatability : listDirectVoltage50ΩStability" :table-header="current === 'repeatability' ? columns_repeatability_timeMark : columns_stability_timeMark" :merge-rows="[]" :need-index="true" /> <!-- 直流电压(1MΩ) --> <div style="display: flex;justify-content: space-between;align-items: center;"> <h5>直流电压(1MΩ)</h5> <el-button v-if="pageType !== 'detail'" type="primary" @click="createResult"> 计算结果 </el-button> </div> <multi-table :table-data="current === 'repeatability' ? listDirectVoltage1MΩRepeatability : listDirectVoltage1MΩStability" :table-header="current === 'repeatability' ? columns_repeatability_timeMark : columns_stability_timeMark" :merge-rows="[]" :need-index="true" /> <!-- 输入阻抗 --> <div style="display: flex;justify-content: space-between;align-items: center;"> <h5>输入阻抗</h5> <el-button v-if="pageType !== 'detail'" type="primary" @click="createResult"> 计算结果 </el-button> </div> <multi-table :table-data="current === 'repeatability' ? listInputImpedanceRepeatability : listInputImpedanceStability" :table-header="current === 'repeatability' ? columns_repeatability_timeMark : columns_stability_timeMark" :merge-rows="[]" :need-index="true" /> <!-- 稳幅正弦信号电压平坦度 --> <div style="display: flex;justify-content: space-between;align-items: center;"> <h5>稳幅正弦信号电压平坦度</h5> <el-button v-if="pageType !== 'detail'" type="primary" @click="createResult"> 计算结果 </el-button> </div> <multi-table :table-data="current === 'repeatability' ? listVoltageFlatnessRepeatability : listVoltageFlatnessStability" :table-header="current === 'repeatability' ? columns_repeatability_voltage_flatness : columns_stability_voltage_flatness" :merge-rows="[]" :need-index="true" /> <!-- 上升时间 --> <div style="display: flex;justify-content: space-between;align-items: center;"> <h5>上升时间</h5> <el-button v-if="pageType !== 'detail'" type="primary" @click="createResult"> 计算结果 </el-button> </div> <multi-table :table-data="current === 'repeatability' ? listRisetimeRepeatability : listRisetimeStability" :table-header="current === 'repeatability' ? columns_repeatability_risetime : columns_stability_risetime" :merge-rows="[]" :need-index="true" /> </detail-block> <!-- 保存核查记录 --> <save-check-record ref="saveCheckRecordRef" /> </template> <style lang="scss" scoped> .link { text-decoration: underline; color: #3d7eff; cursor: pointer; } .file-area { display: flex; align-items: center; font-size: 14px; color: #60627f; margin-bottom: 10px; margin-left: 40px; white-space: nowrap; .tech-file { display: flex; align-items: center; margin-left: 20px; .file-text { margin-right: 10px; } } } </style>