Browse Source

基础资料无权限提示

zhuth 7 years ago
parent
commit
59e53d5548
1 changed files with 132 additions and 0 deletions
  1. 132 0
      frontend/saas-web/app/view/document/kind/KindModel.js

+ 132 - 0
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -22,6 +22,18 @@ Ext.define('saas.view.document.kind.KindModel', {
                 reader: {
                 reader: {
                     type: 'json',
                     type: 'json',
                     rootProperty: 'data'
                     rootProperty: 'data'
+                },
+                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,
             pageSize: null,
@@ -49,6 +61,18 @@ Ext.define('saas.view.document.kind.KindModel', {
                 reader: {
                 reader: {
                     type: 'json',
                     type: 'json',
                     rootProperty: 'data'
                     rootProperty: 'data'
+                },
+                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,
             pageSize: null,
@@ -76,6 +100,18 @@ Ext.define('saas.view.document.kind.KindModel', {
                 reader: {
                 reader: {
                     type: 'json',
                     type: 'json',
                     rootProperty: 'data'
                     rootProperty: 'data'
+                },
+                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,
             pageSize: null,
@@ -103,6 +139,18 @@ Ext.define('saas.view.document.kind.KindModel', {
                 reader: {
                 reader: {
                     type: 'json',
                     type: 'json',
                     rootProperty: 'data'
                     rootProperty: 'data'
+                },
+                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,
             pageSize: null,
@@ -136,6 +184,18 @@ Ext.define('saas.view.document.kind.KindModel', {
                 reader: {
                 reader: {
                     type: 'json',
                     type: 'json',
                     rootProperty: 'data.list'
                     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,
             pageSize: null,
@@ -164,6 +224,18 @@ Ext.define('saas.view.document.kind.KindModel', {
                 reader: {
                 reader: {
                     type: 'json',
                     type: 'json',
                     rootProperty: 'data'
                     rootProperty: 'data'
+                },
+                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,
             pageSize: null,
@@ -195,6 +267,18 @@ Ext.define('saas.view.document.kind.KindModel', {
                 reader: {
                 reader: {
                     type: 'json',
                     type: 'json',
                     rootProperty: 'data.list'
                     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,
             pageSize: null,
@@ -222,6 +306,18 @@ Ext.define('saas.view.document.kind.KindModel', {
                 reader: {
                 reader: {
                     type: 'json',
                     type: 'json',
                     rootProperty: 'data'
                     rootProperty: 'data'
+                },
+                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,
             pageSize: null,
@@ -249,6 +345,18 @@ Ext.define('saas.view.document.kind.KindModel', {
                 reader: {
                 reader: {
                     type: 'json',
                     type: 'json',
                     rootProperty: 'data'
                     rootProperty: 'data'
+                },
+                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,
             pageSize: null,
@@ -279,6 +387,18 @@ Ext.define('saas.view.document.kind.KindModel', {
                 reader: {
                 reader: {
                     type: 'json',
                     type: 'json',
                     rootProperty: 'data.list'
                     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,
             pageSize: null,
@@ -306,6 +426,18 @@ Ext.define('saas.view.document.kind.KindModel', {
                 reader: {
                 reader: {
                     type: 'json',
                     type: 'json',
                     rootProperty: 'data'
                     rootProperty: 'data'
+                },
+                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,
             pageSize: null,