2
0

2 Commits a8b3c82445 ... 6c659c0932

Autor SHA1 Mensagem Data
  liuyc 6c659c0932 Merge remote-tracking branch 'origin/master' 8 meses atrás
  liuyc d96c50f495 excel下载 8 meses atrás
1 arquivos alterados com 13 adições e 8 exclusões
  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>