Browse Source

试验材料进场附件预览

duy 2 months ago
parent
commit
5f8a5f12d6
1 changed files with 11 additions and 12 deletions
  1. 11 12
      src/views/tentative/material/approach.vue

+ 11 - 12
src/views/tentative/material/approach.vue

@@ -72,7 +72,7 @@
                 </div>
             </template>
             <HcTable
-                ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading"
+                ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoad"
                 is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
                 @selection-change="tableSelection"
             >
@@ -218,7 +218,7 @@
 
         <!-- 查看附件 -->
         <hc-new-dialog
-            v-model="viewAttachmentModal" is-table title="查看附件" widths="70rem" is-row-footer
+            v-model="viewAttachmentModal" is-table title="查看附件444" widths="70rem" is-row-footer
             @close="viewAttachmentModalClose"
         >
             <template #extra>
@@ -227,12 +227,7 @@
             <div class="hc-switch-tab-content">
                 <div class="h-full w-full">
                     <div v-if="tableRowData[tabTypeKey]" style="text-align:center;height:100%">
-                        <iframe
-                            v-if="tableRowData[tabTypeKey] && ispdf !== -1" :src="tableRowData[tabTypeKey]" allow="display-capture" frameborder="1"
-                            height="100%" style="height: 100%;"
-                            width="100%"
-                        />
-                        <div v-if="ispdf == -1" class="hc-no-table-form">
+                        <div class="hc-no-table-form">
                             <div class="table-form-no" style="margin-top:100px">
                                 <!-- <img :src="notableform" alt=""/>
                                 <div class="desc">暂无 PDF 数据,请上传</div> -->
@@ -242,7 +237,7 @@
                                     @finished="tableRowPdfFinished"
                                     @progress="tableRowPdfProgress"
                                 />
-                                <el-link :href="tableRowData[tabTypeKey]" style="margin-top:10px" type="primary">
+                                <el-link style="margin-top:10px" type="primary" @click="tableItemClick(tableRowData)">
                                     {{ splitFileName(tableRowData[tabTypeKey]) }}
                                 </el-link>
                             </div>
@@ -390,19 +385,23 @@ const tableColumn = ref([
     { key: 'action', name: '操作', width: 150, fixed: 'right', align: 'center' },
 ])
 const tableRowData = ref({})
+const tableItemClick = (row) => {
+    console.log(row, 'rwo')
+    
+}
 
 //获取数据
-const tableLoading = ref(false)
+const tableLoad = ref(true)
 const tableData = ref([])
 const getTableData = async () => {
-    tableLoading.value = true
+    tableLoad.value = true
     const { error, code, data } = await approachApi.queryPage({
         projectId: projectId.value,
         contractId: contractId.value,
         ...searchForm.value,
     })
     //处理数据
-    tableLoading.value = false
+    tableLoad.value = false
     if (!error && code === 200) {
         tableData.value = getArrValue(data['records'])
         searchForm.value.total = data.total || 0