123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- Ext.define('saas.view.tools.ResetAccount', {
- extend: 'Ext.form.Panel',
- xtype: 'tools-resetaccount',
- requires: ['Ext.layout.container.Column'],
- layout: 'column',
- width: 350,
- bodyPadding: 10,
- items: [{
- xtype: 'textfield',
- name: 'userName',
- emptyText: '输入账号',
- columnWidth: 1,
- allowBlank: false
- }],
- buttonAlign: 'center',
- buttons: [{
- text: '确定',
- formBind: true,
- handler: function() {
- var win = this.up('core-win'),
- form = this.up('tools-resetaccount'),
- userName = form.getValues().userName;
- win.setLoading(true);
- saas.util.BaseUtil.request({
- url: '/api/operation/auth/clearAuthorizeCount?username=' + userName,
- }).then(function(res) {
- saas.util.BaseUtil.showSuccessToast('账号[' + userName + ']已重置');
- win.setLoading(false);
- win.close();
- }).catch(function(e) {
- saas.util.BaseUtil.showErrorToast('账号[' + userName + ']重置失败: ' + e.message);
- win.setLoading(false);
- win.close();
- });
- }
- }, {
- text: '取消',
- handler: 'closeWin'
- }]
- })
|