| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /**
- * Created by zhouy on 2018/10/18.
- */
- Ext.define('saas.view.document.employee.DataListModel', {
- extend: 'Ext.app.ViewModel',
- alias: 'viewmodel.document-employee-datalist',
- stores: {
- employee:{
- fields:[
- {name: 'id', type: 'int'},
- {name: 'em_code', type: 'string'},
- {name: 'em_mobile', type: 'string'},
- {name: 'em_email', type: 'string'},
- {name: 'em_clasee', type: 'string'}
- ],
- proxy: {
- type: 'ajax',
- url: '/api/document/employee/list',
- actionMethods: {
- read: 'GET'
- },
- reader: {
- type: 'json',
- rootProperty: 'data.list'
- },
- listeners: {
- exception: function(proxy, response, operation, eOpts) {
- if(operation.success) {
- if(response.timedout) {
- saas.util.BaseUtil.showErrorToast('请求超时');
- }
- }else {
- console.error('exception: ', response.responseJson);
- saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
- }
- }
- }
- },
- pageSize: null,
- autoLoad: false,
- listeners: {
- beforeload: function (store, op) {
- Ext.apply(store.proxy.extraParams, {
- number: 1,
- size: 1000
- });
- }
- }
- }
- }
- });
|