diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue index f713810..f2d837b 100644 --- a/src/views/business/taskMeasure/certificate/list.vue +++ b/src/views/business/taskMeasure/certificate/list.vue @@ -49,9 +49,9 @@ { text: '被检设备名称', value: 'sampleName', align: 'center' }, { text: '规格型号', value: 'model', align: 'center' }, { text: '出厂编号', value: 'manufactureNo', align: 'center' }, - // { text: '生产厂家', value: 'manufacturer', align: 'center' }, - // { text: '结论', value: 'conclusion', align: 'center' }, - // { text: '限用说明', value: 'restrictionInstruction', align: 'center' }, + { text: '生产厂家', value: 'manufacturer', align: 'center' }, + { text: '结论', value: 'conclusion', align: 'center' }, + { text: '限用说明', value: 'restrictionInstruction', align: 'center' }, { text: '检校类别', value: 'measureCategoryName', align: 'center', width: '55' }, { text: '检定员', value: 'staffName', align: 'center' }, { text: '测试、校准或检定日期', value: 'traceDate', align: 'center', width: '120' }, diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue index f713810..f2d837b 100644 --- a/src/views/business/taskMeasure/certificate/list.vue +++ b/src/views/business/taskMeasure/certificate/list.vue @@ -49,9 +49,9 @@ { text: '被检设备名称', value: 'sampleName', align: 'center' }, { text: '规格型号', value: 'model', align: 'center' }, { text: '出厂编号', value: 'manufactureNo', align: 'center' }, - // { text: '生产厂家', value: 'manufacturer', align: 'center' }, - // { text: '结论', value: 'conclusion', align: 'center' }, - // { text: '限用说明', value: 'restrictionInstruction', align: 'center' }, + { text: '生产厂家', value: 'manufacturer', align: 'center' }, + { text: '结论', value: 'conclusion', align: 'center' }, + { text: '限用说明', value: 'restrictionInstruction', align: 'center' }, { text: '检校类别', value: 'measureCategoryName', align: 'center', width: '55' }, { text: '检定员', value: 'staffName', align: 'center' }, { text: '测试、校准或检定日期', value: 'traceDate', align: 'center', width: '120' }, diff --git a/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue index 68585a5..542acfa 100644 --- a/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue @@ -17,8 +17,6 @@ import { calculateHandle, getInfo } from '@/api/business/taskMeasure/measureData' import { getInfo as getItemInfo } from '@/api/business/measure/item' import { useCheckList } from '@/commonMethods/useCheckList' -import { calc } from '@/utils/useCalc' -import multiTable from '@/components/MultiHeaderTable/index.vue' const props = defineProps({ infoId: String, // id @@ -100,6 +98,11 @@ aNominalQualityValue_5: undefined, // 载荷点A标称质量值(单位固定g,不存单位) aConvertQualityCorrectValue_5: undefined, // 载荷点A折算质量修正值(单位固定mg,不存单位) aManufactureNo_5: '', // 载荷点A出厂编号 + bEquipmentId_5: '', // 载荷点B设备id + bDeviceNumber_5: undefined, // 载荷点B器号 + bNominalQualityValue_5: undefined, // 载荷点B标称质量值(单位固定g,不存单位) + bConvertQualityCorrectValue_5: undefined, // 载荷点B折算质量修正值(单位固定mg,不存单位) + bManufactureNo_5: '', // 载荷点B出厂编号 mSValue_5: undefined, // 标准小砝码ms mpesValue_5: undefined, // |MPEs| uBValue: undefined, // Ub @@ -638,11 +641,6 @@ aDeviceNumber: itemFormData.value.aDeviceNumber_6, // 载荷点A器号 aNominalQualityValue: itemFormData.value.aNominalQualityValue_6, // 载荷点A标称质量值(单位固定g,不存单位) aConvertQualityCorrectValue: itemFormData.value.aConvertQualityCorrectValue_6, // 载荷点A折算质量修正值(单位固定mg,不存单位) - bEquipmentId: itemFormData.value.bEquipmentId_6, // 载荷点B设备id - bManufactureNo: itemFormData.value.bManufactureNo_6, // 载荷点B出厂编号 - bDeviceNumber: itemFormData.value.bDeviceNumber_6, // 载荷点B器号 - bNominalQualityValue: itemFormData.value.bNominalQualityValue_6, // 载荷点B标称质量值(单位固定g,不存单位) - bConvertQualityCorrectValue: itemFormData.value.bConvertQualityCorrectValue_6, // 载荷点B折算质量修正值(单位固定mg,不存单位) ptOne: '', ptOneUnit: '', loadPointBSValue: repeatabilityPt2List.value[0].sValue, @@ -667,7 +665,7 @@ calculateHandle(params).then((res) => { if (res.data && res.data.length) { if (type === '1') { - repeatabilityPt1List.value = res.data.map((item) => { + repeatabilityPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '重复性', @@ -675,7 +673,7 @@ }) } else if (type === '2') { - repeatabilityPt2List.value = res.data.map((item) => { + repeatabilityPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '重复性', @@ -683,7 +681,7 @@ }) } else if (type === '3') { - offsetErrorPt1List.value = res.data.map((item) => { + offsetErrorPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '偏载误差', @@ -691,7 +689,7 @@ }) } else if (type === '4') { - offsetErrorPt2List.value = res.data.map((item) => { + offsetErrorPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '偏载误差', @@ -699,7 +697,7 @@ }) } else if (type === '5') { - indicationErrorPt1List.value = res.data.map((item) => { + indicationErrorPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '局部示值误差', @@ -707,7 +705,7 @@ }) } else if (type === '6') { - indicationErrorPt2List.value = res.data.map((item) => { + indicationErrorPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '局部示值误差', @@ -1051,7 +1049,7 @@ - + @@ -1147,7 +1145,7 @@ 计算结果 - + @@ -1475,7 +1473,7 @@ - + {{ item.equipmentName }} {{ item.manufactureNo }} diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue index f713810..f2d837b 100644 --- a/src/views/business/taskMeasure/certificate/list.vue +++ b/src/views/business/taskMeasure/certificate/list.vue @@ -49,9 +49,9 @@ { text: '被检设备名称', value: 'sampleName', align: 'center' }, { text: '规格型号', value: 'model', align: 'center' }, { text: '出厂编号', value: 'manufactureNo', align: 'center' }, - // { text: '生产厂家', value: 'manufacturer', align: 'center' }, - // { text: '结论', value: 'conclusion', align: 'center' }, - // { text: '限用说明', value: 'restrictionInstruction', align: 'center' }, + { text: '生产厂家', value: 'manufacturer', align: 'center' }, + { text: '结论', value: 'conclusion', align: 'center' }, + { text: '限用说明', value: 'restrictionInstruction', align: 'center' }, { text: '检校类别', value: 'measureCategoryName', align: 'center', width: '55' }, { text: '检定员', value: 'staffName', align: 'center' }, { text: '测试、校准或检定日期', value: 'traceDate', align: 'center', width: '120' }, diff --git a/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue index 68585a5..542acfa 100644 --- a/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue @@ -17,8 +17,6 @@ import { calculateHandle, getInfo } from '@/api/business/taskMeasure/measureData' import { getInfo as getItemInfo } from '@/api/business/measure/item' import { useCheckList } from '@/commonMethods/useCheckList' -import { calc } from '@/utils/useCalc' -import multiTable from '@/components/MultiHeaderTable/index.vue' const props = defineProps({ infoId: String, // id @@ -100,6 +98,11 @@ aNominalQualityValue_5: undefined, // 载荷点A标称质量值(单位固定g,不存单位) aConvertQualityCorrectValue_5: undefined, // 载荷点A折算质量修正值(单位固定mg,不存单位) aManufactureNo_5: '', // 载荷点A出厂编号 + bEquipmentId_5: '', // 载荷点B设备id + bDeviceNumber_5: undefined, // 载荷点B器号 + bNominalQualityValue_5: undefined, // 载荷点B标称质量值(单位固定g,不存单位) + bConvertQualityCorrectValue_5: undefined, // 载荷点B折算质量修正值(单位固定mg,不存单位) + bManufactureNo_5: '', // 载荷点B出厂编号 mSValue_5: undefined, // 标准小砝码ms mpesValue_5: undefined, // |MPEs| uBValue: undefined, // Ub @@ -638,11 +641,6 @@ aDeviceNumber: itemFormData.value.aDeviceNumber_6, // 载荷点A器号 aNominalQualityValue: itemFormData.value.aNominalQualityValue_6, // 载荷点A标称质量值(单位固定g,不存单位) aConvertQualityCorrectValue: itemFormData.value.aConvertQualityCorrectValue_6, // 载荷点A折算质量修正值(单位固定mg,不存单位) - bEquipmentId: itemFormData.value.bEquipmentId_6, // 载荷点B设备id - bManufactureNo: itemFormData.value.bManufactureNo_6, // 载荷点B出厂编号 - bDeviceNumber: itemFormData.value.bDeviceNumber_6, // 载荷点B器号 - bNominalQualityValue: itemFormData.value.bNominalQualityValue_6, // 载荷点B标称质量值(单位固定g,不存单位) - bConvertQualityCorrectValue: itemFormData.value.bConvertQualityCorrectValue_6, // 载荷点B折算质量修正值(单位固定mg,不存单位) ptOne: '', ptOneUnit: '', loadPointBSValue: repeatabilityPt2List.value[0].sValue, @@ -667,7 +665,7 @@ calculateHandle(params).then((res) => { if (res.data && res.data.length) { if (type === '1') { - repeatabilityPt1List.value = res.data.map((item) => { + repeatabilityPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '重复性', @@ -675,7 +673,7 @@ }) } else if (type === '2') { - repeatabilityPt2List.value = res.data.map((item) => { + repeatabilityPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '重复性', @@ -683,7 +681,7 @@ }) } else if (type === '3') { - offsetErrorPt1List.value = res.data.map((item) => { + offsetErrorPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '偏载误差', @@ -691,7 +689,7 @@ }) } else if (type === '4') { - offsetErrorPt2List.value = res.data.map((item) => { + offsetErrorPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '偏载误差', @@ -699,7 +697,7 @@ }) } else if (type === '5') { - indicationErrorPt1List.value = res.data.map((item) => { + indicationErrorPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '局部示值误差', @@ -707,7 +705,7 @@ }) } else if (type === '6') { - indicationErrorPt2List.value = res.data.map((item) => { + indicationErrorPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '局部示值误差', @@ -1051,7 +1049,7 @@ - + @@ -1147,7 +1145,7 @@ 计算结果 - + @@ -1475,7 +1473,7 @@ - + {{ item.equipmentName }} {{ item.manufactureNo }} diff --git a/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue index 790d81b..6d04c75 100644 --- a/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue @@ -700,7 +700,11 @@ rangeRange: item.rangeRange, // 量程 standardValue: item.standardValue, // 标准值 resolution: item.resolution, // 分辨力 - indicatingValue: item.indicatingValue, /// 示值 + indicatingValue: itemCategoryName === '数字多用表(手持)' + || itemCategoryName === '钳形电流表' + || itemCategoryName === '数字多用表(台式)' + ? '' + : item.indicatingValue, /// 示值 lineMode: item.lineMode || '/', maximumError: itemCategoryName === '指针式万用表' ? useMaximumError(item.accuracyA!, item.fullScaleValue!) + item.fullScaleValueUnit! : item.maximumError, // 最大允许误差 maximumErrorFormula: item.maximumError, // 最大允许误差公式 @@ -750,6 +754,19 @@ fetchClassificationListQuery.value.categoryName = categoryName // 设备分类型名称 fetchClassificationListQuery.value.belongStandardEquipment = belongStandardEquipment // 检校标准装置名称 getClassificationList(fetchClassificationListQuery.value).then((response) => { + if (user.bizLabCode === 'H') { // 当前用户是海口实验室的 + form.value.measureAddress = response.data.rows[0].labH + } + else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的 + form.value.measureAddress = response.data.rows[0].labX + } + if (form.value.measureAddress) { + const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress) + if (index !== -1) { + form.value.temperature = positionList.value[index].temperature + form.value.humidity = positionList.value[index].humidity + } + } if (response.data.rows.length) { form.value.technologyFile = response.data.rows[0].technologyFile.split(';') if (pageType.value === 'add') { form.value.measureCategory = response.data.rows[0].measureCategory } // 检校类别 @@ -897,10 +914,10 @@ } // -------------------------------------地点变化事件-------------------------------------------- -const handleChangeAddress = (id: string) => { - if (id) { +const handleChangeAddress = (name: string) => { + if (name) { const index = positionList.value.findIndex( - (item: { id: string }) => item.id === id, + (item: { name: string }) => item.name === name, ) if (index !== -1) { form.value.temperature = positionList.value[index].temperature @@ -1158,7 +1175,7 @@ v-for="item in positionList" :key="item.id" :label="item.name" - :value="item.id" + :value="item.name" /> diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue index f713810..f2d837b 100644 --- a/src/views/business/taskMeasure/certificate/list.vue +++ b/src/views/business/taskMeasure/certificate/list.vue @@ -49,9 +49,9 @@ { text: '被检设备名称', value: 'sampleName', align: 'center' }, { text: '规格型号', value: 'model', align: 'center' }, { text: '出厂编号', value: 'manufactureNo', align: 'center' }, - // { text: '生产厂家', value: 'manufacturer', align: 'center' }, - // { text: '结论', value: 'conclusion', align: 'center' }, - // { text: '限用说明', value: 'restrictionInstruction', align: 'center' }, + { text: '生产厂家', value: 'manufacturer', align: 'center' }, + { text: '结论', value: 'conclusion', align: 'center' }, + { text: '限用说明', value: 'restrictionInstruction', align: 'center' }, { text: '检校类别', value: 'measureCategoryName', align: 'center', width: '55' }, { text: '检定员', value: 'staffName', align: 'center' }, { text: '测试、校准或检定日期', value: 'traceDate', align: 'center', width: '120' }, diff --git a/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue index 68585a5..542acfa 100644 --- a/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue @@ -17,8 +17,6 @@ import { calculateHandle, getInfo } from '@/api/business/taskMeasure/measureData' import { getInfo as getItemInfo } from '@/api/business/measure/item' import { useCheckList } from '@/commonMethods/useCheckList' -import { calc } from '@/utils/useCalc' -import multiTable from '@/components/MultiHeaderTable/index.vue' const props = defineProps({ infoId: String, // id @@ -100,6 +98,11 @@ aNominalQualityValue_5: undefined, // 载荷点A标称质量值(单位固定g,不存单位) aConvertQualityCorrectValue_5: undefined, // 载荷点A折算质量修正值(单位固定mg,不存单位) aManufactureNo_5: '', // 载荷点A出厂编号 + bEquipmentId_5: '', // 载荷点B设备id + bDeviceNumber_5: undefined, // 载荷点B器号 + bNominalQualityValue_5: undefined, // 载荷点B标称质量值(单位固定g,不存单位) + bConvertQualityCorrectValue_5: undefined, // 载荷点B折算质量修正值(单位固定mg,不存单位) + bManufactureNo_5: '', // 载荷点B出厂编号 mSValue_5: undefined, // 标准小砝码ms mpesValue_5: undefined, // |MPEs| uBValue: undefined, // Ub @@ -638,11 +641,6 @@ aDeviceNumber: itemFormData.value.aDeviceNumber_6, // 载荷点A器号 aNominalQualityValue: itemFormData.value.aNominalQualityValue_6, // 载荷点A标称质量值(单位固定g,不存单位) aConvertQualityCorrectValue: itemFormData.value.aConvertQualityCorrectValue_6, // 载荷点A折算质量修正值(单位固定mg,不存单位) - bEquipmentId: itemFormData.value.bEquipmentId_6, // 载荷点B设备id - bManufactureNo: itemFormData.value.bManufactureNo_6, // 载荷点B出厂编号 - bDeviceNumber: itemFormData.value.bDeviceNumber_6, // 载荷点B器号 - bNominalQualityValue: itemFormData.value.bNominalQualityValue_6, // 载荷点B标称质量值(单位固定g,不存单位) - bConvertQualityCorrectValue: itemFormData.value.bConvertQualityCorrectValue_6, // 载荷点B折算质量修正值(单位固定mg,不存单位) ptOne: '', ptOneUnit: '', loadPointBSValue: repeatabilityPt2List.value[0].sValue, @@ -667,7 +665,7 @@ calculateHandle(params).then((res) => { if (res.data && res.data.length) { if (type === '1') { - repeatabilityPt1List.value = res.data.map((item) => { + repeatabilityPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '重复性', @@ -675,7 +673,7 @@ }) } else if (type === '2') { - repeatabilityPt2List.value = res.data.map((item) => { + repeatabilityPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '重复性', @@ -683,7 +681,7 @@ }) } else if (type === '3') { - offsetErrorPt1List.value = res.data.map((item) => { + offsetErrorPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '偏载误差', @@ -691,7 +689,7 @@ }) } else if (type === '4') { - offsetErrorPt2List.value = res.data.map((item) => { + offsetErrorPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '偏载误差', @@ -699,7 +697,7 @@ }) } else if (type === '5') { - indicationErrorPt1List.value = res.data.map((item) => { + indicationErrorPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '局部示值误差', @@ -707,7 +705,7 @@ }) } else if (type === '6') { - indicationErrorPt2List.value = res.data.map((item) => { + indicationErrorPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '局部示值误差', @@ -1051,7 +1049,7 @@ - + @@ -1147,7 +1145,7 @@ 计算结果 - + @@ -1475,7 +1473,7 @@ - + {{ item.equipmentName }} {{ item.manufactureNo }} diff --git a/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue index 790d81b..6d04c75 100644 --- a/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue @@ -700,7 +700,11 @@ rangeRange: item.rangeRange, // 量程 standardValue: item.standardValue, // 标准值 resolution: item.resolution, // 分辨力 - indicatingValue: item.indicatingValue, /// 示值 + indicatingValue: itemCategoryName === '数字多用表(手持)' + || itemCategoryName === '钳形电流表' + || itemCategoryName === '数字多用表(台式)' + ? '' + : item.indicatingValue, /// 示值 lineMode: item.lineMode || '/', maximumError: itemCategoryName === '指针式万用表' ? useMaximumError(item.accuracyA!, item.fullScaleValue!) + item.fullScaleValueUnit! : item.maximumError, // 最大允许误差 maximumErrorFormula: item.maximumError, // 最大允许误差公式 @@ -750,6 +754,19 @@ fetchClassificationListQuery.value.categoryName = categoryName // 设备分类型名称 fetchClassificationListQuery.value.belongStandardEquipment = belongStandardEquipment // 检校标准装置名称 getClassificationList(fetchClassificationListQuery.value).then((response) => { + if (user.bizLabCode === 'H') { // 当前用户是海口实验室的 + form.value.measureAddress = response.data.rows[0].labH + } + else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的 + form.value.measureAddress = response.data.rows[0].labX + } + if (form.value.measureAddress) { + const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress) + if (index !== -1) { + form.value.temperature = positionList.value[index].temperature + form.value.humidity = positionList.value[index].humidity + } + } if (response.data.rows.length) { form.value.technologyFile = response.data.rows[0].technologyFile.split(';') if (pageType.value === 'add') { form.value.measureCategory = response.data.rows[0].measureCategory } // 检校类别 @@ -897,10 +914,10 @@ } // -------------------------------------地点变化事件-------------------------------------------- -const handleChangeAddress = (id: string) => { - if (id) { +const handleChangeAddress = (name: string) => { + if (name) { const index = positionList.value.findIndex( - (item: { id: string }) => item.id === id, + (item: { name: string }) => item.name === name, ) if (index !== -1) { form.value.temperature = positionList.value[index].temperature @@ -1158,7 +1175,7 @@ v-for="item in positionList" :key="item.id" :label="item.name" - :value="item.id" + :value="item.name" /> diff --git a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue index 53512d5..283e779 100644 --- a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue +++ b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue @@ -233,8 +233,22 @@ } fetchClassificationListQuery.value.categoryName = categoryName // 设备分类型名称 fetchClassificationListQuery.value.belongStandardEquipment = belongStandardEquipment // 检校标准装置名称 + getClassificationList(fetchClassificationListQuery.value).then((response) => { if (response.data.rows.length) { + if (user.bizLabCode === 'H') { // 当前用户是海口实验室的 + form.value.measureAddress = response.data.rows[0].labH + } + else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的 + form.value.measureAddress = response.data.rows[0].labX + } + if (form.value.measureAddress) { + const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress) + if (index !== -1) { + form.value.temperature = positionList.value[index].temperature + form.value.humidity = positionList.value[index].humidity + } + } form.value.technologyFile = response.data.rows[0].technologyFile.split(';') if (props.pageType === 'add') { form.value.measureCategory = response.data.rows[0].measureCategory } // 检校类别 } @@ -251,9 +265,9 @@ } // -------------------------------------地点变化事件-------------------------------------------- -const handleChangeAddress = (id: string) => { - if (id) { - const index = positionList.value.findIndex((item: { id: string }) => item.id === id) +const handleChangeAddress = (name: string) => { + if (name) { + const index = positionList.value.findIndex((item: { name: string }) => item.name === name) if (index !== -1) { form.value.temperature = positionList.value[index].temperature form.value.humidity = positionList.value[index].humidity @@ -403,7 +417,7 @@ class="full-width-input" @change="handleChangeAddress" > - + diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue index f713810..f2d837b 100644 --- a/src/views/business/taskMeasure/certificate/list.vue +++ b/src/views/business/taskMeasure/certificate/list.vue @@ -49,9 +49,9 @@ { text: '被检设备名称', value: 'sampleName', align: 'center' }, { text: '规格型号', value: 'model', align: 'center' }, { text: '出厂编号', value: 'manufactureNo', align: 'center' }, - // { text: '生产厂家', value: 'manufacturer', align: 'center' }, - // { text: '结论', value: 'conclusion', align: 'center' }, - // { text: '限用说明', value: 'restrictionInstruction', align: 'center' }, + { text: '生产厂家', value: 'manufacturer', align: 'center' }, + { text: '结论', value: 'conclusion', align: 'center' }, + { text: '限用说明', value: 'restrictionInstruction', align: 'center' }, { text: '检校类别', value: 'measureCategoryName', align: 'center', width: '55' }, { text: '检定员', value: 'staffName', align: 'center' }, { text: '测试、校准或检定日期', value: 'traceDate', align: 'center', width: '120' }, diff --git a/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue index 68585a5..542acfa 100644 --- a/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/eighth/templateDetail.vue @@ -17,8 +17,6 @@ import { calculateHandle, getInfo } from '@/api/business/taskMeasure/measureData' import { getInfo as getItemInfo } from '@/api/business/measure/item' import { useCheckList } from '@/commonMethods/useCheckList' -import { calc } from '@/utils/useCalc' -import multiTable from '@/components/MultiHeaderTable/index.vue' const props = defineProps({ infoId: String, // id @@ -100,6 +98,11 @@ aNominalQualityValue_5: undefined, // 载荷点A标称质量值(单位固定g,不存单位) aConvertQualityCorrectValue_5: undefined, // 载荷点A折算质量修正值(单位固定mg,不存单位) aManufactureNo_5: '', // 载荷点A出厂编号 + bEquipmentId_5: '', // 载荷点B设备id + bDeviceNumber_5: undefined, // 载荷点B器号 + bNominalQualityValue_5: undefined, // 载荷点B标称质量值(单位固定g,不存单位) + bConvertQualityCorrectValue_5: undefined, // 载荷点B折算质量修正值(单位固定mg,不存单位) + bManufactureNo_5: '', // 载荷点B出厂编号 mSValue_5: undefined, // 标准小砝码ms mpesValue_5: undefined, // |MPEs| uBValue: undefined, // Ub @@ -638,11 +641,6 @@ aDeviceNumber: itemFormData.value.aDeviceNumber_6, // 载荷点A器号 aNominalQualityValue: itemFormData.value.aNominalQualityValue_6, // 载荷点A标称质量值(单位固定g,不存单位) aConvertQualityCorrectValue: itemFormData.value.aConvertQualityCorrectValue_6, // 载荷点A折算质量修正值(单位固定mg,不存单位) - bEquipmentId: itemFormData.value.bEquipmentId_6, // 载荷点B设备id - bManufactureNo: itemFormData.value.bManufactureNo_6, // 载荷点B出厂编号 - bDeviceNumber: itemFormData.value.bDeviceNumber_6, // 载荷点B器号 - bNominalQualityValue: itemFormData.value.bNominalQualityValue_6, // 载荷点B标称质量值(单位固定g,不存单位) - bConvertQualityCorrectValue: itemFormData.value.bConvertQualityCorrectValue_6, // 载荷点B折算质量修正值(单位固定mg,不存单位) ptOne: '', ptOneUnit: '', loadPointBSValue: repeatabilityPt2List.value[0].sValue, @@ -667,7 +665,7 @@ calculateHandle(params).then((res) => { if (res.data && res.data.length) { if (type === '1') { - repeatabilityPt1List.value = res.data.map((item) => { + repeatabilityPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '重复性', @@ -675,7 +673,7 @@ }) } else if (type === '2') { - repeatabilityPt2List.value = res.data.map((item) => { + repeatabilityPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '重复性', @@ -683,7 +681,7 @@ }) } else if (type === '3') { - offsetErrorPt1List.value = res.data.map((item) => { + offsetErrorPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '偏载误差', @@ -691,7 +689,7 @@ }) } else if (type === '4') { - offsetErrorPt2List.value = res.data.map((item) => { + offsetErrorPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '偏载误差', @@ -699,7 +697,7 @@ }) } else if (type === '5') { - indicationErrorPt1List.value = res.data.map((item) => { + indicationErrorPt1List.value = res.data.map((item: { params: string }) => { return { ...item, params: '局部示值误差', @@ -707,7 +705,7 @@ }) } else if (type === '6') { - indicationErrorPt2List.value = res.data.map((item) => { + indicationErrorPt2List.value = res.data.map((item: { params: string }) => { return { ...item, params: '局部示值误差', @@ -1051,7 +1049,7 @@ - + @@ -1147,7 +1145,7 @@ 计算结果 - + @@ -1475,7 +1473,7 @@ - + {{ item.equipmentName }} {{ item.manufactureNo }} diff --git a/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue index 790d81b..6d04c75 100644 --- a/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/first/templateDetail.vue @@ -700,7 +700,11 @@ rangeRange: item.rangeRange, // 量程 standardValue: item.standardValue, // 标准值 resolution: item.resolution, // 分辨力 - indicatingValue: item.indicatingValue, /// 示值 + indicatingValue: itemCategoryName === '数字多用表(手持)' + || itemCategoryName === '钳形电流表' + || itemCategoryName === '数字多用表(台式)' + ? '' + : item.indicatingValue, /// 示值 lineMode: item.lineMode || '/', maximumError: itemCategoryName === '指针式万用表' ? useMaximumError(item.accuracyA!, item.fullScaleValue!) + item.fullScaleValueUnit! : item.maximumError, // 最大允许误差 maximumErrorFormula: item.maximumError, // 最大允许误差公式 @@ -750,6 +754,19 @@ fetchClassificationListQuery.value.categoryName = categoryName // 设备分类型名称 fetchClassificationListQuery.value.belongStandardEquipment = belongStandardEquipment // 检校标准装置名称 getClassificationList(fetchClassificationListQuery.value).then((response) => { + if (user.bizLabCode === 'H') { // 当前用户是海口实验室的 + form.value.measureAddress = response.data.rows[0].labH + } + else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的 + form.value.measureAddress = response.data.rows[0].labX + } + if (form.value.measureAddress) { + const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress) + if (index !== -1) { + form.value.temperature = positionList.value[index].temperature + form.value.humidity = positionList.value[index].humidity + } + } if (response.data.rows.length) { form.value.technologyFile = response.data.rows[0].technologyFile.split(';') if (pageType.value === 'add') { form.value.measureCategory = response.data.rows[0].measureCategory } // 检校类别 @@ -897,10 +914,10 @@ } // -------------------------------------地点变化事件-------------------------------------------- -const handleChangeAddress = (id: string) => { - if (id) { +const handleChangeAddress = (name: string) => { + if (name) { const index = positionList.value.findIndex( - (item: { id: string }) => item.id === id, + (item: { name: string }) => item.name === name, ) if (index !== -1) { form.value.temperature = positionList.value[index].temperature @@ -1158,7 +1175,7 @@ v-for="item in positionList" :key="item.id" :label="item.name" - :value="item.id" + :value="item.name" /> diff --git a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue index 53512d5..283e779 100644 --- a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue +++ b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue @@ -233,8 +233,22 @@ } fetchClassificationListQuery.value.categoryName = categoryName // 设备分类型名称 fetchClassificationListQuery.value.belongStandardEquipment = belongStandardEquipment // 检校标准装置名称 + getClassificationList(fetchClassificationListQuery.value).then((response) => { if (response.data.rows.length) { + if (user.bizLabCode === 'H') { // 当前用户是海口实验室的 + form.value.measureAddress = response.data.rows[0].labH + } + else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的 + form.value.measureAddress = response.data.rows[0].labX + } + if (form.value.measureAddress) { + const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress) + if (index !== -1) { + form.value.temperature = positionList.value[index].temperature + form.value.humidity = positionList.value[index].humidity + } + } form.value.technologyFile = response.data.rows[0].technologyFile.split(';') if (props.pageType === 'add') { form.value.measureCategory = response.data.rows[0].measureCategory } // 检校类别 } @@ -251,9 +265,9 @@ } // -------------------------------------地点变化事件-------------------------------------------- -const handleChangeAddress = (id: string) => { - if (id) { - const index = positionList.value.findIndex((item: { id: string }) => item.id === id) +const handleChangeAddress = (name: string) => { + if (name) { + const index = positionList.value.findIndex((item: { name: string }) => item.name === name) if (index !== -1) { form.value.temperature = positionList.value[index].temperature form.value.humidity = positionList.value[index].humidity @@ -403,7 +417,7 @@ class="full-width-input" @change="handleChangeAddress" > - + diff --git a/src/views/business/taskMeasure/measureData/list.vue b/src/views/business/taskMeasure/measureData/list.vue index 00c84e1..2e55485 100644 --- a/src/views/business/taskMeasure/measureData/list.vue +++ b/src/views/business/taskMeasure/measureData/list.vue @@ -31,7 +31,7 @@ { text: '检定数据编号', value: 'dataNo', width: '160', align: 'center' }, { text: '委托单位', value: 'customerName', align: 'center' }, { text: '测试、校准或检定日期', value: 'traceDate', align: 'center', width: '120' }, - { text: '测试、校准或检定地点', value: 'measureAddressName', align: 'center' }, + { text: '测试、校准或检定地点', value: 'measureAddress', align: 'center' }, { text: '受检设备名称', value: 'sampleName', align: 'center' }, { text: '规格型号', value: 'model', align: 'center' }, { text: '出厂编号', value: 'manufactureNo', align: 'center' }, @@ -95,13 +95,7 @@ listQuery.value.offset = 1 } getMeasureDataList(listQuery.value).then((res) => { - list.value = res.data.rows.map((item: { measureAddress: string; measureAddressName: string }) => { - const index = positionList.value.findIndex((i: { id: string }) => item.measureAddress === i.id) - if (index !== -1) { - item.measureAddressName = positionList.value[index].name - } - return item - }) + list.value = res.data.rows total.value = res.data.total loadingTable.value = false })