|
|
@@ -139,9 +139,11 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
sortableColumns: false,
|
|
|
enableColumnHide: false,
|
|
|
rowLines: false,
|
|
|
- plugins: {
|
|
|
- gridexporter: true
|
|
|
- },
|
|
|
+ plugins: [{
|
|
|
+ ptype: 'gridexporter',
|
|
|
+ }, {
|
|
|
+ ptype: 'menuclipboard'
|
|
|
+ }],
|
|
|
features: [{
|
|
|
ftype: 'groupingsummary',
|
|
|
hideGroupedHeader: false,
|
|
|
@@ -159,15 +161,6 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
displayInfo: true,
|
|
|
store: store
|
|
|
}],
|
|
|
- actions: {
|
|
|
- copy: {
|
|
|
- iconCls: 'x-fa fa-copy',
|
|
|
- text: '复制单元格',
|
|
|
- handler: function() {
|
|
|
- me.onCopy(me.selectedData);
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
viewConfig: {
|
|
|
deferEmptyText: false,
|
|
|
emptyText: '无数据',
|
|
|
@@ -217,7 +210,6 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: me.listUrl,
|
|
|
- // url: 'http://192.168.253.58:8560/api/sale/report/saleDetail',
|
|
|
timeout: 8000,
|
|
|
actionMethods: {
|
|
|
read: 'GET'
|
|
|
@@ -276,10 +268,6 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
}
|
|
|
},
|
|
|
listeners: {
|
|
|
- load: function() {
|
|
|
- var grid = me.items.items[1];
|
|
|
- grid.fireEvent('mysummarychange', grid);
|
|
|
- },
|
|
|
beforeload: function (store, op) {
|
|
|
var condition = me.getConditions(),
|
|
|
defaultCondition = me.defaultCondition,
|
|
|
@@ -578,31 +566,5 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
|
|
|
applyParams: function(p) {
|
|
|
return p;
|
|
|
- },
|
|
|
-
|
|
|
- getContextMenu: function() {
|
|
|
- var me = this,
|
|
|
- grid = me.items.items[1];
|
|
|
-
|
|
|
- return grid.contextMenu || (grid.contextMenu = grid.add({
|
|
|
- xtype: 'menu',
|
|
|
- items: [
|
|
|
- // Actions can be converted into MenuItems
|
|
|
- '@copy',
|
|
|
- ]
|
|
|
- }));
|
|
|
- },
|
|
|
-
|
|
|
- onCopy: function(text) {
|
|
|
- var target = Ext.DomHelper.append(document.body, {
|
|
|
- tag: 'textarea',
|
|
|
- style: 'opacity: 0;position: absolute;top: -10000px;right: 0;',
|
|
|
- html: text
|
|
|
- });
|
|
|
- target.focus();
|
|
|
- target.select();
|
|
|
- document.execCommand('Copy');
|
|
|
- target.blur();
|
|
|
- document.body.removeChild(target);
|
|
|
- },
|
|
|
+ }
|
|
|
});
|