Browse Source

导出调整

zhuth 7 years ago
parent
commit
43e3e1f242
1 changed files with 12 additions and 7 deletions
  1. 12 7
      frontend/saas-web/app/view/core/query/QueryGridPanel.js

+ 12 - 7
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -42,8 +42,6 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                 fields: me.getFields(),
                 autoLoad: true,
                 pageSize: 15,
-                exportPageSize: 5000,
-                exportNumber: 1,
                 data: [],
                 proxy: {
                     type: 'ajax',
@@ -273,11 +271,18 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     },
     onExport: function (me) {
         var grid = me.ownerCt.ownerCmp.ownerCt.ownerCt;
-
-        grid.saveDocumentAs({
-            type: 'xlsx',
-            title: grid.addTitle + '列表',
-            fileName: grid.addTitle + '列表.xlsx'
+        grid.store.exportPageSize = 5000;
+        grid.store.exportNumber = 1;
+        grid.store.load(function(records, operation, success) {
+            grid.saveDocumentAs({
+                type: 'xlsx',
+                title: grid.addTitle + '列表',
+                fileName: grid.addTitle + '列表.xlsx'
+            });
+            grid.store.exportPageSize = null;
+            grid.store.exportNumber = null;
+            grid.store.load(function(records, operation, success) {
+            });
         });
     },
     onCloseOrder:function(me){