|
@@ -60,31 +60,41 @@ class _ReportEditPageState extends State<ReportEditPage> {
|
|
|
if (widget.jsonStr.isEmpty) {
|
|
|
return const SizedBox();
|
|
|
}
|
|
|
- // if (!isInit) {
|
|
|
- // // _intitTemplate();
|
|
|
- // }
|
|
|
- return Container(
|
|
|
- decoration: _buildDecoration(),
|
|
|
- padding: _padding,
|
|
|
- alignment: Alignment.center,
|
|
|
- height: _height,
|
|
|
- width: _width,
|
|
|
- child: ListView(
|
|
|
- children: [
|
|
|
- ..._header.map((head) {
|
|
|
- return BlockElementPage(element: head);
|
|
|
- }),
|
|
|
- ..._blocks.map((block) {
|
|
|
- return SizedBox(
|
|
|
- width: _width,
|
|
|
- child: BlockElementPage(element: block),
|
|
|
- );
|
|
|
- }),
|
|
|
- const SizedBox(height: 10),
|
|
|
- ..._footer.map((footer) {
|
|
|
- return BlockElementPage(element: footer);
|
|
|
- }),
|
|
|
- ],
|
|
|
+ final pagePadding = _reportTemplate.pagePadding ?? RTThickness.uniform(56);
|
|
|
+ return Center(
|
|
|
+ child: Container(
|
|
|
+ padding: _padding,
|
|
|
+ alignment: Alignment.center,
|
|
|
+ height: _height,
|
|
|
+ width: _width,
|
|
|
+ color: Colors.white,
|
|
|
+ child: ListView(
|
|
|
+ children: [
|
|
|
+ ..._header.map((head) {
|
|
|
+ return Container(
|
|
|
+ width: _width,
|
|
|
+ alignment: Alignment.center,
|
|
|
+ child: BlockElementPage(element: head),
|
|
|
+ );
|
|
|
+ }),
|
|
|
+ ..._blocks.map((block) {
|
|
|
+ return Container(
|
|
|
+ alignment: Alignment.center,
|
|
|
+ width: _width,
|
|
|
+ child: BlockElementPage(element: block),
|
|
|
+ );
|
|
|
+ }),
|
|
|
+ const SizedBox(height: 10),
|
|
|
+ ..._footer.map((footer) {
|
|
|
+ return SizedBox(
|
|
|
+ width: _width -
|
|
|
+ PtToPxConverter.ptToPx(
|
|
|
+ pagePadding.left! + pagePadding.right!),
|
|
|
+ child: BlockElementPage(element: footer),
|
|
|
+ );
|
|
|
+ }),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
);
|
|
|
}
|