Browse Source

feat:增加PDF导出接口

zhangsiya 1 year ago
parent
commit
59d2516101

+ 10 - 0
apps/bigmember_pc/src/api/modules/report.js

@@ -137,6 +137,16 @@ export function getPdfDetail(data) {
   })
 }
 
+// 下载PDF
+export function ajaxExportPdf(data) {
+  data = qs.stringify(data)
+  return request({
+    url: '/jypay/pdfExportPack/download',
+    method: 'post',
+    data
+  })
+}
+
 
 
 

+ 3 - 3
apps/bigmember_pc/src/views/analysisReport/components/ReportDownloadDialog.vue

@@ -58,7 +58,7 @@
 
 <script>
 import { mapGetters } from 'vuex'
-import { getPDFPackBalance, sendPdfEmail, getPdfEmail, savePdfCondition } from '@/api/modules/'
+import { getPDFPackBalance, sendPdfEmail, getPdfEmail, savePdfCondition, ajaxExportPdf } from '@/api/modules/'
 import { debounce } from '@/utils/'
 import { emailRegExp } from '@/utils/constant'
 
@@ -145,9 +145,9 @@ export default {
           // 发送邮箱
           // 此处id是接口返回的id
           const params = {
-            sid: data
+            filterId: data
           }
-          sendPdfEmail(params).then(response => {
+          ajaxExportPdf(params).then(response => {
             if(response.error_code === 0 && response.data) {
               this.showConfirmDialog()
             }

+ 3 - 3
apps/bigmember_pc/src/views/download-pdf/marketReport.vue

@@ -494,7 +494,7 @@ import Top3Table from '@/views/analysisReport/components/MarketTop3Table'
 import MarketUserScatter from '@/views/analysisReport/components/MarketUserScatter'
 import DetailList from '@/views/download-pdf/components/DetailList.vue'
 import PageBottom from '@/views/download-pdf/components/PageBottom.vue'
-import { getReportAnalysisInfo, getPdfDetail } from '@/api/modules/'
+import { getPdfDetail } from '@/api/modules/'
 import { moneyUnit, dateFormatter, formatPrice } from '@/utils/globalFunctions'
 import ComputedPageEdge from './utils'
 
@@ -722,8 +722,8 @@ export default {
   },
   created() {
     // this.sendRequest()
-    if(this.$route.query.sid) {
-      this.sid = this.$route.query.sid
+    if(this.$route.query.pid) {
+      this.sid = this.$route.query.pid
       this.getData()
     }
 

+ 3 - 3
apps/bigmember_pc/src/views/portrayal/components/EntReportDownloadDialog.vue

@@ -72,7 +72,7 @@
 
 <script>
 import DownloadFilter from './DownloadFilter.vue'
-import { getPDFPackBalance, sendPdfEmail, getPdfEmail, savePdfCondition } from '@/api/modules/'
+import { getPDFPackBalance, sendPdfEmail, getPdfEmail, savePdfCondition, ajaxExportPdf } from '@/api/modules/'
 import { emailRegExp } from '@/utils/constant'
 import { debounce } from '@/utils/'
 
@@ -213,9 +213,9 @@ export default {
           // 发送邮箱
           // 此处id是接口返回的id
           const params = {
-            sid: data
+            filterId: data
           }
-          sendPdfEmail(params).then(response => {
+          ajaxExportPdf(params).then(response => {
             if(response.error_code === 0 && response.data) {
               this.options.visible = false
               this.showConfirmDialog()

+ 3 - 3
apps/bigmember_pc/src/views/portrayal/components/UnitReportDownloadDialog.vue

@@ -75,7 +75,7 @@
 
 <script>
 import DownloadFilter from './DownloadFilter.vue'
-import { getPDFPackBalance, sendPdfEmail, getPdfEmail, savePdfCondition } from '@/api/modules/'
+import { getPDFPackBalance, sendPdfEmail, getPdfEmail, savePdfCondition, ajaxExportPdf } from '@/api/modules/'
 import { emailRegExp } from '@/utils/constant'
 import { debounce } from '@/utils/'
 
@@ -207,9 +207,9 @@ export default {
           // 发送邮箱
           // 此处id是接口返回的id
           const params = {
-            sid: data
+            filterId: data
           }
-          sendPdfEmail(params).then(response => {
+          ajaxExportPdf(params).then(response => {
             if(response.error_code === 0 && response.data) {
               this.options.visible = false
               this.showConfirmDialog()