From 629600bc0010535a4ed91f0c11790c1cfa96bd30 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Fri, 16 May 2025 10:33:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=92=E6=A1=A3=E5=89=8D=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=B2=A1=E6=9C=89=E7=94=9F=E6=88=90=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E5=88=99=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90=E6=8A=A5?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/device/device/index.ts | 5 ----- frontend/src/api/device/report/index.ts | 4 ++++ frontend/src/views/home/components/table.vue | 3 +-- frontend/src/views/home/components/test.vue | 12 ++++++++++-- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/frontend/src/api/device/device/index.ts b/frontend/src/api/device/device/index.ts index 4d276d0..f41766b 100644 --- a/frontend/src/api/device/device/index.ts +++ b/frontend/src/api/device/device/index.ts @@ -64,8 +64,3 @@ export const importContrastPqDev = (params: Device.ReqPqDevParams) => { export const getPqDev = () => { return http.get(`/devType/listAll`) } - -//被检设备归档 -export const documentedPqDev = (ids: string[]) => { - return http.post(`/pqDev/documented`, ids) -} diff --git a/frontend/src/api/device/report/index.ts b/frontend/src/api/device/report/index.ts index 9a64ce9..f6fd8db 100644 --- a/frontend/src/api/device/report/index.ts +++ b/frontend/src/api/device/report/index.ts @@ -40,3 +40,7 @@ export const getPqReportAllVersion = (params:any) => { return http.get(`/report/listAllVersion?name=${params.name}`) } +//被检设备归档 +export const documentedPqDev = (ids: string[]) => { + return http.post(`/report/documented`, ids) +} \ No newline at end of file diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue index 792cc5b..796c333 100644 --- a/frontend/src/views/home/components/table.vue +++ b/frontend/src/views/home/components/table.vue @@ -161,7 +161,6 @@ :icon='Notebook' @click="openDrawer('归档', scope.row)" v-if='form.activeTabs === 4' - :disabled='scope.row.reportState != 1' >归档 @@ -281,7 +280,7 @@ import auth from '@/directives/modules/auth' import {useAuthStore} from '@/stores/modules/auth' import {useDownload} from '@/hooks/useDownload' import {downloadDevData} from '@/api/plan/plan.ts' -import {documentedPqDev} from '@/api/device/device' +import {documentedPqDev} from '@/api/device/report' import {getPqDev} from '@/api/device/device/index.ts' import {ResultEnum} from '@/enums/httpEnum' import SelectTestItemPopup from "@/views/home/components/selectTestItemPopup.vue"; diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue index 6e7b250..9592e2e 100644 --- a/frontend/src/views/home/components/test.vue +++ b/frontend/src/views/home/components/test.vue @@ -712,8 +712,16 @@ const updatePercentage = async () => { let {data: autoGenerate} = await getAutoGenerate() if (autoGenerate == 1) { //调用自动生成报告接口 - let deviceIds = checkStore.devices.map(item => item.deviceId) - // await generateDevReport({'planId': checkStore.plan.id, 'devId':deviceIds[0] ,'scriptId':checkStore.plan.scriptId,'planCode':checkStore.plan.code+''}) + let devIdList=checkStore.devices.map(item => { + return item.deviceId + }) + + await generateDevReport({ + 'planId': checkStore.plan.id, + 'devIdList':devIdList, + 'scriptId':checkStore.plan.scriptId, + 'planCode':checkStore.plan.code+'' + }) } ElMessageBox.alert('检测全部结束,你可以停留在此页面查看检测结果,或返回首页进行复检、报告生成和归档等操作', '检测完成', { confirmButtonText: '确定',