Detail.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. Ext.define('school.view.interaction.maibox.Detail', {
  2. extend: 'school.view.core.form.FormPanel',
  3. xtype: 'interaction-maibox-Detail',
  4. controller: 'interaction-maibox-Detail',
  5. viewModel: 'interaction-maibox-Detail',
  6. _title: '校长信箱',
  7. _idField: 'mailbox_id',
  8. _codeField: null,
  9. // _readUrl: 'http://10.1.80.47:9520/api/school/principal/read',
  10. _readUrl: '/api/school/principal/read',
  11. initId: 0,
  12. initComponent: function () {
  13. Ext.apply(this, {
  14. defaultItems: [{
  15. xtype: 'hidden',
  16. name: 'mailbox_id',
  17. fieldLabel: 'id'
  18. }, {
  19. xtype: "textfield",
  20. name: "mailbox_title",
  21. fieldLabel: "标题",
  22. columnWidth: 0.5,
  23. readOnly: true
  24. }, {
  25. xtype: 'textfield',
  26. name: 'mb_creatorname',
  27. fieldLabel: '提出人',
  28. readOnly: true
  29. }, {
  30. xtype: 'textfield',
  31. name: 'mb_grade',
  32. fieldLabel: '年级',
  33. readOnly: true
  34. }, {
  35. xtype: 'textfield',
  36. name: 'mb_class',
  37. fieldLabel: '班级',
  38. readOnly: true
  39. }, {
  40. xtype: 'datefield',
  41. name: 'create_date',
  42. fieldLabel: '提出时间',
  43. readOnly: true
  44. }, {
  45. xtype: 'textfield',
  46. name: 'mailbox_status_text',
  47. fieldLabel: '回复状态',
  48. readOnly: true,
  49. }, {
  50. xtype: 'textfield',
  51. name: 'mb_ignore_text',
  52. fieldLabel: '忽略状态',
  53. readOnly: true,
  54. }, {
  55. xtype: "textareafield",
  56. name: "mailbox_context",
  57. fieldLabel: "内容",
  58. columnWidth: 1,
  59. readOnly: true
  60. }, {
  61. xtype: 'mfilefield',
  62. name: 'mailbox_files',
  63. fieldLabel: '附件',
  64. readOnly: true
  65. }, {
  66. xtype: 'textareafield',
  67. name: 'mb_reply',
  68. fieldLabel: '回复内容',
  69. columnWidth: 1
  70. }],
  71. toolBtns: [{
  72. xtype: 'button',
  73. text: '回复',
  74. handler: 'onReply'
  75. }, {
  76. xtype: 'button',
  77. text: '忽略',
  78. handler: 'onIgnore',
  79. hidden: true,
  80. bind: {
  81. hidden: '{!!mb_ignore}'
  82. }
  83. }, {
  84. xtype: 'button',
  85. text: '取消忽略',
  86. handler: 'onUnIgnore',
  87. hidden: true,
  88. bind: {
  89. hidden: '{!mb_ignore}'
  90. }
  91. }]
  92. });
  93. this.callParent();
  94. },
  95. listeners: {
  96. load: function(form, data) {
  97. let fileField = form.down('mfilefield');
  98. fileField.value = data.main.mailbox_files
  99. fileField.renderMF(fileField);
  100. }
  101. }
  102. });