licailing преди 5 години
родител
ревизия
e02a7f9fe2
променени са 2 файла, в които са добавени 22 реда и са изтрити 22 реда
  1. 2 2
      src/main/java/com/izouma/wenlvju/service/RateService.java
  2. 20 20
      src/main/vue/src/views/rate/RateOrganizerList.vue

+ 2 - 2
src/main/java/com/izouma/wenlvju/service/RateService.java

@@ -315,7 +315,7 @@ public class RateService {
 
 
     public List<InputStream> upLoad1(Rate rate) throws UnsupportedEncodingException {
     public List<InputStream> upLoad1(Rate rate) throws UnsupportedEncodingException {
         List<InputStream> files = new ArrayList<>();
         List<InputStream> files = new ArrayList<>();
-        String uri = "http://192.168.50.238:8080/word2pdf";
+        String uri = "http://convert.izouma.com/word2pdf";
 
 
         // 表格
         // 表格
         String export = this.export(rate);
         String export = this.export(rate);
@@ -345,7 +345,7 @@ public class RateService {
             if (getSuffix(privacy).equals("doc") || getSuffix(privacy).equals("docx")) {
             if (getSuffix(privacy).equals("doc") || getSuffix(privacy).equals("docx")) {
                 InputStream is1 = HttpRequest.get(privacy)
                 InputStream is1 = HttpRequest.get(privacy)
                         .stream();
                         .stream();
-                InputStream stream = HttpRequest.post("http://192.168.50.238:8080/word2pdf")
+                InputStream stream = HttpRequest.post("http://convert.izouma.com/word2pdf")
                         .accept("*/*")
                         .accept("*/*")
                         .part("file", "审核材料.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", is1)
                         .part("file", "审核材料.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", is1)
                         .stream();
                         .stream();

+ 20 - 20
src/main/vue/src/views/rate/RateOrganizerList.vue

@@ -207,33 +207,15 @@ export default {
         },
         },
         word(row) {
         word(row) {
             this.downloading = true;
             this.downloading = true;
-            // this.$axios
-            //     .get('/rate/exportPdf/' + row.id, { responseType: 'blob' })
-            //     .then(res => {
-            //         console.log(res);
-            //         this.downloading = false;
-            //         const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
-            //         const link = document.createElement('a');
-            //         link.href = downloadUrl;
-            //         link.setAttribute('download', '申请材料.pdf');
-            //         document.body.appendChild(link);
-            //         link.click();
-            //         link.remove();
-            //     })
-            //     .catch(e => {
-            //         console.log(e);
-            //         this.downloading = false;
-            //         this.$message.error(e.error);
-            //     });
             this.$axios
             this.$axios
-                .get('/rate/export/' + row.id)
+                .get('/rate/exportPdf/' + row.id, { responseType: 'blob' })
                 .then(res => {
                 .then(res => {
                     console.log(res);
                     console.log(res);
                     this.downloading = false;
                     this.downloading = false;
                     const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
                     const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
                     const link = document.createElement('a');
                     const link = document.createElement('a');
                     link.href = downloadUrl;
                     link.href = downloadUrl;
-                    link.setAttribute('download', '申请材料.doc');
+                    link.setAttribute('download', '申请材料.pdf');
                     document.body.appendChild(link);
                     document.body.appendChild(link);
                     link.click();
                     link.click();
                     link.remove();
                     link.remove();
@@ -243,6 +225,24 @@ export default {
                     this.downloading = false;
                     this.downloading = false;
                     this.$message.error(e.error);
                     this.$message.error(e.error);
                 });
                 });
+            // this.$axios
+            //     .get('/rate/export/' + row.id)
+            //     .then(res => {
+            //         console.log(res);
+            //         this.downloading = false;
+            //         const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
+            //         const link = document.createElement('a');
+            //         link.href = downloadUrl;
+            //         link.setAttribute('download', '申请材料.doc');
+            //         document.body.appendChild(link);
+            //         link.click();
+            //         link.remove();
+            //     })
+            //     .catch(e => {
+            //         console.log(e);
+            //         this.downloading = false;
+            //         this.$message.error(e.error);
+            //     });
         }
         }
     }
     }
 };
 };