From c8e9849cb5f24848df0174c13bfbbff37bb08a5a Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 21 七月 2026 15:45:30 +0800
Subject: [PATCH] 维护

---
 src/views/project/donateconsolationfund/index.vue |   90 +++++++++++++++++++++++++++------------------
 1 files changed, 54 insertions(+), 36 deletions(-)

diff --git a/src/views/project/donateconsolationfund/index.vue b/src/views/project/donateconsolationfund/index.vue
index 774b8ac..4616177 100644
--- a/src/views/project/donateconsolationfund/index.vue
+++ b/src/views/project/donateconsolationfund/index.vue
@@ -9,9 +9,9 @@
     >
       <el-row align="left">
         <el-col :span="24">
-          <el-form-item label="鎹愮尞缂栧彿" prop="donorno">
+          <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
             <el-input
-              v-model="queryParams.donorno"
+              v-model="queryParams.caseNo"
               placeholder="璇疯緭鍏ユ崘鐚紪鍙�"
               clearable
               size="small"
@@ -89,7 +89,7 @@
             :data="donatebaseinfoList"
             @row-click="selectDonotor"
           >
-            <el-table-column label="鎹愮尞缂栧彿" align="center" prop="donorno" />
+            <el-table-column label="鎹愮尞缂栧彿" align="center" prop="caseNo" />
             <el-table-column
               label="鎹愮尞杩涘害"
               width="150"
@@ -148,7 +148,7 @@
               </el-col>
               <el-col :span="9">
                 <el-form-item label="鎹愮尞缂栧彿">
-                  <el-input v-model="curCase.donorno" disabled></el-input>
+                  <el-input v-model="curCase.caseNo" disabled></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="9">
@@ -333,10 +333,10 @@
         <!-- <el-form ref="applyForm" :model="applicationForm" label-width="120px"> -->
         <el-row>
           <el-col :span="8">
-            <el-form-item label="鎹愮尞缂栧彿" prop="donorno">
+            <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
               <el-input
                 disabled
-                v-model="form.donorno"
+                v-model="form.caseNo"
                 placeholder="璇疯緭鍏ユ崘鐚紪鍙�"
                 clearable
               />
@@ -758,6 +758,8 @@
 } from "@/api/project/donatebaseinfo";
 import Li_area_select from "@/components/Address";
 import OrgSelecter from "@/views/project/components/orgselect";
+import { getToken } from "@/utils/auth";
+
 
 export default {
   components: {
@@ -795,8 +797,8 @@
       updatedatas: {},
       //褰撳墠閫変腑鎹愮尞鑰呭鍚�
       curdonordoname: "",
-      //褰撳墠閫変腑鎹愮尞鑰呮渚嬬紪鍙�
-      curdonorno: "",
+      //褰撳墠閫変腑鎹愮尞鑰呬綇闄㈠彿
+      curcaseNo: "",
       // 閬僵灞�
       loading: true,
       // 瀵煎嚭閬僵灞�
@@ -834,7 +836,7 @@
         residencetown: null,
         recordstate: null,
         treatmenthospitalname: null,
-        donorno: null,
+        caseNo: null,
         reportername: null,
         reporttime: null,
       },
@@ -851,6 +853,9 @@
         amountrequested: [
           { required: true, message: "璇疯緭鍏ョ敵璇烽噾棰�", trigger: "blur" },
         ],
+      },
+      headers: {
+        Authorization: "Bearer " + getToken()
       },
       //褰撳墠閫変腑鎹愮尞妗堜緥
       curCase: {},
@@ -955,22 +960,35 @@
     totaldayin(e) {
       // const id =this.row.id
       getdownloadBX(e).then((res) => {
-        if (res.downloadUrl) {
-          var fileUrl = res;
-          //鑾峰彇褰撳墠缃戝潃
-          var urlBase = process.env.VUE_APP_BASE_API;
-          var curWWWPath = window.document.location.href;
-          var pos = curWWWPath.indexOf(window.document.location.pathname);
-          // 鍒涘缓a鏍囩
-          var aEle = document.createElement("a");
-          aEle.href =
-            curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
-          aEle.click();
-          this.$alert("涓嬭浇鎴愬姛", "鎻愮ず", {
-            confirmButtonText: "纭畾",
-            type: "success",
+        var fileUrl = res;
+        //鑾峰彇褰撳墠缃戝潃
+        var urlBase = process.env.VUE_APP_BASE_API;
+        var curWWWPath = window.document.location.href;
+        var pos = curWWWPath.indexOf(window.document.location.pathname);
+        // 鍒涘缓a鏍囩
+        var aEle = document.createElement("a");
+        aEle.href =
+          curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
+        console.log(aEle.href);
+        // 娣诲姞Authorization澶撮儴
+        fetch(aEle.href, {
+          headers: this.headers
+        })
+          .then(response => {
+            // 灏嗘枃浠朵笅杞介摼鎺ヤ綔涓篵lob瀵硅薄杩涜涓嬭浇
+            return response.blob();
+          })
+          .then(blob => {
+            const url = window.URL.createObjectURL(new Blob([blob]));
+            console.log(url);
+            const link = document.createElement("a");
+            link.href = url;
+            const name=fileUrl["downloadName"]
+            link.setAttribute("download", name); // 鏇挎崲file.pdf涓哄疄闄呯殑鏂囦欢鍚�
+            document.body.appendChild(link);
+            link.click();
+            link.parentNode.removeChild(link);
           });
-        }
       });
     },
 
@@ -1043,14 +1061,14 @@
     },
     //鍔ㄦ�佽绠楃◣鍓嶉噾棰�
     change(scope) {},
-    autodonorno() {
+    autocaseNo() {
       listDonatebaseinfo().then((res) => {
         // console.log("鎵�鏈夋崘鐚�呭垪琛細",res);
         res.rows.forEach((data) => {
           // console.log("data:",data);
           if (this.form.doname === data.name) {
-            this.form.donorno = data.donorno;
-            console.log(this.form.donorno);
+            this.form.caseNo = data.caseNo;
+            console.log(this.form.caseNo);
           } else {
             // this.$modal.alertWarning("瀵逛笉璧凤紝鏃犺鎹愮尞浜�");
           }
@@ -1100,7 +1118,7 @@
 
         id: null,
         infoid: null,
-        donorno: null,
+        caseNo: null,
         delFlag: null,
         createBy: null,
         createTime: null,
@@ -1158,7 +1176,7 @@
         this.reset();
 
         this.queryParams.params = {};
-        this.form.donorno = this.curCase.donorno;
+        this.form.caseNo = this.curCase.caseNo;
         this.form.name = this.curCase.name;
         this.form.infoid = this.curCase.id;
         // this.form.createTime = nowdate;
@@ -1180,7 +1198,7 @@
       this.isopen = 0;
       this.reset();
       this.queryParams.params = {};
-      this.form.donorno = this.curCase.donorno;
+      this.form.caseNo = this.curCase.caseNo;
       this.form.infoid = this.curCase.id;
       this.initFundApplyForm();
       this.dialogOpen = true;
@@ -1262,7 +1280,7 @@
             });
           } else {
             //淇濆瓨涓昏〃璁板綍
-            
+
             addFund(this.form).then((response) => {
               if (response.code === 200) {
                 this.$modal.msgSuccess("鏂板鎴愬姛");
@@ -1379,7 +1397,7 @@
           recordstatus: "0",
           delFlag: null,
           donorname: null,
-          donorno: null,
+          caseNo: null,
           createBy: null,
           createTime: null,
           updateBy: null,
@@ -1441,7 +1459,7 @@
         if (!row.id) {
           row.fundid = this.form.id;
           row.donorname = this.form.donorname;
-          row.donorno = this.form.donorno;
+          row.caseNo = this.form.caseNo;
           addFunddetail(row).then((res) => {
             getownFundDetail(this.form.id).then((res) => {
               getownFundDetail(this.form.id).then((res) => {
@@ -1652,7 +1670,7 @@
             });
           }
         });
-      } 
+      }
       else {
         this.$alert("璇风‘璁ゆ偍瑕佷笅杞界殑涓撳鍔冲姟琛�", "鎻愰啋", {
           confirmButtonText: "纭畾",
@@ -1711,7 +1729,7 @@
             });
           }
         });
-      } 
+      }
       else if(id){
          getdownloadYX(id).then((res) => {
           if (res.downloadUrl) {
@@ -1731,7 +1749,7 @@
             });
           }
         });
-      } 
+      }
        else {
         this.$alert("璇风‘璁ゆ偍瑕佷笅杞界殑涓撳鍔冲姟琛�", "鎻愰啋", {
           confirmButtonText: "纭畾",

--
Gitblit v1.9.3