引入归档接口

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)
}
//被检设备归档
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 { 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)
}
}