Selaa lähdekoodia

'课程表、接口对接完善'

zhuth 6 vuotta sitten
vanhempi
commit
acd86d3729

+ 26 - 14
frontend/pc-web/app/model/Timetable.js

@@ -4,34 +4,46 @@
 Ext.define('school.model.Timetable', {
     extend: 'school.model.Base',
     fields: [{
-        name: 'monday', type: 'string'
+        name: 'mon', type: 'string'
     }, {
-        name: 'tuesday', type: 'string'
+        name: 'tues', type: 'string'
     }, {
-        name: 'wednesday', type: 'string'
+        name: 'wed', type: 'string'
     }, {
-        name: 'thursday', type: 'string'
+        name: 'thur', type: 'string'
     }, {
-        name: 'friday', type: 'string'
+        name: 'fri', type: 'string'
     }, {
-        name: 'saturday', type: 'string'
+        name: 'sat', type: 'string'
     }, {
         name: 'sunday', type: 'string'
     }, {
-        name: 'period0', type: 'date'
+        name: 'startTime', type: 'string',
     }, {
-        name: 'periodText0', type: 'string',
+        name: 'endTime', type: 'string',
+    }, {
+        name: '_time1', type: 'date',
+        convert: function(v, rec) {
+            return new Date('1997-01-01 ' + rec.get('startTime'));
+        },
+        depends: ['startTime']
+    }, {
+        name: '_timeText1', type: 'string',
         convert: function(v, rec) {
-            return Ext.Date.format(rec.get('period0'), 'H:i');
+            return Ext.Date.format(rec.get('_time1'), 'H:i');
         },
-        depends: ['period0']
+        depends: ['_time1']
     }, {
-        name: 'period1', type: 'date'
+        name: '_time2', type: 'date',
+        convert: function(v, rec) {
+            return new Date('1997-01-01 ' + rec.get('endTime'));
+        },
+        depends: ['endTime']
     }, {
-        name: 'periodText1', type: 'string',
+        name: '_timeText2', type: 'string',
         convert: function(v, rec) {
-            return Ext.Date.format(rec.get('period1'), 'H:i');
+            return Ext.Date.format(rec.get('_time2'), 'H:i');
         },
-        depends: ['period1']
+        depends: ['_time2']
     }]
 });

+ 39 - 3
frontend/pc-web/app/store/Subject.js

@@ -8,13 +8,49 @@ Ext.define('school.store.Subject', {
     model: 'school.model.Subject',
 
     data: [{
-        code: 'language',
+        code: '1',
         name: '语文'
     }, {
-        code: 'math',
+        code: '2',
         name: '数学'
     }, {
-        code: 'english',
+        code: '3',
         name: '英语'
+    }, {
+        code: '4',
+        name: '物理'
+    }, {
+        code: '5',
+        name: '化学'
+    }, {
+        code: '6',
+        name: '生物'
+    }, {
+        code: '7',
+        name: '政治'
+    }, {
+        code: '8',
+        name: '历史'
+    }, {
+        code: '9',
+        name: '地理'
+    }, {
+        code: '10',
+        name: '体育'
+    }, {
+        code: '11',
+        name: '书法'
+    }, {
+        code: '12',
+        name: '美工'
+    }, {
+        code: '13',
+        name: '画画'
+    }, {
+        code: '14',
+        name: '自然'
+    }, {
+        code: '15',
+        name: '思想品德'
     }]
 });

+ 28 - 28
frontend/pc-web/app/view/Interaction/homework/List.js

@@ -9,7 +9,7 @@ Ext.define('school.view.interaction.homework.List', {
     dataUrl: '/api/school/homework/list',
     _title: '作业发布',
 
-    initComponent: function() {
+    initComponent: function () {
         var me = this;
         Ext.apply(this, {
             searchField: [{
@@ -23,9 +23,9 @@ Ext.define('school.view.interaction.homework.List', {
             }, {
                 xtype: 'textfield',
                 name: 'keyword',
-                fieldLabel:'关键字'
+                fieldLabel: '关键字'
             }],
-        
+
             gridConfig: {
                 addTitle: '作业发布',
                 addXtype: 'interaction-homework-release',
@@ -37,27 +37,27 @@ Ext.define('school.view.interaction.homework.List', {
                 totalProperty: 'data.total',
                 actionColumn: [],
                 selModel: {
-                    checkOnly:true,
-                    type:'checkboxmodel',
-                    mode : "MULTI" ,
-                    ignoreRightMouseSelection : false
+                    checkOnly: true,
+                    type: 'checkboxmodel',
+                    mode: "MULTI",
+                    ignoreRightMouseSelection: false
                 },
                 hiddenTools: false,
                 toolBtns: [{
                     xtype: 'button',
                     text: '删除',
-                    handler: function() {
+                    handler: function () {
                         let grid = this.up('grid'),
-                        selectedRecords = grid.getSelection();
+                            selectedRecords = grid.getSelection();
                         let data;
 
-                        data = selectedRecords.map(function(r) {
+                        data = selectedRecords.map(function (r) {
                             return {
                                 id: r.get('task_id')
                             };
                         });
 
-                        if(data.length == 0) {
+                        if (data.length == 0) {
                             school.util.BaseUtil.showErrorToast('请先勾选需要删除的记录');
                             return;
                         }
@@ -70,11 +70,11 @@ Ext.define('school.view.interaction.homework.List', {
                             params: JSON.stringify({
                                 baseDTOs: data
                             })
-                        }).then(function(res) {
+                        }).then(function (res) {
                             grid.setLoading(false);
                             school.util.BaseUtil.showSuccessToast('成功删除' + data.length + '条记录');
                             grid.store.loadPage(grid.store.currentPage);
-                        }).catch(function(e) {
+                        }).catch(function (e) {
                             grid.setLoading(false);
                             school.util.BaseUtil.showErrorToast('删除失败: ' + e.message);
                         });
@@ -82,11 +82,11 @@ Ext.define('school.view.interaction.homework.List', {
                 }, {
                     xtype: 'button',
                     text: '新增',
-                    handler: function() {
+                    handler: function () {
                         school.util.BaseUtil.openTab('interaction-homework-release', '新增作业', 'interaction-homework-release-add');
                     }
                 }],
-                columns : [{
+                columns: [{
                     text: 'id',
                     dataIndex: 'task_id',
                     hidden: true
@@ -96,7 +96,7 @@ Ext.define('school.view.interaction.homework.List', {
                     width: 120,
                     tdCls: 'x-detail-column',
                     listeners: {
-                        click: function(view, td, row, col, e, record, tr, eOpts, event) {
+                        click: function (view, td, row, col, e, record, tr, eOpts, event) {
                             let gridConfig = me.gridConfig;
                             school.util.BaseUtil.openTab(gridConfig.addXtype, gridConfig.addTitle + '(' + record.get('task_title') + ')', gridConfig.addXtype + '-' + record.get(gridConfig.idField), {
                                 initId: record.get(gridConfig.idField)
@@ -118,7 +118,7 @@ Ext.define('school.view.interaction.homework.List', {
                     text: '发布时间',
                     dataIndex: 'start_date',
                     width: 120
-                },]
+                }, ]
             },
         });
         this.callParent(arguments);
@@ -158,33 +158,33 @@ Ext.define('school.view.interaction.homework.List', {
         return conditionValue;
     },
 
-    getExtraParams: function(store, op, condition) {
+    getExtraParams: function (store, op, condition) {
         var temp = {};
 
-        for(let x = 0; x < condition.length; x++) {
+        for (let x = 0; x < condition.length; x++) {
             let c = condition[x];
-            if(c.field == 'keyword') {
+            if (c.field == 'keyword') {
                 temp.keyword = c.value;
-            }else if(c.field == 'date') {
+            } else if (c.field == 'date') {
                 temp.fromDate = new Date(c.value.split(',')[0]).getTime();
                 temp.endDate = new Date(c.value.split(',')[1]).getTime();
-            }else if(c.field == 'quoted') {
+            } else if (c.field == 'quoted') {
                 temp.quoted = c.value == 'all' ? null : c.value;
-            }else if(c.field == 'closed') {
+            } else if (c.field == 'closed') {
                 // temp.endDate = c.value == 'all' ? null : (
                 //     c.value == '0' ? 
                 // );
             }
         }
         let obj = {
-            pageNumber: store.exportNumber?store.exportNumber:op._page,
-            pageSize: store.exportPageSize?store.exportPageSize:store.pageSize
+            pageNumber: store.exportNumber ? store.exportNumber : op._page,
+            pageSize: store.exportPageSize ? store.exportPageSize : store.pageSize
         };
-        for(let k in temp) {
-            if(!!temp[k]) {
+        for (let k in temp) {
+            if (!!temp[k]) {
                 obj[k] = temp[k];
             }
         }
         return obj;
-     },
+    }
 });

+ 3 - 6
frontend/pc-web/app/view/Interaction/score/Detail.js

@@ -5,12 +5,9 @@ Ext.define('school.view.interaction.score.Detail', {
     _title: '成绩录入',
     _idField: 'student_id',
     _codeField: 'student_number',
-    _statusField: null,
-    _statusCodeField: null,
-    _auditmanField: null,
-    _auditdateField: null,
-    // _readUrl: 'http://10.1.80.35:8560/api/sale/saledown/read',
-    _readUrl: '/api/sale/xxxx/read',
+
+    // _readUrl: 'http://10.1.80.47:9560/score/read',
+    _readUrl: '/api/school/score/read',
     // _saveUrl: 'http://10.1.80.35:8560/api/sale/saledown/update',
     _saveUrl: '/api/sale/sss/update',
     // _toSaleUrl: 'http://10.1.80.35:8560/api/sale/saledown/toSale',

+ 47 - 56
frontend/pc-web/app/view/Interaction/score/List.js

@@ -7,8 +7,9 @@ Ext.define('school.view.interaction.score.List', {
 
     controller: 'interaction-score-list',
 
-    dataUrl: '/api/interaction/score/list',
-    initComponent: function() {
+    // dataUrl: 'http://10.1.80.47:9560/score/list',
+    dataUrl: '/api/school/score/list',
+    initComponent: function () {
         var me = this;
         Ext.apply(this, {
             searchField: [{
@@ -24,7 +25,7 @@ Ext.define('school.view.interaction.score.List', {
                 name: 'class',
                 fieldLabel: '班级'
             }],
-        
+
             caller: null,
             _formXtype: null,
             _title: null,
@@ -32,73 +33,63 @@ Ext.define('school.view.interaction.score.List', {
             _batchOpenUrl: null,
             _batchCloseUrl: null,
             _batchDeleteUrl: null,
-        
+
             gridConfig: {
-                idField: null,
-                codeField: null,
-                statusCodeField: null,
+                addTitle: '成绩录入',
+                addXtype: 'interaction-score-detail',
+                idField: 'score_id',
+                codeField: 'score_num',
+                detailField: null,
                 dataUrl: me.dataUrl,
                 caller: null,
                 rootProperty: 'data.list',
                 totalProperty: 'data.total',
                 actionColumn: [],
                 selModel: {
-                    checkOnly:true,
-                    type:'checkboxmodel',
-                    mode : "MULTI" ,
-                    ignoreRightMouseSelection : false
+                    checkOnly: true,
+                    type: 'checkboxmodel',
+                    mode: "MULTI",
+                    ignoreRightMouseSelection: false
                 },
                 hiddenTools: false,
                 toolBtns: [{
                     xtype: 'button',
-                    text: '下载模板'
-                }, {
-                    xtype: 'button',
-                    text: '上传成绩'
+                    text: '导入'
                 }, {
                     xtype: 'button',
-                    text: '添加',
-                    handler: 'onAddClick'
+                    text: '删除'
                 }, {
                     xtype: 'button',
-                    text: '删除'
+                    text: '新增',
+                    // handler: 'onAddClick'
                 }],
-                columns : [{
+                columns: [{
+                    text: 'ID',
+                    dataIndex: 'score_id',
+                    hidden: true
+                }, {
                     text: '编号',
-                    dataIndex: 'code',
+                    dataIndex: 'score_num',
                     width: 150
                 }, {
-                    text: '标题',
-                    dataIndex: 'name',
+                    text: '成绩类型',
+                    dataIndex: 'score_name',
                     width: 120
                 }, {
-                    text: '时间',
-                    dataIndex: 'gender',
-                    width: 120
+                    text: '考试时间',
+                    dataIndex: 'score_date',
+                    width: 150
                 }, {
-                    text: '类型',
-                    dataIndex: 'grade'
+                    text: '年级',
+                    dataIndex: 'score_scope'
                 }, {
-                    text: '录入人',
-                    dataIndex: 'class'
+                    text: '类型',
+                    dataIndex: 'score_type'
                 }, {
-                    text: '录入时间',
-                    dataIndex: 'birth',
+                    text: '备注',
+                    dataIndex: 'score_remarks',
                     width: 120
-                }, {
-                    text: '状态',
-                    dataIndex: 'open'
-                }, {
-                    text: '操作',
-                    dataIndex: 'status'
-                }],
-                listeners: {
-                    itemclick: function(view, record, item, index, e, eOpts) {
-                        school.util.BaseUtil.openTab('interaction-score-detail', '课程表', 'interaction-score-detail'+record.get('id'), {
-                            initId: record.get('id')
-                        }); 
-                    }
-                }
+                }]
             },
         });
         this.callParent(arguments);
@@ -138,33 +129,33 @@ Ext.define('school.view.interaction.score.List', {
         return conditionValue;
     },
 
-    getExtraParams: function(store, op, condition) {
+    getExtraParams: function (store, op, condition) {
         var temp = {};
 
-        for(let x = 0; x < condition.length; x++) {
+        for (let x = 0; x < condition.length; x++) {
             let c = condition[x];
-            if(c.field == 'keyword') {
+            if (c.field == 'keyword') {
                 temp.keyword = c.value;
-            }else if(c.field == 'date') {
+            } else if (c.field == 'date') {
                 temp.fromDate = new Date(c.value.split(',')[0]).getTime();
                 temp.endDate = new Date(c.value.split(',')[1]).getTime();
-            }else if(c.field == 'quoted') {
+            } else if (c.field == 'quoted') {
                 temp.quoted = c.value == 'all' ? null : c.value;
-            }else if(c.field == 'closed') {
+            } else if (c.field == 'closed') {
                 // temp.endDate = c.value == 'all' ? null : (
                 //     c.value == '0' ? 
                 // );
             }
         }
         let obj = {
-            pageNumber: store.exportNumber?store.exportNumber:op._page,
-            pageSize: store.exportPageSize?store.exportPageSize:store.pageSize
+            pageNumber: store.exportNumber ? store.exportNumber : op._page,
+            pageSize: store.exportPageSize ? store.exportPageSize : store.pageSize
         };
-        for(let k in temp) {
-            if(!!temp[k]) {
+        for (let k in temp) {
+            if (!!temp[k]) {
                 obj[k] = temp[k];
             }
         }
         return obj;
-     },
+    }
 });

+ 62 - 48
frontend/pc-web/app/view/Interaction/timetable/Detail.js

@@ -2,89 +2,103 @@ Ext.define('school.view.interaction.timetable.Detail', {
     extend: 'school.view.core.form.FormPanel',
     xtype: 'interaction-timetable-detail',
 
+    controller: 'interaction-timetable-detail',
+
     _title: '课程表',
-    _idField: 'student_id',
-    _codeField: 'student_number',
-    _statusField: null,
-    _statusCodeField: null,
-    _auditmanField: null,
-    _auditdateField: null,
+    _idField: 'id',
+    _codeField: null,
     // _readUrl: 'http://10.1.80.35:8560/api/sale/saledown/read',
-    _readUrl: '/api/sale/xxxx/read',
-    // _saveUrl: 'http://10.1.80.35:8560/api/sale/saledown/update',
-    _saveUrl: '/api/sale/sss/update',
-    // _toSaleUrl: 'http://10.1.80.35:8560/api/sale/saledown/toSale',
-    _toSaleUrl: '/api/sale/sss/toSale',
+    _readUrl: '/api/school/curriculum/read',
+    // _saveUrl: 'http://10.1.80.36:9520/api/school/curriculum/save',
+    _saveUrl: '/api/school/curriculum/save',
+    _deleteUrl: '/api/school/curriculum/delete',
     initId: 0,
     cls: 'timetable',
 
-    codeInHeader: true,
-
     START_TIME: Ext.Date.parse('08:00', 'H:i'), // 开始上课时间
     END_TIME: Ext.Date.parse('22:00', 'H:i'), // 结束上课时间
     MIN_WHILE: 10, // 一节课最小时间(分钟)
 
+
     initComponent: function () {
         let me = this;
         Ext.apply(this, {
             defaultItems: [{
+                xtype: 'hidden',
+                name: 'id',
+                fieldLabel: 'id'
+            }, {
+                xtype: 'numberfield',
+                name: 'gradeId',
+                fieldLabel: '年级(id)',
+                allowBlank: false
+            }, {
+                xtype: 'numberfield',
+                name: 'clazzId',
+                fieldLabel: '班级(id)',
+                allowBlank: false
+            }, {
                 xtype: 'textfield',
-                name: 'number',
+                name: 'creatorName',
                 fieldLabel: '录入人'
             }, {
-                xtype: 'textfield',
-                name: 'name',
-                fieldLabel: '录入时间'
+                xtype: 'datefield',
+                name: 'createTime',
+                fieldLabel: '录入时间',
+                format: 'Y-m-d H:i:s'
             }, {
                 xtype: 'textfield',
-                name: 'grade',
+                name: 'status',
                 fieldLabel: '状态'
             }, {
                 xtype: 'textfield',
-                name: 'class',
+                name: 'code',
                 fieldLabel: '课表编号'
             }, {
                 xtype: "textfield",
-                name: "jg",
+                name: "termName",
                 fieldLabel: "学期名称"
             }, {
                 xtype: 'textfield',
-                name: 'mz',
+                name: 'name',
                 fieldLabel: '课表名称'
             }, {
-                xtype: 'textfield',
-                name: 'birth',
-                fieldLabel: '课表班级'
+                xtype: "datefield",
+                name: "termStart",
+                fieldLabel: "学期开始时间",
+                format: 'Y-m-d'
             }, {
-                xtype: "textfield",
-                name: "address",
-                fieldLabel: "学期开始时间"
+                xtype: 'datefield',
+                name: 'termEnd',
+                fieldLabel: '学期结束时间',
+                format: 'Y-m-d'
             }, {
-                xtype: 'textfield',
-                name: 'teacher_zz',
-                fieldLabel: '学期结束时间'
-            }, {
-                xtype: 'textfield',
-                name: 'zs',
+                xtype: 'numberfield',
+                name: 'weekNum',
                 fieldLabel: '周数'
             }, {
                 name: "timetable",
                 xtype: "detailGridField",
-                detnoColumn: 'no',
+                idColumn: 'id',
+                detnoColumn: 'lessons',
                 storeModel: 'school.model.Timetable',
-                deleteDetailUrl: '/api/sale/sale/deleteDetail',
+                deleteDetailUrl: '/api/school/curriculum/deleteDetail',
                 allowEmpty: true,
                 showCount: false,
                 emptyRows: 10,
                 rowViewModel: {},
                 columns: [{
+                    text: 'id',
+                    dataIndex: 'id',
+                    hidden: true
+                }, {
                     text: '时间段',
                     xtype: 'widgetcolumn',
                     width: 200,
                     padding: 0,
                     tdCls: 'x-period-column',
                     getBindField: function(c) {
-                        return ['period0', 'period1']
+                        return ['startTime', 'endTime']
                     },
                     widget: {
                         xtype: 'container',
@@ -95,7 +109,7 @@ Ext.define('school.view.interaction.timetable.Detail', {
                             xtype: 'button',
                             text: '0:00',
                             bind: {
-                                text: '{record.periodText0}',
+                                text: '{record._timeText1}',
                             },
                             style: {
                                 margin: '5px',
@@ -127,7 +141,7 @@ Ext.define('school.view.interaction.timetable.Detail', {
                             xtype: 'button',
                             text: '0:00',
                             bind: {
-                                text: '{record.periodText1}',
+                                text: '{record._timeText2}',
                             },
                             style: {
                                 margin: '5px',
@@ -155,7 +169,7 @@ Ext.define('school.view.interaction.timetable.Detail', {
                                     beforeshow: function(th, eOpts) {
                                         me.currentRecord = th.ownerCmp.ownerCt.$widgetRecord;
                                         let picker = th.down('timepicker');
-                                        let startDate = me.currentRecord.get('period0') || Ext.Date.parse('08:00', 'H:i');
+                                        let startDate = me.currentRecord.get('_time1') || Ext.Date.parse('08:00', 'H:i');
                                         let minValue = Ext.Date.add(startDate, Ext.Date.MINUTE, me.MIN_WHILE);
                                         picker.setMinValue(minValue)
                                     },
@@ -165,27 +179,27 @@ Ext.define('school.view.interaction.timetable.Detail', {
                     }
                 }, {
                     text: '星期一',
-                    dataIndex: 'monday',
+                    dataIndex: 'mon',
                     xtype: 'subjectcolumn'
                 }, {
                     text: '星期二',
-                    dataIndex: 'tuesday',
+                    dataIndex: 'tues',
                     xtype: 'subjectcolumn'
                 }, {
                     text: '星期三',
-                    dataIndex: 'wednesday',
+                    dataIndex: 'wed',
                     xtype: 'subjectcolumn'
                 }, {
                     text: '星期四',
-                    dataIndex: 'thursday',
+                    dataIndex: 'thur',
                     xtype: 'subjectcolumn'
                 }, {
                     text: '星期五',
-                    dataIndex: 'friday',
+                    dataIndex: 'fri',
                     xtype: 'subjectcolumn'
                 }, {
                     text: '星期六',
-                    dataIndex: 'saturday',
+                    dataIndex: 'sat',
                     xtype: 'subjectcolumn'
                 }, {
                     text: '星期日',
@@ -199,15 +213,15 @@ Ext.define('school.view.interaction.timetable.Detail', {
 
     onSelectPeriod0: function(picker, menu, record) {
         let me = this;
-        me.currentRecord.set('period0', record.get('date'));
+        me.currentRecord.set('startTime', Ext.Date.format(record.get('date'), 'H:i:s'));
         menu.setVisible(false);
     },
 
     onSelectPeriod1: function(picker, menu, record) {
         let me = this;
-        me.currentRecord.set('period1', record.get('date'));
+        me.currentRecord.set('endTime', Ext.Date.format(record.get('date'), 'H:i:s'));
         menu.setVisible(false);
-        let classTime = Math.abs(Ext.Date.diff(me.currentRecord.get('period0'), record.get('date'), Ext.Date.MINUTE));
+        let classTime = Math.abs(Ext.Date.diff(me.currentRecord.get('_time1'), record.get('date'), Ext.Date.MINUTE));
         me.CLASS_TIME = classTime;
     }
 });

+ 17 - 0
frontend/pc-web/app/view/Interaction/timetable/DetailController.js

@@ -0,0 +1,17 @@
+Ext.define('school.view.interaction.timetable.DetailController', {
+    extend: 'school.view.core.form.FormPanelController',
+    alias: 'controller.interaction-timetable-detail',
+
+    onAfterSave: function(localJson) {
+        var form = this.getView();
+        var id = localJson.data.id;
+        var code = localJson.data.code;
+        form.initId = id;
+        school.util.FormUtil.loadData(form).then(function(data) {
+            var newId = form.xtype + '-' + data.main.id;
+            var newTitle = form._title + '(' + data.main.id + ')';
+    
+            school.util.BaseUtil.refreshTabTitle(newId, newTitle);
+        });
+    },
+});

+ 40 - 4
frontend/pc-web/app/view/Interaction/timetable/List.js

@@ -37,9 +37,9 @@ Ext.define('school.view.interaction.timetable.List', {
             gridConfig: {
                 addTitle: '课程表',
                 addXtype: 'interaction-timetable-detail',
-                idField: 'notify_id',
+                idField: 'id',
                 codeField: null,
-                detailField: 'notify_title',
+                detailField: 'name',
                 dataUrl: me.dataUrl,
                 caller: null,
                 rootProperty: 'data.list',
@@ -54,13 +54,49 @@ Ext.define('school.view.interaction.timetable.List', {
                 hiddenTools: false,
                 toolBtns: [{
                     xtype: 'button',
-                    text: '删除'
+                    text: '删除',
+                    handler: function() {
+                        let grid = this.up('grid'),
+                            selectedRecords = grid.getSelection();
+                        let data;
+
+                        data = selectedRecords.map(function (r) {
+                            return {
+                                id: r.get('id')
+                            };
+                        });
+
+                        if (data.length == 0) {
+                            school.util.BaseUtil.showErrorToast('请先勾选需要删除的记录');
+                            return;
+                        }
+
+                        grid.setLoading(true);
+                        school.util.BaseUtil.request({
+                            url: '/api/school/curriculum/deleteDetail',
+                            method: 'POST',
+                            params: JSON.stringify({
+                                baseDTOs: data
+                            })
+                        }).then(function (res) {
+                            grid.setLoading(false);
+                            school.util.BaseUtil.showSuccessToast('成功删除' + data.length + '条记录');
+                            grid.store.loadPage(grid.store.currentPage);
+                        }).catch(function (e) {
+                            grid.setLoading(false);
+                            school.util.BaseUtil.showErrorToast('删除失败: ' + e.message);
+                        });
+                    }
                 }, {
                     xtype: 'button',
                     text: '新增',
                     handler: 'onAddClick'
                 }],
                 columns : [{
+                    text: 'id',
+                    dataIndex: 'id',
+                    hidden: true
+                }, {
                     text: '课表名称',
                     dataIndex: 'name',
                     width: 120,
@@ -68,7 +104,7 @@ Ext.define('school.view.interaction.timetable.List', {
                     listeners: {
                         click: function(view, td, row, col, e, record, tr, eOpts, event) {
                             let gridConfig = me.gridConfig;
-                            school.util.BaseUtil.openTab(gridConfig.addXtype, gridConfig.addTitle + '(' + record.get('name') + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
+                            school.util.BaseUtil.openTab(gridConfig.addXtype, gridConfig.addTitle + '(' + record.get('id') + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
                                 initId: record.get(gridConfig.idField)
                             });
                         }

+ 2 - 2
frontend/pc-web/app/view/auth/ReLogin.js

@@ -29,10 +29,10 @@ Ext.define('school.view.auth.ReLogin', {
             value: '会话已过期,请重新登录',
         }, {
             xtype: 'textfield',
-            name: 'username',
+            name: 'user_phone',
             emptyText: '请输入账号/邮箱/手机号',
             fieldLabel: '账号',
-            bind: '{account.username}',
+            bind: '{account.user_phone}',
             readOnly: true,
             hideLabel: true,
             allowBlank: false

+ 1 - 1
frontend/pc-web/app/view/auth/ReLoginController.js

@@ -34,7 +34,7 @@ Ext.define('school.view.auth.ReLoginController', {
 
         view.mask('请稍等...');
 
-        school.model.Session.login(values.username, values.password)
+        school.model.Session.login(values.user_phone, values.password)
         .then(function (session) {
             view.isMasked() && view.unmask();
             viewModel.set('session', session);

+ 23 - 2
frontend/pc-web/app/view/basic/school/SchoolInfo.js

@@ -52,10 +52,23 @@ Ext.define('school.view.basic.school.SchoolInfo', {
                 allowBlank: false,
                 columnWidth: 0.5
             }, {
-                xtype: 'textfield',
+                xtype: 'combobox',
                 name: 'school_status',
                 bind: '{schoolStatus}',
                 fieldLabel: '状态',
+                displayField: 'name',
+                valueField: 'value',
+                queryMode: 'local',
+                store: Ext.create('Ext.data.Store', {
+                    fields: ['name', 'value'],
+                    data: [{
+                        name: '正常',
+                        value: 1
+                    }, {
+                        name: '冻结',
+                        value: 2
+                    }]
+                })
             }, {
                 xtype: "textfield",
                 name: "school_address",
@@ -72,7 +85,15 @@ Ext.define('school.view.basic.school.SchoolInfo', {
                 xtype: 'textfield',
                 name: 'school_appid',
                 bind: '{schoolAppId}',
-                fieldLabel: '绑定微信号'
+                fieldLabel: '公众号账号',
+                readOnly: true
+            }, {
+                xtype: 'textfield',
+                name: 'school_secret',
+                bind: '{schoolSecret}',
+                fieldLabel: '公众号密钥',
+                columnWidth: 0.5,
+                readOnly: true
             }, {
                 xtype: 'textfield',
                 name: 'school_remarks',

+ 2 - 2
frontend/pc-web/app/view/core/base/GridPanel.js

@@ -42,7 +42,7 @@ Ext.define('school.view.core.base.GridPanel', {
 
             me.store = Ext.create('Ext.data.Store',{
                 fields:fields,
-                autoLoad: true,
+                autoLoad: false,
                 pageSize: 10,
                 data: [],
                 proxy: {
@@ -109,7 +109,7 @@ Ext.define('school.view.core.base.GridPanel', {
             var store = grid.getStore(),
             gridBodyBox = grid.body.dom.getBoundingClientRect(),
             gridBodyBoxHeight = gridBodyBox.height;//可能有滚动条
-            var pageSize = Math.floor(gridBodyBoxHeight / 33);
+            var pageSize = Math.floor(gridBodyBoxHeight / 32);
             store.setPageSize(pageSize);
         }
     },

+ 1 - 3
frontend/pc-web/app/view/core/button/import/Window.js

@@ -179,9 +179,7 @@ Ext.define('school.view.core.button.import.Window', {
                         handler: function (b) {
                             //获取模版
                             var serverOptions = Ext.manifest.server;
-                            // window.location.href = (serverOptions.basePath.https?serverOptions.basePath.https:serverOptions.basePath) + '/api/commons/excel/import/templet?caller='+me.caller;
-                            // window.location.href = 'http://10.1.80.47:9560/' + 'excel/import/templet?caller=' + me.caller;
-                            window.location.href = '/api/school/' + 'excel/import/templet?caller=' + me.caller;
+                            window.location.href = (serverOptions.basePath.https?serverOptions.basePath.https:serverOptions.basePath) + '/api/school/' + 'excel/import/templet?caller=' + me.caller;
                         }
                     }
                 }, {