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) } }