liuyc 8 ماه پیش
والد
کامیت
d96c50f495
1فایلهای تغییر یافته به همراه13 افزوده شده و 8 حذف شده
  1. 13 8
      src/views/tentative/collect/monthly.vue

+ 13 - 8
src/views/tentative/collect/monthly.vue

@@ -313,8 +313,8 @@ const getTableData = async () => {
              tableData.value = arr
              searchForm.value.total = data['total']
         })
-  
-   
+
+
 
         } else {
             tableData.value = []
@@ -330,7 +330,7 @@ const editorsNoteModalClick = (row) => {
     console.log(row, 'row')
     editorsNoteModal.value = true
     recordId.value = row.recordId
-  
+
 
 }
 
@@ -342,7 +342,7 @@ const editorsNoteModalSave = async (id) => {
         contractId: contractId.value,
         recordId: recordId.value,
         remarks:editorsNoteVal.value,
-      
+
     })
     //判断状态
     if (!error && code === 200) {
@@ -380,7 +380,7 @@ const printClick = async ()=>{
                 toPdfPage(res)
                 //window.open(res, '_blank')
             }
-            
+
 }
 const downLoading = ref(false)
 const downClick = async ()=>{
@@ -395,21 +395,26 @@ const downClick = async ()=>{
         window.$message.warning('请选择试验检测项目名称')
         return
     }
-    const { error, disposition, res } = await downloadMonth({
+    const {error, code, data} = await downloadMonth({
             ...searchForm.value,
             ids:'1635200237830144002',
             contractId:contractId.value,
         })
         downLoading.value = false
-        //判断状态
+        /*//判断状态
         if (!error) {
         if (disposition) {
             downloadBlob(res, disposition)
         } else {
             window.$message?.error('数据异常')
         }
+    }*///判断状态
+    const res = isString(data) ? data || '' : ''
+    if (!error && code === 200 && res) {
+        //toPdfPage(res)
+        window.open(res, '_blank')
     }
-            
+
 }
 </script>