فهرست منبع

默认bootstrap-table导出所有数据

PPPSCN 8 سال پیش
والد
کامیت
69c28ca764
2فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 1 1
      application/common/controller/Backend.php
  2. 5 0
      public/assets/js/require-table.js

+ 1 - 1
application/common/controller/Backend.php

@@ -162,7 +162,7 @@ class Backend extends Controller
         $sort = $this->request->get("sort", "id");
         $order = $this->request->get("order", "DESC");
         $offset = $this->request->get("offset", 0);
-        $limit = $this->request->get("limit", 10);
+        $limit = $this->request->get("limit", 0);
         $filter = json_decode($filter, TRUE);
         $op = json_decode($op, TRUE);
         $filter = $filter ? $filter : [];

+ 5 - 0
public/assets/js/require-table.js

@@ -9,9 +9,14 @@ define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment', 'bootstr
             method: 'get',
             toolbar: "#toolbar",
             search: true,
+            cache: false,
             advancedSearch: true,
             idTable: 'advancedTable',
             showExport: true,
+            exportDataType: "all",
+            exportTypes: ['json', 'xml', 'csv', 'txt', 'doc', 'excel'],
+            pageSize: 10,
+            pageList: [10, 25, 50, 'All'],
             pagination: true,
             clickToSelect: true,
             showRefresh: false,