zhuth il y a 7 ans
Parent
commit
088dad11cf

+ 4 - 0
frontend/pc-web/app/view/basic/class/ClassInfo.js

@@ -5,6 +5,10 @@ Ext.define('school.view.basic.class.ClassInfo', {
     extend: 'Ext.panel.Panel',
     xtype: 'basic-class-classinfo',
 
+    requires: [
+        'Ext.tree.Panel'
+    ],
+
     controller: 'basic-class-classinfo',
     viewModel: 'basic-class-classinfo',
 

+ 98 - 0
frontend/pc-web/app/view/interact/timetable/Detail.js

@@ -0,0 +1,98 @@
+Ext.define('school.view.interact.timetable.Detail', {
+    extend: 'school.view.core.form.FormPanel',
+    xtype: 'interact-timetable-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',
+    // _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',
+    initId: 0,
+
+    codeInHeader: true,
+
+    initComponent: function () {
+        Ext.apply(this, {
+            defaultItems: [{
+                xtype: 'textfield',
+                name: 'number',
+                fieldLabel: '录入人'
+            }, {
+                xtype: 'textfield',
+                name: 'name',
+                fieldLabel: '录入时间'
+            }, {
+                xtype: 'textfield',
+                name: 'grade',
+                fieldLabel: '状态'
+            }, {
+                xtype: 'textfield',
+                name: 'class',
+                fieldLabel: '课表编号'
+            }, {
+                xtype: "textfield",
+                name: "jg",
+                fieldLabel: "学期名称"
+            }, {
+                xtype: 'textfield',
+                name: 'mz',
+                fieldLabel: '课表名称'
+            }, {
+                xtype: 'textfield',
+                name: 'birth',
+                fieldLabel: '课表班级'
+            }, {
+                xtype: "textfield",
+                name: "address",
+                fieldLabel: "学期开始时间"
+            }, {
+                xtype: 'textfield',
+                name: 'teacher_zz',
+                fieldLabel: '学期结束时间'
+            }, {
+                xtype: 'textfield',
+                name: 'zs',
+                fieldLabel: '周数'
+            }, {
+                name: "timetable",
+                xtype: "detailGridField",
+                detnoColumn: 'no',
+                storeModel: 'school.model.basic.Student',
+                deleteDetailUrl: '/api/sale/sale/deleteDetail',
+                allowEmpty: true,
+                showCount: false,
+                columns: [{
+                    text: '星期一',
+                    dataIndex: 'monday'
+                }, {
+                    text: '星期二',
+                    dataIndex: 'tuesday'
+                }, {
+                    text: '星期三',
+                    dataIndex: 'wednesday',
+                }, {
+                    text: '星期四',
+                    dataIndex: 'thursday'
+                }, {
+                    text: '星期五',
+                    dataIndex: 'friday'
+                }, {
+                    text: '星期六',
+                    dataIndex: 'saturday'
+                }, {
+                    text: '星期日',
+                    dataIndex: 'sunday'
+                }]
+            }],
+        });
+        this.callParent();
+    },
+});

+ 167 - 0
frontend/pc-web/app/view/interact/timetable/List.js

@@ -0,0 +1,167 @@
+/**
+ * 课程表
+ */
+Ext.define('school.view.interact.timetable.List', {
+    extend: 'school.view.core.base.BasePanel',
+    xtype: 'interact-timetable-list',
+
+    dataUrl: '/api/interact/timetable/list',
+    initComponent: function() {
+        var me = this;
+        Ext.apply(this, {
+            searchField: [{
+                xtype: 'textfield',
+                name: 'term',
+                fieldLabel: '学期'
+            }, {
+                xtype: 'textfield',
+                name: 'grade',
+                fieldLabel: '年级'
+            }, {
+                xtype: 'textfield',
+                name: 'class',
+                fieldLabel: '班级'
+            }],
+        
+            caller: null,
+            _formXtype: null,
+            _title: null,
+            _deleteUrl: null,
+            _batchOpenUrl: null,
+            _batchCloseUrl: null,
+            _batchDeleteUrl: null,
+        
+            gridConfig: {
+                idField: null,
+                codeField: null,
+                statusCodeField: null,
+                dataUrl: me.dataUrl,
+                caller: null,
+                rootProperty: 'data.list',
+                totalProperty: 'data.total',
+                actionColumn: [],
+                selModel: {
+                    checkOnly:true,
+                    type:'checkboxmodel',
+                    mode : "MULTI" ,
+                    ignoreRightMouseSelection : false
+                },
+                hiddenTools: false,
+                toolBtns: [{
+                    xtype: 'button',
+                    text: '下载模板'
+                }, {
+                    xtype: 'button',
+                    text: '上传课表'
+                }, {
+                    xtype: 'button',
+                    text: '添加'
+                }, {
+                    xtype: 'button',
+                    text: '删除'
+                }],
+                columns : [{
+                    text: '编号',
+                    dataIndex: 'code',
+                    width: 150
+                }, {
+                    text: '学期',
+                    dataIndex: 'name',
+                    width: 120
+                }, {
+                    text: '性别',
+                    dataIndex: 'gender',
+                    width: 120
+                }, {
+                    text: '年级',
+                    dataIndex: 'grade'
+                }, {
+                    text: '班级',
+                    dataIndex: 'class'
+                }, {
+                    text: '出生日期',
+                    dataIndex: 'birth',
+                    width: 120
+                }, {
+                    text: '年龄',
+                    dataIndex: 'open'
+                }, {
+                    text: '状态',
+                    dataIndex: 'status'
+                }],
+                listeners: {
+                    itemclick: function(view, record, item, index, e, eOpts) {
+                        school.util.BaseUtil.openTab('interact-timetable-detail', '课程表', 'interact-timetable-detail'+record.get('id'), {
+                            initId: record.get('id')
+                        }); 
+                    }
+                }
+            },
+        });
+        this.callParent(arguments);
+    },
+
+    /**
+     * 处理部分字段值
+     */
+    getConditionValue: function (field, value) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            conditionValue;
+        if (me.isContainsAny(xtypes, ['datefield'])) {
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
+        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
+            var from = value.from,
+                to = value.to;
+
+            conditionValue = from + ',' + to;
+        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
+            var from = value.from,
+                to = value.to;
+
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            conditionValue = value;
+        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
+            conditionValue = value;
+        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
+            conditionValue = value.map ? value.map(function (v) {
+                return v.value;
+            }).join(',') : '';
+        } else {
+            conditionValue = value;
+        }
+
+        return conditionValue;
+    },
+
+    getExtraParams: function(store, op, condition) {
+        var temp = {};
+
+        for(let x = 0; x < condition.length; x++) {
+            let c = condition[x];
+            if(c.field == 'keyword') {
+                temp.keyword = c.value;
+            }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') {
+                temp.quoted = c.value == 'all' ? null : c.value;
+            }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
+        };
+        for(let k in temp) {
+            if(!!temp[k]) {
+                obj[k] = temp[k];
+            }
+        }
+        return obj;
+     },
+});

+ 2 - 2
frontend/pc-web/resources/json/navigation.json

@@ -46,9 +46,9 @@
         "text": "作业发布",
         "view": "homework"
     }, {
-        "id": "timetable",
+        "id": "interact-timetable-list",
         "text": "课程表",
-        "view": "timetable"
+        "view": "interact-timetable-list"
     }, {
         "id": "grade",
         "text": "成绩发布",