|
|
@@ -87,41 +87,41 @@ Ext.define('saas.view.home.HomeModel', {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- month_purchase: {
|
|
|
- model: 'saas.model.chart.DataXY',
|
|
|
- autoLoad: true,
|
|
|
- proxy: {
|
|
|
- type: 'ajax',
|
|
|
- // url: 'http://192.168.253.58:8920/homePage/purchaseData?sixMonths=false',
|
|
|
- url: '/api/commons/homePage/purchaseData?sixMonths=false',
|
|
|
- timeout: 8000,
|
|
|
- actionMethods: {
|
|
|
- read: 'GET'
|
|
|
- },
|
|
|
- reader: {
|
|
|
- type: 'json',
|
|
|
- rootProperty: 'data',
|
|
|
- },
|
|
|
- listeners: {
|
|
|
- exception: function(proxy, response, operation, eOpts) {
|
|
|
- var p = Ext.getCmp('month_purchase');
|
|
|
- p && p.setLoading(false);
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- listeners: {
|
|
|
- beforeload: function() {
|
|
|
- var p = Ext.getCmp('month_purchase');
|
|
|
- p && p.setLoading(true);
|
|
|
- },
|
|
|
- load: function(s, d) {
|
|
|
- var p = Ext.getCmp('month_purchase');
|
|
|
- p && p.setLoading(false);
|
|
|
- var sum = Ext.util.Format.number(s.sum('y'), '0.00') || 0;
|
|
|
- Ext.getCmp('home').getViewModel().set('month_purchase_amount', sum+'')
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ // month_purchase: {
|
|
|
+ // model: 'saas.model.chart.DataXY',
|
|
|
+ // autoLoad: true,
|
|
|
+ // proxy: {
|
|
|
+ // type: 'ajax',
|
|
|
+ // // url: 'http://192.168.253.58:8920/homePage/purchaseData?sixMonths=false',
|
|
|
+ // url: '/api/commons/homePage/purchaseData?sixMonths=false',
|
|
|
+ // timeout: 8000,
|
|
|
+ // actionMethods: {
|
|
|
+ // read: 'GET'
|
|
|
+ // },
|
|
|
+ // reader: {
|
|
|
+ // type: 'json',
|
|
|
+ // rootProperty: 'data',
|
|
|
+ // },
|
|
|
+ // listeners: {
|
|
|
+ // exception: function(proxy, response, operation, eOpts) {
|
|
|
+ // var p = Ext.getCmp('month_purchase');
|
|
|
+ // p && p.setLoading(false);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // listeners: {
|
|
|
+ // beforeload: function() {
|
|
|
+ // var p = Ext.getCmp('month_purchase');
|
|
|
+ // p && p.setLoading(true);
|
|
|
+ // },
|
|
|
+ // load: function(s, d) {
|
|
|
+ // var p = Ext.getCmp('month_purchase');
|
|
|
+ // p && p.setLoading(false);
|
|
|
+ // var sum = Ext.util.Format.number(s.sum('y'), '0.00') || 0;
|
|
|
+ // Ext.getCmp('home').getViewModel().set('month_purchase_amount', sum+'')
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
|
|
|
month_io: {
|
|
|
fields: ['x', 'main', 'other'],
|
|
|
@@ -315,5 +315,42 @@ Ext.define('saas.view.home.HomeModel', {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ profit_detail: {
|
|
|
+ fields: ['x', 'y', 'z'],
|
|
|
+ autoLoad: true,
|
|
|
+ proxy: {
|
|
|
+ type: 'ajax',
|
|
|
+ // url: 'http://192.168.253.58:8560/api/commons/homePage/monthProfit',
|
|
|
+ url: '/api/commons/homePage/monthProfit',
|
|
|
+ timeout: 8000,
|
|
|
+ // header: {
|
|
|
+ // Authorization: 'eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJnIiwiYXBwSWQiOiJ0cmFkZS1hcHAiLCJ1c2VySWQiOjM4LCJjb21wYW55SWQiOjIxLCJ1c2VyTmFtZSI6ImciLCJyZWFsTmFtZSI6Iue-pCIsImV4cCI6MTU0NjIyNTg5Mn0.oe6BmpVchOlL6PoR7UspHbThFEJ_HLlKTHBpV4P9wSA4YbL2Pv5sAah2U6M2q7nmu0J1DV5WwMaMClI19Us7n-8fSgNeQrl1IsVFO4sf5nSC3SrUJk0sraBq5dLAqONfAIj9qFOuyduL6tXkV2av5IfmikT1uMk8okTJKDtHj8U'
|
|
|
+ // },
|
|
|
+ actionMethods: {
|
|
|
+ read: 'GET'
|
|
|
+ },
|
|
|
+ reader: {
|
|
|
+ type: 'json',
|
|
|
+ rootProperty: 'data',
|
|
|
+ },
|
|
|
+ listeners: {
|
|
|
+ exception: function(proxy, response, operation, eOpts) {
|
|
|
+ var p = Ext.getCmp('profit_detail');
|
|
|
+ p && p.setLoading(false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ listeners: {
|
|
|
+ beforeload: function() {
|
|
|
+ var p = Ext.getCmp('profit_detail');
|
|
|
+ p && p.setLoading(true);
|
|
|
+ },
|
|
|
+ load: function(s, d) {
|
|
|
+ var p = Ext.getCmp('profit_detail');
|
|
|
+ p && p.setLoading(false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
});
|