|
|
|
@ -38,7 +38,7 @@ export async function print(printJs, isLog, form, logContent) {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
let subFormBody = subForm.content.match(/<table(.*?)<\/table>/g)[0]
|
|
|
|
let subFormBody = subForm.content.match(/<table(.*?)<\/table>/g)[0]
|
|
|
|
let subFormStyle = subForm.content.match(/<style>(.*?)<\/style>/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)
|
|
|
|
printStr = printStr.replace(fieldMath,subFormBody)
|
|
|
|
console.log(fieldMath, printStr)
|
|
|
|
console.log(fieldMath, printStr)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
@ -49,6 +49,7 @@ export async function print(printJs, isLog, form, logContent) {
|
|
|
|
console.log('未找到name属性');
|
|
|
|
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) {
|
|
|
|
if(isLog) {
|
|
|
|
const logStyle = logContent.match(/<style>(.*?)<\/style>/g)
|
|
|
|
const logStyle = logContent.match(/<style>(.*?)<\/style>/g)
|
|
|
|
let totalLogStyle= ''
|
|
|
|
let totalLogStyle= ''
|
|
|
|
|