From e6a6fb8d27b14581ae771325c1b99ee26d6618dd Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 19 三月 2020 18:19:06 +0800 Subject: [PATCH] 2020-03-19 --- src/tabviews/zshare/actionList/index.jsx | 32 +++++++++++++++++++++----------- 1 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/tabviews/zshare/actionList/index.jsx b/src/tabviews/zshare/actionList/index.jsx index 4832c00..282ad5d 100644 --- a/src/tabviews/zshare/actionList/index.jsx +++ b/src/tabviews/zshare/actionList/index.jsx @@ -675,6 +675,26 @@ } execPrint = (item, list, template) => { + let _documents = [] + + Object.keys(template).forEach(key => { + let _data = list.filter(cell => cell.TemplateID === key) + + if (_data.length > 0) { + let _cell = { + documentID: Utils.getuuid(), + contents: [ + { + data: _data, + templateURL: JSON.stringify(template[key]) + } + ] + } + + _documents.push(_cell) + } + }) + let printdata = { cmd: 'print', requestID: '', @@ -683,17 +703,7 @@ taskID: Utils.getuuid(), preview: false, printer: item.printer, - documents: list.map(cell => { - return { - documentID: Utils.getuuid(), - contents: [ - { - data: cell, - templateURL: JSON.stringify(template[cell.TemplateID]) - } - ] - } - }) + documents: _documents } } -- Gitblit v1.8.0