Эх сурвалжийг харах

在线验收预览接口调用

duy 1 жил өмнө
parent
commit
806ad31d4f

+ 8 - 0
src/api/modules/initial/initial.js

@@ -154,4 +154,12 @@ export default {
             params: form,
         }, msg)
     },
+    //在线验收-预览
+    async getAppPreview(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-archive/archiveExpertConclusion/getAppPreview',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
 }

+ 17 - 2
src/views/transfer/initial-expert.vue

@@ -7,7 +7,7 @@
                     @change="tabChange"
                 />
                 <HcTooltip keys="transfer_initial_expert_btn_preview">
-                    <el-button hc-btn type="primary">
+                    <el-button hc-btn type="primary" @click="previewClick">
                         <HcIcon name="file-pdf" />
                         <span>预览</span>
                     </el-button>
@@ -48,7 +48,7 @@
                                     is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
                                     @selection-change="tableSelection"
                                 /> -->
-                                <visualTable :table-data="item1.list " :is-check="false" @getTableKeys="getTableKeys" />
+                                <visualTable :table-data="item1.list " :is-check="false" @get-table-keys="getTableKeys" />
                             </div>
                         </HcCardItem>
                     </template>
@@ -303,6 +303,21 @@ const pdfDate = ref(null)
 const onSubmitReportDrawerClose = () => {
     isSubmitReportDrawer.value = false
 }
+
+//预览
+const previewClick = async ()=>{
+    const { error, code, data, msg } = await initialgApi.getAppPreview({
+        projectId: projectId.value,
+    })
+    if (!error && code === 200) {
+        if (data) {
+            window.open(data, '_blank')
+        } else {
+            window.$message?.warning('文件不存在')
+        }
+
+    }
+}
 </script>
 
 <style lang="scss" scoped>