引入归档接口

This commit is contained in:
caozehui
2025-01-13 18:20:35 +08:00
parent f58f7b97e5
commit f3ee11ebab
2 changed files with 26 additions and 18 deletions

View File

@@ -37,3 +37,8 @@ export const importPqDev=(params: Device.ReqPqDevParams)=>{
return http.upload(`/pqDev/import`, params) return http.upload(`/pqDev/import`, params)
} }
//被检设备归档
export const documentedPqDev=(ids:string[])=>{
return http.post(`/pqDev/documented`, ids)
}

View File

@@ -262,6 +262,7 @@ import auth from "@/directives/modules/auth";
import { useAuthStore } from "@/stores/modules/auth"; import { useAuthStore } from "@/stores/modules/auth";
import { useDownload } from '@/hooks/useDownload' import { useDownload } from '@/hooks/useDownload'
import {downloadDevData} from '@/api/plan/plan.ts' import {downloadDevData} from '@/api/plan/plan.ts'
import {documentedPqDev} from "@/api/device/device";
const dictStore = useDictStore() const dictStore = useDictStore()
const checkStore = useCheckStore() const checkStore = useCheckStore()
@@ -972,15 +973,16 @@ const handleTest = async (val:string) => {
if(val==='批量归档') if(val==='批量归档')
{ {
const loading = ElLoading.service({ // const loading = ElLoading.service({
lock: true, // lock: true,
text: '归档中...', // text: '归档中...',
background: 'rgba(0, 0, 0, 0.7)', // background: 'rgba(0, 0, 0, 0.7)',
}) // })
setTimeout(() => { // setTimeout(() => {
loading.close() // loading.close()
ElMessage.success("归档成功"); // ElMessage.success("归档成功");
}, 2000) // }, 2000)
documentedPqDev(checkStore.devices.map(item => {item.deviceId}))
} }
@@ -1018,15 +1020,16 @@ const openDrawer = (title: string, row: any) => {
if (title === '归档') if (title === '归档')
{ {
const loading = ElLoading.service({ documentedPqDev([row.id])
lock: true, // const loading = ElLoading.service({
text: '归档中...', // lock: true,
background: 'rgba(0, 0, 0, 0.7)', // text: '归档中...',
}) // background: 'rgba(0, 0, 0, 0.7)',
setTimeout(() => { // })
loading.close() // setTimeout(() => {
ElMessage.success("归档成功"); // loading.close()
}, 2000) // ElMessage.success("归档成功");
// }, 2000)
} }
} }