| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- /**
- * 作业发布
- */
- Ext.define('school.view.interaction.homework.Release', {
- extend: 'school.view.core.form.FormPanel',
- xtype: 'interaction-homework-release',
- controller: 'interaction-homework-release',
- // viewModel: 'purchase-purchase-formpanel',
- //字段属性
- _title: '作业发布',
- _idField: 'task_id',
- _codeField: null,
- // _readUrl: 'http://10.1.80.47:9560/homework/read',
- _readUrl: '/api/school/homework/read',
- // _saveUrl: 'http://10.1.80.47:9560/homework/save',
- _saveUrl: '/api/school/homework/save',
- _deleteUrl: '/api/school/homework/delete',
- initId: 0,
- initComponent: function () {
- Ext.apply(this, {
- defaultItems: [{
- xtype: 'hidden',
- name: 'task_id',
- fieldLabel: 'id'
- }, {
- xtype: "textfield",
- name: "task_creator",
- fieldLabel: "发布人",
- columnWidth: 0.5
- }, {
- xtype: 'textfield',
- name: 'grade_name',
- fieldLabel: '年级'
- }, {
- xtype: 'textfield',
- name: 'classz_name',
- fieldLabel: '班级'
- }, {
- xtype: 'datefield',
- name: 'start_date',
- fieldLabel: '开始时间',
- columnWidth: 0.5,
- defaultValue: new Date()
- }, {
- xtype: 'datefield',
- name: 'end_date',
- fieldLabel: '截止时间',
- columnWidth: 0.5
- }, {
- xtype: "textfield",
- name: "task_title",
- fieldLabel: "标题",
- columnWidth: 1
- }, {
- xtype: 'combobox',
- name: 'task_status',
- fieldLabel: '发布状态',
- displayField: 'name',
- valueField: 'value',
- editable: false,
- readOnly: true,
- defaultValue: 2,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['name', 'value'],
- data: [['未发布', 2], ['已发布', 1]]
- }),
- minChars: 0,
- queryMode: 'local'
- }, {
- xtype: 'datefield',
- name: 'publish_date',
- fieldLabel: '发布时间',
- readOnly: true,
- format: 'Y-m-d H:i:s'
- }, {
- xtype: "textareafield",
- name: 'task_context',
- fieldLabel: "内容",
- columnWidth: 1,
- height: 250
- }, {
- xtype: 'textfield',
- name: 'fj',
- fieldLabel: '附件'
- }],
- toolBtns: [{
- xtype: 'button',
- text: '发布',
- bind: {
- hidden: '{!task_id}'
- },
- handler: 'onPublish'
- }]
- });
- this.callParent();
- }
- });
|