归档前如果设备没有生成报告则自动生成报告
This commit is contained in:
@@ -64,8 +64,3 @@ export const importContrastPqDev = (params: Device.ReqPqDevParams) => {
|
|||||||
export const getPqDev = () => {
|
export const getPqDev = () => {
|
||||||
return http.get(`/devType/listAll`)
|
return http.get(`/devType/listAll`)
|
||||||
}
|
}
|
||||||
|
|
||||||
//被检设备归档
|
|
||||||
export const documentedPqDev = (ids: string[]) => {
|
|
||||||
return http.post(`/pqDev/documented`, ids)
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -40,3 +40,7 @@ export const getPqReportAllVersion = (params:any) => {
|
|||||||
return http.get(`/report/listAllVersion?name=${params.name}`)
|
return http.get(`/report/listAllVersion?name=${params.name}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//被检设备归档
|
||||||
|
export const documentedPqDev = (ids: string[]) => {
|
||||||
|
return http.post(`/report/documented`, ids)
|
||||||
|
}
|
||||||
@@ -161,7 +161,6 @@
|
|||||||
:icon='Notebook'
|
:icon='Notebook'
|
||||||
@click="openDrawer('归档', scope.row)"
|
@click="openDrawer('归档', scope.row)"
|
||||||
v-if='form.activeTabs === 4'
|
v-if='form.activeTabs === 4'
|
||||||
:disabled='scope.row.reportState != 1'
|
|
||||||
>归档
|
>归档
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
@@ -281,7 +280,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'
|
import {documentedPqDev} from '@/api/device/report'
|
||||||
import {getPqDev} from '@/api/device/device/index.ts'
|
import {getPqDev} from '@/api/device/device/index.ts'
|
||||||
import {ResultEnum} from '@/enums/httpEnum'
|
import {ResultEnum} from '@/enums/httpEnum'
|
||||||
import SelectTestItemPopup from "@/views/home/components/selectTestItemPopup.vue";
|
import SelectTestItemPopup from "@/views/home/components/selectTestItemPopup.vue";
|
||||||
|
|||||||
@@ -712,8 +712,16 @@ const updatePercentage = async () => {
|
|||||||
let {data: autoGenerate} = await getAutoGenerate()
|
let {data: autoGenerate} = await getAutoGenerate()
|
||||||
if (autoGenerate == 1) {
|
if (autoGenerate == 1) {
|
||||||
//调用自动生成报告接口
|
//调用自动生成报告接口
|
||||||
let deviceIds = checkStore.devices.map(item => item.deviceId)
|
let devIdList=checkStore.devices.map(item => {
|
||||||
// await generateDevReport({'planId': checkStore.plan.id, 'devId':deviceIds[0] ,'scriptId':checkStore.plan.scriptId,'planCode':checkStore.plan.code+''})
|
return item.deviceId
|
||||||
|
})
|
||||||
|
|
||||||
|
await generateDevReport({
|
||||||
|
'planId': checkStore.plan.id,
|
||||||
|
'devIdList':devIdList,
|
||||||
|
'scriptId':checkStore.plan.scriptId,
|
||||||
|
'planCode':checkStore.plan.code+''
|
||||||
|
})
|
||||||
}
|
}
|
||||||
ElMessageBox.alert('检测全部结束,你可以停留在此页面查看检测结果,或返回首页进行复检、报告生成和归档等操作', '检测完成', {
|
ElMessageBox.alert('检测全部结束,你可以停留在此页面查看检测结果,或返回首页进行复检、报告生成和归档等操作', '检测完成', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|||||||
Reference in New Issue
Block a user