Parcourir la source

文件收集修改

duy il y a 1 an
Parent
commit
cbd38185bb
1 fichiers modifiés avec 19 ajouts et 4 suppressions
  1. 19 4
      src/views/file/collection.vue

+ 19 - 4
src/views/file/collection.vue

@@ -803,11 +803,12 @@ const tableindex = ref('')
 const setTableCheck = async (row, index) => {
     if (row.ids) {
         const keys = row.ids.split(','), list = row.list
-        for (let i = 0; i < list.list; i++) {
+        for (let i = 0; i < list.length; i++) {
             const item = list[i]
             if (keys.indexOf(item.id) > -1) {
                 item.checked = true
                 await nextTick()
+                console.log(sorTableRef.value[index], 'sorTableRef.value[index]')
                 sorTableRef.value[index].toggleRowSelection(item, true)
             }
         }
@@ -1599,11 +1600,25 @@ const CertClick = async () => {
 
 //名称被点击
 const tableRowName = (row) => {
-    if (row['pdfFileUrl']) {
-        window.open(row['pdfFileUrl'], '_blank')
+    console.log(row, 'row')
+    if (row?.isCertificationValue === '已认证' || row?.isApprovalValue === '已审批') {
+        if (row['eVisaFile']) {
+            window.open(row['eVisaFile'], '_blank')
+        } else if (row['pdfFileUrl']) {
+            window.open(row['pdfFileUrl'], '_blank')
+         
+        } else {
+            window.$message?.warning('文件不存在')
+        }
     } else {
-        window.$message?.warning('文件不存在')
+        if (row['pdfFileUrl']) {
+            window.open(row['pdfFileUrl'], '_blank')
+        } else {
+            window.$message?.warning('文件不存在')
+        }
     }
+
+  
 }
 
 //上报