From 5685babbcf4eb0b1cbbe1385472d862ce5fbb410 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期四, 06 四月 2023 14:23:53 +0800
Subject: [PATCH] 地质体模型挂载,数据申请页面 添加下载功能

---
 src/views/Archive/dataApplication.vue |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/src/views/Archive/dataApplication.vue b/src/views/Archive/dataApplication.vue
index 4f667c4..158843e 100644
--- a/src/views/Archive/dataApplication.vue
+++ b/src/views/Archive/dataApplication.vue
@@ -168,6 +168,13 @@
               plain
               @click="handlDetails(scope.$index, scope.row)"
             >{{ $t("dataApply.details") }}</el-button>
+            <el-button
+              v-show="scope.row.guid != null"
+              type="success"
+              size="mini"
+              plain
+              @click="handlDownload(scope.$index, scope.row)"
+            >{{ $t("common.download") }}</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -189,7 +196,6 @@
       :title="$t('dataApply.details')"
       :visible.sync="dialogDetailsVisible"
       width="50%"
-      :before-close="handleClose"
     >
       <div>
         <el-form
@@ -278,6 +284,11 @@
         </el-table>
       </div>
     </el-dialog>
+    <iframe
+      id="downFrame"
+      src=""
+      style="display: none; border: 0; padding: 0; height: 0; width: 0"
+    ></iframe>
   </div>
 </template>
 
@@ -291,6 +302,8 @@
   apply_updateForReject,
   apply_updateForResubmit,
 } from "../../api/api";
+import $ from 'jquery'
+import { getToken } from '@/utils/auth';
 export default {
   //import寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
   components: {
@@ -372,6 +385,7 @@
         return this.$message.error("鍒楄〃璋冪敤澶辫触");
       }
       this.detailsFrom.tableData = data1.result;
+
     },
     async handleReApply(index, row) {
       const data = await apply_updateForResubmit({ applyid: row.id });
@@ -405,6 +419,12 @@
       this.detailsFrom.statued = row.status;
       this.dialogDetailsVisible = true;
     },
+    async handlDownload(index, row) {
+
+      var token = getToken()
+      var url = BASE_URL + "/dataLib/downloadFile?token=" + token + "&guid=" + row.guid;
+      $("#downFrame").attr("src", url).click();
+    },
     matchState(state = "", reg) {
       var row = state.row;
       if (

--
Gitblit v1.9.3