This commit is contained in:
sjl
2025-01-13 23:17:31 +08:00
3 changed files with 177 additions and 97 deletions

View File

@@ -154,8 +154,7 @@
v-if="form.activeTabs === 4"
>数据查看</el-button
> -->
<el-button
:type="scope.row.check_State === '检测完成' ? 'primary' : 'info'"
<el-button type='primary'
link
:icon="Notebook"
@click="openDrawer('归档', scope.row)"
@@ -264,6 +263,7 @@ import { useDownload } from '@/hooks/useDownload'
import {downloadDevData} from '@/api/plan/plan.ts'
import {documentedPqDev} from "@/api/device/device";
import { getPqDev } from '@/api/device/device/index.ts'
import {ResultEnum} from "@/enums/httpEnum";
const dictStore = useDictStore()
const checkStore = useCheckStore()
const webMsgSend = ref();//webSocket推送的数据
@@ -1014,7 +1014,11 @@ const handleTest = async (val:string) => {
// loading.close()
// ElMessage.success("归档成功");
// }, 2000)
documentedPqDev(checkStore.devices.map(item => {item.deviceId}))
documentedPqDev(checkStore.devices.map(item => {item.deviceId})).then((res) => {
if(res.code === ResultEnum.SUCCESS){
ElMessage.success("归档成功!");
}
})
}
@@ -1052,7 +1056,11 @@ const openDrawer = async (title: string, row: any) => {
if (title === '归档')
{
await documentedPqDev([row.id])
await documentedPqDev([row.id]).then((res) => {
if(res.code === ResultEnum.SUCCESS){
ElMessage.success("归档成功!");
}
})
emit('batchGenerateClicked'); // 触发事件
// const loading = ElLoading.service({
// lock: true,