From a58144a284aa8c199a7c6ba31b9aedbcf379e453 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期三, 21 五月 2025 22:20:38 +0800
Subject: [PATCH] 发发发

---
 ruoyi-ui/src/views/qrcode/pdfShow.vue |   81 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 70 insertions(+), 11 deletions(-)

diff --git a/ruoyi-ui/src/views/qrcode/pdfShow.vue b/ruoyi-ui/src/views/qrcode/pdfShow.vue
index ef5be06..496945d 100644
--- a/ruoyi-ui/src/views/qrcode/pdfShow.vue
+++ b/ruoyi-ui/src/views/qrcode/pdfShow.vue
@@ -8,31 +8,38 @@
 
       </h1>
     </div>
-    <li v-for="(item,index) in fileList1">
-          <el-link :href="'/pdfShowInfo?filePath='+item" type="success">{{fileList[index]}}</el-link>
+    <li v-for="(item,index) in fileList">
+          <el-link @click="handleDownload(fileLs[index])" type="success">{{fileList[index]}}-------涓嬭浇</el-link>
     </li>
       <!--  <h4 class="form-header"> </h4>
         <div style="margin-left: 20px;">
            <el-link :href="'/register'" class="psf" type="success">娉ㄥ唽             </el-link>
                 <el-link :href="'/login'" type="success">鐧诲綍</el-link>
         </div> -->
-
+		
+	<el-dialog 
+		 :visible.sync="msk" >
+			<p class="op65">鐐瑰嚮鍙充笂瑙掓寜閽紝鐒跺悗鍦ㄥ脊鍑虹殑鑿滃崟涓紝鐐瑰嚮鍦ㄦ祻瑙堝櫒涓墦寮�锛屽嵆鍙笅杞借棰�</p>
+			
+	</el-dialog>
   </div>
 </template>
 
 <script>
 import {listFScan,getFScanInfo,addFScan,delFScan,getFSInfo,updateFScan, uploadPic, uploadPic1, download} from "@/api/fscan/index";
-
+import {blobValidate} from "@/utils/ruoyi";
 export default {
-  components: {
-    pdf
-  },
+  // components: {
+  //   pdf
+  // },
   data() {
     return {
       	  fileList1:[],
           fileList:[],
-      pdfSrc: '',
-        numPages: undefined,
+		  fileLs:[],
+		  pdfSrc: '',
+          numPages: undefined,
+		  msk: false,
     }
   },
   mounted() {
@@ -41,7 +48,8 @@
     //鍙戣捣璇锋眰鎷垮埌pdfSrc
     let _this = this
     getFScanInfo(id).then(response => {
-     // alert(23)
+		
+     
       //console.log(response)
      // if(response.msg=="鎿嶄綔鎴愬姛")
       {
@@ -51,18 +59,56 @@
         this.fileList1 = response.data.filePath.split(",");
         for(let i = 0; i < this.fileList1.length; i++)
         {
+			if(this.fileList1[i].length!=0){
+			this.fileLs.push(this.fileList1[i])
           var lsr = this.fileList1[i].split("/")
           var ls = lsr[lsr.length - 1].split("_")
           var lr = ls[ls.length-1].split(".")
           var pnam = ls[0] + "." + lr[lr.length-1]
-          this.fileList.push(pnam)
+          this.fileList.push(pnam)}
+		  
 
 
         }
+		console.log(this.fileLs)
+		console.log("--------------------")
+		
         // alert(1234)
       }
    
       })
+  },
+  methods:{
+	  is_weixin() {
+	      var ua = navigator.userAgent.toLowerCase();
+	      if (ua.match(/MicroMessenger/i) == "micromessenger") {
+	          return true;
+	      } else {
+	          return false;
+	      }
+	  },
+	  handleDownload(url) {
+alert(90)
+		if (this.is_weixin()) {
+			alert(123)
+			//this.msk = true
+			  window.location.href = "www.bendudu.com"
+			}
+			else{
+				this.msk = false;
+			var formData = {'path':url.replace(process.env.VUE_APP_BASE_TRUE_API,"")};
+			let lens = formData.path.split(".")
+			let suffix = lens[lens.length-1] 
+			console.log(formData)
+			download(formData).then(async (response) => {
+			  const isLogin = await blobValidate(response);
+			  let nt = new Date().getTime()
+			  let filename = 'scods_'+nt+'.'+suffix
+			  const blob = new Blob([response])
+			  saveAs(blob, filename)
+			})
+		}
+	  },
   }
 }
 </script>
@@ -82,4 +128,17 @@
     .psf{
       margin-right: 20px;
     }
+	
+	.block {
+	  width: 100%;
+	  height: 400px;
+	  background-color: gray;
+	  background-size: 100% 100%;
+	}
+	.blocks {
+	  width: 100%;
+	  height: 400px;
+	  background-color: gray;
+	  background-size: 100% 100%;
+	}
 </style>

--
Gitblit v1.9.1