From 69c28ca76450714fb17839f406973861a415d240 Mon Sep 17 00:00:00 2001 From: PPPSCN <35696959@qq.com> Date: Fri, 5 May 2017 15:47:26 +0800 Subject: [PATCH] 默认bootstrap-table导出所有数据 --- application/common/controller/Backend.php | 2 +- public/assets/js/require-table.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/application/common/controller/Backend.php b/application/common/controller/Backend.php index b379b1f..82a2272 100644 --- a/application/common/controller/Backend.php +++ b/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 : []; diff --git a/public/assets/js/require-table.js b/public/assets/js/require-table.js index 4a1decb..4d212af 100644 --- a/public/assets/js/require-table.js +++ b/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, -- libgit2 0.24.0