| | |
| | | }, |
| | | //打印按钮 |
| | | printFun() { |
| | | this.printDialogVisible = false; |
| | | const printSettings = { |
| | | paper: { |
| | | width: 827, // A4纸的宽度(单位:像素) |
| | | height: 595, // A4纸的高度(单位:像素) |
| | | orientation: 'portrait', // 竖向打印 |
| | | }} |
| | | |
| | | PrintJS({ |
| | | printable: "printRaw", |
| | | type: "html", |
| | | maxWidth: 950, |
| | | style: '@page {margin: 2.0mm 2.0mm}', |
| | | header:"", |
| | | maxWidth: 1000, |
| | | printSettings, |
| | | style: '@page {margin: 2.0mm 2.0mm;size:A4;}', |
| | | targetStyles: ["*"], |
| | | // importCSS: true, |
| | | fontSize: '30px', |
| | | ignoreElements: ["no-ignore"], |
| | | orientation: 'portrait' |
| | |
| | | this.printFormData = res.data.data |
| | | this.printFormData.createTime = row.createTime |
| | | this.printFormData.updateTime = row.updateTime |
| | | // console.log(this.printFormData,"7777777777====="); |
| | | this.printDialogVisible = true |
| | | }).catch(error=>{ |
| | | // console.log(error); |
| | | }) |
| | | }, |
| | | exportExcel(){ |