王震
2023-11-20 e1e5ccdfef4aefc70f2df86a97cb50ae4e3d2706
src/views/quality/finishedProductInspection/index.vue
@@ -217,19 +217,19 @@
            },
            //打印按钮
            printFun() {
                const printSettings = {
                        paper: {
                        width: 827, // A4纸的宽度(单位:像素)
                        height: 595, // A4纸的高度(单位:像素)
                        orientation: 'portrait', // 竖向打印
                        }}
                // const printSettings = {
                //         paper: {
                //         width: 827, // A4纸的宽度(单位:像素)
                //         height: 595, // A4纸的高度(单位:像素)
                //         orientation: 'portrait', // 竖向打印
                //         }}
                        
                PrintJS({
                    printable: "printRaw",
                    type: "html",
                    maxWidth: 1000,
                    printSettings,
                    style: '@page {margin: 2.0mm 2.0mm;size:A4;}',
                    // printSettings,
                    style: '@page {margin: 10mm 5mm;size:A4;}',
                    targetStyles: ["*"],
                    ignoreElements: ["no-ignore"],
                    orientation: 'portrait'