diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 7031e67..0a462df 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -119,8 +119,8 @@ 同意 + 驳回 + --> 拒绝 diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 7031e67..0a462df 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -119,8 +119,8 @@ 同意 + 驳回 + --> 拒绝 diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue index 15a9741..7f14ac9 100644 --- a/src/components/MultiHeaderTable/tableColumn.vue +++ b/src/components/MultiHeaderTable/tableColumn.vue @@ -95,13 +95,23 @@ @change="handleInputChange(scope)" @blur="handleInputBlur(scope.row)" /> - + /> --> +
+ + {{ scope.row.showUnitData }} +
diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 7031e67..0a462df 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -119,8 +119,8 @@ 同意 + 驳回 + --> 拒绝 diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue index 15a9741..7f14ac9 100644 --- a/src/components/MultiHeaderTable/tableColumn.vue +++ b/src/components/MultiHeaderTable/tableColumn.vue @@ -95,13 +95,23 @@ @change="handleInputChange(scope)" @blur="handleInputBlur(scope.row)" /> - + /> --> +
+ + {{ scope.row.showUnitData }} +
diff --git a/src/views/business/measure/item/useCalculateResolution.ts b/src/views/business/measure/item/useCalculateResolution.ts index 3e1e08a..2615de8 100644 --- a/src/views/business/measure/item/useCalculateResolution.ts +++ b/src/views/business/measure/item/useCalculateResolution.ts @@ -27,7 +27,7 @@ */ export function caculateDecimalDigits(value: any) { if (!value || `${value}` === '' || `${value}` === 'undefined') { - return false + return value } const data = Number(value) console.log('计算分辨力小数点后面有几位分辨力数值:', value) diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 7031e67..0a462df 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -119,8 +119,8 @@ 同意 + 驳回 + --> 拒绝 diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue index 15a9741..7f14ac9 100644 --- a/src/components/MultiHeaderTable/tableColumn.vue +++ b/src/components/MultiHeaderTable/tableColumn.vue @@ -95,13 +95,23 @@ @change="handleInputChange(scope)" @blur="handleInputBlur(scope.row)" /> - + /> --> +
+ + {{ scope.row.showUnitData }} +
diff --git a/src/views/business/measure/item/useCalculateResolution.ts b/src/views/business/measure/item/useCalculateResolution.ts index 3e1e08a..2615de8 100644 --- a/src/views/business/measure/item/useCalculateResolution.ts +++ b/src/views/business/measure/item/useCalculateResolution.ts @@ -27,7 +27,7 @@ */ export function caculateDecimalDigits(value: any) { if (!value || `${value}` === '' || `${value}` === 'undefined') { - return false + return value } const data = Number(value) console.log('计算分辨力小数点后面有几位分辨力数值:', value) diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue index f9b9632..7b71b09 100644 --- a/src/views/business/taskMeasure/certificate/components/basic.vue +++ b/src/views/business/taskMeasure/certificate/components/basic.vue @@ -86,20 +86,20 @@ background: 'rgba(255, 255, 255, 0.8)', }) getInfo({ id: infoId.value }).then((res) => { - if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) { - createMeasureCert({ id: infoId.value }).then((res) => { - form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 - form.value.certificateFile = res.data.certificateFile // 检定证书 - emits('reportData', res.data.certificateFile, res.data.originalRecordFile) - loading.close() - }) - } - else { - loading.close() - form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 - form.value.certificateFile = res.data.certificateFile // 检定证书 - emits('reportData', res.data.certificateFile, res.data.originalRecordFile) - } + // if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) { + // createMeasureCert({ id: infoId.value }).then((res) => { + // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + // form.value.certificateFile = res.data.certificateFile // 检定证书 + // emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // loading.close() + // }) + // } + // else { + loading.close() + form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + form.value.certificateFile = res.data.certificateFile // 检定证书 + emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // } }) } diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 7031e67..0a462df 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -119,8 +119,8 @@ 同意 + 驳回 + --> 拒绝 diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue index 15a9741..7f14ac9 100644 --- a/src/components/MultiHeaderTable/tableColumn.vue +++ b/src/components/MultiHeaderTable/tableColumn.vue @@ -95,13 +95,23 @@ @change="handleInputChange(scope)" @blur="handleInputBlur(scope.row)" /> - + /> --> +
+ + {{ scope.row.showUnitData }} +
diff --git a/src/views/business/measure/item/useCalculateResolution.ts b/src/views/business/measure/item/useCalculateResolution.ts index 3e1e08a..2615de8 100644 --- a/src/views/business/measure/item/useCalculateResolution.ts +++ b/src/views/business/measure/item/useCalculateResolution.ts @@ -27,7 +27,7 @@ */ export function caculateDecimalDigits(value: any) { if (!value || `${value}` === '' || `${value}` === 'undefined') { - return false + return value } const data = Number(value) console.log('计算分辨力小数点后面有几位分辨力数值:', value) diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue index f9b9632..7b71b09 100644 --- a/src/views/business/taskMeasure/certificate/components/basic.vue +++ b/src/views/business/taskMeasure/certificate/components/basic.vue @@ -86,20 +86,20 @@ background: 'rgba(255, 255, 255, 0.8)', }) getInfo({ id: infoId.value }).then((res) => { - if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) { - createMeasureCert({ id: infoId.value }).then((res) => { - form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 - form.value.certificateFile = res.data.certificateFile // 检定证书 - emits('reportData', res.data.certificateFile, res.data.originalRecordFile) - loading.close() - }) - } - else { - loading.close() - form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 - form.value.certificateFile = res.data.certificateFile // 检定证书 - emits('reportData', res.data.certificateFile, res.data.originalRecordFile) - } + // if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) { + // createMeasureCert({ id: infoId.value }).then((res) => { + // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + // form.value.certificateFile = res.data.certificateFile // 检定证书 + // emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // loading.close() + // }) + // } + // else { + loading.close() + form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + form.value.certificateFile = res.data.certificateFile // 检定证书 + emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // } }) } diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue index f2d837b..67fadfe 100644 --- a/src/views/business/taskMeasure/certificate/list.vue +++ b/src/views/business/taskMeasure/certificate/list.vue @@ -15,11 +15,13 @@ import { approvalDelete, cancelApproval, + createMeasureCert, draftDelete, exportCertificateList, getCertificateList, refuseApproval, } from '@/api/business/taskMeasure/certificate' + const buttonBoxActive = 'businessCertificate' // 存储在sessionstorage里面的字段名,用于记录右上角buttonbox点击状态 const { proxy } = getCurrentInstance() as any const $router = useRouter() @@ -147,7 +149,9 @@ } // ----------------------------------------------操作--------------------------------------------------- +const approvalId = ref('') // 操作的行id const handleEdit = (row: IList, type: string) => { + approvalId.value = row.id if (type === 'detail') { // 详情 $router.push({ path: `/businessCertificate/${type}/${row.id}`, @@ -236,9 +240,16 @@ }) } // -----------------------------------------审批------------------------------------------------ -// 审批结束回调 +// 审批结束回调(同意) const approvalSuccess = () => { - fetchData(true) + loadingTable.value = true + createMeasureCert({ id: approvalId.value }).then((res) => { + // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + // form.value.certificateFile = res.data.certificateFile // 检定证书 + // emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // loading.close() + fetchData(true) + }) } // 切换tab状态 diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 7031e67..0a462df 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -119,8 +119,8 @@ 同意 + 驳回 + --> 拒绝 diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue index 15a9741..7f14ac9 100644 --- a/src/components/MultiHeaderTable/tableColumn.vue +++ b/src/components/MultiHeaderTable/tableColumn.vue @@ -95,13 +95,23 @@ @change="handleInputChange(scope)" @blur="handleInputBlur(scope.row)" /> - + /> --> +
+ + {{ scope.row.showUnitData }} +
diff --git a/src/views/business/measure/item/useCalculateResolution.ts b/src/views/business/measure/item/useCalculateResolution.ts index 3e1e08a..2615de8 100644 --- a/src/views/business/measure/item/useCalculateResolution.ts +++ b/src/views/business/measure/item/useCalculateResolution.ts @@ -27,7 +27,7 @@ */ export function caculateDecimalDigits(value: any) { if (!value || `${value}` === '' || `${value}` === 'undefined') { - return false + return value } const data = Number(value) console.log('计算分辨力小数点后面有几位分辨力数值:', value) diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue index f9b9632..7b71b09 100644 --- a/src/views/business/taskMeasure/certificate/components/basic.vue +++ b/src/views/business/taskMeasure/certificate/components/basic.vue @@ -86,20 +86,20 @@ background: 'rgba(255, 255, 255, 0.8)', }) getInfo({ id: infoId.value }).then((res) => { - if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) { - createMeasureCert({ id: infoId.value }).then((res) => { - form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 - form.value.certificateFile = res.data.certificateFile // 检定证书 - emits('reportData', res.data.certificateFile, res.data.originalRecordFile) - loading.close() - }) - } - else { - loading.close() - form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 - form.value.certificateFile = res.data.certificateFile // 检定证书 - emits('reportData', res.data.certificateFile, res.data.originalRecordFile) - } + // if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) { + // createMeasureCert({ id: infoId.value }).then((res) => { + // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + // form.value.certificateFile = res.data.certificateFile // 检定证书 + // emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // loading.close() + // }) + // } + // else { + loading.close() + form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + form.value.certificateFile = res.data.certificateFile // 检定证书 + emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // } }) } diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue index f2d837b..67fadfe 100644 --- a/src/views/business/taskMeasure/certificate/list.vue +++ b/src/views/business/taskMeasure/certificate/list.vue @@ -15,11 +15,13 @@ import { approvalDelete, cancelApproval, + createMeasureCert, draftDelete, exportCertificateList, getCertificateList, refuseApproval, } from '@/api/business/taskMeasure/certificate' + const buttonBoxActive = 'businessCertificate' // 存储在sessionstorage里面的字段名,用于记录右上角buttonbox点击状态 const { proxy } = getCurrentInstance() as any const $router = useRouter() @@ -147,7 +149,9 @@ } // ----------------------------------------------操作--------------------------------------------------- +const approvalId = ref('') // 操作的行id const handleEdit = (row: IList, type: string) => { + approvalId.value = row.id if (type === 'detail') { // 详情 $router.push({ path: `/businessCertificate/${type}/${row.id}`, @@ -236,9 +240,16 @@ }) } // -----------------------------------------审批------------------------------------------------ -// 审批结束回调 +// 审批结束回调(同意) const approvalSuccess = () => { - fetchData(true) + loadingTable.value = true + createMeasureCert({ id: approvalId.value }).then((res) => { + // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + // form.value.certificateFile = res.data.certificateFile // 检定证书 + // emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // loading.close() + fetchData(true) + }) } // 切换tab状态 diff --git a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue index afe1fa1..5639925 100644 --- a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue +++ b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue @@ -3,6 +3,7 @@ import { ref } from 'vue' import { ElLoading, ElMessage } from 'element-plus' import dayjs from 'dayjs' +import { PageActionEventType } from 'pdfjs-dist/types/src/shared/util' import selectStandard from '../dialog/selectStandardDialog.vue' import type { ITempelateForm } from '../measureData-interface' import useUserStore from '@/store/modules/user' @@ -258,17 +259,19 @@ 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 + if (props.pageType === 'add') { + 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(';') diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 7031e67..0a462df 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -119,8 +119,8 @@ 同意 + 驳回 + --> 拒绝 diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue index 15a9741..7f14ac9 100644 --- a/src/components/MultiHeaderTable/tableColumn.vue +++ b/src/components/MultiHeaderTable/tableColumn.vue @@ -95,13 +95,23 @@ @change="handleInputChange(scope)" @blur="handleInputBlur(scope.row)" /> - + /> --> +
+ + {{ scope.row.showUnitData }} +
diff --git a/src/views/business/measure/item/useCalculateResolution.ts b/src/views/business/measure/item/useCalculateResolution.ts index 3e1e08a..2615de8 100644 --- a/src/views/business/measure/item/useCalculateResolution.ts +++ b/src/views/business/measure/item/useCalculateResolution.ts @@ -27,7 +27,7 @@ */ export function caculateDecimalDigits(value: any) { if (!value || `${value}` === '' || `${value}` === 'undefined') { - return false + return value } const data = Number(value) console.log('计算分辨力小数点后面有几位分辨力数值:', value) diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue index f9b9632..7b71b09 100644 --- a/src/views/business/taskMeasure/certificate/components/basic.vue +++ b/src/views/business/taskMeasure/certificate/components/basic.vue @@ -86,20 +86,20 @@ background: 'rgba(255, 255, 255, 0.8)', }) getInfo({ id: infoId.value }).then((res) => { - if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) { - createMeasureCert({ id: infoId.value }).then((res) => { - form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 - form.value.certificateFile = res.data.certificateFile // 检定证书 - emits('reportData', res.data.certificateFile, res.data.originalRecordFile) - loading.close() - }) - } - else { - loading.close() - form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 - form.value.certificateFile = res.data.certificateFile // 检定证书 - emits('reportData', res.data.certificateFile, res.data.originalRecordFile) - } + // if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) { + // createMeasureCert({ id: infoId.value }).then((res) => { + // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + // form.value.certificateFile = res.data.certificateFile // 检定证书 + // emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // loading.close() + // }) + // } + // else { + loading.close() + form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + form.value.certificateFile = res.data.certificateFile // 检定证书 + emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // } }) } diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue index f2d837b..67fadfe 100644 --- a/src/views/business/taskMeasure/certificate/list.vue +++ b/src/views/business/taskMeasure/certificate/list.vue @@ -15,11 +15,13 @@ import { approvalDelete, cancelApproval, + createMeasureCert, draftDelete, exportCertificateList, getCertificateList, refuseApproval, } from '@/api/business/taskMeasure/certificate' + const buttonBoxActive = 'businessCertificate' // 存储在sessionstorage里面的字段名,用于记录右上角buttonbox点击状态 const { proxy } = getCurrentInstance() as any const $router = useRouter() @@ -147,7 +149,9 @@ } // ----------------------------------------------操作--------------------------------------------------- +const approvalId = ref('') // 操作的行id const handleEdit = (row: IList, type: string) => { + approvalId.value = row.id if (type === 'detail') { // 详情 $router.push({ path: `/businessCertificate/${type}/${row.id}`, @@ -236,9 +240,16 @@ }) } // -----------------------------------------审批------------------------------------------------ -// 审批结束回调 +// 审批结束回调(同意) const approvalSuccess = () => { - fetchData(true) + loadingTable.value = true + createMeasureCert({ id: approvalId.value }).then((res) => { + // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + // form.value.certificateFile = res.data.certificateFile // 检定证书 + // emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // loading.close() + fetchData(true) + }) } // 切换tab状态 diff --git a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue index afe1fa1..5639925 100644 --- a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue +++ b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue @@ -3,6 +3,7 @@ import { ref } from 'vue' import { ElLoading, ElMessage } from 'element-plus' import dayjs from 'dayjs' +import { PageActionEventType } from 'pdfjs-dist/types/src/shared/util' import selectStandard from '../dialog/selectStandardDialog.vue' import type { ITempelateForm } from '../measureData-interface' import useUserStore from '@/store/modules/user' @@ -258,17 +259,19 @@ 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 + if (props.pageType === 'add') { + 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(';') diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue index 1615c82..5f68915 100644 --- a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue @@ -95,7 +95,7 @@ { text: '检定项目', value: 'params', align: 'center', required: true }, { text: '标称值', value: 'nominalValueDefineFront', align: 'center', required: true }, { text: '指标下限', value: 'lowerIndex', align: 'center', required: false }, - { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '220' }, + { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '320' }, { text: '指标上限', value: 'upperIndex', align: 'center', required: false }, { text: '相对误差', value: 'relativeError', align: 'center', required: false }, { text: 'U(k=2)', value: 'urel', align: 'center', required: true }, @@ -212,7 +212,7 @@ lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波 modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率 nominalValueDefineFront: item.nominalValue + item.unit, // 标称值 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计 @@ -231,7 +231,7 @@ modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率 nominalValueDefineFront: item.nominalValue + item.unit, // 标称值 measureValueUnit: item.unit, // 测量值单位 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) @@ -248,7 +248,7 @@ frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率 highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波 lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计 @@ -264,7 +264,7 @@ frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率 highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波 lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计 @@ -280,7 +280,7 @@ frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率 amplitudeDefineFront: item.amplitude + item.amplitudeUnit, // 幅度 measureValueDefineFront: item.measureValue + item.measureValueUnit, // 测量值 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计 @@ -299,7 +299,7 @@ modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率 nominalValueDefineFront: item.nominalValue + item.unit, // 标称值 measureValueUnit: item.unit, // 测量值单位 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计 @@ -316,7 +316,7 @@ powerDefineFront: item.power + item.powerUnit, // 功率 offsetFrequencyDefineFront: item.offsetFrequency + item.offsetFrequencyUnit, // 偏移频率 // measureValueUnit: 'dBc', // 测量值单位 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) @@ -370,7 +370,7 @@ upperIndex: '', // 指标上限 lowerIndex: '', // 指标下限 measureValue: '', // 测量值 - measureValueUnit: item.nominalValueUnit, // 测量值单位 + measureValueUnit: item.unit, // 测量值单位 relativeError: '', // 相对误差 urel: item.urel, // U(k=2) technicalIndex: item.technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue index 7031e67..0a462df 100644 --- a/src/components/Approval/ApprovalDialog.vue +++ b/src/components/Approval/ApprovalDialog.vue @@ -119,8 +119,8 @@ 同意 + 驳回 + --> 拒绝 diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue index 15a9741..7f14ac9 100644 --- a/src/components/MultiHeaderTable/tableColumn.vue +++ b/src/components/MultiHeaderTable/tableColumn.vue @@ -95,13 +95,23 @@ @change="handleInputChange(scope)" @blur="handleInputBlur(scope.row)" /> - + /> --> +
+ + {{ scope.row.showUnitData }} +
diff --git a/src/views/business/measure/item/useCalculateResolution.ts b/src/views/business/measure/item/useCalculateResolution.ts index 3e1e08a..2615de8 100644 --- a/src/views/business/measure/item/useCalculateResolution.ts +++ b/src/views/business/measure/item/useCalculateResolution.ts @@ -27,7 +27,7 @@ */ export function caculateDecimalDigits(value: any) { if (!value || `${value}` === '' || `${value}` === 'undefined') { - return false + return value } const data = Number(value) console.log('计算分辨力小数点后面有几位分辨力数值:', value) diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue index f9b9632..7b71b09 100644 --- a/src/views/business/taskMeasure/certificate/components/basic.vue +++ b/src/views/business/taskMeasure/certificate/components/basic.vue @@ -86,20 +86,20 @@ background: 'rgba(255, 255, 255, 0.8)', }) getInfo({ id: infoId.value }).then((res) => { - if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) { - createMeasureCert({ id: infoId.value }).then((res) => { - form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 - form.value.certificateFile = res.data.certificateFile // 检定证书 - emits('reportData', res.data.certificateFile, res.data.originalRecordFile) - loading.close() - }) - } - else { - loading.close() - form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 - form.value.certificateFile = res.data.certificateFile // 检定证书 - emits('reportData', res.data.certificateFile, res.data.originalRecordFile) - } + // if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) { + // createMeasureCert({ id: infoId.value }).then((res) => { + // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + // form.value.certificateFile = res.data.certificateFile // 检定证书 + // emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // loading.close() + // }) + // } + // else { + loading.close() + form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + form.value.certificateFile = res.data.certificateFile // 检定证书 + emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // } }) } diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue index f2d837b..67fadfe 100644 --- a/src/views/business/taskMeasure/certificate/list.vue +++ b/src/views/business/taskMeasure/certificate/list.vue @@ -15,11 +15,13 @@ import { approvalDelete, cancelApproval, + createMeasureCert, draftDelete, exportCertificateList, getCertificateList, refuseApproval, } from '@/api/business/taskMeasure/certificate' + const buttonBoxActive = 'businessCertificate' // 存储在sessionstorage里面的字段名,用于记录右上角buttonbox点击状态 const { proxy } = getCurrentInstance() as any const $router = useRouter() @@ -147,7 +149,9 @@ } // ----------------------------------------------操作--------------------------------------------------- +const approvalId = ref('') // 操作的行id const handleEdit = (row: IList, type: string) => { + approvalId.value = row.id if (type === 'detail') { // 详情 $router.push({ path: `/businessCertificate/${type}/${row.id}`, @@ -236,9 +240,16 @@ }) } // -----------------------------------------审批------------------------------------------------ -// 审批结束回调 +// 审批结束回调(同意) const approvalSuccess = () => { - fetchData(true) + loadingTable.value = true + createMeasureCert({ id: approvalId.value }).then((res) => { + // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录 + // form.value.certificateFile = res.data.certificateFile // 检定证书 + // emits('reportData', res.data.certificateFile, res.data.originalRecordFile) + // loading.close() + fetchData(true) + }) } // 切换tab状态 diff --git a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue index afe1fa1..5639925 100644 --- a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue +++ b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue @@ -3,6 +3,7 @@ import { ref } from 'vue' import { ElLoading, ElMessage } from 'element-plus' import dayjs from 'dayjs' +import { PageActionEventType } from 'pdfjs-dist/types/src/shared/util' import selectStandard from '../dialog/selectStandardDialog.vue' import type { ITempelateForm } from '../measureData-interface' import useUserStore from '@/store/modules/user' @@ -258,17 +259,19 @@ 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 + if (props.pageType === 'add') { + 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(';') diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue index 1615c82..5f68915 100644 --- a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue @@ -95,7 +95,7 @@ { text: '检定项目', value: 'params', align: 'center', required: true }, { text: '标称值', value: 'nominalValueDefineFront', align: 'center', required: true }, { text: '指标下限', value: 'lowerIndex', align: 'center', required: false }, - { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '220' }, + { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '320' }, { text: '指标上限', value: 'upperIndex', align: 'center', required: false }, { text: '相对误差', value: 'relativeError', align: 'center', required: false }, { text: 'U(k=2)', value: 'urel', align: 'center', required: true }, @@ -212,7 +212,7 @@ lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波 modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率 nominalValueDefineFront: item.nominalValue + item.unit, // 标称值 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计 @@ -231,7 +231,7 @@ modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率 nominalValueDefineFront: item.nominalValue + item.unit, // 标称值 measureValueUnit: item.unit, // 测量值单位 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) @@ -248,7 +248,7 @@ frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率 highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波 lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计 @@ -264,7 +264,7 @@ frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率 highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波 lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计 @@ -280,7 +280,7 @@ frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率 amplitudeDefineFront: item.amplitude + item.amplitudeUnit, // 幅度 measureValueDefineFront: item.measureValue + item.measureValueUnit, // 测量值 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计 @@ -299,7 +299,7 @@ modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率 nominalValueDefineFront: item.nominalValue + item.unit, // 标称值 measureValueUnit: item.unit, // 测量值单位 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计 @@ -316,7 +316,7 @@ powerDefineFront: item.power + item.powerUnit, // 功率 offsetFrequencyDefineFront: item.offsetFrequency + item.offsetFrequencyUnit, // 偏移频率 // measureValueUnit: 'dBc', // 测量值单位 - upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限 + upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限 technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标 technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数) @@ -370,7 +370,7 @@ upperIndex: '', // 指标上限 lowerIndex: '', // 指标下限 measureValue: '', // 测量值 - measureValueUnit: item.nominalValueUnit, // 测量值单位 + measureValueUnit: item.unit, // 测量值单位 relativeError: '', // 相对误差 urel: item.urel, // U(k=2) technicalIndex: item.technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数) diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue index 0da1053..aabbefb 100644 --- a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue +++ b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue @@ -152,8 +152,25 @@