/**
 * 表单打印模板
 */

 import { StringUtil } from "@birt/funclib/StringUtil.js";

 export function newInstance(stores, conf) {
     const dlgId = StringUtil.randomString(6);
     // 应用报表模型
     var birtWorkBook = Object.assign({
         controlName: "BirtWorkBook",
         controlId: "BirtWorkBook_" + dlgId,
         showToolBar: false,
         totalPage: 1,
         renderType: "print",
         height: "100%",
     }, conf.birtWorkBook || {})
     birtWorkBook.children = [
         {
             controlName: "BirtSheet",
             controlId: "BirtSheet_" + dlgId,
             name: "sheet_" + dlgId,
             pageIndex: 0,
             dataSets: [detailDataset],
             children: [
                 {
                     controlName: "BirtFormSheet",
                     controlId: "BirtFormSheet_" + dlgId,
                     children: [
                         hcForm
                     ]
                 }
             ]
         }
     ];
     // 返回布局结构
     return birtWorkBook
 }