Browse Source

增加家校互动页面

jinsy 7 years ago
parent
commit
dfe2113682

+ 52 - 0
frontend/pc-web/app/view/Interaction/access/Access.js

@@ -0,0 +1,52 @@
+/**
+ * 出入校记录
+ */
+Ext.define('school.view.Interaction.access.Access',{
+    // extend: 'school.view.core.form.FormPanel',
+    extend: 'Ext.grid.Panel',
+    xtype: 'interaction-access-access',
+
+    //字段属性
+    _title: '出入校记录',
+    _idField: 'id',
+    _codeField: 'pu_code',
+    _statusField: 'pu_status',
+    _statusCodeField: 'pu_statuscode',
+    _auditmanField: 'pu_auditman',
+    _auditdateField: 'pu_auditdate',
+    _relationColumn: 'pd_puid',
+    _readUrl: '/api/purchase/purchase/read',
+    _saveUrl: '/api/purchase/purchase/save',
+    _auditUrl: '/api/purchase/purchase/audit',
+    _unAuditUrl: '/api/purchase/purchase/unAudit',
+    _deleteUrl: '/api/purchase/purchase/delete',
+    _turnInUrl: '/api/purchase/purchase/turnProdin',
+    initId: 0,
+
+    initComponent: function () {
+        Ext.apply(this, {
+            title: '出入校记录',
+            store: Ext.create('Ext.data.Store', {
+                fields:['portrait', 'name', 'sex', 'class', 'StudentID', 'state', 'time'],
+                data:[
+                    {portrait:"头像1", name:"张三", sex:'男', class:'三年级二班', StudentID:'0001', state:'出校', time:"01/10/2004 16:00"},
+                    {portrait:"头像2", name:"李四", sex:'男', class:'三年级二班', StudentID:'0002', state:'出校', time:"04/01/2004 8:00"},
+                    {portrait:"头像3", name:"红红", sex:'女', class:'三年级二班', StudentID:'0003', state:'在校', time:"04/01/2004 19:00"},
+                    {portrait:"头像4", name:"王五", sex:'男', class:'三年级二班', StudentID:'0004', state:'出校', time:"04/01/2004 22:50"},
+                    {portrait:"头像5", name:"六六", sex:'男', class:'三年级二班', StudentID:'0005', state:'出校', time:"04/01/2004 9:00"},
+                ]
+            }),
+            columns: [
+                {text: '头像',  dataIndex:'portrait'},
+                {text: '姓名',  dataIndex:'name'},
+                {text: '性别',  dataIndex:'sex'},
+                {text: '班级',  dataIndex:'class'},
+                {text: '学号',  dataIndex:'StudentID'},
+                {text: '状态',  dataIndex:'state'},
+                {text: '时间',  dataIndex:'time', xtype: 'datecolumn', format:'Y-m-d H:i'},
+            ],
+            forceFit: true,
+        });
+        this.callParent();
+    }
+});

+ 91 - 0
frontend/pc-web/app/view/Interaction/homework/Release.js

@@ -0,0 +1,91 @@
+/**
+ * 作业发布
+ */
+Ext.define('school.view.Interaction.homework.Release', {
+    extend: 'school.view.core.form.FormPanel',
+    xtype: 'interaction-homework-release',
+
+    // controller: 'purchase-purchase-formpanel',
+    // viewModel: 'purchase-purchase-formpanel',
+
+    //字段属性
+    _title: '作业发布',
+    _idField: 'id',
+    _codeField: 'pu_code',
+    _statusField: 'pu_status',
+    _statusCodeField: 'pu_statuscode',
+    _auditmanField: 'pu_auditman',
+    _auditdateField: 'pu_auditdate',
+    _relationColumn: 'pd_puid',
+    _readUrl: '/api/purchase/purchase/read',
+    _saveUrl: '/api/purchase/purchase/save',
+    _auditUrl: '/api/purchase/purchase/audit',
+    _unAuditUrl: '/api/purchase/purchase/unAudit',
+    _deleteUrl: '/api/purchase/purchase/delete',
+    _turnInUrl: '/api/purchase/purchase/turnProdin',
+    initId: 0,
+    initComponent: function () {
+        Ext.apply(this, {
+            defaultItems: [{
+                xtype: 'hidden',
+                name: 'id',
+                fieldLabel: 'id'
+            }, {
+                xtype: "textfield",
+                name: "Publisher",
+                fieldLabel: "发布人",
+                columnWidth: 0.5
+            }, {
+                xtype: 'textfield',
+                name: 'time',
+                fieldLabel: '发布时间',
+                columnWidth: 0.5
+            }, {
+                xtype: 'combobox',
+                name: 'Notifications',
+                fieldLabel: '通知人',
+                columnWidth: 0.5,
+                queryMode: 'local',
+                displayField: 'name',
+                valueField: 'abbr',
+                store:Ext.create('Ext.data.Store', {
+                    fields: ['abbr', 'name'],
+                    data : [
+                        {"abbr":"AL", "name":"Alabama"},
+                        {"abbr":"AK", "name":"Alaska"},
+                        {"abbr":"AZ", "name":"Arizona"}
+                    ]
+                })
+            }, {
+                xtype: 'textfield',
+                name: 'Deadline',
+                fieldLabel: '截止时间',
+                columnWidth: 0.5
+            }, {
+                xtype: "textfield",
+                name: "title",
+                fieldLabel: "标题",
+                columnWidth: 1
+            }, {
+                xtype: "textareafield",
+                name: 'content',
+                fieldLabel: "内容",
+                columnWidth: 1,
+            }, {
+                xtype: 'button',
+                text : '发布',
+                style: {
+                    left: '50%',
+                    transform: 'translateX(-50%)',
+                    borderRadius: '4px'
+                },
+                listeners: {
+                    click: function() {
+                        // 点击后做的事情
+                    },
+                }
+            }]
+        });
+        this.callParent();
+    }
+});

+ 86 - 0
frontend/pc-web/app/view/Interaction/notice/SchoolNotice.js

@@ -0,0 +1,86 @@
+/**
+ * 学校通知
+ */
+Ext.define('school.view.Interaction.notice.SchoolNotice', {
+    extend: 'school.view.core.form.FormPanel',
+    xtype: 'interaction-notice-schoolnotice',
+
+    // controller: 'purchase-purchase-formpanel',
+    // viewModel: 'purchase-purchase-formpanel',
+
+    //字段属性
+    _title: '学校通知',
+    _idField: 'id',
+    _codeField: 'pu_code',
+    _statusField: 'pu_status',
+    _statusCodeField: 'pu_statuscode',
+    _auditmanField: 'pu_auditman',
+    _auditdateField: 'pu_auditdate',
+    _relationColumn: 'pd_puid',
+    _readUrl: '/api/purchase/purchase/read',
+    _saveUrl: '/api/purchase/purchase/save',
+    _auditUrl: '/api/purchase/purchase/audit',
+    _unAuditUrl: '/api/purchase/purchase/unAudit',
+    _deleteUrl: '/api/purchase/purchase/delete',
+    _turnInUrl: '/api/purchase/purchase/turnProdin',
+    initId: 0,
+    initComponent: function () {
+        Ext.apply(this, {
+            defaultItems: [{
+                xtype: 'hidden',
+                name: 'id',
+                fieldLabel: 'id'
+            }, {
+                xtype: "textfield",
+                name: "Publisher",
+                fieldLabel: "发布人",
+                columnWidth: 0.5
+            }, {
+                xtype: 'textfield',
+                name: 'time',
+                fieldLabel: '发布时间',
+                columnWidth: 0.5
+            }, {
+                xtype: 'combobox',
+                name: 'Notifications',
+                fieldLabel: '通知人',
+                columnWidth: 0.5,
+                queryMode: 'local',
+                displayField: 'name',
+                valueField: 'abbr',
+                forceSelection: 'true',//阻止输入非列表内容
+                store:Ext.create('Ext.data.Store', {
+                    fields: ['abbr', 'name'],
+                    data : [
+                        {"abbr":"AL", "name":"Alabama"},
+                        {"abbr":"AK", "name":"Alaska"},
+                        {"abbr":"AZ", "name":"Arizona"}
+                    ]
+                })
+            }, {
+                xtype: "textfield",
+                name: "title",
+                fieldLabel: "标题",
+                columnWidth: 1
+            }, {
+                xtype: "textareafield",//文本域
+                name: 'content',
+                fieldLabel: "内容",
+                columnWidth: 1,
+            }, {
+                xtype: 'button',
+                text : '发布',
+                style: {
+                    left: '50%',
+                    transform: 'translateX(-50%)',
+                },
+                listeners: {
+                    click: function() {
+                        // 点击后做的事情
+                    },
+                }
+            }]
+        });
+        this.callParent();
+    }
+});

+ 1 - 10
frontend/pc-web/app/view/basic/school/SchoolInfo.js

@@ -59,14 +59,5 @@ Ext.define('school.view.basic.school.SchoolInfo', {
             }]
         });
         this.callParent();
-    },
-    toolBtns: [{
-        xtype: 'button',
-        text: '转采购验收单',
-        hidden: true,
-        bind: {
-            hidden: '{turnHidden}'
-        },
-        handler: 'turnIn'
-    }]
+    }
 });

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

@@ -38,13 +38,13 @@
     "text": "家校互动",
     "iconCls": "x-sa sa-setting",
     "items": [{
-        "id": "notice",
+        "id": "interaction-notice-schoolnotice", 
         "text": "学校通知",
-        "view": "notice"
+        "view": "interaction-notice-schoolnotice"
     }, {
-        "id": "homework",
+        "id": "interaction-homework-release",
         "text": "作业发布",
-        "view": "homework"
+        "view": "interaction-homework-release"
     }, {
         "id": "timetable",
         "text": "课程表",
@@ -58,8 +58,8 @@
         "text": "校长信箱",
         "view": "mailbox"
     }, {
-        "id": "crossing-record",
+        "id": "interaction-access-access",
         "text": "出入校记录",
-        "view": "crossing-record"
+        "view": "interaction-access-access"
     }]
 }]