Login.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /**
  2. * 登录页面
  3. */
  4. Ext.define('uas.auth.Login', {
  5. extend: 'Ext.container.Container',
  6. xtype: 'login',
  7. requires: [
  8. 'Ext.form.Label',
  9. 'Ext.form.field.Checkbox'
  10. ],
  11. // controller: 'login',
  12. viewModel: 'login',
  13. layout: 'border',
  14. defaultFocus: 'authdialog',
  15. items: [{
  16. region: 'center',
  17. xtype: 'container',
  18. cls: 'auth-login',
  19. items: [{
  20. xtype: 'authdialog',
  21. reference: 'authdialog',
  22. defaultButton: 'loginButton',
  23. autoComplete: true,
  24. bodyPadding: '20 20',
  25. cls: 'auth-dialog-login',
  26. header: false,
  27. width: 415,
  28. layout: {
  29. type: 'vbox',
  30. align: 'stretch'
  31. },
  32. defaults: {
  33. margin: '5 0'
  34. },
  35. items: [{
  36. xtype: 'label',
  37. text: '账 户 登 录',
  38. cls: 'auth-title'
  39. },
  40. {
  41. xtype: 'combobox',
  42. name: 'locale',
  43. bind: '{locale}',
  44. store: {
  45. type: 'locale'
  46. },
  47. queryMode: 'local',
  48. displayField: 'name',
  49. valueField: 'code',
  50. selectFirstIfNull: true,
  51. height: 55,
  52. hideLabel: true,
  53. allowBlank: false,
  54. emptyText: '语言',
  55. editable: false,
  56. triggers: {
  57. picker: {
  58. cls: 'trigger-glyph-noop auth-locale-trigger'
  59. }
  60. }
  61. },
  62. {
  63. xtype: 'combobox',
  64. name: 'datacenter',
  65. bind: '{datacenter}',
  66. store: {
  67. type: 'datacenter'
  68. },
  69. queryMode: 'local',
  70. displayField: 'name',
  71. valueField: 'id',
  72. selectFirstIfNull: true,
  73. height: 55,
  74. hideLabel: true,
  75. allowBlank: false,
  76. emptyText: '数据中心',
  77. editable: false,
  78. triggers: {
  79. picker: {
  80. cls: 'trigger-glyph-noop auth-datacenter-trigger'
  81. }
  82. }
  83. },
  84. {
  85. xtype: 'textfield',
  86. name: 'username',
  87. bind: '{username}',
  88. height: 55,
  89. hideLabel: true,
  90. allowBlank: false,
  91. emptyText: '账号/邮箱/手机号',
  92. triggers: {
  93. glyphed: {
  94. cls: 'trigger-glyph-noop auth-email-trigger'
  95. }
  96. }
  97. },
  98. {
  99. xtype: 'textfield',
  100. height: 55,
  101. hideLabel: true,
  102. emptyText: '密码',
  103. inputType: 'password',
  104. name: 'password',
  105. bind: '{password}',
  106. allowBlank: false,
  107. triggers: {
  108. glyphed: {
  109. cls: 'trigger-glyph-noop auth-password-trigger'
  110. }
  111. }
  112. },
  113. {
  114. xtype: 'container',
  115. layout: 'hbox',
  116. items: [{
  117. xtype: 'checkboxfield',
  118. flex: 1,
  119. height: 30,
  120. bind: '{persist}',
  121. boxLabel: '记住账户'
  122. },
  123. {
  124. xtype: 'box',
  125. html: '<a href="#passwordreset" class="link-forgot-password"> 忘记密码 ?</a>'
  126. }
  127. ]
  128. },
  129. {
  130. xtype: 'button',
  131. reference: 'loginButton',
  132. scale: 'large',
  133. ui: 'login',
  134. iconAlign: 'right',
  135. iconCls: 'x-fa fa-angle-right',
  136. text: '登录',
  137. formBind: true,
  138. operation: 'login'
  139. }
  140. ]
  141. }]
  142. }, {
  143. region: 'south',
  144. cls: 'auth-login-footer',
  145. html: '©2019 深圳市优软科技有限公司 版权所有'
  146. }]
  147. });