From f3ee11ebab85746e472dbf384a62582d846e3e71 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Mon, 13 Jan 2025 18:20:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5=E5=BD=92=E6=A1=A3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= 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/views/home/components/table.vue | 39 +++++++++++--------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/frontend/src/api/device/device/index.ts b/frontend/src/api/device/device/index.ts index 9deebd8..b9a89a3 100644 --- a/frontend/src/api/device/device/index.ts +++ b/frontend/src/api/device/device/index.ts @@ -37,3 +37,8 @@ export const importPqDev=(params: Device.ReqPqDevParams)=>{ return http.upload(`/pqDev/import`, params) } + +//被检设备归档 +export const documentedPqDev=(ids:string[])=>{ + return http.post(`/pqDev/documented`, ids) +} diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue index 7aa229d..7ea3e41 100644 --- a/frontend/src/views/home/components/table.vue +++ b/frontend/src/views/home/components/table.vue @@ -262,6 +262,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"; const dictStore = useDictStore() const checkStore = useCheckStore() @@ -972,15 +973,16 @@ const handleTest = async (val:string) => { if(val==='批量归档') { - const loading = ElLoading.service({ - lock: true, - text: '归档中...', - background: 'rgba(0, 0, 0, 0.7)', - }) - setTimeout(() => { - loading.close() - ElMessage.success("归档成功"); - }, 2000) + // const loading = ElLoading.service({ + // lock: true, + // text: '归档中...', + // background: 'rgba(0, 0, 0, 0.7)', + // }) + // setTimeout(() => { + // loading.close() + // ElMessage.success("归档成功"); + // }, 2000) + documentedPqDev(checkStore.devices.map(item => {item.deviceId})) } @@ -1018,15 +1020,16 @@ const openDrawer = (title: string, row: any) => { if (title === '归档') { - const loading = ElLoading.service({ - lock: true, - text: '归档中...', - background: 'rgba(0, 0, 0, 0.7)', - }) - setTimeout(() => { - loading.close() - ElMessage.success("归档成功"); - }, 2000) + documentedPqDev([row.id]) + // const loading = ElLoading.service({ + // lock: true, + // text: '归档中...', + // background: 'rgba(0, 0, 0, 0.7)', + // }) + // setTimeout(() => { + // loading.close() + // ElMessage.success("归档成功"); + // }, 2000) } }