Răsfoiți Sursa

vconsole调试

zhangxiaomu 1 an în urmă
părinte
comite
7315e4307a
1 a modificat fișierele cu 4 adăugiri și 7 ștergeri
  1. 4 7
      src/view/wx-print/index.vue

+ 4 - 7
src/view/wx-print/index.vue

@@ -3,7 +3,6 @@
     <div style="margin: 20px;height:100px;overflow:scroll"> <span style="font-weight:bold;color: black">打印数据返回 =></span> {{printDataRes}}</div>
     <div style="margin: 20px;height:100px;overflow:scroll"> <span style="font-weight:bold;color: black">模板数据返回 =></span> {{printLayoutRes}}</div>
     <div style="margin: 20px;height:100px;overflow:scroll"> <span style="font-weight:bold;color: black">err =></span> {{err}}</div>
-<!--    <div style="margin: 20px;height:100px;overflow:scroll"> <span style="font-weight:bold;color: black">模板对象返回 =></span> {{hiprintTemplate}}</div>-->
     <div style="margin: 20px;height:100px;overflow:scroll"> <span style="font-weight:bold;color: black">BLOB返回 =></span> {{blob}}</div>
     <div style="margin: 20px;height:100px;overflow:scroll"> <span style="font-weight:bold;color: black">PDF返回 =></span> {{pdf}}</div>
     <div style="margin: 20px;height:100px;overflow:scroll"> <span style="font-weight:bold;color: black">上传PDF返回 =></span> {{uploadRes}}</div>
@@ -29,7 +28,6 @@ export default {
       printLayoutRes:undefined,
       uploadRes:undefined,
       err:undefined,
-      hiprintTemplate:undefined,
       blob:undefined,
       pdf:undefined,
       // docs:{
@@ -104,8 +102,8 @@ export default {
     // let detail=this.excuteNoParam(this.docs[this.$route.query.doc].service, this.docs[this.$route.query.doc].service.selectOrderInfoById, [this.$route.query.data_id])
     Promise.all([data,layout])
       .then((results) => {
-        console.log('data',data)
-        console.log('layout',layout)
+        // console.log('data',data)
+        // console.log('layout',layout)
 
         // 在这里执行接下来的操作
         if(results?.[0]?.code === this.$config.SUCCESS_CODE){
@@ -113,17 +111,16 @@ export default {
           let detail =results?.[0]?.data.itemList
           let layout =results?.[1]?.data?.list.find(it => it.layoutId == this.$route.query.layout_id)?.layoutData
           this.$set(header, 'table', detail)
-          this.printDataRes=header
-          this.printLayoutRes=layout
 
           let printData = {...header}
 
           let hiprintTemplate = new hiprint.PrintTemplate({
             template: layout,
           })
+          console.log('data',header)
+          console.log('layout',layout)
           console.log('hiprintTemplate',hiprintTemplate)
 
-          // this.hiprintTemplate=hiprintTemplate
           // hiprintTemplate.toPdf(printData,'单据打印',{isDownload:false,type:'datauristring'}).then(dataURL=>{
           //   this.blob=dataURL
           //   let pdf = this.dataURLtoFile(dataURL, "pdf");