|
|
|
@ -10,7 +10,7 @@ export async function print(printJs, isLog, form, logContent) {
|
|
|
|
const staticMap = new Map([
|
|
|
|
const staticMap = new Map([
|
|
|
|
['apply_name', `<span>${form.creator?.name}</span>`],
|
|
|
|
['apply_name', `<span>${form.creator?.name}</span>`],
|
|
|
|
['apply_department_name', `<span>${form.creator_department?.name}</span>`],
|
|
|
|
['apply_department_name', `<span>${form.creator_department?.name}</span>`],
|
|
|
|
['apply_sign', form.creator?.sign_file ? `<img src="${form.creator?.sign_file}" alt="${form.creator?.name}" style="max-height: 80px;max-width: 120px;">` : `<span>${form.creator?.name}</span>`],
|
|
|
|
['apply_sign', form.creator?.sign_file ? `<img src="${form.creator?.sign_file?.url}" alt="${form.creator?.name}" style="max-height: 80px;max-width: 120px;">` : `<span>${form.creator?.name}</span>`],
|
|
|
|
['created_at', `<span>${form.created_at}</span>`],
|
|
|
|
['created_at', `<span>${form.created_at}</span>`],
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
@ -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; }</style>`)
|
|
|
|
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(fieldMath,subFormBody)
|
|
|
|
printStr = printStr.replace(fieldMath,subFormBody)
|
|
|
|
console.log(fieldMath, printStr)
|
|
|
|
console.log(fieldMath, printStr)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|