diff --git a/src/views/business/measure/item/components/second/templateDetail.vue b/src/views/business/measure/item/components/second/templateDetail.vue index d037a4c..f03be8c 100644 --- a/src/views/business/measure/item/components/second/templateDetail.vue +++ b/src/views/business/measure/item/components/second/templateDetail.vue @@ -128,7 +128,7 @@ 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: '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' }, @@ -143,7 +143,7 @@ const columns_voltage_representation_value_error_pointer = 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: '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' }, @@ -251,7 +251,7 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { - let data = {} + let data = {} as any switch (title) { case '电源电压调整率': // 电源电压调整率 data = { @@ -263,8 +263,9 @@ unit: '', // 单位 voltageRegulatorOutputValue: '', // 调压器输出值 editable: true, - } - lineVoltageRegulationList.value.push(data) + } as any + lineVoltageRegulationList.value.length ? lineVoltageRegulationList.value.push(lineVoltageRegulationList.value[lineVoltageRegulationList.value.length - 1]) : lineVoltageRegulationList.value.push(data) + break case '负载调整率': // 负载调整率 data = { @@ -282,6 +283,10 @@ break case '电压表示值误差': // 电压表示值误差 // 1数字式、2指针式 + if (voltageRepresentationValueErrorList.value.length) { + voltageRepresentationValueErrorList.value.push(voltageRepresentationValueErrorList.value[voltageRepresentationValueErrorList.value.length - 1]) + break + } data = { params: '电压表示值误差', dataType: '3', @@ -315,6 +320,10 @@ } break case '电流表示值误差(直接测量)': // 电流表示值误差(直接测量) + if (ammeterDirectList.value.length) { + ammeterDirectList.value.push(ammeterDirectList.value[ammeterDirectList.value.length - 1]) + break + } data = { params: '电流表示值误差(直接测量)', dataType: '4', @@ -348,6 +357,10 @@ } break case '电流表示值误差(间接测量)': // 电流表示值误差(间接测量) + if (ammeterIndirectList.value.length) { + ammeterIndirectList.value.push(ammeterIndirectList.value[ammeterIndirectList.value.length - 1]) + break + } data = { params: '电流表示值误差(间接测量)', dataType: '5', @@ -384,6 +397,10 @@ } break case '纹波电压': // 纹波电压 + if (rippleVoltageList.value.length) { + rippleVoltageList.value.push(rippleVoltageList.value[rippleVoltageList.value.length - 1]) + break + } data = { params: '纹波电压', dataType: '6', @@ -405,7 +422,7 @@ unit: '', // 单位 editable: true, } - outputVoltageStabilityList.value.push(data) + outputVoltageStabilityList.value.length ? outputVoltageStabilityList.value.push(outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1]) : outputVoltageStabilityList.value.push(data) break } } @@ -687,7 +704,15 @@ 负载情况: loadSituationList.value, 最大允许误差: standardMaximumError.value, 标准电阻值单位: standardResistance.value, - 测量单位: unitList1.value, + } +} +// 自定义下拉框内容 +const customSelect = (data: any, fun: any) => { + if (data.column.text === '单位') { + fun(unitList1.value) + } + else { + fun(tableDict.value[data.text]) } } // 生成最终list @@ -825,10 +850,10 @@ ([ { 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: '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' }, @@ -143,7 +143,7 @@ const columns_voltage_representation_value_error_pointer = 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: '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' }, @@ -251,7 +251,7 @@ */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { - let data = {} + let data = {} as any switch (title) { case '电源电压调整率': // 电源电压调整率 data = { @@ -263,8 +263,9 @@ unit: '', // 单位 voltageRegulatorOutputValue: '', // 调压器输出值 editable: true, - } - lineVoltageRegulationList.value.push(data) + } as any + lineVoltageRegulationList.value.length ? lineVoltageRegulationList.value.push(lineVoltageRegulationList.value[lineVoltageRegulationList.value.length - 1]) : lineVoltageRegulationList.value.push(data) + break case '负载调整率': // 负载调整率 data = { @@ -282,6 +283,10 @@ break case '电压表示值误差': // 电压表示值误差 // 1数字式、2指针式 + if (voltageRepresentationValueErrorList.value.length) { + voltageRepresentationValueErrorList.value.push(voltageRepresentationValueErrorList.value[voltageRepresentationValueErrorList.value.length - 1]) + break + } data = { params: '电压表示值误差', dataType: '3', @@ -315,6 +320,10 @@ } break case '电流表示值误差(直接测量)': // 电流表示值误差(直接测量) + if (ammeterDirectList.value.length) { + ammeterDirectList.value.push(ammeterDirectList.value[ammeterDirectList.value.length - 1]) + break + } data = { params: '电流表示值误差(直接测量)', dataType: '4', @@ -348,6 +357,10 @@ } break case '电流表示值误差(间接测量)': // 电流表示值误差(间接测量) + if (ammeterIndirectList.value.length) { + ammeterIndirectList.value.push(ammeterIndirectList.value[ammeterIndirectList.value.length - 1]) + break + } data = { params: '电流表示值误差(间接测量)', dataType: '5', @@ -384,6 +397,10 @@ } break case '纹波电压': // 纹波电压 + if (rippleVoltageList.value.length) { + rippleVoltageList.value.push(rippleVoltageList.value[rippleVoltageList.value.length - 1]) + break + } data = { params: '纹波电压', dataType: '6', @@ -405,7 +422,7 @@ unit: '', // 单位 editable: true, } - outputVoltageStabilityList.value.push(data) + outputVoltageStabilityList.value.length ? outputVoltageStabilityList.value.push(outputVoltageStabilityList.value[outputVoltageStabilityList.value.length - 1]) : outputVoltageStabilityList.value.push(data) break } } @@ -687,7 +704,15 @@ 负载情况: loadSituationList.value, 最大允许误差: standardMaximumError.value, 标准电阻值单位: standardResistance.value, - 测量单位: unitList1.value, + } +} +// 自定义下拉框内容 +const customSelect = (data: any, fun: any) => { + if (data.column.text === '单位') { + fun(unitList1.value) + } + else { + fun(tableDict.value[data.text]) } } // 生成最终list @@ -825,10 +850,10 @@ - + @@ -370,6 +370,12 @@ visibility: hidden; } } + +.radio { + :deep(.el-radio__label) { + display: none !important; + } +}