Browse Source

优化日期列导出格式

zhouy 7 years ago
parent
commit
3b771d8d82
1 changed files with 10 additions and 0 deletions
  1. 10 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.js

+ 10 - 0
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -281,6 +281,16 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                     tdCls: 'x-querygrid-code-column'
                     tdCls: 'x-querygrid-code-column'
                 });
                 });
             }
             }
+            if(c.xtype == 'datecolumn') {
+                Ext.applyIf(c, {
+                    exportStyle: {
+                        format: 'Medium Date'
+                    },
+                    exportRenderer: function (value) {
+                        return Ext.Date.format(new Date(value), 'Y-m-d');
+                    }
+                })
+            }
         });
         });
 
 
         return columns;
         return columns;