diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue index 3a2b325..e6ffc98 100644 --- a/src/views/business/lab/myMeasure/myMeasureList.vue +++ b/src/views/business/lab/myMeasure/myMeasureList.vue @@ -283,7 +283,7 @@ // 点击生成原始记录 const createPrimitiveLog = (row: any) => { let type = 'add' - switch (row.sampleFileStatus) { + switch (String(row.sampleFileStatus)) { case '1': type = 'add' break @@ -307,8 +307,8 @@ // 生成证书 const createCertificate = (row: any) => { let type = 'add' - switch (row.sampleFileStatus) { - case '1': + switch (String(row.sampleFileStatus)) { + case '2': type = 'add' break case '4': @@ -318,15 +318,22 @@ type = 'edit' break } - // 获取证书详情 - getReportDetail({ id: row.certificateReportId }).then((res) => { + const nav = (data: any) => { $router.push({ path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`, query: { - row: JSON.stringify(res.data), + row: JSON.stringify(data), originalRecordId: row.originalRecordId, }, }) + } + if (type === 'add') { + nav({}) + return + } + // 获取证书详情 + getReportDetail({ id: row.certificateReportId }).then((res) => { + nav(res.data) }) } // 点击添加设备