hbchen 10 月之前
父節點
當前提交
b50b360001
共有 3 個文件被更改,包括 10 次插入6 次删除
  1. 2 2
      src/views/report/reportDetailPdf.vue
  2. 6 2
      src/views/reportEn/detailPdf.vue
  3. 2 2
      src/views/smartReport/detailPdf.vue

+ 2 - 2
src/views/report/reportDetailPdf.vue

@@ -161,10 +161,10 @@ export default {
         })
     },
     setReportContent(str){
-      str=str.replace(/(<iframe)(.*src="\S+\/chartshow)/g,(match, tag,attr)=>{
+      str=str.replace(/(<iframe)( src="\S+\/chartshow)/g,(match, tag,attr)=>{
         return '<eta-chart class="no-wrap"'+attr
       })
-      str=str.replace(/(<iframe)(.*src="\S+\/sheetshow)/g,(match, tag,attr)=>{
+      str=str.replace(/(<iframe)( src="\S+\/sheetshow)/g,(match, tag,attr)=>{
         return '<eta-table class="no-wrap"'+attr
       })
       return str

+ 6 - 2
src/views/reportEn/detailPdf.vue

@@ -137,12 +137,16 @@ export default {
         })
     },
     setReportContent(str){
-      str=str.replace(/(<iframe)(.*src="\S+\/chartshow)/g,(match, tag,attr)=>{
+      str=str.replace(/(<iframe)( src="\S+\/chartshow)/g,(match, tag,attr)=>{
+        console.log(tag,'tag','eta-chart');
         return '<eta-chart class="no-wrap"'+attr
       })
-      str=str.replace(/(<iframe)(.*src="\S+\/sheetshow)/g,(match, tag,attr)=>{
+      str=str.replace(/(<iframe)( src="\S+\/sheetshow)/g,(match, tag,attr)=>{
+        console.log(tag,'tag','eta-table');
+        // console.log('<eta-table class="no-wrap"'+attr);
         return '<eta-table class="no-wrap"'+attr
       })
+      console.log(str,'str');
       return str
     },
     setWaterMark(str){

+ 2 - 2
src/views/smartReport/detailPdf.vue

@@ -92,10 +92,10 @@ export default {
       })
     },
     setReportContent(str){
-      str=str.replace(/(<iframe)(.*src="\S+\/chartshow)/g,(match, tag,attr)=>{
+      str=str.replace(/(<iframe)( src="\S+\/chartshow)/g,(match, tag,attr)=>{
         return '<eta-chart class="no-wrap"'+attr
       })
-      str=str.replace(/(<iframe)(.*src="\S+\/sheetshow)/g,(match, tag,attr)=>{
+      str=str.replace(/(<iframe)( src="\S+\/sheetshow)/g,(match, tag,attr)=>{
         return '<eta-table class="no-wrap"'+attr
       })
       return str