rollback^2
xy 9 months ago
parent 730d6348f7
commit d31129d0be

@ -38,7 +38,7 @@ export async function print(printJs, isLog, form, logContent) {
})
let subFormBody = subForm.content.match(/<table(.*?)<\/table>/g)[0]
let subFormStyle = subForm.content.match(/<style>(.*?)<\/style>/g)[0]
printStr = printStr.replace('</style>',`</style>${subFormStyle}<style>.vxe-table { width: 100%;border-top: 1px solid;border-left: 1px solid; } .vxe-table * { width: auto !important;white-space: initial; }.vxe-table:not(.is--print) .col--ellipsis > div { word-break: break-all;white-space: normal;overflow: initial; }.tblPrint .vxe-table td,.tblPrint .vxe-table th { font-size: 20px;padding: 0; }.el-image__inner{width:100%;height:100%}</style>`)
printStr = printStr.replace('</style>',`</style>${subFormStyle}`)
printStr = printStr.replace(fieldMath,subFormBody)
console.log(fieldMath, printStr)
} else {
@ -49,6 +49,7 @@ export async function print(printJs, isLog, form, logContent) {
console.log('未找到name属性');
}
}
printStr = printStr.replace('</style>',`.vxe-table { width: 100%;border-top: 1px solid;border-left: 1px solid; } .vxe-table * { width: auto !important;white-space: initial; }.vxe-table:not(.is--print) .col--ellipsis > div { word-break: break-all;white-space: normal;overflow: initial; }.tblPrint .vxe-table td,.tblPrint .vxe-table th { font-size: 20px;padding: 0; }.el-image__inner{width:100%;height:100%}</style>`)
if(isLog) {
const logStyle = logContent.match(/<style>(.*?)<\/style>/g)
let totalLogStyle= ''

Loading…
Cancel
Save