|
|
@@ -54,13 +54,50 @@ Ext.define('school.view.interaction.timetable.List', {
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
- xtype: 'textfield',
|
|
|
+ xtype: 'combobox',
|
|
|
name: 'mcur_term_part',
|
|
|
- fieldLabel: '学年'
|
|
|
+ fieldLabel: '学年',
|
|
|
+ queryModel: 'local',
|
|
|
+ displayField: 'value',
|
|
|
+ valueField: 'value',
|
|
|
+ store: Ext.create('Ext.data.ArrayStore', {
|
|
|
+ fields: ['value'],
|
|
|
+ data: (function() {
|
|
|
+ let now = new Date();
|
|
|
+ let year = now.getFullYear();
|
|
|
+ let op = [], o1, o2;
|
|
|
+ o1 = [(year - 1) + '-' + year];
|
|
|
+ o2 = [year + '-' + (year + 1)];
|
|
|
+ op.push(o1);
|
|
|
+ op.push(o2);
|
|
|
+ return op;
|
|
|
+ })()
|
|
|
+ }),
|
|
|
+ value: (function() {
|
|
|
+ let now = new Date();
|
|
|
+ let year = now.getFullYear();
|
|
|
+ let month = now.getMonth() + 1;
|
|
|
+ let o1, o2;
|
|
|
+ o1 = [(year - 1) + '-' + year];
|
|
|
+ o2 = [year + '-' + (year + 1)];
|
|
|
+ return (month < 9) ? o1 : o2
|
|
|
+ })()
|
|
|
}, {
|
|
|
- xtype: 'textfield',
|
|
|
- name: 'mcur_term_name',
|
|
|
- fieldLabel: '学期'
|
|
|
+ xtype: "combobox",
|
|
|
+ name: "mcur_term_name",
|
|
|
+ fieldLabel: "学期",
|
|
|
+ queryModel: 'local',
|
|
|
+ displayField: 'value',
|
|
|
+ valueField: 'value',
|
|
|
+ store: Ext.create('Ext.data.ArrayStore', {
|
|
|
+ fields: ['value'],
|
|
|
+ data: [['第一学期'], ['第二学期']]
|
|
|
+ }),
|
|
|
+ value: (function() {
|
|
|
+ let now = new Date();
|
|
|
+ let month = now.getMonth() + 1;
|
|
|
+ return (month < 9) ? '第一学期' : '第二学期'
|
|
|
+ })()
|
|
|
}],
|
|
|
|
|
|
gridConfig: {
|