Browse Source

Merge remote-tracking branch 'origin/master'

ZaiZai 1 year ago
parent
commit
3f911d977f
2 changed files with 18 additions and 2 deletions
  1. 9 1
      src/views/debit-pay/material/order.vue
  2. 9 1
      src/views/debit-pay/start-work/order.vue

+ 9 - 1
src/views/debit-pay/material/order.vue

@@ -88,7 +88,7 @@
                     <div class="mt-5">附件列表</div>
                     <div class="mt-3">
                         <template v-if="infoData?.fileList?.length > 0">
-                            <el-check-tag v-for="item in infoData?.fileList" :key="item.id" checked class="mr-2">{{ item.fileName }}</el-check-tag>
+                            <el-check-tag v-for="item in infoData?.fileList" :key="item.id" checked class="mr-2" @click="viewFile(item)">{{ item.fileName }}</el-check-tag>
                         </template>
                        
                         <HcNoData v-else />
@@ -207,6 +207,14 @@ const getDetail = async (id)=>{
         infoData.value = {}
     }
 }
+//查看附件
+const viewFile = (item)=>{
+    const { filePdfUrl } = item
+    if (filePdfUrl) {
+        window.open(filePdfUrl, '_blank')
+    }
+    
+}
 //表格选择
 const tableCheckChange = () => {
 

+ 9 - 1
src/views/debit-pay/start-work/order.vue

@@ -58,7 +58,7 @@
                     <div class="mt-5">附件列表</div>
                     <div class="mt-3">
                         <template v-if="infoData?.fileList?.length > 0">
-                            <el-check-tag v-for="item in infoData?.fileList" :key="item.id" checked class="mr-2">{{ item.fileName }}</el-check-tag>
+                            <el-check-tag v-for="item in infoData?.fileList" :key="item.id" checked class="mr-2" @click="viewFile(item)">{{ item.fileName }}</el-check-tag>
                         </template>
                        
                         <HcNoData v-else />
@@ -172,6 +172,14 @@ const getDetail = async (id)=>{
         infoData.value = {}
     }
 }
+//查看附件
+const viewFile = (item)=>{
+    const { filePdfUrl } = item
+    if (filePdfUrl) {
+        window.open(filePdfUrl, '_blank')
+    }
+    
+}
 //表格选择
 const tableCheckChange = () => {