{
 "hidden": false,
 "children": [{
  "configs": {"itemId": "module"},
  "expanded": true,
  "children": [{
   "configs": {
    "layout": "border",
    "itemId": "viewport"
   },
   "expanded": true,
   "children": [
    {
     "configs": {
      "itemId": "tbar",
      "region": "north"
     },
     "expanded": true,
     "children": [{
      "configs": {"itemId": "dockedItems"},
      "expanded": true,
      "children": [
       {
        "configs": {"itemId": "tbar1"},
        "expanded": true,
        "children": [
         {
          "configs": {
           "itemId": "searchItem",
           "text": "查询",
           "iconCls": "search_icon"
          },
          "expanded": false,
          "children": [],
          "type": "item",
          "events": {"click": "// Wb.request({\
//   url: 'm?xwl=examples/tabulator/datasource/select',\
//   out:app.tbar,\
//   success: function(rec) {\
// //     console.log(Wb.decode(rec.responseText).rows);\
//     app.table1.setData(Wb.decode(rec.responseText).rows);\
//   }\
// });\
app.table1.setData();"}
         },
         {
          "configs": {
           "itemId": "clearItem",
           "text": "清空",
           "iconCls": "clear_filters_icon"
          },
          "expanded": false,
          "children": [],
          "type": "item",
          "events": {"click": "app.table1.clearHeaderFilter();"}
         },
         {
          "configs": {
           "itemId": "getDataAllItem",
           "text": "获取表中全部数据",
           "iconCls": "book_icon"
          },
          "expanded": false,
          "children": [],
          "type": "item",
          "events": {"click": "console.log(app.table1.getData());"}
         },
         {
          "configs": {
           "itemId": "getSelectedDataItem",
           "text": "获取选中行数据",
           "iconCls": "book_icon"
          },
          "expanded": false,
          "children": [],
          "type": "item",
          "events": {"click": "//获取数据\
console.log(app.table1.getSelectedData());\
//获取选中行组件\
// console.log(app.table1.getSelectedRows());"}
         },
         {
          "configs": {
           "itemId": "getEditedDataItem",
           "text": "获取编辑数据",
           "iconCls": "book_icon"
          },
          "expanded": false,
          "children": [],
          "type": "item",
          "events": {"click": "//获取编辑的单元格\
console.log(app.table1.getEditedCells());"}
         },
         {
          "configs": {
           "itemId": "downloadAllItem",
           "text": "下载全部数据至xlxs",
           "iconCls": "book_icon"
          },
          "expanded": false,
          "children": [],
          "type": "item",
          "events": {"click": "app.table1.download(\"xlsx\", \"data.xlsx\", {sheetName:\"MyData\"});"}
         },
         {
          "configs": {
           "itemId": "downloadSelectedItem",
           "text": "下载选中数据xlxs",
           "iconCls": "book_icon"
          },
          "expanded": false,
          "children": [],
          "type": "item",
          "events": {"click": "//获取编辑的单元格\
app.table1.download(\"xlsx\", \"data.xlsx\", {sheetName:\"MyData\"},\"selected\");"}
         }
        ],
        "type": "toolbar"
       },
       {
        "configs": {"itemId": "tbar2"},
        "expanded": true,
        "children": [{
         "configs": {
          "itemId": "categray",
          "labelAlign": "right",
          "fieldLabel": "代码类别",
          "labelWidth": "50"
         },
         "expanded": false,
         "children": [],
         "type": "text"
        }],
        "type": "toolbar"
       }
      ],
      "type": "array"
     }],
     "type": "panel"
    },
    {
     "configs": {
      "layout": "fit",
      "itemId": "tablePanel",
      "html": "<div id =\"page-table-tabulator\"><\/div>",
      "region": "center"
     },
     "expanded": false,
     "children": [],
     "type": "panel",
     "events": {"afterrender": "app.table1 = new Tabulator(\"#page-table-tabulator\" , {\
  locale: true,\
  pagination: true,\
  paginationMode: \"remote\",\
  filterMode:\"remote\",\
  ajaxURL: \"m?xwl=examples/tabulator/datasource/selectPage\",\
  ajaxConfig: \"POST\",\
  ajaxParams: function() {\
    return {\
      categray: app.categray.getValue()\
    };\
  },\
  ajaxResponse: function(url, params, response) {\
    return {\
      last_page: Math.ceil(response.total / params.size),\
      last_row: response.total,\
      data: response.rows\
    };\
  },\
  paginationSize: 10,\
  paginationSizeSelector: [10, 20, 50, 100],\
  paginationCounter: \"rows\",\
  //如果是分页 设置小于100%否则wb导致无法显示分页footer\
  height: \"93.5%\",\
  //开启可移动列\
  movableColumns: true,\
  //开启选中模式\
  selectable: true,\
  columns: [{\
    formatter: \"rowSelection\",\
    titleFormatter: \"rowSelection\",\
    hozAlign: \"center\",\
    headerSort: false,\
    //无需导出列\
    download: false,\
    cellClick: function(e, cell) {\
      cell.getRow().toggleSelect();\
    }\
  }, {\
    title: \"序号\",\
    formatter: \"rownum\",\
    hozAlign: \"center\",\
    width: 40,\
    headerSort: false\
  }, {\
    title: \"类别\",\
    field: \"SYS_CATEGORY\",\
    sorter: \"string\",\
    headerFilter: true,\
    //wb导致input search无法使用回退键\
    headerFilterLiveFilter: false,\
    //可编辑\
    editor: \"input\"\
  }, {\
    title: \"key\",\
    field: \"SYS_KEY\",\
    sorter: \"string\",\
    headerFilter: true,\
    editor: \"input\"\
  }, {\
    title: \"value\",\
    field: \"SYS_VALUE\",\
    sorter: \"string\",\
    headerFilter: true,\
    editor: \"input\"\
  }, {\
    title: \"代码序号\",\
    field: \"SYS_SEQ\",\
    sorter: \"string\",\
    headerFilter: true,\
    editor: \"input\"\
  }, {\
    title: \"创建人\",\
    field: \"CREATED_BY\",\
    sorter: \"string\"\
  }, {\
    title: \"创建时间\",\
    field: \"CREATED_ON\",\
    sorter: \"string\"\
  }, {\
    title: \"修改人\",\
    field: \"UPDATED_BY\",\
    sorter: \"string\"\
  }, {\
    title: \"修改时间\",\
    field: \"UPDATED_ON\",\
    sorter: \"string\"\
  }]\
});"}
    }
   ],
   "type": "viewport"
  }],
  "type": "module"
 }],
 "roles": {"default": 1},
 "title": "远程分页",
 "iconCls": "",
 "inframe": false,
 "pageLink": ""
}