diff --git a/src/views/business/measure/item/components/fourteen/components/clock.vue b/src/views/business/measure/item/components/fourteen/components/clock.vue index 00bc1b7..1d92ac9 100644 --- a/src/views/business/measure/item/components/fourteen/components/clock.vue +++ b/src/views/business/measure/item/components/fourteen/components/clock.vue @@ -91,58 +91,58 @@ // ----------------------------------------表头------------------------------------------------ const columns_output_signal = ref([ // 输出信号 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '信号类型', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '被测信号频率', value: 'unit', align: 'center', required: true, type: '' }, - { text: '幅度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '脉冲宽度技术指标', value: 'sweepWidthUnit', align: 'center', required: true, type: '' }, - { text: '上升时间技术指标', value: 'horizontalResolution', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '信号类型', value: 'signalType', align: 'center', required: true, type: 'select' }, + { text: '被测信号频率', value: '', align: 'center', required: false, type: '' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '脉冲宽度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '上升时间技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_warm_up = ref([ // 开机特性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '开机时间', value: 'horizontalResolution', align: 'center', required: true, type: 'number' }, - { text: '开机时间单位', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '开机时间', value: 'onTime', align: 'center', required: true, type: 'number' }, + { text: '开机时间单位', value: 'onTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_reproducibility = ref([ // 频率复现性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T2', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T2单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T3', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T3单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: 'T1', value: 'tOne', align: 'center', required: true, type: 'number' }, + { text: 'T1单位', value: 'tOneUnit', align: 'center', required: true, type: 'select' }, + { text: 'T2', value: 'tTwo', align: 'center', required: true, type: 'number' }, + { text: 'T2单位', value: 'tTwoUnit', align: 'center', required: true, type: 'select' }, + { text: 'T3', value: 'tThree', align: 'center', required: true, type: 'number' }, + { text: 'T3单位', value: 'tThreeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_stability = ref([ // 频率稳定度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度uc', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度uc', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_daily_frequency_drift_rate = ref([ // 日频率漂移率 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 @@ -163,6 +163,35 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { + const params = { + signalType: '', // 信号类型 + testedSignalFrequency: '', // 被测信号频率 + testedSignalFrequencyUnit: 'MHz', // 被测信号频率单位 + amplitudeTechnicalIndexLower: '', // 幅度技术指标下限 + amplitudeTechnicalIndexUpper: '', // 幅度技术指标上限 + amplitudeTechnicalIndexUnit: '', // 幅度技术指标单位 + pulseWidthTechnicalIndexLower: '', // 脉冲宽度技术指标下限 + pulseWidthTechnicalIndexUnit: '', // 脉冲宽度技术指标单位 + pulseWidthTechnicalIndexUpper: '', // 脉冲宽度技术指标上限 + technicalIndex: '', // 上升时间技术指标 + technicalIndexSymbol: '±', // 上升时间技术指标符号 + technicalIndexUnit: '', // 上升时间技术指标单位 + gateTime: '', // 闸门时间 + gateTimeUnit: '', // 闸门时间单位 + multiplyFrequency: '', // 倍增次数 + onTime: '', // 开机时间 + onTimeUnit: '', // 开机时间单位 + sampleTime: '', // 取样时间 + sampleTimeUnit: '', // 取样时间单位 + urel: '', + tOne: '', + tTwo: '', + tThree: '', + tOneUnit: '', + tTwoUnit: '', + tThreeUnit: '', + sampleGroupNumber: '', // 采样组数 + } switch (title) { case '输出信号': // 输出信号 outputSignalList.value.length @@ -170,7 +199,63 @@ : outputSignalList.value.push({ dataType: '1', params: '输出信号', - unit: '', // 标称值单位 + ...params, + editable: true, + } as any) + break + case '开机特性': // 开机特性 + warmUpList.value.length + ? warmUpList.value.push(JSON.parse(JSON.stringify(warmUpList.value[warmUpList.value.length - 1]))) + : warmUpList.value.push({ + dataType: '2', + params: '开机特性', + ...params, + editable: true, + } as any) + break + case '频率复现性': // 频率复现性 + frequencyReproducibilityList.value.length + ? frequencyReproducibilityList.value.push(JSON.parse(JSON.stringify(frequencyReproducibilityList.value[frequencyReproducibilityList.value.length - 1]))) + : frequencyReproducibilityList.value.push({ + dataType: '3', + params: '频率复现性', + ...params, + gateTime: '100', + tOne: '24', + tTwo: '24', + tThree: '12', + editable: true, + } as any) + break + case '相对频率偏差': // 相对频率偏差 + relativeFrequencyDeviationList.value.length + ? relativeFrequencyDeviationList.value.push(JSON.parse(JSON.stringify(relativeFrequencyDeviationList.value[relativeFrequencyDeviationList.value.length - 1]))) + : relativeFrequencyDeviationList.value.push({ + dataType: '4', + params: '相对频率偏差', + ...params, + gateTime: '100', + editable: true, + } as any) + break + case '频率稳定度': // 频率稳定度 + frequencyStabilityList.value.length + ? frequencyStabilityList.value.push(JSON.parse(JSON.stringify(frequencyStabilityList.value[frequencyStabilityList.value.length - 1]))) + : frequencyStabilityList.value.push({ + dataType: '5', + params: '频率稳定度', + ...params, + editable: true, + } as any) + break + case '日频率漂移率': // 日频率漂移率 + dailyFrequencyDriftRateList.value.length + ? dailyFrequencyDriftRateList.value.push(JSON.parse(JSON.stringify(dailyFrequencyDriftRateList.value[dailyFrequencyDriftRateList.value.length - 1]))) + : dailyFrequencyDriftRateList.value.push({ + dataType: '6', + params: '日频率漂移率', + ...params, + gateTime: '100', editable: true, } as any) break @@ -232,7 +317,12 @@ // ----------------------------------------------------------------------------------------------------- const clearAllList = () => { list.value = [] - // crystalOscillatorStartupCharacterList.value = [] + dailyFrequencyDriftRateList.value = [] + frequencyStabilityList.value = [] + relativeFrequencyDeviationList.value = [] + frequencyReproducibilityList.value = [] + warmUpList.value = [] + outputSignalList.value = [] for (const i in listDict.value) { listDict.value[i] = [] } @@ -243,11 +333,52 @@ newVal.forEach((item: any) => { switch (item.dataType) { case '1': - // 晶振开机特性 - crystalOscillatorStartupCharacterList.value.push({ ...item, params: '晶振开机特性' }) + // 输出信号 + outputSignalList.value.push({ ...item, params: '输出信号', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '2': + // 开机特性 + warmUpList.value.push({ ...item, params: '开机特性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '3': + // 频率复现性 + frequencyReproducibilityList.value.push({ ...item, params: '频率复现性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '4': + // 相对频率偏差 + relativeFrequencyDeviationList.value.push({ ...item, params: '相对频率偏差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '5': + // 频率稳定度 + frequencyStabilityList.value.push({ ...item, params: '频率稳定度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '6': + // 日频率漂移率 + dailyFrequencyDriftRateList.value.push({ ...item, params: '日频率漂移率', technicalIndex: clearSymbol(item.technicalIndex) }) break } }) + + if (props.pageType !== 'detail') { + if (newVal.every((item: { dataType: string }) => item.dataType !== '3')) { + addRow([], '频率复现性', '3') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '4')) { + addRow([], '相对频率偏差', '4') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '6')) { + addRow([], '日频率漂移率', '6') + } + } + } + else { + if (props.pageType !== 'detail') { + setTimeout(() => { + addRow([], '频率复现性', '3') + addRow([], '相对频率偏差', '4') + addRow([], '日频率漂移率', '6') + }) + } } }) const getList = () => { @@ -281,25 +412,59 @@ // 获取字典 const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位 +const thoroughfare = ref<{ value: string;name: string;id: string }[]>([]) // 通道 +const testedSignalFrequency = ref<{ value: string;name: string;id: string }[]>([]) // 被测信号频率 +const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位 +const timeList = ref<{ value: string;name: string;id: string }[]>([]) // 时间 +const standardTechnicalIndexSymbol = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号 +const signalType = ref<{ value: string;name: string;id: string }[]>([]) // 信号类型 const fetchDict = async () => { // 标称值单位 const res1 = await getDictByCode('bizFirstStandardFrequencyUnit') nominalValueUnit.value = res1.data + // 通道 + const res2 = await getDictByCode('cesiumAtomThoroughfare') + thoroughfare.value = res2.data + // 被测信号频率 + const res3 = await getDictByCode('cesiumAtomTestedSignalFrequency') + testedSignalFrequency.value = res3.data + // 电压单位 + const res4 = await getDictByCode('standardVoltage') + standardVoltage.value = res4.data + // 时间 + const res5 = await getDictByCode('standardTimeUnit') + timeList.value = res5.data + // 技术指标符号 + const res6 = await getDictByCode('standardTechnicalIndexSymbol') + standardTechnicalIndexSymbol.value = res6.data + // 信号类型 + const res7 = await getDictByCode('cesiumAtomSignalType') + signalType.value = res7.data + console.log(signalType.value, 'signalType.value') tableDict.value = { 标称值单位: nominalValueUnit.value, + 通道: thoroughfare.value, + 被测信号频率: testedSignalFrequency.value, + 取样时间单位: timeList.value, + 闸门时间单位: timeList.value, + 开机时间单位: timeList.value, + T1单位: timeList.value, + T3单位: timeList.value, + T2单位: timeList.value, + 信号类型: signalType.value, } } fetchDict() // 自定义下拉框内容 -const customSelect = (data: any, fun: any) => { - if (data.title === '参考电平' && data.text === '标称值单位') { - fun(amplitudeUnit.value) - } - else { - fun(tableDict.value[data.text]) - } -} +// const customSelect = (data: any, fun: any) => { +// if (data.title === '参考电平' && data.text === '标称值单位') { +// fun(amplitudeUnit.value) +// } +// else { +// fun(tableDict.value[data.text]) +// } +// } + + @@ -339,6 +604,28 @@ 开机特性 + + @@ -355,6 +642,28 @@ 频率复现性 + + @@ -371,6 +680,28 @@ 相对频率偏差 + + @@ -387,6 +718,28 @@ 频率稳定度 + + @@ -403,5 +756,27 @@ 日频率漂移率 + + diff --git a/src/views/business/measure/item/components/fourteen/components/clock.vue b/src/views/business/measure/item/components/fourteen/components/clock.vue index 00bc1b7..1d92ac9 100644 --- a/src/views/business/measure/item/components/fourteen/components/clock.vue +++ b/src/views/business/measure/item/components/fourteen/components/clock.vue @@ -91,58 +91,58 @@ // ----------------------------------------表头------------------------------------------------ const columns_output_signal = ref([ // 输出信号 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '信号类型', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '被测信号频率', value: 'unit', align: 'center', required: true, type: '' }, - { text: '幅度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '脉冲宽度技术指标', value: 'sweepWidthUnit', align: 'center', required: true, type: '' }, - { text: '上升时间技术指标', value: 'horizontalResolution', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '信号类型', value: 'signalType', align: 'center', required: true, type: 'select' }, + { text: '被测信号频率', value: '', align: 'center', required: false, type: '' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '脉冲宽度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '上升时间技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_warm_up = ref([ // 开机特性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '开机时间', value: 'horizontalResolution', align: 'center', required: true, type: 'number' }, - { text: '开机时间单位', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '开机时间', value: 'onTime', align: 'center', required: true, type: 'number' }, + { text: '开机时间单位', value: 'onTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_reproducibility = ref([ // 频率复现性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T2', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T2单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T3', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T3单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: 'T1', value: 'tOne', align: 'center', required: true, type: 'number' }, + { text: 'T1单位', value: 'tOneUnit', align: 'center', required: true, type: 'select' }, + { text: 'T2', value: 'tTwo', align: 'center', required: true, type: 'number' }, + { text: 'T2单位', value: 'tTwoUnit', align: 'center', required: true, type: 'select' }, + { text: 'T3', value: 'tThree', align: 'center', required: true, type: 'number' }, + { text: 'T3单位', value: 'tThreeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_stability = ref([ // 频率稳定度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度uc', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度uc', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_daily_frequency_drift_rate = ref([ // 日频率漂移率 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 @@ -163,6 +163,35 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { + const params = { + signalType: '', // 信号类型 + testedSignalFrequency: '', // 被测信号频率 + testedSignalFrequencyUnit: 'MHz', // 被测信号频率单位 + amplitudeTechnicalIndexLower: '', // 幅度技术指标下限 + amplitudeTechnicalIndexUpper: '', // 幅度技术指标上限 + amplitudeTechnicalIndexUnit: '', // 幅度技术指标单位 + pulseWidthTechnicalIndexLower: '', // 脉冲宽度技术指标下限 + pulseWidthTechnicalIndexUnit: '', // 脉冲宽度技术指标单位 + pulseWidthTechnicalIndexUpper: '', // 脉冲宽度技术指标上限 + technicalIndex: '', // 上升时间技术指标 + technicalIndexSymbol: '±', // 上升时间技术指标符号 + technicalIndexUnit: '', // 上升时间技术指标单位 + gateTime: '', // 闸门时间 + gateTimeUnit: '', // 闸门时间单位 + multiplyFrequency: '', // 倍增次数 + onTime: '', // 开机时间 + onTimeUnit: '', // 开机时间单位 + sampleTime: '', // 取样时间 + sampleTimeUnit: '', // 取样时间单位 + urel: '', + tOne: '', + tTwo: '', + tThree: '', + tOneUnit: '', + tTwoUnit: '', + tThreeUnit: '', + sampleGroupNumber: '', // 采样组数 + } switch (title) { case '输出信号': // 输出信号 outputSignalList.value.length @@ -170,7 +199,63 @@ : outputSignalList.value.push({ dataType: '1', params: '输出信号', - unit: '', // 标称值单位 + ...params, + editable: true, + } as any) + break + case '开机特性': // 开机特性 + warmUpList.value.length + ? warmUpList.value.push(JSON.parse(JSON.stringify(warmUpList.value[warmUpList.value.length - 1]))) + : warmUpList.value.push({ + dataType: '2', + params: '开机特性', + ...params, + editable: true, + } as any) + break + case '频率复现性': // 频率复现性 + frequencyReproducibilityList.value.length + ? frequencyReproducibilityList.value.push(JSON.parse(JSON.stringify(frequencyReproducibilityList.value[frequencyReproducibilityList.value.length - 1]))) + : frequencyReproducibilityList.value.push({ + dataType: '3', + params: '频率复现性', + ...params, + gateTime: '100', + tOne: '24', + tTwo: '24', + tThree: '12', + editable: true, + } as any) + break + case '相对频率偏差': // 相对频率偏差 + relativeFrequencyDeviationList.value.length + ? relativeFrequencyDeviationList.value.push(JSON.parse(JSON.stringify(relativeFrequencyDeviationList.value[relativeFrequencyDeviationList.value.length - 1]))) + : relativeFrequencyDeviationList.value.push({ + dataType: '4', + params: '相对频率偏差', + ...params, + gateTime: '100', + editable: true, + } as any) + break + case '频率稳定度': // 频率稳定度 + frequencyStabilityList.value.length + ? frequencyStabilityList.value.push(JSON.parse(JSON.stringify(frequencyStabilityList.value[frequencyStabilityList.value.length - 1]))) + : frequencyStabilityList.value.push({ + dataType: '5', + params: '频率稳定度', + ...params, + editable: true, + } as any) + break + case '日频率漂移率': // 日频率漂移率 + dailyFrequencyDriftRateList.value.length + ? dailyFrequencyDriftRateList.value.push(JSON.parse(JSON.stringify(dailyFrequencyDriftRateList.value[dailyFrequencyDriftRateList.value.length - 1]))) + : dailyFrequencyDriftRateList.value.push({ + dataType: '6', + params: '日频率漂移率', + ...params, + gateTime: '100', editable: true, } as any) break @@ -232,7 +317,12 @@ // ----------------------------------------------------------------------------------------------------- const clearAllList = () => { list.value = [] - // crystalOscillatorStartupCharacterList.value = [] + dailyFrequencyDriftRateList.value = [] + frequencyStabilityList.value = [] + relativeFrequencyDeviationList.value = [] + frequencyReproducibilityList.value = [] + warmUpList.value = [] + outputSignalList.value = [] for (const i in listDict.value) { listDict.value[i] = [] } @@ -243,11 +333,52 @@ newVal.forEach((item: any) => { switch (item.dataType) { case '1': - // 晶振开机特性 - crystalOscillatorStartupCharacterList.value.push({ ...item, params: '晶振开机特性' }) + // 输出信号 + outputSignalList.value.push({ ...item, params: '输出信号', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '2': + // 开机特性 + warmUpList.value.push({ ...item, params: '开机特性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '3': + // 频率复现性 + frequencyReproducibilityList.value.push({ ...item, params: '频率复现性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '4': + // 相对频率偏差 + relativeFrequencyDeviationList.value.push({ ...item, params: '相对频率偏差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '5': + // 频率稳定度 + frequencyStabilityList.value.push({ ...item, params: '频率稳定度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '6': + // 日频率漂移率 + dailyFrequencyDriftRateList.value.push({ ...item, params: '日频率漂移率', technicalIndex: clearSymbol(item.technicalIndex) }) break } }) + + if (props.pageType !== 'detail') { + if (newVal.every((item: { dataType: string }) => item.dataType !== '3')) { + addRow([], '频率复现性', '3') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '4')) { + addRow([], '相对频率偏差', '4') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '6')) { + addRow([], '日频率漂移率', '6') + } + } + } + else { + if (props.pageType !== 'detail') { + setTimeout(() => { + addRow([], '频率复现性', '3') + addRow([], '相对频率偏差', '4') + addRow([], '日频率漂移率', '6') + }) + } } }) const getList = () => { @@ -281,25 +412,59 @@ // 获取字典 const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位 +const thoroughfare = ref<{ value: string;name: string;id: string }[]>([]) // 通道 +const testedSignalFrequency = ref<{ value: string;name: string;id: string }[]>([]) // 被测信号频率 +const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位 +const timeList = ref<{ value: string;name: string;id: string }[]>([]) // 时间 +const standardTechnicalIndexSymbol = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号 +const signalType = ref<{ value: string;name: string;id: string }[]>([]) // 信号类型 const fetchDict = async () => { // 标称值单位 const res1 = await getDictByCode('bizFirstStandardFrequencyUnit') nominalValueUnit.value = res1.data + // 通道 + const res2 = await getDictByCode('cesiumAtomThoroughfare') + thoroughfare.value = res2.data + // 被测信号频率 + const res3 = await getDictByCode('cesiumAtomTestedSignalFrequency') + testedSignalFrequency.value = res3.data + // 电压单位 + const res4 = await getDictByCode('standardVoltage') + standardVoltage.value = res4.data + // 时间 + const res5 = await getDictByCode('standardTimeUnit') + timeList.value = res5.data + // 技术指标符号 + const res6 = await getDictByCode('standardTechnicalIndexSymbol') + standardTechnicalIndexSymbol.value = res6.data + // 信号类型 + const res7 = await getDictByCode('cesiumAtomSignalType') + signalType.value = res7.data + console.log(signalType.value, 'signalType.value') tableDict.value = { 标称值单位: nominalValueUnit.value, + 通道: thoroughfare.value, + 被测信号频率: testedSignalFrequency.value, + 取样时间单位: timeList.value, + 闸门时间单位: timeList.value, + 开机时间单位: timeList.value, + T1单位: timeList.value, + T3单位: timeList.value, + T2单位: timeList.value, + 信号类型: signalType.value, } } fetchDict() // 自定义下拉框内容 -const customSelect = (data: any, fun: any) => { - if (data.title === '参考电平' && data.text === '标称值单位') { - fun(amplitudeUnit.value) - } - else { - fun(tableDict.value[data.text]) - } -} +// const customSelect = (data: any, fun: any) => { +// if (data.title === '参考电平' && data.text === '标称值单位') { +// fun(amplitudeUnit.value) +// } +// else { +// fun(tableDict.value[data.text]) +// } +// } + + @@ -339,6 +604,28 @@ 开机特性 + + @@ -355,6 +642,28 @@ 频率复现性 + + @@ -371,6 +680,28 @@ 相对频率偏差 + + @@ -387,6 +718,28 @@ 频率稳定度 + + @@ -403,5 +756,27 @@ 日频率漂移率 + + diff --git a/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue b/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue index 66b27dd..33c3474 100644 --- a/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue +++ b/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue @@ -92,61 +92,61 @@ // ----------------------------------------表头------------------------------------------------ const columns_frequency_signal_output_amplitude = ref([ // 频率信号输出幅度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '幅度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_second_pulse_output = ref([ // 秒脉冲输出 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '幅度技术指标', value: 'nominalValue', align: 'center', required: true, type: '' }, - { text: '脉冲宽度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '上升时间技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '脉冲宽度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '上升时间技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_stability = ref([ // 频率稳定度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度uc', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度uc', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_relative_frequency_deviation = ref([ // 相对频率偏差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '开机时间', value: 'horizontalResolution', align: 'center', required: true, type: 'number' }, - { text: '开机时间单位', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: false, type: 'number' }, + { text: '开机时间', value: 'onTime', align: 'center', required: true, type: 'number' }, + { text: '开机时间单位', value: 'onTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_reproducibility = ref([ // 频率复现性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T2', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T2单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3', value: 'tOne', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3单位', value: 'tOneUnit', align: 'center', required: true, type: 'select' }, + { text: 'T2', value: 'tTwo', align: 'center', required: true, type: 'number' }, + { text: 'T2单位', value: 'tTwoUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_daily_aging_rate = ref([ // 日老化率 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 @@ -167,6 +167,35 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { + const params = { + thoroughfare: '', // 通道 + testedSignalFrequency: '', // 被测信号频率 + testedSignalFrequencyUnit: 'MHz', // 被测信号频率单位 + urel: '', // 不确定度U(k=2) + amplitudeTechnicalIndexUnit: '', // 幅度技术指标单位 + amplitudeTechnicalIndexLower: '', // 幅度技术指标下限 + amplitudeTechnicalIndexUpper: '', // 幅度技术指标上限 + technicalIndex: '', // 上升时间技术指标 + technicalIndexSymbol: '±', // 上升时间技术指标符号 + technicalIndexUnit: '', // 上升时间技术指标单位 + pulseWidthTechnicalIndexLower: '', // 脉冲宽度技术指标下限 + pulseWidthTechnicalIndexUnit: '', // 脉冲宽度技术指标单位 + pulseWidthTechnicalIndexUpper: '', // 脉冲宽度技术指标上限 + sampleTime: '', // 取样时间 + sampleTimeUnit: '', // 取样时间单位 + sampleGroupNumber: '', // 采样组数 + gateTime: '', // 闸门时间 + gateTimeUnit: '', // 闸门时间单位 + multiplyFrequency: '', // 倍增次数 + onTime: '', // 开机时间 + onTimeUnit: '', // 开机时间单位 + tOne: '', + tTwo: '', + tThree: '', + tOneUnit: '', + tTwoUnit: '', + tThreeUnit: '', + } switch (title) { case '频率信号输出幅度': // 频率信号输出幅度 frequencySignalOutputAmplitudelList.value.length @@ -174,7 +203,58 @@ : frequencySignalOutputAmplitudelList.value.push({ dataType: '1', params: '频率信号输出幅度', - unit: '', // 标称值单位 + ...params, + editable: true, + } as any) + break + case '秒脉冲输出': // 秒脉冲输出 + secondPulseOutputList.value.length + ? secondPulseOutputList.value.push(JSON.parse(JSON.stringify(secondPulseOutputList.value[secondPulseOutputList.value.length - 1]))) + : secondPulseOutputList.value.push({ + dataType: '2', + params: '秒脉冲输出', + ...params, + editable: true, + } as any) + break + case '频率稳定度': // 频率稳定度 + frequencyStabilityList.value.length + ? frequencyStabilityList.value.push(JSON.parse(JSON.stringify(frequencyStabilityList.value[frequencyStabilityList.value.length - 1]))) + : frequencyStabilityList.value.push({ + dataType: '3', + params: '频率稳定度', + ...params, + editable: true, + } as any) + break + case '相对频率偏差': // 相对频率偏差 + relativeFrequencyDeviationList.value.length + ? relativeFrequencyDeviationList.value.push(JSON.parse(JSON.stringify(relativeFrequencyDeviationList.value[relativeFrequencyDeviationList.value.length - 1]))) + : relativeFrequencyDeviationList.value.push({ + dataType: '4', + params: '相对频率偏差', + ...params, + editable: true, + } as any) + break + case '频率复现性': // 频率复现性 + frequencyReproducibilityList.value.length + ? frequencyReproducibilityList.value.push(JSON.parse(JSON.stringify(frequencyReproducibilityList.value[frequencyReproducibilityList.value.length - 1]))) + : frequencyReproducibilityList.value.push({ + dataType: '5', + params: '频率复现性', + ...params, + editable: true, + } as any) + break + case '日老化率': // 日老化率 + dailyAgingRateList.value.length + ? dailyAgingRateList.value.push(JSON.parse(JSON.stringify(dailyAgingRateList.value[dailyAgingRateList.value.length - 1]))) + : dailyAgingRateList.value.push({ + dataType: '6', + params: '日老化率', + ...params, + sampleGroupNumber: '15', editable: true, } as any) break @@ -253,10 +333,52 @@ switch (item.dataType) { case '1': // 频率信号输出幅度 - frequencySignalOutputAmplitudelList.value.push({ ...item, params: '频率信号输出幅度' }) + frequencySignalOutputAmplitudelList.value.push({ ...item, params: '频率信号输出幅度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '2': + // 秒脉冲输出 + secondPulseOutputList.value.push({ ...item, params: '秒脉冲输出', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '3': + // 频率稳定度 + frequencyStabilityList.value.push({ ...item, params: '频率稳定度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '4': + // 相对频率偏差 + relativeFrequencyDeviationList.value.push({ ...item, params: '相对频率偏差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '5': + // 频率复现性 + frequencyReproducibilityList.value.push({ ...item, params: '频率复现性', technicalIndex: clearSymbol(item.technicalIndex) }) + console.log(frequencyReproducibilityList.value, 'frequencyReproducibilityList.value') + break + case '6': + // 日老化率 + dailyAgingRateList.value.push({ ...item, params: '日老化率', technicalIndex: clearSymbol(item.technicalIndex) }) break } }) + + if (props.pageType !== 'detail') { + if (newVal.every((item: { dataType: string }) => item.dataType !== '4')) { + addRow([], '相对频率偏差', '4') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '5')) { + addRow([], '频率复现性', '5') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '6')) { + addRow([], '日老化率', '6') + } + } + } + else { + if (props.pageType !== 'detail') { + setTimeout(() => { + addRow([], '相对频率偏差', '4') + addRow([], '频率复现性', '5') + addRow([], '日老化率', '6') + }) + } } }) const getList = () => { @@ -269,7 +391,6 @@ } return result } -defineExpose({ list, checkAllList, form, getList }) // 表格下拉框等内容是否禁用 const disabled = ({ scope, column }, fun) => { fun(props.pageType === 'detail') @@ -290,25 +411,57 @@ // 获取字典 const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位 +const thoroughfare = ref<{ value: string;name: string;id: string }[]>([]) // 通道 +const testedSignalFrequency = ref<{ value: string;name: string;id: string }[]>([]) // 被测信号频率 +const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位 +const timeList = ref<{ value: string;name: string;id: string }[]>([]) // 时间 +const standardTechnicalIndexSymbol = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号 + +// const fetchDict = async () => { // 标称值单位 const res1 = await getDictByCode('bizFirstStandardFrequencyUnit') nominalValueUnit.value = res1.data + // 通道 + const res2 = await getDictByCode('cesiumAtomThoroughfare') + thoroughfare.value = res2.data + // 被测信号频率 + const res3 = await getDictByCode('cesiumAtomTestedSignalFrequency') + testedSignalFrequency.value = res3.data + // 电压单位 + const res4 = await getDictByCode('standardVoltage') + standardVoltage.value = res4.data + // 时间 + const res5 = await getDictByCode('standardTimeUnit') + timeList.value = res5.data + // 技术指标符号 + const res6 = await getDictByCode('standardTechnicalIndexSymbol') + standardTechnicalIndexSymbol.value = res6.data + tableDict.value = { - 标称值单位: nominalValueUnit.value, + '标称值单位': nominalValueUnit.value, + '通道': thoroughfare.value, + '被测信号频率': testedSignalFrequency.value, + '取样时间单位': timeList.value, + '闸门时间单位': timeList.value, + '开机时间单位': timeList.value, + 'T1/T3单位': timeList.value, + 'T2单位': timeList.value, } } fetchDict() // 自定义下拉框内容 -const customSelect = (data: any, fun: any) => { - if (data.title === '参考电平' && data.text === '标称值单位') { - fun(amplitudeUnit.value) - } - else { - fun(tableDict.value[data.text]) - } -} +// const customSelect = (data: any, fun: any) => { +// if (data.title === '参考电平' && data.text === '标称值单位') { +// fun(amplitudeUnit.value) +// } +// else { +// fun(tableDict.value[data.text]) +// } +// } + +defineExpose({ list, checkAllList, form, getList }) + + @@ -348,6 +527,75 @@ 秒脉冲输出 + @@ -364,6 +612,28 @@ 频率稳定度 + + @@ -380,6 +650,28 @@ 相对频率偏差 + + @@ -396,6 +688,23 @@ 频率复现性 + @@ -412,5 +721,27 @@ 日老化率 + + diff --git a/src/views/business/measure/item/components/fourteen/components/clock.vue b/src/views/business/measure/item/components/fourteen/components/clock.vue index 00bc1b7..1d92ac9 100644 --- a/src/views/business/measure/item/components/fourteen/components/clock.vue +++ b/src/views/business/measure/item/components/fourteen/components/clock.vue @@ -91,58 +91,58 @@ // ----------------------------------------表头------------------------------------------------ const columns_output_signal = ref([ // 输出信号 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '信号类型', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '被测信号频率', value: 'unit', align: 'center', required: true, type: '' }, - { text: '幅度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '脉冲宽度技术指标', value: 'sweepWidthUnit', align: 'center', required: true, type: '' }, - { text: '上升时间技术指标', value: 'horizontalResolution', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '信号类型', value: 'signalType', align: 'center', required: true, type: 'select' }, + { text: '被测信号频率', value: '', align: 'center', required: false, type: '' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '脉冲宽度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '上升时间技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_warm_up = ref([ // 开机特性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '开机时间', value: 'horizontalResolution', align: 'center', required: true, type: 'number' }, - { text: '开机时间单位', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '开机时间', value: 'onTime', align: 'center', required: true, type: 'number' }, + { text: '开机时间单位', value: 'onTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_reproducibility = ref([ // 频率复现性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T2', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T2单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T3', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T3单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: 'T1', value: 'tOne', align: 'center', required: true, type: 'number' }, + { text: 'T1单位', value: 'tOneUnit', align: 'center', required: true, type: 'select' }, + { text: 'T2', value: 'tTwo', align: 'center', required: true, type: 'number' }, + { text: 'T2单位', value: 'tTwoUnit', align: 'center', required: true, type: 'select' }, + { text: 'T3', value: 'tThree', align: 'center', required: true, type: 'number' }, + { text: 'T3单位', value: 'tThreeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_stability = ref([ // 频率稳定度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度uc', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度uc', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_daily_frequency_drift_rate = ref([ // 日频率漂移率 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 @@ -163,6 +163,35 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { + const params = { + signalType: '', // 信号类型 + testedSignalFrequency: '', // 被测信号频率 + testedSignalFrequencyUnit: 'MHz', // 被测信号频率单位 + amplitudeTechnicalIndexLower: '', // 幅度技术指标下限 + amplitudeTechnicalIndexUpper: '', // 幅度技术指标上限 + amplitudeTechnicalIndexUnit: '', // 幅度技术指标单位 + pulseWidthTechnicalIndexLower: '', // 脉冲宽度技术指标下限 + pulseWidthTechnicalIndexUnit: '', // 脉冲宽度技术指标单位 + pulseWidthTechnicalIndexUpper: '', // 脉冲宽度技术指标上限 + technicalIndex: '', // 上升时间技术指标 + technicalIndexSymbol: '±', // 上升时间技术指标符号 + technicalIndexUnit: '', // 上升时间技术指标单位 + gateTime: '', // 闸门时间 + gateTimeUnit: '', // 闸门时间单位 + multiplyFrequency: '', // 倍增次数 + onTime: '', // 开机时间 + onTimeUnit: '', // 开机时间单位 + sampleTime: '', // 取样时间 + sampleTimeUnit: '', // 取样时间单位 + urel: '', + tOne: '', + tTwo: '', + tThree: '', + tOneUnit: '', + tTwoUnit: '', + tThreeUnit: '', + sampleGroupNumber: '', // 采样组数 + } switch (title) { case '输出信号': // 输出信号 outputSignalList.value.length @@ -170,7 +199,63 @@ : outputSignalList.value.push({ dataType: '1', params: '输出信号', - unit: '', // 标称值单位 + ...params, + editable: true, + } as any) + break + case '开机特性': // 开机特性 + warmUpList.value.length + ? warmUpList.value.push(JSON.parse(JSON.stringify(warmUpList.value[warmUpList.value.length - 1]))) + : warmUpList.value.push({ + dataType: '2', + params: '开机特性', + ...params, + editable: true, + } as any) + break + case '频率复现性': // 频率复现性 + frequencyReproducibilityList.value.length + ? frequencyReproducibilityList.value.push(JSON.parse(JSON.stringify(frequencyReproducibilityList.value[frequencyReproducibilityList.value.length - 1]))) + : frequencyReproducibilityList.value.push({ + dataType: '3', + params: '频率复现性', + ...params, + gateTime: '100', + tOne: '24', + tTwo: '24', + tThree: '12', + editable: true, + } as any) + break + case '相对频率偏差': // 相对频率偏差 + relativeFrequencyDeviationList.value.length + ? relativeFrequencyDeviationList.value.push(JSON.parse(JSON.stringify(relativeFrequencyDeviationList.value[relativeFrequencyDeviationList.value.length - 1]))) + : relativeFrequencyDeviationList.value.push({ + dataType: '4', + params: '相对频率偏差', + ...params, + gateTime: '100', + editable: true, + } as any) + break + case '频率稳定度': // 频率稳定度 + frequencyStabilityList.value.length + ? frequencyStabilityList.value.push(JSON.parse(JSON.stringify(frequencyStabilityList.value[frequencyStabilityList.value.length - 1]))) + : frequencyStabilityList.value.push({ + dataType: '5', + params: '频率稳定度', + ...params, + editable: true, + } as any) + break + case '日频率漂移率': // 日频率漂移率 + dailyFrequencyDriftRateList.value.length + ? dailyFrequencyDriftRateList.value.push(JSON.parse(JSON.stringify(dailyFrequencyDriftRateList.value[dailyFrequencyDriftRateList.value.length - 1]))) + : dailyFrequencyDriftRateList.value.push({ + dataType: '6', + params: '日频率漂移率', + ...params, + gateTime: '100', editable: true, } as any) break @@ -232,7 +317,12 @@ // ----------------------------------------------------------------------------------------------------- const clearAllList = () => { list.value = [] - // crystalOscillatorStartupCharacterList.value = [] + dailyFrequencyDriftRateList.value = [] + frequencyStabilityList.value = [] + relativeFrequencyDeviationList.value = [] + frequencyReproducibilityList.value = [] + warmUpList.value = [] + outputSignalList.value = [] for (const i in listDict.value) { listDict.value[i] = [] } @@ -243,11 +333,52 @@ newVal.forEach((item: any) => { switch (item.dataType) { case '1': - // 晶振开机特性 - crystalOscillatorStartupCharacterList.value.push({ ...item, params: '晶振开机特性' }) + // 输出信号 + outputSignalList.value.push({ ...item, params: '输出信号', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '2': + // 开机特性 + warmUpList.value.push({ ...item, params: '开机特性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '3': + // 频率复现性 + frequencyReproducibilityList.value.push({ ...item, params: '频率复现性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '4': + // 相对频率偏差 + relativeFrequencyDeviationList.value.push({ ...item, params: '相对频率偏差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '5': + // 频率稳定度 + frequencyStabilityList.value.push({ ...item, params: '频率稳定度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '6': + // 日频率漂移率 + dailyFrequencyDriftRateList.value.push({ ...item, params: '日频率漂移率', technicalIndex: clearSymbol(item.technicalIndex) }) break } }) + + if (props.pageType !== 'detail') { + if (newVal.every((item: { dataType: string }) => item.dataType !== '3')) { + addRow([], '频率复现性', '3') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '4')) { + addRow([], '相对频率偏差', '4') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '6')) { + addRow([], '日频率漂移率', '6') + } + } + } + else { + if (props.pageType !== 'detail') { + setTimeout(() => { + addRow([], '频率复现性', '3') + addRow([], '相对频率偏差', '4') + addRow([], '日频率漂移率', '6') + }) + } } }) const getList = () => { @@ -281,25 +412,59 @@ // 获取字典 const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位 +const thoroughfare = ref<{ value: string;name: string;id: string }[]>([]) // 通道 +const testedSignalFrequency = ref<{ value: string;name: string;id: string }[]>([]) // 被测信号频率 +const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位 +const timeList = ref<{ value: string;name: string;id: string }[]>([]) // 时间 +const standardTechnicalIndexSymbol = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号 +const signalType = ref<{ value: string;name: string;id: string }[]>([]) // 信号类型 const fetchDict = async () => { // 标称值单位 const res1 = await getDictByCode('bizFirstStandardFrequencyUnit') nominalValueUnit.value = res1.data + // 通道 + const res2 = await getDictByCode('cesiumAtomThoroughfare') + thoroughfare.value = res2.data + // 被测信号频率 + const res3 = await getDictByCode('cesiumAtomTestedSignalFrequency') + testedSignalFrequency.value = res3.data + // 电压单位 + const res4 = await getDictByCode('standardVoltage') + standardVoltage.value = res4.data + // 时间 + const res5 = await getDictByCode('standardTimeUnit') + timeList.value = res5.data + // 技术指标符号 + const res6 = await getDictByCode('standardTechnicalIndexSymbol') + standardTechnicalIndexSymbol.value = res6.data + // 信号类型 + const res7 = await getDictByCode('cesiumAtomSignalType') + signalType.value = res7.data + console.log(signalType.value, 'signalType.value') tableDict.value = { 标称值单位: nominalValueUnit.value, + 通道: thoroughfare.value, + 被测信号频率: testedSignalFrequency.value, + 取样时间单位: timeList.value, + 闸门时间单位: timeList.value, + 开机时间单位: timeList.value, + T1单位: timeList.value, + T3单位: timeList.value, + T2单位: timeList.value, + 信号类型: signalType.value, } } fetchDict() // 自定义下拉框内容 -const customSelect = (data: any, fun: any) => { - if (data.title === '参考电平' && data.text === '标称值单位') { - fun(amplitudeUnit.value) - } - else { - fun(tableDict.value[data.text]) - } -} +// const customSelect = (data: any, fun: any) => { +// if (data.title === '参考电平' && data.text === '标称值单位') { +// fun(amplitudeUnit.value) +// } +// else { +// fun(tableDict.value[data.text]) +// } +// } + + @@ -339,6 +604,28 @@ 开机特性 + + @@ -355,6 +642,28 @@ 频率复现性 + + @@ -371,6 +680,28 @@ 相对频率偏差 + + @@ -387,6 +718,28 @@ 频率稳定度 + + @@ -403,5 +756,27 @@ 日频率漂移率 + + diff --git a/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue b/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue index 66b27dd..33c3474 100644 --- a/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue +++ b/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue @@ -92,61 +92,61 @@ // ----------------------------------------表头------------------------------------------------ const columns_frequency_signal_output_amplitude = ref([ // 频率信号输出幅度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '幅度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_second_pulse_output = ref([ // 秒脉冲输出 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '幅度技术指标', value: 'nominalValue', align: 'center', required: true, type: '' }, - { text: '脉冲宽度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '上升时间技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '脉冲宽度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '上升时间技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_stability = ref([ // 频率稳定度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度uc', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度uc', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_relative_frequency_deviation = ref([ // 相对频率偏差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '开机时间', value: 'horizontalResolution', align: 'center', required: true, type: 'number' }, - { text: '开机时间单位', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: false, type: 'number' }, + { text: '开机时间', value: 'onTime', align: 'center', required: true, type: 'number' }, + { text: '开机时间单位', value: 'onTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_reproducibility = ref([ // 频率复现性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T2', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T2单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3', value: 'tOne', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3单位', value: 'tOneUnit', align: 'center', required: true, type: 'select' }, + { text: 'T2', value: 'tTwo', align: 'center', required: true, type: 'number' }, + { text: 'T2单位', value: 'tTwoUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_daily_aging_rate = ref([ // 日老化率 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 @@ -167,6 +167,35 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { + const params = { + thoroughfare: '', // 通道 + testedSignalFrequency: '', // 被测信号频率 + testedSignalFrequencyUnit: 'MHz', // 被测信号频率单位 + urel: '', // 不确定度U(k=2) + amplitudeTechnicalIndexUnit: '', // 幅度技术指标单位 + amplitudeTechnicalIndexLower: '', // 幅度技术指标下限 + amplitudeTechnicalIndexUpper: '', // 幅度技术指标上限 + technicalIndex: '', // 上升时间技术指标 + technicalIndexSymbol: '±', // 上升时间技术指标符号 + technicalIndexUnit: '', // 上升时间技术指标单位 + pulseWidthTechnicalIndexLower: '', // 脉冲宽度技术指标下限 + pulseWidthTechnicalIndexUnit: '', // 脉冲宽度技术指标单位 + pulseWidthTechnicalIndexUpper: '', // 脉冲宽度技术指标上限 + sampleTime: '', // 取样时间 + sampleTimeUnit: '', // 取样时间单位 + sampleGroupNumber: '', // 采样组数 + gateTime: '', // 闸门时间 + gateTimeUnit: '', // 闸门时间单位 + multiplyFrequency: '', // 倍增次数 + onTime: '', // 开机时间 + onTimeUnit: '', // 开机时间单位 + tOne: '', + tTwo: '', + tThree: '', + tOneUnit: '', + tTwoUnit: '', + tThreeUnit: '', + } switch (title) { case '频率信号输出幅度': // 频率信号输出幅度 frequencySignalOutputAmplitudelList.value.length @@ -174,7 +203,58 @@ : frequencySignalOutputAmplitudelList.value.push({ dataType: '1', params: '频率信号输出幅度', - unit: '', // 标称值单位 + ...params, + editable: true, + } as any) + break + case '秒脉冲输出': // 秒脉冲输出 + secondPulseOutputList.value.length + ? secondPulseOutputList.value.push(JSON.parse(JSON.stringify(secondPulseOutputList.value[secondPulseOutputList.value.length - 1]))) + : secondPulseOutputList.value.push({ + dataType: '2', + params: '秒脉冲输出', + ...params, + editable: true, + } as any) + break + case '频率稳定度': // 频率稳定度 + frequencyStabilityList.value.length + ? frequencyStabilityList.value.push(JSON.parse(JSON.stringify(frequencyStabilityList.value[frequencyStabilityList.value.length - 1]))) + : frequencyStabilityList.value.push({ + dataType: '3', + params: '频率稳定度', + ...params, + editable: true, + } as any) + break + case '相对频率偏差': // 相对频率偏差 + relativeFrequencyDeviationList.value.length + ? relativeFrequencyDeviationList.value.push(JSON.parse(JSON.stringify(relativeFrequencyDeviationList.value[relativeFrequencyDeviationList.value.length - 1]))) + : relativeFrequencyDeviationList.value.push({ + dataType: '4', + params: '相对频率偏差', + ...params, + editable: true, + } as any) + break + case '频率复现性': // 频率复现性 + frequencyReproducibilityList.value.length + ? frequencyReproducibilityList.value.push(JSON.parse(JSON.stringify(frequencyReproducibilityList.value[frequencyReproducibilityList.value.length - 1]))) + : frequencyReproducibilityList.value.push({ + dataType: '5', + params: '频率复现性', + ...params, + editable: true, + } as any) + break + case '日老化率': // 日老化率 + dailyAgingRateList.value.length + ? dailyAgingRateList.value.push(JSON.parse(JSON.stringify(dailyAgingRateList.value[dailyAgingRateList.value.length - 1]))) + : dailyAgingRateList.value.push({ + dataType: '6', + params: '日老化率', + ...params, + sampleGroupNumber: '15', editable: true, } as any) break @@ -253,10 +333,52 @@ switch (item.dataType) { case '1': // 频率信号输出幅度 - frequencySignalOutputAmplitudelList.value.push({ ...item, params: '频率信号输出幅度' }) + frequencySignalOutputAmplitudelList.value.push({ ...item, params: '频率信号输出幅度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '2': + // 秒脉冲输出 + secondPulseOutputList.value.push({ ...item, params: '秒脉冲输出', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '3': + // 频率稳定度 + frequencyStabilityList.value.push({ ...item, params: '频率稳定度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '4': + // 相对频率偏差 + relativeFrequencyDeviationList.value.push({ ...item, params: '相对频率偏差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '5': + // 频率复现性 + frequencyReproducibilityList.value.push({ ...item, params: '频率复现性', technicalIndex: clearSymbol(item.technicalIndex) }) + console.log(frequencyReproducibilityList.value, 'frequencyReproducibilityList.value') + break + case '6': + // 日老化率 + dailyAgingRateList.value.push({ ...item, params: '日老化率', technicalIndex: clearSymbol(item.technicalIndex) }) break } }) + + if (props.pageType !== 'detail') { + if (newVal.every((item: { dataType: string }) => item.dataType !== '4')) { + addRow([], '相对频率偏差', '4') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '5')) { + addRow([], '频率复现性', '5') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '6')) { + addRow([], '日老化率', '6') + } + } + } + else { + if (props.pageType !== 'detail') { + setTimeout(() => { + addRow([], '相对频率偏差', '4') + addRow([], '频率复现性', '5') + addRow([], '日老化率', '6') + }) + } } }) const getList = () => { @@ -269,7 +391,6 @@ } return result } -defineExpose({ list, checkAllList, form, getList }) // 表格下拉框等内容是否禁用 const disabled = ({ scope, column }, fun) => { fun(props.pageType === 'detail') @@ -290,25 +411,57 @@ // 获取字典 const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位 +const thoroughfare = ref<{ value: string;name: string;id: string }[]>([]) // 通道 +const testedSignalFrequency = ref<{ value: string;name: string;id: string }[]>([]) // 被测信号频率 +const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位 +const timeList = ref<{ value: string;name: string;id: string }[]>([]) // 时间 +const standardTechnicalIndexSymbol = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号 + +// const fetchDict = async () => { // 标称值单位 const res1 = await getDictByCode('bizFirstStandardFrequencyUnit') nominalValueUnit.value = res1.data + // 通道 + const res2 = await getDictByCode('cesiumAtomThoroughfare') + thoroughfare.value = res2.data + // 被测信号频率 + const res3 = await getDictByCode('cesiumAtomTestedSignalFrequency') + testedSignalFrequency.value = res3.data + // 电压单位 + const res4 = await getDictByCode('standardVoltage') + standardVoltage.value = res4.data + // 时间 + const res5 = await getDictByCode('standardTimeUnit') + timeList.value = res5.data + // 技术指标符号 + const res6 = await getDictByCode('standardTechnicalIndexSymbol') + standardTechnicalIndexSymbol.value = res6.data + tableDict.value = { - 标称值单位: nominalValueUnit.value, + '标称值单位': nominalValueUnit.value, + '通道': thoroughfare.value, + '被测信号频率': testedSignalFrequency.value, + '取样时间单位': timeList.value, + '闸门时间单位': timeList.value, + '开机时间单位': timeList.value, + 'T1/T3单位': timeList.value, + 'T2单位': timeList.value, } } fetchDict() // 自定义下拉框内容 -const customSelect = (data: any, fun: any) => { - if (data.title === '参考电平' && data.text === '标称值单位') { - fun(amplitudeUnit.value) - } - else { - fun(tableDict.value[data.text]) - } -} +// const customSelect = (data: any, fun: any) => { +// if (data.title === '参考电平' && data.text === '标称值单位') { +// fun(amplitudeUnit.value) +// } +// else { +// fun(tableDict.value[data.text]) +// } +// } + +defineExpose({ list, checkAllList, form, getList }) + + @@ -348,6 +527,75 @@ 秒脉冲输出 + @@ -364,6 +612,28 @@ 频率稳定度 + + @@ -380,6 +650,28 @@ 相对频率偏差 + + @@ -396,6 +688,23 @@ 频率复现性 + @@ -412,5 +721,27 @@ 日老化率 + + diff --git a/src/views/business/measure/item/components/fourteen/components/universalCounter.vue b/src/views/business/measure/item/components/fourteen/components/universalCounter.vue index 722c62a..f82d255 100644 --- a/src/views/business/measure/item/components/fourteen/components/universalCounter.vue +++ b/src/views/business/measure/item/components/fourteen/components/universalCounter.vue @@ -115,101 +115,124 @@ '9-周期测量误差': form.value.periodicMeasureError, '10-时间间隔测量范围及测量误差': form.value.timeIntervalMeasureRange, } + if (props.itemCategoryName === '通用计数器') { + delete chekedDict['6-频率测量范围、输入灵敏度及最大输入电平'] + } + else { + delete chekedDict['6-频率测量范围、输入灵敏度'] + } }, { deep: true, }) // ----------------------------------------表头------------------------------------------------ const columns_crystal_oscillator_startup_character = ref([ // 晶振开机特性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '组数', value: 'sweepWidth', align: 'center', required: true, type: 'number' }, - { text: '测量间隔', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '测量间隔单位', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '组数', value: 'groupNumber', align: 'center', required: true, type: 'number' }, + { text: '测量间隔', value: 'measureInterval', align: 'center', required: true, type: 'number' }, + { text: '测量间隔单位', value: 'measureIntervalUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_stability = ref([ // 晶振1s频率稳定度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '组数', value: 'sweepWidth', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度uc', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '组数', value: 'groupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度uc', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_deviation = ref([ // 晶振相对频率偏差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_reproducibility = ref([ // 晶振频率复现性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: 'T2', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: 'T2单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3', value: 'tOne', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3单位', value: 'tOneUnit', align: 'center', required: true, type: 'select' }, + { text: 'T2', value: 'tTwo', align: 'center', required: true, type: 'number' }, + { text: 'T2单位', value: 'tTwoUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_dailyAging_rate = ref([ // 晶振日老化率 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) -const columns_frequency_measure_range = ref([ // 频率测量范围、输入灵敏度 - { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '信号源输出幅度', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '信号源输出幅度单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '输入灵敏度技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, -]) +const columns_frequency_measure_range = ref( // 频率测量范围、输入灵敏度 + props.itemCategoryName === '通用计数器' + ? [ + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitude', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'select' }, + { text: '输入灵敏度技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, + ] + : [ + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitude', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源最大输入电平', value: 'signalSourceMaxInputLevel', align: 'center', required: true, type: 'number' }, + { text: '信号源最大输入电平单位', value: 'signalSourceMaxInputLevelUnit', align: 'center', required: true, type: 'select' }, + { text: '输入灵敏度技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '最大输入电平技术指标', value: 'otherTechnicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, + ]) + const columns_frequency_measure_error = ref([ // 频率测量误差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_periodic_measure_range = ref([ // 周期测量范围、输入灵敏度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '信号源输出幅度', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '信号源输出幅度单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '输入灵敏度技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitude', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'select' }, + { text: '输入灵敏度技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_periodic_measure_error = ref([ // 周期测量误差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '信号源输出幅度', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '信号源输出幅度单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceMaxInputLevelUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_time_interval_measure_range = ref([ // 时间间隔测量范围及测量误差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 @@ -235,14 +258,147 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { + const params = { + gateTime: '10s', // 闸门时间 + multiplyFrequency: '', // 倍增次数 + groupNumber: '', // 组数 + measureInterval: '', // 测量间隔 + measureIntervalUnit: '', // 测量间隔单位 + technicalIndex: '', // 上升时间技术指标 + technicalIndexSymbol: '±', // 上升时间技术指标符号 + urel: '', // 不确定度U(k=2) + tOne: '1', + tOneUnit: '', + tTwo: '24', + tTwoUnit: '', + tThree: '', + tThreeUnit: '', + sampleGroupNumber: '', // 采样组数 + sampleTime: '', // 取样时间 + sampleTimeUnit: '', // 取样时间单位 + testedSignalFrequency: '', // 被测信号频率 + testedSignalFrequencyUnit: 'MHz', // 被测信号频率单位 + nominalValue: '', + unit: '', + signalSourceOutputAmplitude: '', + signalSourceOutputAmplitudeUnit: '', + signalSourceMaxInputLevel: '', + signalSourceMaxInputLevelUnit: '', + otherTechnicalIndex: '', + otherTechnicalIndexSymbol: '±', + } switch (title) { case '晶振开机特性': // 晶振开机特性 - frequencyList.value.length - ? frequencyList.value.push(JSON.parse(JSON.stringify(frequencyList.value[frequencyList.value.length - 1]))) - : frequencyList.value.push({ + crystalOscillatorStartupCharacterList.value.length + ? crystalOscillatorStartupCharacterList.value.push(JSON.parse(JSON.stringify(crystalOscillatorStartupCharacterList.value[crystalOscillatorStartupCharacterList.value.length - 1]))) + : crystalOscillatorStartupCharacterList.value.push({ dataType: '1', - params: '频率显示', - unit: '', // 标称值单位 + params: '晶振开机特性', + ...params, + groupNumber: '8', + editable: true, + } as any) + break + case '晶振1s频率稳定度': // 晶振1s频率稳定度 + crystalOscillatorStabilityList.value.length + ? crystalOscillatorStabilityList.value.push(JSON.parse(JSON.stringify(crystalOscillatorStabilityList.value[crystalOscillatorStabilityList.value.length - 1]))) + : crystalOscillatorStabilityList.value.push({ + dataType: '2', + params: '晶振1s频率稳定度', + ...params, + groupNumber: '101', + editable: true, + } as any) + break + case '晶振相对频率偏差': // 晶振相对频率偏差 + crystalOscillatorDeviationList.value.length + ? crystalOscillatorDeviationList.value.push(JSON.parse(JSON.stringify(crystalOscillatorDeviationList.value[crystalOscillatorDeviationList.value.length - 1]))) + : crystalOscillatorDeviationList.value.push({ + dataType: '3', + params: '晶振相对频率偏差', + ...params, + editable: true, + } as any) + break + case '晶振频率复现性': // 晶振频率复现性 + crystalOscillatorReproducibilityList.value.length + ? crystalOscillatorReproducibilityList.value.push(JSON.parse(JSON.stringify(crystalOscillatorReproducibilityList.value[crystalOscillatorReproducibilityList.value.length - 1]))) + : crystalOscillatorReproducibilityList.value.push({ + dataType: '4', + params: '晶振频率复现性', + ...params, + editable: true, + } as any) + break + case '晶振日老化率': // 晶振日老化率 + crystalOscillatorDailyAgingRateList.value.length + ? crystalOscillatorDailyAgingRateList.value.push(JSON.parse(JSON.stringify(crystalOscillatorDailyAgingRateList.value[crystalOscillatorDailyAgingRateList.value.length - 1]))) + : crystalOscillatorDailyAgingRateList.value.push({ + dataType: '5', + params: '晶振日老化率', + ...params, + sampleTime: '12', + sampleGroupNumber: '15', + editable: true, + } as any) + break + case '频率测量范围、输入灵敏度': // 频率测量范围、输入灵敏度 + frequencyMeasureRangeList.value.length + ? frequencyMeasureRangeList.value.push(JSON.parse(JSON.stringify(frequencyMeasureRangeList.value[frequencyMeasureRangeList.value.length - 1]))) + : frequencyMeasureRangeList.value.push({ + dataType: '6', + params: '频率测量范围、输入灵敏度', + ...params, + editable: true, + } as any) + break + case '频率测量范围、输入灵敏度及最大输入电平': // 频率测量范围、输入灵敏度及最大输入电平 + frequencyMeasureRangeList.value.length + ? frequencyMeasureRangeList.value.push(JSON.parse(JSON.stringify(frequencyMeasureRangeList.value[frequencyMeasureRangeList.value.length - 1]))) + : frequencyMeasureRangeList.value.push({ + dataType: '6', + params: '频率测量范围、输入灵敏度及最大输入电平', + ...params, + editable: true, + } as any) + break + case '频率测量误差': // 频率测量误差 + frequencyMeasureErrorList.value.length + ? frequencyMeasureErrorList.value.push(JSON.parse(JSON.stringify(frequencyMeasureErrorList.value[frequencyMeasureErrorList.value.length - 1]))) + : frequencyMeasureErrorList.value.push({ + dataType: '7', + params: '频率测量误差', + ...params, + editable: true, + } as any) + break + case '周期测量范围、输入灵敏度': // 周期测量范围、输入灵敏度 + periodicMeasureRangeList.value.length + ? periodicMeasureRangeList.value.push(JSON.parse(JSON.stringify(periodicMeasureRangeList.value[periodicMeasureRangeList.value.length - 1]))) + : periodicMeasureRangeList.value.push({ + dataType: '8', + params: '周期测量范围、输入灵敏度', + ...params, + editable: true, + } as any) + break + case '周期测量误差': // 周期测量误差 + periodicMeasureErrorList.value.length + ? periodicMeasureErrorList.value.push(JSON.parse(JSON.stringify(periodicMeasureErrorList.value[periodicMeasureErrorList.value.length - 1]))) + : periodicMeasureErrorList.value.push({ + dataType: '9', + params: '周期测量误差', + ...params, + editable: true, + } as any) + break + case '时间间隔测量范围及测量误差': // 时间间隔测量范围及测量误差 + timeIntervalMeasureRangeList.value.length + ? timeIntervalMeasureRangeList.value.push(JSON.parse(JSON.stringify(timeIntervalMeasureRangeList.value[timeIntervalMeasureRangeList.value.length - 1]))) + : timeIntervalMeasureRangeList.value.push({ + dataType: '10', + params: '时间间隔测量范围及测量误差', + ...params, editable: true, } as any) break @@ -337,10 +493,80 @@ switch (item.dataType) { case '1': // 晶振开机特性 - crystalOscillatorStartupCharacterList.value.push({ ...item, params: '晶振开机特性' }) + crystalOscillatorStartupCharacterList.value.push({ ...item, params: '晶振开机特性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '2': + // 晶振1s频率稳定度 + crystalOscillatorStabilityList.value.push({ ...item, params: '晶振1s频率稳定度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '3': + // 晶振相对频率偏差 + crystalOscillatorDeviationList.value.push({ ...item, params: '晶振相对频率偏差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '4': + // 晶振频率复现性 + crystalOscillatorReproducibilityList.value.push({ ...item, params: '晶振频率复现性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '5': + // 晶振日老化率 + crystalOscillatorDailyAgingRateList.value.push({ ...item, params: '晶振日老化率', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '6': + if (props.itemCategoryName === '通用计数器') { + // 频率测量范围、输入灵敏度 + frequencyMeasureRangeList.value.push({ ...item, params: '频率测量范围、输入灵敏度', technicalIndex: clearSymbol(item.technicalIndex) }) + } + else { + // 频率测量范围、输入灵敏度及最大输入电平 + frequencyMeasureRangeList.value.push({ ...item, params: '频率测量范围、输入灵敏度及最大输入电平', technicalIndex: clearSymbol(item.technicalIndex) }) + } + break + case '7': + // 频率测量误差 + frequencyMeasureErrorList.value.push({ ...item, params: '频率测量误差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '8': + // 周期测量范围、输入灵敏度 + periodicMeasureRangeList.value.push({ ...item, params: '周期测量范围、输入灵敏度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '9': + // 周期测量误差 + periodicMeasureErrorList.value.push({ ...item, params: '周期测量误差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '10': + // 时间间隔测量范围及测量误差 + timeIntervalMeasureRangeList.value.push({ ...item, params: '时间间隔测量范围及测量误差', technicalIndex: clearSymbol(item.technicalIndex) }) break } }) + if (props.pageType !== 'detail') { + if (newVal.every((item: { dataType: string }) => item.dataType !== '1')) { + addRow([], '晶振开机特性', '1') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '2')) { + addRow([], '晶振1s频率稳定度', '2') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '3')) { + addRow([], '晶振相对频率偏差', '3') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '4')) { + addRow([], '晶振频率复现性', '4') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '5')) { + addRow([], '晶振日老化率', '5') + } + } + } + else { + if (props.pageType !== 'detail') { + setTimeout(() => { + addRow([], '晶振开机特性', '1') + addRow([], '晶振1s频率稳定度', '2') + addRow([], '晶振相对频率偏差', '3') + addRow([], '晶振频率复现性', '4') + addRow([], '晶振日老化率', '5') + }) + } } }) const getList = () => { @@ -373,21 +599,55 @@ } // 获取字典 +const gateTimeValue = ref<{ value: string;name: string;id: string }[]>([]) // 闸门时间 +const timeList = ref<{ value: string;name: string;id: string }[]>([]) // 时间 +const standardTechnicalIndexSymbol = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号 +const testedSignalFrequency = ref<{ value: string;name: string;id: string }[]>([]) // 被测信号频率 const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位 +const standardAmplitudeUnit = ref<{ value: string;name: string;id: string }[]>([]) // 信号源输出幅度 +const thoroughfare = ref<{ value: string;name: string;id: string }[]>([]) // 通道 const fetchDict = async () => { // 标称值单位 - const res1 = await getDictByCode('bizFirstStandardFrequencyUnit') - nominalValueUnit.value = res1.data + const res1 = await getDictByCode('gateTimeValue') + gateTimeValue.value = res1.data + // 时间 + const res2 = await getDictByCode('standardTimeUnit') + timeList.value = res2.data + // 技术指标符号 + const res3 = await getDictByCode('standardTechnicalIndexSymbol') + standardTechnicalIndexSymbol.value = res3.data + // 被测信号频率 + const res4 = await getDictByCode('cesiumAtomTestedSignalFrequency') + testedSignalFrequency.value = res4.data + // 标称值单位 + const res5 = await getDictByCode('bizFirstStandardFrequencyUnit') + nominalValueUnit.value = res5.data + // 信号源输出幅度 + const res6 = await getDictByCode('standardAmplitudeUnit') + standardAmplitudeUnit.value = res6.data + // 通道 + const res7 = await getDictByCode('cesiumAtomThoroughfare') + thoroughfare.value = res7.data + tableDict.value = { - 标称值单位: nominalValueUnit.value, + '闸门时间': gateTimeValue.value, + '取样时间单位': gateTimeValue.value, + '测量间隔单位': timeList.value, + 'T1/T3单位': timeList.value, + 'T2单位': timeList.value, + '被测信号频率': testedSignalFrequency.value, + '标称值单位': nominalValueUnit.value, + '信号源输出幅度单位': standardAmplitudeUnit.value, + '信号源最大输入电平单位': standardAmplitudeUnit.value, + '通道': thoroughfare.value, } } fetchDict() // 自定义下拉框内容 const customSelect = (data: any, fun: any) => { - if (data.title === '参考电平' && data.text === '标称值单位') { - fun(amplitudeUnit.value) + if ((data.title === '时间间隔测量范围及测量误差' || data.title === '周期测量误差' || data.title === '周期测量范围、输入灵敏度') && data.text === '标称值单位') { + fun(timeList.value) } else { fun(tableDict.value[data.text]) @@ -416,6 +676,23 @@ 晶振开机特性 + @@ -432,6 +709,23 @@ 晶振1s频率稳定度 + @@ -448,6 +742,23 @@ 晶振相对频率偏差 + @@ -464,6 +775,23 @@ 晶振频率复现性 + @@ -480,6 +808,28 @@ 晶振日老化率 + + + @@ -511,6 +893,23 @@ 频率测量误差 + @@ -518,9 +917,11 @@ v-if="props.itemCategoryName === '通用计数器'" :data="periodicMeasureRangeList" :columns="columns_periodic_measure_range" :page-type="pageType" title="周期测量范围、输入灵敏度" index="8" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" + :custom-select="true" @disabled="disabled" @add-row="addRow" @del-row="delRow" + @customSelect="customSelect" @change-load-situationa="changeLoadSituationa" > + @@ -535,9 +953,11 @@ v-if="props.itemCategoryName === '通用计数器'" :data="periodicMeasureErrorList" :columns="columns_periodic_measure_error" :page-type="pageType" title="周期测量误差" index="9" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" + :custom-select="true" @disabled="disabled" @add-row="addRow" @del-row="delRow" + @customSelect="customSelect" @change-load-situationa="changeLoadSituationa" > + @@ -552,9 +989,11 @@ v-if="props.itemCategoryName === '通用计数器'" :data="timeIntervalMeasureRangeList" :columns="columns_time_interval_measure_range" :page-type="pageType" title="时间间隔测量范围及测量误差" index="10" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" + :custom-select="true" @disabled="disabled" @add-row="addRow" @del-row="delRow" + @customSelect="customSelect" @change-load-situationa="changeLoadSituationa" > + diff --git a/src/views/business/measure/item/components/fourteen/components/clock.vue b/src/views/business/measure/item/components/fourteen/components/clock.vue index 00bc1b7..1d92ac9 100644 --- a/src/views/business/measure/item/components/fourteen/components/clock.vue +++ b/src/views/business/measure/item/components/fourteen/components/clock.vue @@ -91,58 +91,58 @@ // ----------------------------------------表头------------------------------------------------ const columns_output_signal = ref([ // 输出信号 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '信号类型', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '被测信号频率', value: 'unit', align: 'center', required: true, type: '' }, - { text: '幅度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '脉冲宽度技术指标', value: 'sweepWidthUnit', align: 'center', required: true, type: '' }, - { text: '上升时间技术指标', value: 'horizontalResolution', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '信号类型', value: 'signalType', align: 'center', required: true, type: 'select' }, + { text: '被测信号频率', value: '', align: 'center', required: false, type: '' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '脉冲宽度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '上升时间技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_warm_up = ref([ // 开机特性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '开机时间', value: 'horizontalResolution', align: 'center', required: true, type: 'number' }, - { text: '开机时间单位', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '开机时间', value: 'onTime', align: 'center', required: true, type: 'number' }, + { text: '开机时间单位', value: 'onTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_reproducibility = ref([ // 频率复现性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T2', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T2单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T3', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T3单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: 'T1', value: 'tOne', align: 'center', required: true, type: 'number' }, + { text: 'T1单位', value: 'tOneUnit', align: 'center', required: true, type: 'select' }, + { text: 'T2', value: 'tTwo', align: 'center', required: true, type: 'number' }, + { text: 'T2单位', value: 'tTwoUnit', align: 'center', required: true, type: 'select' }, + { text: 'T3', value: 'tThree', align: 'center', required: true, type: 'number' }, + { text: 'T3单位', value: 'tThreeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_stability = ref([ // 频率稳定度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度uc', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度uc', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_daily_frequency_drift_rate = ref([ // 日频率漂移率 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 @@ -163,6 +163,35 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { + const params = { + signalType: '', // 信号类型 + testedSignalFrequency: '', // 被测信号频率 + testedSignalFrequencyUnit: 'MHz', // 被测信号频率单位 + amplitudeTechnicalIndexLower: '', // 幅度技术指标下限 + amplitudeTechnicalIndexUpper: '', // 幅度技术指标上限 + amplitudeTechnicalIndexUnit: '', // 幅度技术指标单位 + pulseWidthTechnicalIndexLower: '', // 脉冲宽度技术指标下限 + pulseWidthTechnicalIndexUnit: '', // 脉冲宽度技术指标单位 + pulseWidthTechnicalIndexUpper: '', // 脉冲宽度技术指标上限 + technicalIndex: '', // 上升时间技术指标 + technicalIndexSymbol: '±', // 上升时间技术指标符号 + technicalIndexUnit: '', // 上升时间技术指标单位 + gateTime: '', // 闸门时间 + gateTimeUnit: '', // 闸门时间单位 + multiplyFrequency: '', // 倍增次数 + onTime: '', // 开机时间 + onTimeUnit: '', // 开机时间单位 + sampleTime: '', // 取样时间 + sampleTimeUnit: '', // 取样时间单位 + urel: '', + tOne: '', + tTwo: '', + tThree: '', + tOneUnit: '', + tTwoUnit: '', + tThreeUnit: '', + sampleGroupNumber: '', // 采样组数 + } switch (title) { case '输出信号': // 输出信号 outputSignalList.value.length @@ -170,7 +199,63 @@ : outputSignalList.value.push({ dataType: '1', params: '输出信号', - unit: '', // 标称值单位 + ...params, + editable: true, + } as any) + break + case '开机特性': // 开机特性 + warmUpList.value.length + ? warmUpList.value.push(JSON.parse(JSON.stringify(warmUpList.value[warmUpList.value.length - 1]))) + : warmUpList.value.push({ + dataType: '2', + params: '开机特性', + ...params, + editable: true, + } as any) + break + case '频率复现性': // 频率复现性 + frequencyReproducibilityList.value.length + ? frequencyReproducibilityList.value.push(JSON.parse(JSON.stringify(frequencyReproducibilityList.value[frequencyReproducibilityList.value.length - 1]))) + : frequencyReproducibilityList.value.push({ + dataType: '3', + params: '频率复现性', + ...params, + gateTime: '100', + tOne: '24', + tTwo: '24', + tThree: '12', + editable: true, + } as any) + break + case '相对频率偏差': // 相对频率偏差 + relativeFrequencyDeviationList.value.length + ? relativeFrequencyDeviationList.value.push(JSON.parse(JSON.stringify(relativeFrequencyDeviationList.value[relativeFrequencyDeviationList.value.length - 1]))) + : relativeFrequencyDeviationList.value.push({ + dataType: '4', + params: '相对频率偏差', + ...params, + gateTime: '100', + editable: true, + } as any) + break + case '频率稳定度': // 频率稳定度 + frequencyStabilityList.value.length + ? frequencyStabilityList.value.push(JSON.parse(JSON.stringify(frequencyStabilityList.value[frequencyStabilityList.value.length - 1]))) + : frequencyStabilityList.value.push({ + dataType: '5', + params: '频率稳定度', + ...params, + editable: true, + } as any) + break + case '日频率漂移率': // 日频率漂移率 + dailyFrequencyDriftRateList.value.length + ? dailyFrequencyDriftRateList.value.push(JSON.parse(JSON.stringify(dailyFrequencyDriftRateList.value[dailyFrequencyDriftRateList.value.length - 1]))) + : dailyFrequencyDriftRateList.value.push({ + dataType: '6', + params: '日频率漂移率', + ...params, + gateTime: '100', editable: true, } as any) break @@ -232,7 +317,12 @@ // ----------------------------------------------------------------------------------------------------- const clearAllList = () => { list.value = [] - // crystalOscillatorStartupCharacterList.value = [] + dailyFrequencyDriftRateList.value = [] + frequencyStabilityList.value = [] + relativeFrequencyDeviationList.value = [] + frequencyReproducibilityList.value = [] + warmUpList.value = [] + outputSignalList.value = [] for (const i in listDict.value) { listDict.value[i] = [] } @@ -243,11 +333,52 @@ newVal.forEach((item: any) => { switch (item.dataType) { case '1': - // 晶振开机特性 - crystalOscillatorStartupCharacterList.value.push({ ...item, params: '晶振开机特性' }) + // 输出信号 + outputSignalList.value.push({ ...item, params: '输出信号', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '2': + // 开机特性 + warmUpList.value.push({ ...item, params: '开机特性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '3': + // 频率复现性 + frequencyReproducibilityList.value.push({ ...item, params: '频率复现性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '4': + // 相对频率偏差 + relativeFrequencyDeviationList.value.push({ ...item, params: '相对频率偏差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '5': + // 频率稳定度 + frequencyStabilityList.value.push({ ...item, params: '频率稳定度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '6': + // 日频率漂移率 + dailyFrequencyDriftRateList.value.push({ ...item, params: '日频率漂移率', technicalIndex: clearSymbol(item.technicalIndex) }) break } }) + + if (props.pageType !== 'detail') { + if (newVal.every((item: { dataType: string }) => item.dataType !== '3')) { + addRow([], '频率复现性', '3') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '4')) { + addRow([], '相对频率偏差', '4') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '6')) { + addRow([], '日频率漂移率', '6') + } + } + } + else { + if (props.pageType !== 'detail') { + setTimeout(() => { + addRow([], '频率复现性', '3') + addRow([], '相对频率偏差', '4') + addRow([], '日频率漂移率', '6') + }) + } } }) const getList = () => { @@ -281,25 +412,59 @@ // 获取字典 const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位 +const thoroughfare = ref<{ value: string;name: string;id: string }[]>([]) // 通道 +const testedSignalFrequency = ref<{ value: string;name: string;id: string }[]>([]) // 被测信号频率 +const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位 +const timeList = ref<{ value: string;name: string;id: string }[]>([]) // 时间 +const standardTechnicalIndexSymbol = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号 +const signalType = ref<{ value: string;name: string;id: string }[]>([]) // 信号类型 const fetchDict = async () => { // 标称值单位 const res1 = await getDictByCode('bizFirstStandardFrequencyUnit') nominalValueUnit.value = res1.data + // 通道 + const res2 = await getDictByCode('cesiumAtomThoroughfare') + thoroughfare.value = res2.data + // 被测信号频率 + const res3 = await getDictByCode('cesiumAtomTestedSignalFrequency') + testedSignalFrequency.value = res3.data + // 电压单位 + const res4 = await getDictByCode('standardVoltage') + standardVoltage.value = res4.data + // 时间 + const res5 = await getDictByCode('standardTimeUnit') + timeList.value = res5.data + // 技术指标符号 + const res6 = await getDictByCode('standardTechnicalIndexSymbol') + standardTechnicalIndexSymbol.value = res6.data + // 信号类型 + const res7 = await getDictByCode('cesiumAtomSignalType') + signalType.value = res7.data + console.log(signalType.value, 'signalType.value') tableDict.value = { 标称值单位: nominalValueUnit.value, + 通道: thoroughfare.value, + 被测信号频率: testedSignalFrequency.value, + 取样时间单位: timeList.value, + 闸门时间单位: timeList.value, + 开机时间单位: timeList.value, + T1单位: timeList.value, + T3单位: timeList.value, + T2单位: timeList.value, + 信号类型: signalType.value, } } fetchDict() // 自定义下拉框内容 -const customSelect = (data: any, fun: any) => { - if (data.title === '参考电平' && data.text === '标称值单位') { - fun(amplitudeUnit.value) - } - else { - fun(tableDict.value[data.text]) - } -} +// const customSelect = (data: any, fun: any) => { +// if (data.title === '参考电平' && data.text === '标称值单位') { +// fun(amplitudeUnit.value) +// } +// else { +// fun(tableDict.value[data.text]) +// } +// } + + @@ -339,6 +604,28 @@ 开机特性 + + @@ -355,6 +642,28 @@ 频率复现性 + + @@ -371,6 +680,28 @@ 相对频率偏差 + + @@ -387,6 +718,28 @@ 频率稳定度 + + @@ -403,5 +756,27 @@ 日频率漂移率 + + diff --git a/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue b/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue index 66b27dd..33c3474 100644 --- a/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue +++ b/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue @@ -92,61 +92,61 @@ // ----------------------------------------表头------------------------------------------------ const columns_frequency_signal_output_amplitude = ref([ // 频率信号输出幅度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '幅度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_second_pulse_output = ref([ // 秒脉冲输出 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '幅度技术指标', value: 'nominalValue', align: 'center', required: true, type: '' }, - { text: '脉冲宽度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '上升时间技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '脉冲宽度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '上升时间技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_stability = ref([ // 频率稳定度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度uc', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度uc', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_relative_frequency_deviation = ref([ // 相对频率偏差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '开机时间', value: 'horizontalResolution', align: 'center', required: true, type: 'number' }, - { text: '开机时间单位', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: false, type: 'number' }, + { text: '开机时间', value: 'onTime', align: 'center', required: true, type: 'number' }, + { text: '开机时间单位', value: 'onTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_reproducibility = ref([ // 频率复现性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T2', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T2单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3', value: 'tOne', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3单位', value: 'tOneUnit', align: 'center', required: true, type: 'select' }, + { text: 'T2', value: 'tTwo', align: 'center', required: true, type: 'number' }, + { text: 'T2单位', value: 'tTwoUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_daily_aging_rate = ref([ // 日老化率 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 @@ -167,6 +167,35 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { + const params = { + thoroughfare: '', // 通道 + testedSignalFrequency: '', // 被测信号频率 + testedSignalFrequencyUnit: 'MHz', // 被测信号频率单位 + urel: '', // 不确定度U(k=2) + amplitudeTechnicalIndexUnit: '', // 幅度技术指标单位 + amplitudeTechnicalIndexLower: '', // 幅度技术指标下限 + amplitudeTechnicalIndexUpper: '', // 幅度技术指标上限 + technicalIndex: '', // 上升时间技术指标 + technicalIndexSymbol: '±', // 上升时间技术指标符号 + technicalIndexUnit: '', // 上升时间技术指标单位 + pulseWidthTechnicalIndexLower: '', // 脉冲宽度技术指标下限 + pulseWidthTechnicalIndexUnit: '', // 脉冲宽度技术指标单位 + pulseWidthTechnicalIndexUpper: '', // 脉冲宽度技术指标上限 + sampleTime: '', // 取样时间 + sampleTimeUnit: '', // 取样时间单位 + sampleGroupNumber: '', // 采样组数 + gateTime: '', // 闸门时间 + gateTimeUnit: '', // 闸门时间单位 + multiplyFrequency: '', // 倍增次数 + onTime: '', // 开机时间 + onTimeUnit: '', // 开机时间单位 + tOne: '', + tTwo: '', + tThree: '', + tOneUnit: '', + tTwoUnit: '', + tThreeUnit: '', + } switch (title) { case '频率信号输出幅度': // 频率信号输出幅度 frequencySignalOutputAmplitudelList.value.length @@ -174,7 +203,58 @@ : frequencySignalOutputAmplitudelList.value.push({ dataType: '1', params: '频率信号输出幅度', - unit: '', // 标称值单位 + ...params, + editable: true, + } as any) + break + case '秒脉冲输出': // 秒脉冲输出 + secondPulseOutputList.value.length + ? secondPulseOutputList.value.push(JSON.parse(JSON.stringify(secondPulseOutputList.value[secondPulseOutputList.value.length - 1]))) + : secondPulseOutputList.value.push({ + dataType: '2', + params: '秒脉冲输出', + ...params, + editable: true, + } as any) + break + case '频率稳定度': // 频率稳定度 + frequencyStabilityList.value.length + ? frequencyStabilityList.value.push(JSON.parse(JSON.stringify(frequencyStabilityList.value[frequencyStabilityList.value.length - 1]))) + : frequencyStabilityList.value.push({ + dataType: '3', + params: '频率稳定度', + ...params, + editable: true, + } as any) + break + case '相对频率偏差': // 相对频率偏差 + relativeFrequencyDeviationList.value.length + ? relativeFrequencyDeviationList.value.push(JSON.parse(JSON.stringify(relativeFrequencyDeviationList.value[relativeFrequencyDeviationList.value.length - 1]))) + : relativeFrequencyDeviationList.value.push({ + dataType: '4', + params: '相对频率偏差', + ...params, + editable: true, + } as any) + break + case '频率复现性': // 频率复现性 + frequencyReproducibilityList.value.length + ? frequencyReproducibilityList.value.push(JSON.parse(JSON.stringify(frequencyReproducibilityList.value[frequencyReproducibilityList.value.length - 1]))) + : frequencyReproducibilityList.value.push({ + dataType: '5', + params: '频率复现性', + ...params, + editable: true, + } as any) + break + case '日老化率': // 日老化率 + dailyAgingRateList.value.length + ? dailyAgingRateList.value.push(JSON.parse(JSON.stringify(dailyAgingRateList.value[dailyAgingRateList.value.length - 1]))) + : dailyAgingRateList.value.push({ + dataType: '6', + params: '日老化率', + ...params, + sampleGroupNumber: '15', editable: true, } as any) break @@ -253,10 +333,52 @@ switch (item.dataType) { case '1': // 频率信号输出幅度 - frequencySignalOutputAmplitudelList.value.push({ ...item, params: '频率信号输出幅度' }) + frequencySignalOutputAmplitudelList.value.push({ ...item, params: '频率信号输出幅度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '2': + // 秒脉冲输出 + secondPulseOutputList.value.push({ ...item, params: '秒脉冲输出', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '3': + // 频率稳定度 + frequencyStabilityList.value.push({ ...item, params: '频率稳定度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '4': + // 相对频率偏差 + relativeFrequencyDeviationList.value.push({ ...item, params: '相对频率偏差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '5': + // 频率复现性 + frequencyReproducibilityList.value.push({ ...item, params: '频率复现性', technicalIndex: clearSymbol(item.technicalIndex) }) + console.log(frequencyReproducibilityList.value, 'frequencyReproducibilityList.value') + break + case '6': + // 日老化率 + dailyAgingRateList.value.push({ ...item, params: '日老化率', technicalIndex: clearSymbol(item.technicalIndex) }) break } }) + + if (props.pageType !== 'detail') { + if (newVal.every((item: { dataType: string }) => item.dataType !== '4')) { + addRow([], '相对频率偏差', '4') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '5')) { + addRow([], '频率复现性', '5') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '6')) { + addRow([], '日老化率', '6') + } + } + } + else { + if (props.pageType !== 'detail') { + setTimeout(() => { + addRow([], '相对频率偏差', '4') + addRow([], '频率复现性', '5') + addRow([], '日老化率', '6') + }) + } } }) const getList = () => { @@ -269,7 +391,6 @@ } return result } -defineExpose({ list, checkAllList, form, getList }) // 表格下拉框等内容是否禁用 const disabled = ({ scope, column }, fun) => { fun(props.pageType === 'detail') @@ -290,25 +411,57 @@ // 获取字典 const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位 +const thoroughfare = ref<{ value: string;name: string;id: string }[]>([]) // 通道 +const testedSignalFrequency = ref<{ value: string;name: string;id: string }[]>([]) // 被测信号频率 +const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位 +const timeList = ref<{ value: string;name: string;id: string }[]>([]) // 时间 +const standardTechnicalIndexSymbol = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号 + +// const fetchDict = async () => { // 标称值单位 const res1 = await getDictByCode('bizFirstStandardFrequencyUnit') nominalValueUnit.value = res1.data + // 通道 + const res2 = await getDictByCode('cesiumAtomThoroughfare') + thoroughfare.value = res2.data + // 被测信号频率 + const res3 = await getDictByCode('cesiumAtomTestedSignalFrequency') + testedSignalFrequency.value = res3.data + // 电压单位 + const res4 = await getDictByCode('standardVoltage') + standardVoltage.value = res4.data + // 时间 + const res5 = await getDictByCode('standardTimeUnit') + timeList.value = res5.data + // 技术指标符号 + const res6 = await getDictByCode('standardTechnicalIndexSymbol') + standardTechnicalIndexSymbol.value = res6.data + tableDict.value = { - 标称值单位: nominalValueUnit.value, + '标称值单位': nominalValueUnit.value, + '通道': thoroughfare.value, + '被测信号频率': testedSignalFrequency.value, + '取样时间单位': timeList.value, + '闸门时间单位': timeList.value, + '开机时间单位': timeList.value, + 'T1/T3单位': timeList.value, + 'T2单位': timeList.value, } } fetchDict() // 自定义下拉框内容 -const customSelect = (data: any, fun: any) => { - if (data.title === '参考电平' && data.text === '标称值单位') { - fun(amplitudeUnit.value) - } - else { - fun(tableDict.value[data.text]) - } -} +// const customSelect = (data: any, fun: any) => { +// if (data.title === '参考电平' && data.text === '标称值单位') { +// fun(amplitudeUnit.value) +// } +// else { +// fun(tableDict.value[data.text]) +// } +// } + +defineExpose({ list, checkAllList, form, getList }) + + @@ -348,6 +527,75 @@ 秒脉冲输出 + @@ -364,6 +612,28 @@ 频率稳定度 + + @@ -380,6 +650,28 @@ 相对频率偏差 + + @@ -396,6 +688,23 @@ 频率复现性 + @@ -412,5 +721,27 @@ 日老化率 + + diff --git a/src/views/business/measure/item/components/fourteen/components/universalCounter.vue b/src/views/business/measure/item/components/fourteen/components/universalCounter.vue index 722c62a..f82d255 100644 --- a/src/views/business/measure/item/components/fourteen/components/universalCounter.vue +++ b/src/views/business/measure/item/components/fourteen/components/universalCounter.vue @@ -115,101 +115,124 @@ '9-周期测量误差': form.value.periodicMeasureError, '10-时间间隔测量范围及测量误差': form.value.timeIntervalMeasureRange, } + if (props.itemCategoryName === '通用计数器') { + delete chekedDict['6-频率测量范围、输入灵敏度及最大输入电平'] + } + else { + delete chekedDict['6-频率测量范围、输入灵敏度'] + } }, { deep: true, }) // ----------------------------------------表头------------------------------------------------ const columns_crystal_oscillator_startup_character = ref([ // 晶振开机特性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '组数', value: 'sweepWidth', align: 'center', required: true, type: 'number' }, - { text: '测量间隔', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '测量间隔单位', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '组数', value: 'groupNumber', align: 'center', required: true, type: 'number' }, + { text: '测量间隔', value: 'measureInterval', align: 'center', required: true, type: 'number' }, + { text: '测量间隔单位', value: 'measureIntervalUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_stability = ref([ // 晶振1s频率稳定度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '组数', value: 'sweepWidth', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度uc', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '组数', value: 'groupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度uc', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_deviation = ref([ // 晶振相对频率偏差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_reproducibility = ref([ // 晶振频率复现性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: 'T2', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: 'T2单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3', value: 'tOne', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3单位', value: 'tOneUnit', align: 'center', required: true, type: 'select' }, + { text: 'T2', value: 'tTwo', align: 'center', required: true, type: 'number' }, + { text: 'T2单位', value: 'tTwoUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_dailyAging_rate = ref([ // 晶振日老化率 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) -const columns_frequency_measure_range = ref([ // 频率测量范围、输入灵敏度 - { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '信号源输出幅度', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '信号源输出幅度单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '输入灵敏度技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, -]) +const columns_frequency_measure_range = ref( // 频率测量范围、输入灵敏度 + props.itemCategoryName === '通用计数器' + ? [ + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitude', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'select' }, + { text: '输入灵敏度技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, + ] + : [ + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitude', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源最大输入电平', value: 'signalSourceMaxInputLevel', align: 'center', required: true, type: 'number' }, + { text: '信号源最大输入电平单位', value: 'signalSourceMaxInputLevelUnit', align: 'center', required: true, type: 'select' }, + { text: '输入灵敏度技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '最大输入电平技术指标', value: 'otherTechnicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, + ]) + const columns_frequency_measure_error = ref([ // 频率测量误差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_periodic_measure_range = ref([ // 周期测量范围、输入灵敏度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '信号源输出幅度', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '信号源输出幅度单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '输入灵敏度技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitude', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'select' }, + { text: '输入灵敏度技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_periodic_measure_error = ref([ // 周期测量误差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '信号源输出幅度', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '信号源输出幅度单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceMaxInputLevelUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_time_interval_measure_range = ref([ // 时间间隔测量范围及测量误差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 @@ -235,14 +258,147 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { + const params = { + gateTime: '10s', // 闸门时间 + multiplyFrequency: '', // 倍增次数 + groupNumber: '', // 组数 + measureInterval: '', // 测量间隔 + measureIntervalUnit: '', // 测量间隔单位 + technicalIndex: '', // 上升时间技术指标 + technicalIndexSymbol: '±', // 上升时间技术指标符号 + urel: '', // 不确定度U(k=2) + tOne: '1', + tOneUnit: '', + tTwo: '24', + tTwoUnit: '', + tThree: '', + tThreeUnit: '', + sampleGroupNumber: '', // 采样组数 + sampleTime: '', // 取样时间 + sampleTimeUnit: '', // 取样时间单位 + testedSignalFrequency: '', // 被测信号频率 + testedSignalFrequencyUnit: 'MHz', // 被测信号频率单位 + nominalValue: '', + unit: '', + signalSourceOutputAmplitude: '', + signalSourceOutputAmplitudeUnit: '', + signalSourceMaxInputLevel: '', + signalSourceMaxInputLevelUnit: '', + otherTechnicalIndex: '', + otherTechnicalIndexSymbol: '±', + } switch (title) { case '晶振开机特性': // 晶振开机特性 - frequencyList.value.length - ? frequencyList.value.push(JSON.parse(JSON.stringify(frequencyList.value[frequencyList.value.length - 1]))) - : frequencyList.value.push({ + crystalOscillatorStartupCharacterList.value.length + ? crystalOscillatorStartupCharacterList.value.push(JSON.parse(JSON.stringify(crystalOscillatorStartupCharacterList.value[crystalOscillatorStartupCharacterList.value.length - 1]))) + : crystalOscillatorStartupCharacterList.value.push({ dataType: '1', - params: '频率显示', - unit: '', // 标称值单位 + params: '晶振开机特性', + ...params, + groupNumber: '8', + editable: true, + } as any) + break + case '晶振1s频率稳定度': // 晶振1s频率稳定度 + crystalOscillatorStabilityList.value.length + ? crystalOscillatorStabilityList.value.push(JSON.parse(JSON.stringify(crystalOscillatorStabilityList.value[crystalOscillatorStabilityList.value.length - 1]))) + : crystalOscillatorStabilityList.value.push({ + dataType: '2', + params: '晶振1s频率稳定度', + ...params, + groupNumber: '101', + editable: true, + } as any) + break + case '晶振相对频率偏差': // 晶振相对频率偏差 + crystalOscillatorDeviationList.value.length + ? crystalOscillatorDeviationList.value.push(JSON.parse(JSON.stringify(crystalOscillatorDeviationList.value[crystalOscillatorDeviationList.value.length - 1]))) + : crystalOscillatorDeviationList.value.push({ + dataType: '3', + params: '晶振相对频率偏差', + ...params, + editable: true, + } as any) + break + case '晶振频率复现性': // 晶振频率复现性 + crystalOscillatorReproducibilityList.value.length + ? crystalOscillatorReproducibilityList.value.push(JSON.parse(JSON.stringify(crystalOscillatorReproducibilityList.value[crystalOscillatorReproducibilityList.value.length - 1]))) + : crystalOscillatorReproducibilityList.value.push({ + dataType: '4', + params: '晶振频率复现性', + ...params, + editable: true, + } as any) + break + case '晶振日老化率': // 晶振日老化率 + crystalOscillatorDailyAgingRateList.value.length + ? crystalOscillatorDailyAgingRateList.value.push(JSON.parse(JSON.stringify(crystalOscillatorDailyAgingRateList.value[crystalOscillatorDailyAgingRateList.value.length - 1]))) + : crystalOscillatorDailyAgingRateList.value.push({ + dataType: '5', + params: '晶振日老化率', + ...params, + sampleTime: '12', + sampleGroupNumber: '15', + editable: true, + } as any) + break + case '频率测量范围、输入灵敏度': // 频率测量范围、输入灵敏度 + frequencyMeasureRangeList.value.length + ? frequencyMeasureRangeList.value.push(JSON.parse(JSON.stringify(frequencyMeasureRangeList.value[frequencyMeasureRangeList.value.length - 1]))) + : frequencyMeasureRangeList.value.push({ + dataType: '6', + params: '频率测量范围、输入灵敏度', + ...params, + editable: true, + } as any) + break + case '频率测量范围、输入灵敏度及最大输入电平': // 频率测量范围、输入灵敏度及最大输入电平 + frequencyMeasureRangeList.value.length + ? frequencyMeasureRangeList.value.push(JSON.parse(JSON.stringify(frequencyMeasureRangeList.value[frequencyMeasureRangeList.value.length - 1]))) + : frequencyMeasureRangeList.value.push({ + dataType: '6', + params: '频率测量范围、输入灵敏度及最大输入电平', + ...params, + editable: true, + } as any) + break + case '频率测量误差': // 频率测量误差 + frequencyMeasureErrorList.value.length + ? frequencyMeasureErrorList.value.push(JSON.parse(JSON.stringify(frequencyMeasureErrorList.value[frequencyMeasureErrorList.value.length - 1]))) + : frequencyMeasureErrorList.value.push({ + dataType: '7', + params: '频率测量误差', + ...params, + editable: true, + } as any) + break + case '周期测量范围、输入灵敏度': // 周期测量范围、输入灵敏度 + periodicMeasureRangeList.value.length + ? periodicMeasureRangeList.value.push(JSON.parse(JSON.stringify(periodicMeasureRangeList.value[periodicMeasureRangeList.value.length - 1]))) + : periodicMeasureRangeList.value.push({ + dataType: '8', + params: '周期测量范围、输入灵敏度', + ...params, + editable: true, + } as any) + break + case '周期测量误差': // 周期测量误差 + periodicMeasureErrorList.value.length + ? periodicMeasureErrorList.value.push(JSON.parse(JSON.stringify(periodicMeasureErrorList.value[periodicMeasureErrorList.value.length - 1]))) + : periodicMeasureErrorList.value.push({ + dataType: '9', + params: '周期测量误差', + ...params, + editable: true, + } as any) + break + case '时间间隔测量范围及测量误差': // 时间间隔测量范围及测量误差 + timeIntervalMeasureRangeList.value.length + ? timeIntervalMeasureRangeList.value.push(JSON.parse(JSON.stringify(timeIntervalMeasureRangeList.value[timeIntervalMeasureRangeList.value.length - 1]))) + : timeIntervalMeasureRangeList.value.push({ + dataType: '10', + params: '时间间隔测量范围及测量误差', + ...params, editable: true, } as any) break @@ -337,10 +493,80 @@ switch (item.dataType) { case '1': // 晶振开机特性 - crystalOscillatorStartupCharacterList.value.push({ ...item, params: '晶振开机特性' }) + crystalOscillatorStartupCharacterList.value.push({ ...item, params: '晶振开机特性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '2': + // 晶振1s频率稳定度 + crystalOscillatorStabilityList.value.push({ ...item, params: '晶振1s频率稳定度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '3': + // 晶振相对频率偏差 + crystalOscillatorDeviationList.value.push({ ...item, params: '晶振相对频率偏差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '4': + // 晶振频率复现性 + crystalOscillatorReproducibilityList.value.push({ ...item, params: '晶振频率复现性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '5': + // 晶振日老化率 + crystalOscillatorDailyAgingRateList.value.push({ ...item, params: '晶振日老化率', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '6': + if (props.itemCategoryName === '通用计数器') { + // 频率测量范围、输入灵敏度 + frequencyMeasureRangeList.value.push({ ...item, params: '频率测量范围、输入灵敏度', technicalIndex: clearSymbol(item.technicalIndex) }) + } + else { + // 频率测量范围、输入灵敏度及最大输入电平 + frequencyMeasureRangeList.value.push({ ...item, params: '频率测量范围、输入灵敏度及最大输入电平', technicalIndex: clearSymbol(item.technicalIndex) }) + } + break + case '7': + // 频率测量误差 + frequencyMeasureErrorList.value.push({ ...item, params: '频率测量误差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '8': + // 周期测量范围、输入灵敏度 + periodicMeasureRangeList.value.push({ ...item, params: '周期测量范围、输入灵敏度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '9': + // 周期测量误差 + periodicMeasureErrorList.value.push({ ...item, params: '周期测量误差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '10': + // 时间间隔测量范围及测量误差 + timeIntervalMeasureRangeList.value.push({ ...item, params: '时间间隔测量范围及测量误差', technicalIndex: clearSymbol(item.technicalIndex) }) break } }) + if (props.pageType !== 'detail') { + if (newVal.every((item: { dataType: string }) => item.dataType !== '1')) { + addRow([], '晶振开机特性', '1') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '2')) { + addRow([], '晶振1s频率稳定度', '2') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '3')) { + addRow([], '晶振相对频率偏差', '3') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '4')) { + addRow([], '晶振频率复现性', '4') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '5')) { + addRow([], '晶振日老化率', '5') + } + } + } + else { + if (props.pageType !== 'detail') { + setTimeout(() => { + addRow([], '晶振开机特性', '1') + addRow([], '晶振1s频率稳定度', '2') + addRow([], '晶振相对频率偏差', '3') + addRow([], '晶振频率复现性', '4') + addRow([], '晶振日老化率', '5') + }) + } } }) const getList = () => { @@ -373,21 +599,55 @@ } // 获取字典 +const gateTimeValue = ref<{ value: string;name: string;id: string }[]>([]) // 闸门时间 +const timeList = ref<{ value: string;name: string;id: string }[]>([]) // 时间 +const standardTechnicalIndexSymbol = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号 +const testedSignalFrequency = ref<{ value: string;name: string;id: string }[]>([]) // 被测信号频率 const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位 +const standardAmplitudeUnit = ref<{ value: string;name: string;id: string }[]>([]) // 信号源输出幅度 +const thoroughfare = ref<{ value: string;name: string;id: string }[]>([]) // 通道 const fetchDict = async () => { // 标称值单位 - const res1 = await getDictByCode('bizFirstStandardFrequencyUnit') - nominalValueUnit.value = res1.data + const res1 = await getDictByCode('gateTimeValue') + gateTimeValue.value = res1.data + // 时间 + const res2 = await getDictByCode('standardTimeUnit') + timeList.value = res2.data + // 技术指标符号 + const res3 = await getDictByCode('standardTechnicalIndexSymbol') + standardTechnicalIndexSymbol.value = res3.data + // 被测信号频率 + const res4 = await getDictByCode('cesiumAtomTestedSignalFrequency') + testedSignalFrequency.value = res4.data + // 标称值单位 + const res5 = await getDictByCode('bizFirstStandardFrequencyUnit') + nominalValueUnit.value = res5.data + // 信号源输出幅度 + const res6 = await getDictByCode('standardAmplitudeUnit') + standardAmplitudeUnit.value = res6.data + // 通道 + const res7 = await getDictByCode('cesiumAtomThoroughfare') + thoroughfare.value = res7.data + tableDict.value = { - 标称值单位: nominalValueUnit.value, + '闸门时间': gateTimeValue.value, + '取样时间单位': gateTimeValue.value, + '测量间隔单位': timeList.value, + 'T1/T3单位': timeList.value, + 'T2单位': timeList.value, + '被测信号频率': testedSignalFrequency.value, + '标称值单位': nominalValueUnit.value, + '信号源输出幅度单位': standardAmplitudeUnit.value, + '信号源最大输入电平单位': standardAmplitudeUnit.value, + '通道': thoroughfare.value, } } fetchDict() // 自定义下拉框内容 const customSelect = (data: any, fun: any) => { - if (data.title === '参考电平' && data.text === '标称值单位') { - fun(amplitudeUnit.value) + if ((data.title === '时间间隔测量范围及测量误差' || data.title === '周期测量误差' || data.title === '周期测量范围、输入灵敏度') && data.text === '标称值单位') { + fun(timeList.value) } else { fun(tableDict.value[data.text]) @@ -416,6 +676,23 @@ 晶振开机特性 + @@ -432,6 +709,23 @@ 晶振1s频率稳定度 + @@ -448,6 +742,23 @@ 晶振相对频率偏差 + @@ -464,6 +775,23 @@ 晶振频率复现性 + @@ -480,6 +808,28 @@ 晶振日老化率 + + + @@ -511,6 +893,23 @@ 频率测量误差 + @@ -518,9 +917,11 @@ v-if="props.itemCategoryName === '通用计数器'" :data="periodicMeasureRangeList" :columns="columns_periodic_measure_range" :page-type="pageType" title="周期测量范围、输入灵敏度" index="8" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" + :custom-select="true" @disabled="disabled" @add-row="addRow" @del-row="delRow" + @customSelect="customSelect" @change-load-situationa="changeLoadSituationa" > + @@ -535,9 +953,11 @@ v-if="props.itemCategoryName === '通用计数器'" :data="periodicMeasureErrorList" :columns="columns_periodic_measure_error" :page-type="pageType" title="周期测量误差" index="9" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" + :custom-select="true" @disabled="disabled" @add-row="addRow" @del-row="delRow" + @customSelect="customSelect" @change-load-situationa="changeLoadSituationa" > + @@ -552,9 +989,11 @@ v-if="props.itemCategoryName === '通用计数器'" :data="timeIntervalMeasureRangeList" :columns="columns_time_interval_measure_range" :page-type="pageType" title="时间间隔测量范围及测量误差" index="10" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" + :custom-select="true" @disabled="disabled" @add-row="addRow" @del-row="delRow" + @customSelect="customSelect" @change-load-situationa="changeLoadSituationa" > + diff --git a/src/views/business/measure/item/components/fourteen/templateDetail.vue b/src/views/business/measure/item/components/fourteen/templateDetail.vue index aca52fd..85d2f9e 100644 --- a/src/views/business/measure/item/components/fourteen/templateDetail.vue +++ b/src/views/business/measure/item/components/fourteen/templateDetail.vue @@ -29,11 +29,19 @@ }) // 组件实例 const standardRef = ref() -const form = standardRef.value?.form -const list = standardRef.value?.list -const checkAllList = standardRef.value?.checkAllList -const getList = standardRef.value?.getList -defineExpose({ list, checkAllList, form, getList }) +// const form = standardRef.value.form +// const list = standardRef.value.getList() +// const checkAllList = standardRef.value.checkAllList +// const getList = standardRef.value.getList +const getInfo = () => { + return { + form: standardRef.value.form, + list: standardRef.value.getList(), + checkAllList: standardRef.value.checkAllList, + getList: standardRef.value.getList, + } +} +defineExpose({ getInfo }) + + @@ -355,6 +642,28 @@ 频率复现性 + + @@ -371,6 +680,28 @@ 相对频率偏差 + + @@ -387,6 +718,28 @@ 频率稳定度 + + @@ -403,5 +756,27 @@ 日频率漂移率 + + diff --git a/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue b/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue index 66b27dd..33c3474 100644 --- a/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue +++ b/src/views/business/measure/item/components/fourteen/components/crystalOscillator.vue @@ -92,61 +92,61 @@ // ----------------------------------------表头------------------------------------------------ const columns_frequency_signal_output_amplitude = ref([ // 频率信号输出幅度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '幅度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_second_pulse_output = ref([ // 秒脉冲输出 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '幅度技术指标', value: 'nominalValue', align: 'center', required: true, type: '' }, - { text: '脉冲宽度技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '上升时间技术指标', value: 'sweepWidth', align: 'center', required: true, type: '' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '幅度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '脉冲宽度技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '上升时间技术指标', value: '', align: 'center', required: false, type: '' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_stability = ref([ // 频率稳定度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度uc', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度uc', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_relative_frequency_deviation = ref([ // 相对频率偏差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '开机时间', value: 'horizontalResolution', align: 'center', required: true, type: 'number' }, - { text: '开机时间单位', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: false, type: 'number' }, + { text: '开机时间', value: 'onTime', align: 'center', required: true, type: 'number' }, + { text: '开机时间单位', value: 'onTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_frequency_reproducibility = ref([ // 频率复现性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: 'T2', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: 'T2单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3', value: 'tOne', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3单位', value: 'tOneUnit', align: 'center', required: true, type: 'select' }, + { text: 'T2', value: 'tTwo', align: 'center', required: true, type: 'number' }, + { text: 'T2单位', value: 'tTwoUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_daily_aging_rate = ref([ // 日老化率 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '闸门时间单位', value: 'sweepWidth', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'sweepWidthUnit', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'number' }, + { text: '闸门时间单位', value: 'gateTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 @@ -167,6 +167,35 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { + const params = { + thoroughfare: '', // 通道 + testedSignalFrequency: '', // 被测信号频率 + testedSignalFrequencyUnit: 'MHz', // 被测信号频率单位 + urel: '', // 不确定度U(k=2) + amplitudeTechnicalIndexUnit: '', // 幅度技术指标单位 + amplitudeTechnicalIndexLower: '', // 幅度技术指标下限 + amplitudeTechnicalIndexUpper: '', // 幅度技术指标上限 + technicalIndex: '', // 上升时间技术指标 + technicalIndexSymbol: '±', // 上升时间技术指标符号 + technicalIndexUnit: '', // 上升时间技术指标单位 + pulseWidthTechnicalIndexLower: '', // 脉冲宽度技术指标下限 + pulseWidthTechnicalIndexUnit: '', // 脉冲宽度技术指标单位 + pulseWidthTechnicalIndexUpper: '', // 脉冲宽度技术指标上限 + sampleTime: '', // 取样时间 + sampleTimeUnit: '', // 取样时间单位 + sampleGroupNumber: '', // 采样组数 + gateTime: '', // 闸门时间 + gateTimeUnit: '', // 闸门时间单位 + multiplyFrequency: '', // 倍增次数 + onTime: '', // 开机时间 + onTimeUnit: '', // 开机时间单位 + tOne: '', + tTwo: '', + tThree: '', + tOneUnit: '', + tTwoUnit: '', + tThreeUnit: '', + } switch (title) { case '频率信号输出幅度': // 频率信号输出幅度 frequencySignalOutputAmplitudelList.value.length @@ -174,7 +203,58 @@ : frequencySignalOutputAmplitudelList.value.push({ dataType: '1', params: '频率信号输出幅度', - unit: '', // 标称值单位 + ...params, + editable: true, + } as any) + break + case '秒脉冲输出': // 秒脉冲输出 + secondPulseOutputList.value.length + ? secondPulseOutputList.value.push(JSON.parse(JSON.stringify(secondPulseOutputList.value[secondPulseOutputList.value.length - 1]))) + : secondPulseOutputList.value.push({ + dataType: '2', + params: '秒脉冲输出', + ...params, + editable: true, + } as any) + break + case '频率稳定度': // 频率稳定度 + frequencyStabilityList.value.length + ? frequencyStabilityList.value.push(JSON.parse(JSON.stringify(frequencyStabilityList.value[frequencyStabilityList.value.length - 1]))) + : frequencyStabilityList.value.push({ + dataType: '3', + params: '频率稳定度', + ...params, + editable: true, + } as any) + break + case '相对频率偏差': // 相对频率偏差 + relativeFrequencyDeviationList.value.length + ? relativeFrequencyDeviationList.value.push(JSON.parse(JSON.stringify(relativeFrequencyDeviationList.value[relativeFrequencyDeviationList.value.length - 1]))) + : relativeFrequencyDeviationList.value.push({ + dataType: '4', + params: '相对频率偏差', + ...params, + editable: true, + } as any) + break + case '频率复现性': // 频率复现性 + frequencyReproducibilityList.value.length + ? frequencyReproducibilityList.value.push(JSON.parse(JSON.stringify(frequencyReproducibilityList.value[frequencyReproducibilityList.value.length - 1]))) + : frequencyReproducibilityList.value.push({ + dataType: '5', + params: '频率复现性', + ...params, + editable: true, + } as any) + break + case '日老化率': // 日老化率 + dailyAgingRateList.value.length + ? dailyAgingRateList.value.push(JSON.parse(JSON.stringify(dailyAgingRateList.value[dailyAgingRateList.value.length - 1]))) + : dailyAgingRateList.value.push({ + dataType: '6', + params: '日老化率', + ...params, + sampleGroupNumber: '15', editable: true, } as any) break @@ -253,10 +333,52 @@ switch (item.dataType) { case '1': // 频率信号输出幅度 - frequencySignalOutputAmplitudelList.value.push({ ...item, params: '频率信号输出幅度' }) + frequencySignalOutputAmplitudelList.value.push({ ...item, params: '频率信号输出幅度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '2': + // 秒脉冲输出 + secondPulseOutputList.value.push({ ...item, params: '秒脉冲输出', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '3': + // 频率稳定度 + frequencyStabilityList.value.push({ ...item, params: '频率稳定度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '4': + // 相对频率偏差 + relativeFrequencyDeviationList.value.push({ ...item, params: '相对频率偏差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '5': + // 频率复现性 + frequencyReproducibilityList.value.push({ ...item, params: '频率复现性', technicalIndex: clearSymbol(item.technicalIndex) }) + console.log(frequencyReproducibilityList.value, 'frequencyReproducibilityList.value') + break + case '6': + // 日老化率 + dailyAgingRateList.value.push({ ...item, params: '日老化率', technicalIndex: clearSymbol(item.technicalIndex) }) break } }) + + if (props.pageType !== 'detail') { + if (newVal.every((item: { dataType: string }) => item.dataType !== '4')) { + addRow([], '相对频率偏差', '4') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '5')) { + addRow([], '频率复现性', '5') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '6')) { + addRow([], '日老化率', '6') + } + } + } + else { + if (props.pageType !== 'detail') { + setTimeout(() => { + addRow([], '相对频率偏差', '4') + addRow([], '频率复现性', '5') + addRow([], '日老化率', '6') + }) + } } }) const getList = () => { @@ -269,7 +391,6 @@ } return result } -defineExpose({ list, checkAllList, form, getList }) // 表格下拉框等内容是否禁用 const disabled = ({ scope, column }, fun) => { fun(props.pageType === 'detail') @@ -290,25 +411,57 @@ // 获取字典 const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位 +const thoroughfare = ref<{ value: string;name: string;id: string }[]>([]) // 通道 +const testedSignalFrequency = ref<{ value: string;name: string;id: string }[]>([]) // 被测信号频率 +const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位 +const timeList = ref<{ value: string;name: string;id: string }[]>([]) // 时间 +const standardTechnicalIndexSymbol = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号 + +// const fetchDict = async () => { // 标称值单位 const res1 = await getDictByCode('bizFirstStandardFrequencyUnit') nominalValueUnit.value = res1.data + // 通道 + const res2 = await getDictByCode('cesiumAtomThoroughfare') + thoroughfare.value = res2.data + // 被测信号频率 + const res3 = await getDictByCode('cesiumAtomTestedSignalFrequency') + testedSignalFrequency.value = res3.data + // 电压单位 + const res4 = await getDictByCode('standardVoltage') + standardVoltage.value = res4.data + // 时间 + const res5 = await getDictByCode('standardTimeUnit') + timeList.value = res5.data + // 技术指标符号 + const res6 = await getDictByCode('standardTechnicalIndexSymbol') + standardTechnicalIndexSymbol.value = res6.data + tableDict.value = { - 标称值单位: nominalValueUnit.value, + '标称值单位': nominalValueUnit.value, + '通道': thoroughfare.value, + '被测信号频率': testedSignalFrequency.value, + '取样时间单位': timeList.value, + '闸门时间单位': timeList.value, + '开机时间单位': timeList.value, + 'T1/T3单位': timeList.value, + 'T2单位': timeList.value, } } fetchDict() // 自定义下拉框内容 -const customSelect = (data: any, fun: any) => { - if (data.title === '参考电平' && data.text === '标称值单位') { - fun(amplitudeUnit.value) - } - else { - fun(tableDict.value[data.text]) - } -} +// const customSelect = (data: any, fun: any) => { +// if (data.title === '参考电平' && data.text === '标称值单位') { +// fun(amplitudeUnit.value) +// } +// else { +// fun(tableDict.value[data.text]) +// } +// } + +defineExpose({ list, checkAllList, form, getList }) + + @@ -348,6 +527,75 @@ 秒脉冲输出 + @@ -364,6 +612,28 @@ 频率稳定度 + + @@ -380,6 +650,28 @@ 相对频率偏差 + + @@ -396,6 +688,23 @@ 频率复现性 + @@ -412,5 +721,27 @@ 日老化率 + + diff --git a/src/views/business/measure/item/components/fourteen/components/universalCounter.vue b/src/views/business/measure/item/components/fourteen/components/universalCounter.vue index 722c62a..f82d255 100644 --- a/src/views/business/measure/item/components/fourteen/components/universalCounter.vue +++ b/src/views/business/measure/item/components/fourteen/components/universalCounter.vue @@ -115,101 +115,124 @@ '9-周期测量误差': form.value.periodicMeasureError, '10-时间间隔测量范围及测量误差': form.value.timeIntervalMeasureRange, } + if (props.itemCategoryName === '通用计数器') { + delete chekedDict['6-频率测量范围、输入灵敏度及最大输入电平'] + } + else { + delete chekedDict['6-频率测量范围、输入灵敏度'] + } }, { deep: true, }) // ----------------------------------------表头------------------------------------------------ const columns_crystal_oscillator_startup_character = ref([ // 晶振开机特性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '组数', value: 'sweepWidth', align: 'center', required: true, type: 'number' }, - { text: '测量间隔', value: 'sweepWidthUnit', align: 'center', required: true, type: 'number' }, - { text: '测量间隔单位', value: 'horizontalResolution', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '组数', value: 'groupNumber', align: 'center', required: true, type: 'number' }, + { text: '测量间隔', value: 'measureInterval', align: 'center', required: true, type: 'number' }, + { text: '测量间隔单位', value: 'measureIntervalUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_stability = ref([ // 晶振1s频率稳定度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '组数', value: 'sweepWidth', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度uc', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '组数', value: 'groupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度uc', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_deviation = ref([ // 晶振相对频率偏差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_reproducibility = ref([ // 晶振频率复现性 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '倍增次数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: 'T1/T3单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: 'T2', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: 'T2单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '倍增次数', value: 'multiplyFrequency', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3', value: 'tOne', align: 'center', required: true, type: 'number' }, + { text: 'T1/T3单位', value: 'tOneUnit', align: 'center', required: true, type: 'select' }, + { text: 'T2', value: 'tTwo', align: 'center', required: true, type: 'number' }, + { text: 'T2单位', value: 'tTwoUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_crystal_oscillator_dailyAging_rate = ref([ // 晶振日老化率 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '被测信号频率', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '取样时间', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '取样时间单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '采样组数', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'resolutionBandwidth', align: 'center', required: true, type: 'number' }, + { text: '被测信号频率', value: 'testedSignalFrequency', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '取样时间', value: 'sampleTime', align: 'center', required: true, type: 'number' }, + { text: '取样时间单位', value: 'sampleTimeUnit', align: 'center', required: true, type: 'select' }, + { text: '采样组数', value: 'sampleGroupNumber', align: 'center', required: true, type: 'number' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) -const columns_frequency_measure_range = ref([ // 频率测量范围、输入灵敏度 - { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, - { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '信号源输出幅度', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '信号源输出幅度单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '输入灵敏度技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, -]) +const columns_frequency_measure_range = ref( // 频率测量范围、输入灵敏度 + props.itemCategoryName === '通用计数器' + ? [ + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitude', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'select' }, + { text: '输入灵敏度技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, + ] + : [ + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, + { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitude', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源最大输入电平', value: 'signalSourceMaxInputLevel', align: 'center', required: true, type: 'number' }, + { text: '信号源最大输入电平单位', value: 'signalSourceMaxInputLevelUnit', align: 'center', required: true, type: 'select' }, + { text: '输入灵敏度技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '最大输入电平技术指标', value: 'otherTechnicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, + ]) + const columns_frequency_measure_error = ref([ // 频率测量误差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_periodic_measure_range = ref([ // 周期测量范围、输入灵敏度 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '信号源输出幅度', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '信号源输出幅度单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '输入灵敏度技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitude', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'select' }, + { text: '输入灵敏度技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_periodic_measure_error = ref([ // 周期测量误差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, - { text: '通道', value: 'nominalValue', align: 'center', required: true, type: 'select' }, + { text: '通道', value: 'thoroughfare', align: 'center', required: true, type: 'select' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '闸门时间', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '信号源输出幅度', value: 'unit', align: 'center', required: true, type: 'number' }, - { text: '信号源输出幅度单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '闸门时间', value: 'gateTime', align: 'center', required: true, type: 'select' }, + { text: '信号源输出幅度', value: 'signalSourceOutputAmplitudeUnit', align: 'center', required: true, type: 'number' }, + { text: '信号源输出幅度单位', value: 'signalSourceMaxInputLevelUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) const columns_time_interval_measure_range = ref([ // 时间间隔测量范围及测量误差 { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, - { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '技术指标', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, - { text: '不确定度U(k=2)', value: 'horizontalResolutionUnit', align: 'center', required: true, type: 'number' }, + { text: '标称值单位', value: 'nominalValueUnit', align: 'center', required: true, type: 'select' }, + { text: '技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, + { text: '不确定度U(k=2)', value: 'urel', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 @@ -235,14 +258,147 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { + const params = { + gateTime: '10s', // 闸门时间 + multiplyFrequency: '', // 倍增次数 + groupNumber: '', // 组数 + measureInterval: '', // 测量间隔 + measureIntervalUnit: '', // 测量间隔单位 + technicalIndex: '', // 上升时间技术指标 + technicalIndexSymbol: '±', // 上升时间技术指标符号 + urel: '', // 不确定度U(k=2) + tOne: '1', + tOneUnit: '', + tTwo: '24', + tTwoUnit: '', + tThree: '', + tThreeUnit: '', + sampleGroupNumber: '', // 采样组数 + sampleTime: '', // 取样时间 + sampleTimeUnit: '', // 取样时间单位 + testedSignalFrequency: '', // 被测信号频率 + testedSignalFrequencyUnit: 'MHz', // 被测信号频率单位 + nominalValue: '', + unit: '', + signalSourceOutputAmplitude: '', + signalSourceOutputAmplitudeUnit: '', + signalSourceMaxInputLevel: '', + signalSourceMaxInputLevelUnit: '', + otherTechnicalIndex: '', + otherTechnicalIndexSymbol: '±', + } switch (title) { case '晶振开机特性': // 晶振开机特性 - frequencyList.value.length - ? frequencyList.value.push(JSON.parse(JSON.stringify(frequencyList.value[frequencyList.value.length - 1]))) - : frequencyList.value.push({ + crystalOscillatorStartupCharacterList.value.length + ? crystalOscillatorStartupCharacterList.value.push(JSON.parse(JSON.stringify(crystalOscillatorStartupCharacterList.value[crystalOscillatorStartupCharacterList.value.length - 1]))) + : crystalOscillatorStartupCharacterList.value.push({ dataType: '1', - params: '频率显示', - unit: '', // 标称值单位 + params: '晶振开机特性', + ...params, + groupNumber: '8', + editable: true, + } as any) + break + case '晶振1s频率稳定度': // 晶振1s频率稳定度 + crystalOscillatorStabilityList.value.length + ? crystalOscillatorStabilityList.value.push(JSON.parse(JSON.stringify(crystalOscillatorStabilityList.value[crystalOscillatorStabilityList.value.length - 1]))) + : crystalOscillatorStabilityList.value.push({ + dataType: '2', + params: '晶振1s频率稳定度', + ...params, + groupNumber: '101', + editable: true, + } as any) + break + case '晶振相对频率偏差': // 晶振相对频率偏差 + crystalOscillatorDeviationList.value.length + ? crystalOscillatorDeviationList.value.push(JSON.parse(JSON.stringify(crystalOscillatorDeviationList.value[crystalOscillatorDeviationList.value.length - 1]))) + : crystalOscillatorDeviationList.value.push({ + dataType: '3', + params: '晶振相对频率偏差', + ...params, + editable: true, + } as any) + break + case '晶振频率复现性': // 晶振频率复现性 + crystalOscillatorReproducibilityList.value.length + ? crystalOscillatorReproducibilityList.value.push(JSON.parse(JSON.stringify(crystalOscillatorReproducibilityList.value[crystalOscillatorReproducibilityList.value.length - 1]))) + : crystalOscillatorReproducibilityList.value.push({ + dataType: '4', + params: '晶振频率复现性', + ...params, + editable: true, + } as any) + break + case '晶振日老化率': // 晶振日老化率 + crystalOscillatorDailyAgingRateList.value.length + ? crystalOscillatorDailyAgingRateList.value.push(JSON.parse(JSON.stringify(crystalOscillatorDailyAgingRateList.value[crystalOscillatorDailyAgingRateList.value.length - 1]))) + : crystalOscillatorDailyAgingRateList.value.push({ + dataType: '5', + params: '晶振日老化率', + ...params, + sampleTime: '12', + sampleGroupNumber: '15', + editable: true, + } as any) + break + case '频率测量范围、输入灵敏度': // 频率测量范围、输入灵敏度 + frequencyMeasureRangeList.value.length + ? frequencyMeasureRangeList.value.push(JSON.parse(JSON.stringify(frequencyMeasureRangeList.value[frequencyMeasureRangeList.value.length - 1]))) + : frequencyMeasureRangeList.value.push({ + dataType: '6', + params: '频率测量范围、输入灵敏度', + ...params, + editable: true, + } as any) + break + case '频率测量范围、输入灵敏度及最大输入电平': // 频率测量范围、输入灵敏度及最大输入电平 + frequencyMeasureRangeList.value.length + ? frequencyMeasureRangeList.value.push(JSON.parse(JSON.stringify(frequencyMeasureRangeList.value[frequencyMeasureRangeList.value.length - 1]))) + : frequencyMeasureRangeList.value.push({ + dataType: '6', + params: '频率测量范围、输入灵敏度及最大输入电平', + ...params, + editable: true, + } as any) + break + case '频率测量误差': // 频率测量误差 + frequencyMeasureErrorList.value.length + ? frequencyMeasureErrorList.value.push(JSON.parse(JSON.stringify(frequencyMeasureErrorList.value[frequencyMeasureErrorList.value.length - 1]))) + : frequencyMeasureErrorList.value.push({ + dataType: '7', + params: '频率测量误差', + ...params, + editable: true, + } as any) + break + case '周期测量范围、输入灵敏度': // 周期测量范围、输入灵敏度 + periodicMeasureRangeList.value.length + ? periodicMeasureRangeList.value.push(JSON.parse(JSON.stringify(periodicMeasureRangeList.value[periodicMeasureRangeList.value.length - 1]))) + : periodicMeasureRangeList.value.push({ + dataType: '8', + params: '周期测量范围、输入灵敏度', + ...params, + editable: true, + } as any) + break + case '周期测量误差': // 周期测量误差 + periodicMeasureErrorList.value.length + ? periodicMeasureErrorList.value.push(JSON.parse(JSON.stringify(periodicMeasureErrorList.value[periodicMeasureErrorList.value.length - 1]))) + : periodicMeasureErrorList.value.push({ + dataType: '9', + params: '周期测量误差', + ...params, + editable: true, + } as any) + break + case '时间间隔测量范围及测量误差': // 时间间隔测量范围及测量误差 + timeIntervalMeasureRangeList.value.length + ? timeIntervalMeasureRangeList.value.push(JSON.parse(JSON.stringify(timeIntervalMeasureRangeList.value[timeIntervalMeasureRangeList.value.length - 1]))) + : timeIntervalMeasureRangeList.value.push({ + dataType: '10', + params: '时间间隔测量范围及测量误差', + ...params, editable: true, } as any) break @@ -337,10 +493,80 @@ switch (item.dataType) { case '1': // 晶振开机特性 - crystalOscillatorStartupCharacterList.value.push({ ...item, params: '晶振开机特性' }) + crystalOscillatorStartupCharacterList.value.push({ ...item, params: '晶振开机特性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '2': + // 晶振1s频率稳定度 + crystalOscillatorStabilityList.value.push({ ...item, params: '晶振1s频率稳定度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '3': + // 晶振相对频率偏差 + crystalOscillatorDeviationList.value.push({ ...item, params: '晶振相对频率偏差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '4': + // 晶振频率复现性 + crystalOscillatorReproducibilityList.value.push({ ...item, params: '晶振频率复现性', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '5': + // 晶振日老化率 + crystalOscillatorDailyAgingRateList.value.push({ ...item, params: '晶振日老化率', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '6': + if (props.itemCategoryName === '通用计数器') { + // 频率测量范围、输入灵敏度 + frequencyMeasureRangeList.value.push({ ...item, params: '频率测量范围、输入灵敏度', technicalIndex: clearSymbol(item.technicalIndex) }) + } + else { + // 频率测量范围、输入灵敏度及最大输入电平 + frequencyMeasureRangeList.value.push({ ...item, params: '频率测量范围、输入灵敏度及最大输入电平', technicalIndex: clearSymbol(item.technicalIndex) }) + } + break + case '7': + // 频率测量误差 + frequencyMeasureErrorList.value.push({ ...item, params: '频率测量误差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '8': + // 周期测量范围、输入灵敏度 + periodicMeasureRangeList.value.push({ ...item, params: '周期测量范围、输入灵敏度', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '9': + // 周期测量误差 + periodicMeasureErrorList.value.push({ ...item, params: '周期测量误差', technicalIndex: clearSymbol(item.technicalIndex) }) + break + case '10': + // 时间间隔测量范围及测量误差 + timeIntervalMeasureRangeList.value.push({ ...item, params: '时间间隔测量范围及测量误差', technicalIndex: clearSymbol(item.technicalIndex) }) break } }) + if (props.pageType !== 'detail') { + if (newVal.every((item: { dataType: string }) => item.dataType !== '1')) { + addRow([], '晶振开机特性', '1') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '2')) { + addRow([], '晶振1s频率稳定度', '2') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '3')) { + addRow([], '晶振相对频率偏差', '3') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '4')) { + addRow([], '晶振频率复现性', '4') + } + else if (newVal.every((item: { dataType: string }) => item.dataType !== '5')) { + addRow([], '晶振日老化率', '5') + } + } + } + else { + if (props.pageType !== 'detail') { + setTimeout(() => { + addRow([], '晶振开机特性', '1') + addRow([], '晶振1s频率稳定度', '2') + addRow([], '晶振相对频率偏差', '3') + addRow([], '晶振频率复现性', '4') + addRow([], '晶振日老化率', '5') + }) + } } }) const getList = () => { @@ -373,21 +599,55 @@ } // 获取字典 +const gateTimeValue = ref<{ value: string;name: string;id: string }[]>([]) // 闸门时间 +const timeList = ref<{ value: string;name: string;id: string }[]>([]) // 时间 +const standardTechnicalIndexSymbol = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号 +const testedSignalFrequency = ref<{ value: string;name: string;id: string }[]>([]) // 被测信号频率 const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位 +const standardAmplitudeUnit = ref<{ value: string;name: string;id: string }[]>([]) // 信号源输出幅度 +const thoroughfare = ref<{ value: string;name: string;id: string }[]>([]) // 通道 const fetchDict = async () => { // 标称值单位 - const res1 = await getDictByCode('bizFirstStandardFrequencyUnit') - nominalValueUnit.value = res1.data + const res1 = await getDictByCode('gateTimeValue') + gateTimeValue.value = res1.data + // 时间 + const res2 = await getDictByCode('standardTimeUnit') + timeList.value = res2.data + // 技术指标符号 + const res3 = await getDictByCode('standardTechnicalIndexSymbol') + standardTechnicalIndexSymbol.value = res3.data + // 被测信号频率 + const res4 = await getDictByCode('cesiumAtomTestedSignalFrequency') + testedSignalFrequency.value = res4.data + // 标称值单位 + const res5 = await getDictByCode('bizFirstStandardFrequencyUnit') + nominalValueUnit.value = res5.data + // 信号源输出幅度 + const res6 = await getDictByCode('standardAmplitudeUnit') + standardAmplitudeUnit.value = res6.data + // 通道 + const res7 = await getDictByCode('cesiumAtomThoroughfare') + thoroughfare.value = res7.data + tableDict.value = { - 标称值单位: nominalValueUnit.value, + '闸门时间': gateTimeValue.value, + '取样时间单位': gateTimeValue.value, + '测量间隔单位': timeList.value, + 'T1/T3单位': timeList.value, + 'T2单位': timeList.value, + '被测信号频率': testedSignalFrequency.value, + '标称值单位': nominalValueUnit.value, + '信号源输出幅度单位': standardAmplitudeUnit.value, + '信号源最大输入电平单位': standardAmplitudeUnit.value, + '通道': thoroughfare.value, } } fetchDict() // 自定义下拉框内容 const customSelect = (data: any, fun: any) => { - if (data.title === '参考电平' && data.text === '标称值单位') { - fun(amplitudeUnit.value) + if ((data.title === '时间间隔测量范围及测量误差' || data.title === '周期测量误差' || data.title === '周期测量范围、输入灵敏度') && data.text === '标称值单位') { + fun(timeList.value) } else { fun(tableDict.value[data.text]) @@ -416,6 +676,23 @@ 晶振开机特性 + @@ -432,6 +709,23 @@ 晶振1s频率稳定度 + @@ -448,6 +742,23 @@ 晶振相对频率偏差 + @@ -464,6 +775,23 @@ 晶振频率复现性 + @@ -480,6 +808,28 @@ 晶振日老化率 + + + @@ -511,6 +893,23 @@ 频率测量误差 + @@ -518,9 +917,11 @@ v-if="props.itemCategoryName === '通用计数器'" :data="periodicMeasureRangeList" :columns="columns_periodic_measure_range" :page-type="pageType" title="周期测量范围、输入灵敏度" index="8" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" + :custom-select="true" @disabled="disabled" @add-row="addRow" @del-row="delRow" + @customSelect="customSelect" @change-load-situationa="changeLoadSituationa" > + @@ -535,9 +953,11 @@ v-if="props.itemCategoryName === '通用计数器'" :data="periodicMeasureErrorList" :columns="columns_periodic_measure_error" :page-type="pageType" title="周期测量误差" index="9" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" + :custom-select="true" @disabled="disabled" @add-row="addRow" @del-row="delRow" + @customSelect="customSelect" @change-load-situationa="changeLoadSituationa" > + @@ -552,9 +989,11 @@ v-if="props.itemCategoryName === '通用计数器'" :data="timeIntervalMeasureRangeList" :columns="columns_time_interval_measure_range" :page-type="pageType" title="时间间隔测量范围及测量误差" index="10" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" + :custom-select="true" @disabled="disabled" @add-row="addRow" @del-row="delRow" + @customSelect="customSelect" @change-load-situationa="changeLoadSituationa" > + diff --git a/src/views/business/measure/item/components/fourteen/templateDetail.vue b/src/views/business/measure/item/components/fourteen/templateDetail.vue index aca52fd..85d2f9e 100644 --- a/src/views/business/measure/item/components/fourteen/templateDetail.vue +++ b/src/views/business/measure/item/components/fourteen/templateDetail.vue @@ -29,11 +29,19 @@ }) // 组件实例 const standardRef = ref() -const form = standardRef.value?.form -const list = standardRef.value?.list -const checkAllList = standardRef.value?.checkAllList -const getList = standardRef.value?.getList -defineExpose({ list, checkAllList, form, getList }) +// const form = standardRef.value.form +// const list = standardRef.value.getList() +// const checkAllList = standardRef.value.checkAllList +// const getList = standardRef.value.getList +const getInfo = () => { + return { + form: standardRef.value.form, + list: standardRef.value.getList(), + checkAllList: standardRef.value.checkAllList, + getList: standardRef.value.getList, + } +} +defineExpose({ getInfo })