diff --git a/src/views/business/measure/item/components/second/templateDetail.vue b/src/views/business/measure/item/components/second/templateDetail.vue index 0afb7ce..01df84b 100644 --- a/src/views/business/measure/item/components/second/templateDetail.vue +++ b/src/views/business/measure/item/components/second/templateDetail.vue @@ -122,25 +122,25 @@ { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, { text: '调压器输出值', value: 'voltageRegulatorOutputValue', align: 'center', required: true, type: 'select' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'input' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, ]) const columns_load_regulation = ref([ // 负载调整率 { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, { text: '负载情况', value: 'loadSituation', align: 'center', required: true, type: 'select' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'input' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, ]) // 电压表示值误差(数字式)、电流表示值误差(直接测量)--(数字式) const columns_voltage_representation_value_error_number = ref([ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'input' }, - { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, - { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'input', reg: (resolution: string | number) => { return Number(resolution) < 1 } }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'number' }, + { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, + { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'number', reg: (resolution: string | number) => { return Number(resolution) < 1 } }, ]) // 电压表示值误差(数字式) const columns_voltage_representation = ref(columns_voltage_representation_value_error_number.value) @@ -151,23 +151,23 @@ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'input' }, - { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'number' }, + { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, ]) // 电流表示值误差(间接测量)--数字式 const columns_ammeter_indirect_number = ref([ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'input' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'number' }, { text: '标准电阻值单位', value: 'standardResistanceValueUnit', align: 'center', required: true, type: 'select' }, - { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'input' }, - { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, - { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'input' }, + { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'number' }, + { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, + { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'number' }, ]) // 电流表示值误差(间接测量) const columns_ammeter_indirect = ref(columns_ammeter_indirect_number.value) @@ -176,12 +176,12 @@ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'input' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'number' }, { text: '标准电阻值单位', value: 'standardResistanceValueUnit', align: 'center', required: true, type: 'select' }, - { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'input' }, - { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, + { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'number' }, + { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, ]) // 纹波电压 const columns_ripple_voltage = ref([ @@ -195,7 +195,7 @@ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '仪器技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'input' }, + { text: '仪器技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 多选 @@ -293,7 +293,7 @@ case '电压示值误差': // 电压表示值误差 // 1数字式、2指针式 if (voltageRepresentationValueErrorList.value.length) { - voltageRepresentationValueErrorList.value.push(voltageRepresentationValueErrorList.value[voltageRepresentationValueErrorList.value.length - 1]) + voltageRepresentationValueErrorList.value.push(JSON.parse(JSON.stringify(voltageRepresentationValueErrorList.value[voltageRepresentationValueErrorList.value.length - 1]))) break } data = { @@ -330,7 +330,7 @@ break case '电流示值误差(直接测量)': // 电流表示值误差(直接测量) if (ammeterDirectList.value.length) { - ammeterDirectList.value.push(ammeterDirectList.value[ammeterDirectList.value.length - 1]) + ammeterDirectList.value.push(JSON.parse(JSON.stringify(ammeterDirectList.value[ammeterDirectList.value.length - 1]))) break } data = { @@ -367,7 +367,7 @@ break case '电流示值误差(间接测量)': // 电流表示值误差(间接测量) if (ammeterIndirectList.value.length) { - ammeterIndirectList.value.push(ammeterIndirectList.value[ammeterIndirectList.value.length - 1]) + ammeterIndirectList.value.push(JSON.parse(JSON.stringify(ammeterIndirectList.value[ammeterIndirectList.value.length - 1]))) break } data = { @@ -407,7 +407,7 @@ break case '纹波电压': // 纹波电压 if (rippleVoltageList.value.length) { - rippleVoltageList.value.push(rippleVoltageList.value[rippleVoltageList.value.length - 1]) + rippleVoltageList.value.push(JSON.parse(JSON.stringify(rippleVoltageList.value[rippleVoltageList.value.length - 1]))) break } data = { @@ -431,7 +431,7 @@ unit: '', // 单位 editable: true, } - outputVoltageStabilityList.value.length ? outputVoltageStabilityList.value.push(outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1]) : outputVoltageStabilityList.value.push(data) + outputVoltageStabilityList.value.length ? outputVoltageStabilityList.value.push(JSON.parse(JSON.stringify(outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1]))) : outputVoltageStabilityList.value.push(data) break } } diff --git a/src/views/business/measure/item/components/second/templateDetail.vue b/src/views/business/measure/item/components/second/templateDetail.vue index 0afb7ce..01df84b 100644 --- a/src/views/business/measure/item/components/second/templateDetail.vue +++ b/src/views/business/measure/item/components/second/templateDetail.vue @@ -122,25 +122,25 @@ { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, { text: '调压器输出值', value: 'voltageRegulatorOutputValue', align: 'center', required: true, type: 'select' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'input' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, ]) const columns_load_regulation = ref([ // 负载调整率 { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, { text: '负载情况', value: 'loadSituation', align: 'center', required: true, type: 'select' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'input' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, ]) // 电压表示值误差(数字式)、电流表示值误差(直接测量)--(数字式) const columns_voltage_representation_value_error_number = ref([ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'input' }, - { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, - { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'input', reg: (resolution: string | number) => { return Number(resolution) < 1 } }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'number' }, + { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, + { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'number', reg: (resolution: string | number) => { return Number(resolution) < 1 } }, ]) // 电压表示值误差(数字式) const columns_voltage_representation = ref(columns_voltage_representation_value_error_number.value) @@ -151,23 +151,23 @@ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'input' }, - { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'number' }, + { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, ]) // 电流表示值误差(间接测量)--数字式 const columns_ammeter_indirect_number = ref([ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'input' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'number' }, { text: '标准电阻值单位', value: 'standardResistanceValueUnit', align: 'center', required: true, type: 'select' }, - { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'input' }, - { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, - { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'input' }, + { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'number' }, + { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, + { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'number' }, ]) // 电流表示值误差(间接测量) const columns_ammeter_indirect = ref(columns_ammeter_indirect_number.value) @@ -176,12 +176,12 @@ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'input' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'number' }, { text: '标准电阻值单位', value: 'standardResistanceValueUnit', align: 'center', required: true, type: 'select' }, - { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'input' }, - { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, + { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'number' }, + { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, ]) // 纹波电压 const columns_ripple_voltage = ref([ @@ -195,7 +195,7 @@ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '仪器技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'input' }, + { text: '仪器技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 多选 @@ -293,7 +293,7 @@ case '电压示值误差': // 电压表示值误差 // 1数字式、2指针式 if (voltageRepresentationValueErrorList.value.length) { - voltageRepresentationValueErrorList.value.push(voltageRepresentationValueErrorList.value[voltageRepresentationValueErrorList.value.length - 1]) + voltageRepresentationValueErrorList.value.push(JSON.parse(JSON.stringify(voltageRepresentationValueErrorList.value[voltageRepresentationValueErrorList.value.length - 1]))) break } data = { @@ -330,7 +330,7 @@ break case '电流示值误差(直接测量)': // 电流表示值误差(直接测量) if (ammeterDirectList.value.length) { - ammeterDirectList.value.push(ammeterDirectList.value[ammeterDirectList.value.length - 1]) + ammeterDirectList.value.push(JSON.parse(JSON.stringify(ammeterDirectList.value[ammeterDirectList.value.length - 1]))) break } data = { @@ -367,7 +367,7 @@ break case '电流示值误差(间接测量)': // 电流表示值误差(间接测量) if (ammeterIndirectList.value.length) { - ammeterIndirectList.value.push(ammeterIndirectList.value[ammeterIndirectList.value.length - 1]) + ammeterIndirectList.value.push(JSON.parse(JSON.stringify(ammeterIndirectList.value[ammeterIndirectList.value.length - 1]))) break } data = { @@ -407,7 +407,7 @@ break case '纹波电压': // 纹波电压 if (rippleVoltageList.value.length) { - rippleVoltageList.value.push(rippleVoltageList.value[rippleVoltageList.value.length - 1]) + rippleVoltageList.value.push(JSON.parse(JSON.stringify(rippleVoltageList.value[rippleVoltageList.value.length - 1]))) break } data = { @@ -431,7 +431,7 @@ unit: '', // 单位 editable: true, } - outputVoltageStabilityList.value.length ? outputVoltageStabilityList.value.push(outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1]) : outputVoltageStabilityList.value.push(data) + outputVoltageStabilityList.value.length ? outputVoltageStabilityList.value.push(JSON.parse(JSON.stringify(outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1]))) : outputVoltageStabilityList.value.push(data) break } } diff --git a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue index 75ea9c6..b6df51b 100644 --- a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue @@ -88,63 +88,64 @@ } } const columns_line_voltage_regulation = ref([ // 电源电压调整率 - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, - { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'text' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '调压器输出值', value: 'voltageRegulatorOutputValue', align: 'center', required: true, type: 'text' }, - { text: '被检电源输出电压值', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '输出通道', value: 'outputChannel', align: 'center', required: false, type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '调压器输出值', value: 'voltageRegulatorOutputValue', align: 'center', required: false, type: 'text' }, + { text: '被检电源输出电压值', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, { text: '被检电源输出电压最大差值', value: 'voltageMaxDifference', align: 'center', required: false, type: 'text' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'text' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: false, type: 'text' }, { text: '电源电压调整率', value: 'voltageRegulation', align: 'center', required: false, type: 'text' }, ]) const columns_load_regulation = ref([ // 负载调整率 - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, - { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'text' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '负载情况', value: 'loadSituation', align: 'center', required: true, type: 'text' }, - { text: '被检电源输出电压值', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '电压差值', value: 'voltageDifference', align: 'center', type: 'text' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'text' }, - { text: '负载调整率', value: 'loadRegulation', align: 'center', type: 'text' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '输出通道', value: 'outputChannel', align: 'center', required: false, type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '负载情况', value: 'loadSituation', align: 'center', required: false, type: 'text' }, + { text: '被检电源输出电压值', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, + { text: '电压差值', value: 'voltageDifference', align: 'center', required: false, type: 'text' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: false, type: 'text' }, + { text: '负载调整率', value: 'loadRegulation', align: 'center', required: false, type: 'text' }, ]) // 电压表示值误差 const columns_voltage_representation_value_error = ref([ - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, - { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'text' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '标准值', value: 'standardValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'text' }, - { text: '绝对误差', value: 'absoluteError', align: 'center', type: 'text' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '输出通道', value: 'outputChannel', align: 'center', required: false, type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, + { text: '标准值', value: 'standardValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: false, type: 'text' }, + { text: '绝对误差', value: 'absoluteError', align: 'center', required: false, type: 'text' }, ]) // 电流表示值误差(间接测量) const columns_ammeter_indirect = ref([ - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, - { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'text' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '标准电压值', value: 'standardVoltageValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '标准值', value: 'standardValue', align: 'center', type: 'text' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'text' }, - { text: '绝对误差', value: 'absoluteError', align: 'center', type: 'text' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '输出通道', value: 'outputChannel', align: 'center', required: false, type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, + { text: '标准电压值', value: 'standardVoltageValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number', width: '250' }, + { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: false, type: 'text' }, + { text: '标准值', value: 'standardValue', align: 'center', required: false, type: 'text' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: false, type: 'text' }, + { text: '绝对误差', value: 'absoluteError', align: 'center', required: false, type: 'text' }, ]) // 纹波电压 const columns_ripple_voltage = ref([ - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, - { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'text' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'text' }, - { text: '纹波电压', value: 'rippleVoltage', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '输出通道', value: 'outputChannel', align: 'center', required: false, type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: false, type: 'text' }, + { text: '纹波电压', value: 'rippleVoltage', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, ]) // 输出电压短期稳定性 const columns_output_voltage_stability = ref([ - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'select-dict', code: 'standardOutputChannel' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '被测电源输出电压', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '输出电压最大变化值', value: 'outputVoltageMaxChange', align: 'center', type: 'text' }, - { text: '仪器技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'text' }, - { text: '短期稳定性', value: 'shortTermStability', align: 'center', type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '被测电源输出电压', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, + { text: '输出电压最大变化值', value: 'outputVoltageMaxChange', align: 'center', required: false, type: 'text' }, + { text: '仪器技术指标', value: 'technicalIndex', align: 'center', required: false, type: 'text' }, + { text: '短期稳定性', value: 'shortTermStability', align: 'center', required: false, type: 'text' }, ]) const columnsDict = ref<{ [key: string]: any[] | TableColumn[] }>({ '1-电源电压调整率': columns_line_voltage_regulation.value, // 1 @@ -222,17 +223,17 @@ // 1数字式、2指针式 if (item.dataTypeType === '1') { if (item.maximumError === '2') { - return Number(item.errorParamA) * Number(item.measureIndicationValue) + Number(item.errorParamB) * Number(item.resolution) + return (Number(item.errorParamA) * Number(item.measureIndicationValue) + Number(item.errorParamB) * Number(item.resolution)) || 0 } else if (item.maximumError === '2') { - return Number(item.errorParamA) * Number(item.measureIndicationValue) + Number(item.errorParamB) + return (Number(item.errorParamA) * Number(item.measureIndicationValue) + Number(item.errorParamB)) || 0 } else if (item.maximumError === '1') { - return Number(item.accuracyA) * Number(item.fullScaleValue) + return (Number(item.accuracyA) * Number(item.fullScaleValue)) || 0 } } else if (item.dataTypeType === '2') { - return Number(item.accuracyA) * Number(item.fullScaleValue) + return (Number(item.accuracyA) * Number(item.fullScaleValue)) || 0 } } // 初始化数据 @@ -250,6 +251,7 @@ } // 初始化输入数据 function initInputData(data: any[]) { + console.log(data, '11111') initAllData() data.forEach((item) => { switch (item.dataType) { @@ -263,15 +265,15 @@ break case '3': // 电压表示值误差 - voltageRepresentationValueErrorList.value.push({ ...item, params: '电压表示值误差', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : item.maximumError }) + voltageRepresentationValueErrorList.value.push({ ...item, params: '电压表示值误差', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : Number(item.maximumError) || 0 }) break case '4': // 电流表示值误差(直接测量) - ammeterDirectList.value.push({ ...item, params: '电流表示值误差(直接测量)', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : item.maximumError }) + ammeterDirectList.value.push({ ...item, params: '电流表示值误差(直接测量)', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : Number(item.maximumError) || 0 }) break case '5': // 电流表示值误差(间接测量) - ammeterIndirectList.value.push({ ...item, params: '电流表示值误差(间接测量)', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : item.maximumError }) + ammeterIndirectList.value.push({ ...item, params: '电流表示值误差(间接测量)', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : Number(item.maximumError) || 0 }) break case '6': // 纹波电压 @@ -481,6 +483,14 @@ {{ scope.technicalIndexSymbol }} + + @@ -506,6 +524,11 @@ ± + @@ -519,6 +542,11 @@ ± + + + + diff --git a/src/views/business/measure/item/components/second/templateDetail.vue b/src/views/business/measure/item/components/second/templateDetail.vue index 0afb7ce..01df84b 100644 --- a/src/views/business/measure/item/components/second/templateDetail.vue +++ b/src/views/business/measure/item/components/second/templateDetail.vue @@ -122,25 +122,25 @@ { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, { text: '调压器输出值', value: 'voltageRegulatorOutputValue', align: 'center', required: true, type: 'select' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'input' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, ]) const columns_load_regulation = ref([ // 负载调整率 { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, { text: '负载情况', value: 'loadSituation', align: 'center', required: true, type: 'select' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'input' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, ]) // 电压表示值误差(数字式)、电流表示值误差(直接测量)--(数字式) const columns_voltage_representation_value_error_number = ref([ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'input' }, - { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, - { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'input', reg: (resolution: string | number) => { return Number(resolution) < 1 } }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'number' }, + { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, + { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'number', reg: (resolution: string | number) => { return Number(resolution) < 1 } }, ]) // 电压表示值误差(数字式) const columns_voltage_representation = ref(columns_voltage_representation_value_error_number.value) @@ -151,23 +151,23 @@ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'input' }, - { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'number' }, + { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, ]) // 电流表示值误差(间接测量)--数字式 const columns_ammeter_indirect_number = ref([ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'input' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'number' }, { text: '标准电阻值单位', value: 'standardResistanceValueUnit', align: 'center', required: true, type: 'select' }, - { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'input' }, - { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, - { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'input' }, + { text: '误差参数a', value: 'errorParamA', align: 'center', required: true, type: 'number' }, + { text: '误差参数b', value: 'errorParamB', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, + { text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'number' }, ]) // 电流表示值误差(间接测量) const columns_ammeter_indirect = ref(columns_ammeter_indirect_number.value) @@ -176,12 +176,12 @@ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'input' }, - { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'input' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: 'number' }, + { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: true, type: 'number' }, { text: '标准电阻值单位', value: 'standardResistanceValueUnit', align: 'center', required: true, type: 'select' }, - { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'input' }, - { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value' }, + { text: '准确度a', value: 'accuracyA', align: 'center', required: true, type: 'number' }, + { text: '指针式仪表满量程值', value: 'fullScaleValue', align: 'center', required: true, type: 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'select', bind: 'value', width: '300' }, ]) // 纹波电压 const columns_ripple_voltage = ref([ @@ -195,7 +195,7 @@ { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'select-dict', code: 'standardOutputChannel' }, { text: '单位', value: 'unit', align: 'center', required: true, type: 'select' }, - { text: '仪器技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'input' }, + { text: '仪器技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'number' }, ]) // --------------------------------表格操作--------------------------------------------------- // 多选 @@ -293,7 +293,7 @@ case '电压示值误差': // 电压表示值误差 // 1数字式、2指针式 if (voltageRepresentationValueErrorList.value.length) { - voltageRepresentationValueErrorList.value.push(voltageRepresentationValueErrorList.value[voltageRepresentationValueErrorList.value.length - 1]) + voltageRepresentationValueErrorList.value.push(JSON.parse(JSON.stringify(voltageRepresentationValueErrorList.value[voltageRepresentationValueErrorList.value.length - 1]))) break } data = { @@ -330,7 +330,7 @@ break case '电流示值误差(直接测量)': // 电流表示值误差(直接测量) if (ammeterDirectList.value.length) { - ammeterDirectList.value.push(ammeterDirectList.value[ammeterDirectList.value.length - 1]) + ammeterDirectList.value.push(JSON.parse(JSON.stringify(ammeterDirectList.value[ammeterDirectList.value.length - 1]))) break } data = { @@ -367,7 +367,7 @@ break case '电流示值误差(间接测量)': // 电流表示值误差(间接测量) if (ammeterIndirectList.value.length) { - ammeterIndirectList.value.push(ammeterIndirectList.value[ammeterIndirectList.value.length - 1]) + ammeterIndirectList.value.push(JSON.parse(JSON.stringify(ammeterIndirectList.value[ammeterIndirectList.value.length - 1]))) break } data = { @@ -407,7 +407,7 @@ break case '纹波电压': // 纹波电压 if (rippleVoltageList.value.length) { - rippleVoltageList.value.push(rippleVoltageList.value[rippleVoltageList.value.length - 1]) + rippleVoltageList.value.push(JSON.parse(JSON.stringify(rippleVoltageList.value[rippleVoltageList.value.length - 1]))) break } data = { @@ -431,7 +431,7 @@ unit: '', // 单位 editable: true, } - outputVoltageStabilityList.value.length ? outputVoltageStabilityList.value.push(outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1]) : outputVoltageStabilityList.value.push(data) + outputVoltageStabilityList.value.length ? outputVoltageStabilityList.value.push(JSON.parse(JSON.stringify(outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1]))) : outputVoltageStabilityList.value.push(data) break } } diff --git a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue index 75ea9c6..b6df51b 100644 --- a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue @@ -88,63 +88,64 @@ } } const columns_line_voltage_regulation = ref([ // 电源电压调整率 - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, - { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'text' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '调压器输出值', value: 'voltageRegulatorOutputValue', align: 'center', required: true, type: 'text' }, - { text: '被检电源输出电压值', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '输出通道', value: 'outputChannel', align: 'center', required: false, type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '调压器输出值', value: 'voltageRegulatorOutputValue', align: 'center', required: false, type: 'text' }, + { text: '被检电源输出电压值', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, { text: '被检电源输出电压最大差值', value: 'voltageMaxDifference', align: 'center', required: false, type: 'text' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'text' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: false, type: 'text' }, { text: '电源电压调整率', value: 'voltageRegulation', align: 'center', required: false, type: 'text' }, ]) const columns_load_regulation = ref([ // 负载调整率 - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, - { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'text' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '负载情况', value: 'loadSituation', align: 'center', required: true, type: 'text' }, - { text: '被检电源输出电压值', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '电压差值', value: 'voltageDifference', align: 'center', type: 'text' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'text' }, - { text: '负载调整率', value: 'loadRegulation', align: 'center', type: 'text' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '输出通道', value: 'outputChannel', align: 'center', required: false, type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '负载情况', value: 'loadSituation', align: 'center', required: false, type: 'text' }, + { text: '被检电源输出电压值', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, + { text: '电压差值', value: 'voltageDifference', align: 'center', required: false, type: 'text' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: false, type: 'text' }, + { text: '负载调整率', value: 'loadRegulation', align: 'center', required: false, type: 'text' }, ]) // 电压表示值误差 const columns_voltage_representation_value_error = ref([ - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, - { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'text' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '标准值', value: 'standardValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'text' }, - { text: '绝对误差', value: 'absoluteError', align: 'center', type: 'text' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '输出通道', value: 'outputChannel', align: 'center', required: false, type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, + { text: '标准值', value: 'standardValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: false, type: 'text' }, + { text: '绝对误差', value: 'absoluteError', align: 'center', required: false, type: 'text' }, ]) // 电流表示值误差(间接测量) const columns_ammeter_indirect = ref([ - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, - { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'text' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '标准电压值', value: 'standardVoltageValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '标准值', value: 'standardValue', align: 'center', type: 'text' }, - { text: '最大允许误差', value: 'maximumError', align: 'center', required: true, type: 'text' }, - { text: '绝对误差', value: 'absoluteError', align: 'center', type: 'text' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '输出通道', value: 'outputChannel', align: 'center', required: false, type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '被检表示值', value: 'measureIndicationValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, + { text: '标准电压值', value: 'standardVoltageValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number', width: '250' }, + { text: '标准电阻值', value: 'standardResistanceValue', align: 'center', required: false, type: 'text' }, + { text: '标准值', value: 'standardValue', align: 'center', required: false, type: 'text' }, + { text: '最大允许误差', value: 'maximumError', align: 'center', required: false, type: 'text' }, + { text: '绝对误差', value: 'absoluteError', align: 'center', required: false, type: 'text' }, ]) // 纹波电压 const columns_ripple_voltage = ref([ - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, - { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: 'text' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'text' }, - { text: '纹波电压', value: 'rippleVoltage', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, + { text: '输出通道', value: 'outputChannel', align: 'center', required: false, type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '被检电源技术指标', value: 'technicalIndex', align: 'center', required: false, type: 'text' }, + { text: '纹波电压', value: 'rippleVoltage', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, ]) // 输出电压短期稳定性 const columns_output_voltage_stability = ref([ - { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, + { text: '检定项目', value: 'params', align: 'center', required: false, type: 'text' }, { text: '输出通道', value: 'outputChannel', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'select-dict', code: 'standardOutputChannel' }, - { text: '单位', value: 'unit', align: 'center', required: true, type: 'text' }, - { text: '被测电源输出电压', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'input' }, - { text: '输出电压最大变化值', value: 'outputVoltageMaxChange', align: 'center', type: 'text' }, - { text: '仪器技术指标', value: 'technicalIndex', align: 'center', required: true, type: 'text' }, - { text: '短期稳定性', value: 'shortTermStability', align: 'center', type: 'text' }, + { text: '单位', value: 'unit', align: 'center', required: false, type: 'text' }, + { text: '被测电源输出电压', value: 'voltageOutputValue', align: 'center', required: true, type: pageType.value === 'detail' ? 'text' : 'number' }, + { text: '输出电压最大变化值', value: 'outputVoltageMaxChange', align: 'center', required: false, type: 'text' }, + { text: '仪器技术指标', value: 'technicalIndex', align: 'center', required: false, type: 'text' }, + { text: '短期稳定性', value: 'shortTermStability', align: 'center', required: false, type: 'text' }, ]) const columnsDict = ref<{ [key: string]: any[] | TableColumn[] }>({ '1-电源电压调整率': columns_line_voltage_regulation.value, // 1 @@ -222,17 +223,17 @@ // 1数字式、2指针式 if (item.dataTypeType === '1') { if (item.maximumError === '2') { - return Number(item.errorParamA) * Number(item.measureIndicationValue) + Number(item.errorParamB) * Number(item.resolution) + return (Number(item.errorParamA) * Number(item.measureIndicationValue) + Number(item.errorParamB) * Number(item.resolution)) || 0 } else if (item.maximumError === '2') { - return Number(item.errorParamA) * Number(item.measureIndicationValue) + Number(item.errorParamB) + return (Number(item.errorParamA) * Number(item.measureIndicationValue) + Number(item.errorParamB)) || 0 } else if (item.maximumError === '1') { - return Number(item.accuracyA) * Number(item.fullScaleValue) + return (Number(item.accuracyA) * Number(item.fullScaleValue)) || 0 } } else if (item.dataTypeType === '2') { - return Number(item.accuracyA) * Number(item.fullScaleValue) + return (Number(item.accuracyA) * Number(item.fullScaleValue)) || 0 } } // 初始化数据 @@ -250,6 +251,7 @@ } // 初始化输入数据 function initInputData(data: any[]) { + console.log(data, '11111') initAllData() data.forEach((item) => { switch (item.dataType) { @@ -263,15 +265,15 @@ break case '3': // 电压表示值误差 - voltageRepresentationValueErrorList.value.push({ ...item, params: '电压表示值误差', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : item.maximumError }) + voltageRepresentationValueErrorList.value.push({ ...item, params: '电压表示值误差', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : Number(item.maximumError) || 0 }) break case '4': // 电流表示值误差(直接测量) - ammeterDirectList.value.push({ ...item, params: '电流表示值误差(直接测量)', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : item.maximumError }) + ammeterDirectList.value.push({ ...item, params: '电流表示值误差(直接测量)', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : Number(item.maximumError) || 0 }) break case '5': // 电流表示值误差(间接测量) - ammeterIndirectList.value.push({ ...item, params: '电流表示值误差(间接测量)', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : item.maximumError }) + ammeterIndirectList.value.push({ ...item, params: '电流表示值误差(间接测量)', maximumError: !item.maximumError.includes('.') ? calcMaxError(item) : Number(item.maximumError) || 0 }) break case '6': // 纹波电压 @@ -481,6 +483,14 @@ {{ scope.technicalIndexSymbol }} + + @@ -506,6 +524,11 @@ ± + @@ -519,6 +542,11 @@ ± + + + + diff --git a/src/views/business/taskMeasure/measureData/components/sixth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/sixth/templateDetail.vue index a8a12cc..abadccc 100644 --- a/src/views/business/taskMeasure/measureData/components/sixth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/sixth/templateDetail.vue @@ -372,7 +372,7 @@ v-for="i in conclusionList" :key="i.value" :label="i.name" - :value="i.value" + :value="i.name" /> @@ -385,7 +385,7 @@ v-for="i in conclusionList" :key="i.value" :label="i.name" - :value="i.value" + :value="i.name" />