|  |  | @ -73,7 +73,11 @@ import { | 
			
		
	
		
		
			
				
					
					|  |  |  |   updateTestSheetStatus, |  |  |  |   updateTestSheetStatus, | 
			
		
	
		
		
			
				
					
					|  |  |  | } from '@/api/module/eam/device/template' |  |  |  | } from '@/api/module/eam/device/template' | 
			
		
	
		
		
			
				
					
					|  |  |  | import { isResError, useMessage } from '@/hooks/useMessage' |  |  |  | import { isResError, useMessage } from '@/hooks/useMessage' | 
			
		
	
		
		
			
				
					
					|  |  |  | import { getDeviceTestSheet, type IDevice } from '@/api/module/eam/device' |  |  |  | import { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   getDeviceReportPDF, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   getDeviceTestSheet, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   type IDevice, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | } from '@/api/module/eam/device' | 
			
		
	
		
		
			
				
					
					|  |  |  | import { useRoute } from 'vue-router' |  |  |  | import { useRoute } from 'vue-router' | 
			
		
	
		
		
			
				
					
					|  |  |  | import testSheetInfoDlg from './testSheetInfoDlg.vue' |  |  |  | import testSheetInfoDlg from './testSheetInfoDlg.vue' | 
			
		
	
		
		
			
				
					
					|  |  |  | const route = useRoute() |  |  |  | const route = useRoute() | 
			
		
	
	
		
		
			
				
					|  |  | @ -126,11 +130,24 @@ const isShowDetail = ref(false) | 
			
		
	
		
		
			
				
					
					|  |  |  | const sheetDetail = ref<any>([]) |  |  |  | const sheetDetail = ref<any>([]) | 
			
		
	
		
		
			
				
					
					|  |  |  | const curSheetDetailName = ref<any>() |  |  |  | const curSheetDetailName = ref<any>() | 
			
		
	
		
		
			
				
					
					|  |  |  | async function loadSheetDetail(row: any) { |  |  |  | async function loadSheetDetail(row: any) { | 
			
		
	
		
		
			
				
					
					|  |  |  |   const res = await getSheetDetail(row.id) |  |  |  |   // const res = await getSheetDetail(row.id) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // if (isResError(res)) return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // sheetDetail.value = res.data | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // isShowDetail.value = true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // curSheetDetailName.value = row.name | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   onPrintReport() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | async function onPrintReport() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // setLoadingPrint() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   const res = await getDeviceReportPDF(props.deviceId) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // closeLoadingPrint() | 
			
		
	
		
		
			
				
					
					|  |  |  |   if (isResError(res)) return |  |  |  |   if (isResError(res)) return | 
			
		
	
		
		
			
				
					
					|  |  |  |   sheetDetail.value = res.data |  |  |  |   const pdfURL = URL.createObjectURL(res.data) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   isShowDetail.value = true |  |  |  |   const printWindow = window.open(pdfURL) as any | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   curSheetDetailName.value = row.name |  |  |  |   // printWindow.onload = () => { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   //   printWindow.print() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | watch( |  |  |  | watch( | 
			
		
	
	
		
		
			
				
					|  |  | 
 |