Ext.define('school.view.interaction.maibox.Detail', { extend: 'school.view.core.form.FormPanel', xtype: 'interaction-maibox-Detail', controller: 'interaction-maibox-Detail', viewModel: 'interaction-maibox-Detail', _title: '校长信箱', _idField: 'mailbox_id', _codeField: null, // _readUrl: 'http://10.1.80.47:9520/api/school/principal/read', _readUrl: '/api/school/principal/read', initId: 0, initComponent: function () { Ext.apply(this, { defaultItems: [{ xtype: 'hidden', name: 'mailbox_id', fieldLabel: 'id' }, { xtype: "textfield", name: "mailbox_title", fieldLabel: "标题", columnWidth: 0.5, readOnly: true }, { xtype: 'textfield', name: 'mb_creatorname', fieldLabel: '提出人', readOnly: true }, { xtype: 'textfield', name: 'mb_grade', fieldLabel: '年级', readOnly: true }, { xtype: 'textfield', name: 'mb_class', fieldLabel: '班级', readOnly: true }, { xtype: 'datefield', name: 'create_date', fieldLabel: '提出时间', readOnly: true }, { xtype: 'textfield', name: 'mailbox_status_text', fieldLabel: '回复状态', readOnly: true, }, { xtype: 'textfield', name: 'mb_ignore_text', fieldLabel: '忽略状态', readOnly: true, }, { xtype: "textareafield", name: "mailbox_context", fieldLabel: "内容", columnWidth: 1, readOnly: true }, { xtype: 'mfilefield', name: 'mailbox_files', fieldLabel: '附件', readOnly: true }, { xtype: 'textareafield', name: 'mb_reply', fieldLabel: '回复内容', columnWidth: 1 }], toolBtns: [{ xtype: 'button', text: '回复', handler: 'onReply' }, { xtype: 'button', text: '忽略', handler: 'onIgnore', hidden: true, bind: { hidden: '{!!mb_ignore}' } }, { xtype: 'button', text: '取消忽略', handler: 'onUnIgnore', hidden: true, bind: { hidden: '{!mb_ignore}' } }] }); this.callParent(); }, listeners: { load: function(form, data) { let fileField = form.down('mfilefield'); fileField.value = data.main.mailbox_files fileField.renderMF(fileField); } } });