123456789101112131415161718192021222324252627282930313233343536373839 |
- Ext.define('saas.view.tools.ClearCache', {
- extend: 'Ext.form.Panel',
- xtype: 'tools-clearcache',
- requires: ['Ext.form.field.Display'],
- layout: 'column',
- width: 350,
- bodyPadding: 10,
- items: [{
- xtype: 'displayfield',
- value: '确定执行清除缓存操作吗?',
- columnWidth: 1
- }],
- buttonAlign: 'center',
- buttons: [{
- text: '确定',
- handler: function() {
- var win = this.up('core-win');
- win.setLoading(true);
- saas.util.BaseUtil.request({
- url: '/api/account/account/cache/clearAll',
- }).then(function(res) {
- saas.util.BaseUtil.showSuccessToast('清除缓存成功');
- win.setLoading(false);
- win.close();
- }).catch(function(e) {
- saas.util.BaseUtil.showErrorToast('清除缓存失败: ' + e.message);
- win.setLoading(false);
- win.close();
- });
- }
- }, {
- text: '取消',
- handler: 'closeWin'
- }]
- })
|