FormUtil.js 494 B

12345678910111213141516171819
  1. Ext.define('saas.util.FormUtil', {
  2. BaseUtil: Ext.create('saas.util.BaseUtil'),
  3. /**
  4. * 获得form的字段配置
  5. * @param form: form组件
  6. * @param url: url
  7. */
  8. getFormItems: function(form, url, callback) {
  9. this.BaseUtil.request(url)
  10. .then(function(response) {
  11. var items = Ext.decode(response.responseText);
  12. form.add(items);
  13. }).catch(function(response) {
  14. console.log(response);
  15. });
  16. }
  17. });