|
@@ -90,6 +90,9 @@ class ReportBaseInfo {
|
|
|
///选择图像提示文字
|
|
|
String selectImageHint = '';
|
|
|
|
|
|
+ ///表格允许空数据
|
|
|
+ bool allowEmptyCell = false;
|
|
|
+
|
|
|
///初始化ReportInfo
|
|
|
void init(
|
|
|
ReportTemplateDocument reportTemplate,
|
|
@@ -102,6 +105,7 @@ class ReportBaseInfo {
|
|
|
String revoke = '',
|
|
|
String selectEntry = '',
|
|
|
String selectImageHint = '',
|
|
|
+ bool allowEmptyCell = false,
|
|
|
}) {
|
|
|
try {
|
|
|
headers = [];
|
|
@@ -113,6 +117,7 @@ class ReportBaseInfo {
|
|
|
this.reportTemplate = reportTemplate;
|
|
|
this.reportDate = reportDate;
|
|
|
this.reporter = reporter;
|
|
|
+ this.allowEmptyCell = allowEmptyCell;
|
|
|
isCustom = reportTemplate.isCustom;
|
|
|
name = reportTemplate.name;
|
|
|
updateTime = reportTemplate.updateTime;
|
|
@@ -255,7 +260,7 @@ class ReportBaseInfo {
|
|
|
final _type = element.elementType!;
|
|
|
if (_type.name == ElementType.rtTable.name) {
|
|
|
final table = element as RTTable;
|
|
|
- return RTTableInfo.fromElement(table);
|
|
|
+ return RTTableInfo.fromElement(table, allowEmptyCell: allowEmptyCell);
|
|
|
} else if (_type.name == ElementType.paragraph.name) {
|
|
|
final paragraph = element as Paragraph;
|
|
|
return ParagraphInfo.fromElement(paragraph);
|