Browse Source

pdf报告预览

jwyu 9 tháng trước cách đây
mục cha
commit
99f8eefb50
1 tập tin đã thay đổi với 8 bổ sung3 xóa
  1. 8 3
      src/views/report/pdf/List.vue

+ 8 - 3
src/views/report/pdf/List.vue

@@ -66,7 +66,7 @@ function getTitleTime(e) {
   return dayjs(e.ModifyTime).format('MMDD')
 }
 
-const userList = ref([])
+const pdfList = ref([])
 const page = ref(1)
 const pageSize = ref(10)
 const tableLoading = ref(false)
@@ -88,7 +88,7 @@ async function getReportList() {
   })
   tableLoading.value = false
   if (res.Ret === 200) {
-    userList.value = res.Data.List || []
+    pdfList.value = res.Data.List || []
     totals.value = res.Data.Paging.Totals
   }
 }
@@ -154,6 +154,10 @@ async function handleReportDelete(e){
   }
 }
 
+function handlePreviewPdf(e){
+  window.open(e.PdfUrl,'__blank')
+}
+
 </script>
 
 <template>
@@ -221,7 +225,7 @@ async function handleReportDelete(e){
     </div>
     <div class="list-wrap" style="margin-top: 20px">
       <el-table
-        :data="userList"
+        :data="pdfList"
         border
         stripe
         highlight-current-row
@@ -253,6 +257,7 @@ async function handleReportDelete(e){
           </template>
           <template #default="{ row }">
             <span v-if="column.key === 'Title'"
+              @click="handlePreviewPdf(row)"
               >{{ row.Title }}({{ getTitleTime(row) }})</span
             >
             <span v-else-if="column.key === 'ClassifyNameFirst'"