diff --git a/src/views/plugin/workflow/mixins/ex-form.js b/src/views/plugin/workflow/mixins/ex-form.js index 3a27617..753063e 100644 --- a/src/views/plugin/workflow/mixins/ex-form.js +++ b/src/views/plugin/workflow/mixins/ex-form.js @@ -324,10 +324,45 @@ export default { }) }, handlePrint() { // 打印 - // const watermarkText = this.userInfo.user_name + " " + this.userInfo.dept_name - // Watermark.set({ watermark_txt: watermarkText }) // 添加水印 - Print('#printBody') - Watermark.remove() // 删除水印 + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); + const option = this.deepClone(this.option) + this.option.detail = true + if (this.option.column) { + this.option.column.forEach(col => { + this.handleTemporaryPrintOption(col) + }) + } + if (this.option.group) { + this.option.group.forEach(g => { + g.column.forEach(col => { + this.handleTemporaryPrintOption(col) + }) + }) + } + setTimeout(() => { + loading.close() + // const watermarkText = this.userInfo.user_name + " " + this.userInfo.dept_name + // Watermark.set({ watermark_txt: watermarkText }) // 添加水印 + Print('#printBody') + this.option = option + Watermark.remove() // 删除水印 + }, 500) + }, + // 生成打印临时option + handleTemporaryPrintOption(obj) { + if (!obj.type) return + obj.span = 24 + if (obj.type == 'dynamic') { + obj.children.type = 'form' + obj.children.column.forEach(col => { + this.handleTemporaryPrintOption(col) + }) + } }, // 关闭当前tag,并跳转 handleCloseTag(path) { diff --git a/src/views/plugin/workflow/process/external/Leave/detail.vue b/src/views/plugin/workflow/process/external/Leave/detail.vue index 9195f47..5a3c796 100644 --- a/src/views/plugin/workflow/process/external/Leave/detail.vue +++ b/src/views/plugin/workflow/process/external/Leave/detail.vue @@ -19,7 +19,7 @@ -
-