Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/smartschool-platform into dev

zhaoy 7 years ago
parent
commit
863a6060ed
33 changed files with 488 additions and 465 deletions
  1. 1 21
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/SchoolApplication.java
  2. 1 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/ClassController.java
  3. 4 5
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/StudentServiceImpl.java
  4. 2 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysStudentMapper.java
  5. 8 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysParents.java
  6. 10 3
      applications/school/school-server/src/main/resources/mapper/SysStudentMapper.xml
  7. 8 2
      frontend/pc-web/app/Application.js
  8. 3 0
      frontend/pc-web/app/model/Session.js
  9. 12 0
      frontend/pc-web/app/store/Class.js
  10. 5 3
      frontend/pc-web/app/store/Grade.js
  11. 1 1
      frontend/pc-web/app/store/Subject.js
  12. 3 69
      frontend/pc-web/app/view/Interaction/access/List.js
  13. 21 85
      frontend/pc-web/app/view/Interaction/homework/List.js
  14. 45 14
      frontend/pc-web/app/view/Interaction/homework/Release.js
  15. 2 4
      frontend/pc-web/app/view/Interaction/mailbox/List.js
  16. 22 86
      frontend/pc-web/app/view/Interaction/notice/List.js
  17. 9 3
      frontend/pc-web/app/view/Interaction/notice/SchoolNotice.js
  18. 40 21
      frontend/pc-web/app/view/Interaction/score/List.js
  19. 46 8
      frontend/pc-web/app/view/Interaction/timetable/Detail.js
  20. 39 14
      frontend/pc-web/app/view/Interaction/timetable/List.js
  21. 2 2
      frontend/pc-web/app/view/basic/class/ClassInfo.js
  22. 3 2
      frontend/pc-web/app/view/basic/class/ClassInfoController.js
  23. 1 1
      frontend/pc-web/app/view/basic/class/ListCard.js
  24. 1 1
      frontend/pc-web/app/view/basic/class/ListCardController.js
  25. 14 6
      frontend/pc-web/app/view/basic/staff/StaffDetail.js
  26. 71 16
      frontend/pc-web/app/view/basic/student/StudentDetail.js
  27. 46 73
      frontend/pc-web/app/view/basic/student/StudentList.js
  28. 8 10
      frontend/pc-web/app/view/core/base/BasePanel.js
  29. 20 0
      frontend/pc-web/app/view/core/form/field/ClassComboBox.js
  30. 20 0
      frontend/pc-web/app/view/core/form/field/GradeComboBox.js
  31. 1 1
      frontend/pc-web/app/view/core/grid/column/SubjectColumn.js
  32. 1 1
      frontend/pc-web/app/view/viewport/ViewportController.js
  33. 18 11
      frontend/pc-web/app/view/viewport/ViewportModel.js

+ 1 - 21
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/SchoolApplication.java

@@ -1,15 +1,11 @@
 package com.usoftchina.smartschool.school;
 
-import com.usoftchina.smartschool.school.interceptor.AuthRestInterceptor;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.web.servlet.ServletComponentScan;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
 /**
  * @author: guq
@@ -20,24 +16,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
 @ServletComponentScan
 @EnableEurekaClient
 @EnableFeignClients("com.usoftchina.smartschool")
-public class SchoolApplication extends WebMvcConfigurerAdapter{
+public class SchoolApplication {
     public static void main(String[] args) {
         SpringApplication.run(SchoolApplication.class, args);
     }
-
-    @Override
-    public void addCorsMappings(CorsRegistry registry) {
-
-        registry.addMapping("/**")
-                .allowCredentials(true)
-                .allowedHeaders("*")
-                .allowedOrigins("*")
-                .allowedMethods("*");
-    }
-
-    @Override
-    public void addInterceptors(InterceptorRegistry registry){
-        registry.addInterceptor(new AuthRestInterceptor()).addPathPatterns("/**");
-        super.addInterceptors(registry);
-    }
 }

+ 1 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/ClassController.java

@@ -33,6 +33,7 @@ public class ClassController {
     @PostMapping("/delete/{id}")
     public Result delete(@PathVariable("id") Long id) {
         classService.delete(id);
+
         return Result.success();
     }
 

+ 4 - 5
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/StudentServiceImpl.java

@@ -42,7 +42,6 @@ public class StudentServiceImpl implements StudentService{
     public PageInfo<SysStudent> getListData(PageRequest page, ListReqDTO listReqDTO) {
         PageHelper.startPage(page.getNumber(), page.getSize());
         Long schoolId = BaseContextHolder.getSchoolId();
-        schoolId = 1l;
         //condition语句
         String condition = listReqDTO.getFinalCondition();
         if(condition == null){
@@ -91,7 +90,7 @@ public class StudentServiceImpl implements StudentService{
                     item.setSchool_id(schoolid);
                     sysStudentMapper.insertparent(item);
                     pr_id = item.getParent_id();
-                    sysStudentMapper.insertrelation(id, pr_id);
+                    sysStudentMapper.insertrelation(id, pr_id, item.getPs_relation());
                 }
             }
             return new DocBaseDTO(id, null, "student");
@@ -115,17 +114,17 @@ public class StudentServiceImpl implements StudentService{
                 item.setSchool_id(schoolid);
                 sysStudentMapper.insertparent(item);
                 pr_id = item.getParent_id();
-                sysStudentMapper.insertrelation(id, pr_id);
+                sysStudentMapper.insertrelation(id, pr_id, item.getPs_relation());
             }
         }
         //更新从表
         if (updateDetails.size() > 0) {
             sysStudentMapper.updateParents(updateDetails);
             for (SysParents item : updateDetails) {
-                sysStudentMapper.updateRelation(item.getParent_id(), id, item.getPr_relation());
+                sysStudentMapper.updateRelation(item.getParent_stu_id(), item.getPs_relation());
             }
         }
-        return new DocBaseDTO(id, null, "student");
+        return new DocBaseDTO(id);
     }
 
     @Override

+ 2 - 2
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysStudentMapper.java

@@ -27,11 +27,11 @@ public interface SysStudentMapper {
 
     void insertparent(SysParents item);
 
-    void insertrelation(@Param("id") Long id, @Param("pr_id") Long pr_id);
+    void insertrelation(@Param("id") Long id, @Param("pr_id") Long pr_id, @Param("relation") String relation);
 
     void updateParents(List<SysParents> updateDetails);
 
-    void updateRelation(@Param("parent_id") Long parent_id, @Param("id") Long id, @Param("relation") String relation);
+    void updateRelation(@Param("id") Long id, @Param("relation") String relation);
 
     SysStudent selectByCode(@Param("code") String code, @Param("schoolId") Long schoolId);
 

+ 8 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysParents.java

@@ -44,6 +44,14 @@ public class SysParents {
 
     private String ps_relation;
 
+    public String getPs_relation() {
+        return ps_relation;
+    }
+
+    public void setPs_relation(String ps_relation) {
+        this.ps_relation = ps_relation;
+    }
+
     public Long getParent_stu_id() {
         return parent_stu_id;
     }

+ 10 - 3
applications/school/school-server/src/main/resources/mapper/SysStudentMapper.xml

@@ -297,6 +297,7 @@
     <result column="parents_remarks" property="parents_remarks" jdbcType="VARCHAR" />
     <result column="ps_relation" property="ps_relation" jdbcType="VARCHAR" />
     <result column="parent_stu_id" property="parent_stu_id" jdbcType="BIGINT" />
+    <result property="pa_phone" column="pa_phone" jdbcType="VARCHAR"/>
   </resultMap>
   <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.smartschool.school.po.SysParents" extends="parentMap" >
     <result column="parents_photo" property="parents_photo" jdbcType="LONGVARCHAR" />
@@ -346,6 +347,9 @@
       <if test="parents_remarks != null" >
         parents_remarks,
       </if>
+      <if test="pa_phone != null" >
+        pa_phone,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="user_id != null" >
@@ -381,24 +385,27 @@
       <if test="parents_remarks != null" >
         #{parents_remarks,jdbcType=VARCHAR},
       </if>
+      <if test="pa_phone != null" >
+        #{pa_phone,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
 
   <insert id="insertrelation">
-    insert into sys_parents_stu (stu_id,parent_id) VALUES (#{id},#{pr_id})
+    insert into sys_parents_stu (stu_id,parent_id,ps_relation) VALUES (#{id},#{pr_id},#{relation})
   </insert>
 
   <update id="updateParents" parameterType="com.usoftchina.smartschool.school.po.SysParents" >
     <foreach collection="list" item="item" index="index" open="" close="" separator=";">
       update sys_parents <set>
-      parents_name = #{item.parents_name,jdbcType=VARCHAR}
+      parents_name = #{item.parents_name,jdbcType=VARCHAR},pa_phone = #{item.pa_phone,jdbcType=VARCHAR}
     </set>
       where parent_id = #{item.parent_id,jdbcType=BIGINT}
     </foreach>
   </update>
 
   <update id="updateRelation">
-    update sys_parents_stu set ps_relation=#{relation} where parent_id=#{parent_id} and stu_id =#{id}
+    update sys_parents_stu set ps_relation=#{relation} where parent_stu_id =#{id}
   </update>
 
   <select id="selectByCode" resultMap="BaseResultMap">

+ 8 - 2
frontend/pc-web/app/Application.js

@@ -11,10 +11,16 @@ Ext.define('school.Application', {
 
     mainView: 'school.view.viewport.Viewport',
 
+    stores: [
+        // TODO: add global / shared stores here
+        'school.store.Grade',
+        'school.store.Class'
+    ],
+
     defaultToken: 'main',
 
-    launch: function(profile) {
+    launch: function (profile) {
         Ext.getBody().removeCls('launching');
         this.callParent([profile]);
     }
-});
+});

+ 3 - 0
frontend/pc-web/app/model/Session.js

@@ -12,6 +12,9 @@ Ext.define('school.model.Session', {
     statics: {
         login: function(username, password) {
             return new Ext.Promise(function (resolve, reject) {
+                Ext.getCmp('rootView').getController().setRequestToken(null);
+                Ext.getCmp('rootView').getController().saveSession(null);
+
 				Ext.Ajax.request({
                     // url: 'http://10.1.80.23:9520/api/auth/authorize',
                     url: '/api/auth/authorize',

+ 12 - 0
frontend/pc-web/app/store/Class.js

@@ -0,0 +1,12 @@
+/**
+ * 班级
+ */
+Ext.define('school.store.Class', {
+    extend: 'Ext.data.Store',
+    alias: 'store.store_class',
+
+    storeId: 'store_class',
+
+    fields: ['name', 'value'],
+    data: []
+});

+ 5 - 3
frontend/pc-web/app/store/Grade.js

@@ -1,11 +1,13 @@
 /**
- * 学科
+ * 年级
  */
 Ext.define('school.store.Grade', {
     extend: 'Ext.data.Store',
-    alias: 'store.subject',
+    alias: 'store.store_grade',
 
-    model: 'school.model.Grade',
+    storeId: 'store_grade',
+
+    fields: ['name', 'value'],
 
     data: []
 });

+ 1 - 1
frontend/pc-web/app/store/Subject.js

@@ -3,7 +3,7 @@
  */
 Ext.define('school.store.Subject', {
     extend: 'Ext.data.Store',
-    alias: 'store.subject',
+    alias: 'store.store_subject',
 
     model: 'school.model.Subject',
 

+ 3 - 69
frontend/pc-web/app/view/Interaction/access/List.js

@@ -33,12 +33,10 @@ Ext.define('school.view.interaction.access.List', {
                 totalProperty: 'data.total',
                 actionColumn: [],
                 selModel: {
-                    checkOnly: true,
-                    type: 'checkboxmodel',
-                    mode: "MULTI",
-                    ignoreRightMouseSelection: false
+                    type: 'cellmodel'
                 },
                 hiddenTools: true,
+                disableDetail: true,
                 toolBtns: [],
                 columns: [{
                     text: 'id',
@@ -76,69 +74,5 @@ Ext.define('school.view.interaction.access.List', {
             },
         });
         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;
-    },
+    }
 });

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

@@ -43,18 +43,18 @@ Ext.define('school.view.interaction.homework.List', {
                 }),
                 minChars: 0,
                 queryMode: 'local'
-            }, {
-                xtype: 'condatefield',
-                name: 'publish_date',
-                fieldLabel: '发布时间',
-                columnWidth: 0.5
+            // }, {
+            //     xtype: 'condatefield',
+            //     name: 'publish_date',
+            //     fieldLabel: '发布时间',
+            //     columnWidth: 0.5
             }],
 
             gridConfig: {
                 addTitle: '作业发布',
                 addXtype: 'interaction-homework-release',
                 idField: 'task_id',
-                codeField: null,
+                codeField: 'task_title',
                 dataUrl: me.dataUrl,
                 caller: null,
                 rootProperty: 'data.list',
@@ -68,6 +68,12 @@ Ext.define('school.view.interaction.homework.List', {
                 },
                 hiddenTools: false,
                 toolBtns: [{
+                    xtype: 'button',
+                    text: '新增',
+                    handler: function () {
+                        school.util.BaseUtil.openTab('interaction-homework-release', '新增作业', 'interaction-homework-release-add');
+                    }
+                }, {
                     xtype: 'button',
                     text: '删除',
                     handler: function () {
@@ -103,12 +109,6 @@ Ext.define('school.view.interaction.homework.List', {
                             school.util.BaseUtil.showErrorToast('删除失败: ' + e.message);
                         });
                     }
-                }, {
-                    xtype: 'button',
-                    text: '新增',
-                    handler: function () {
-                        school.util.BaseUtil.openTab('interaction-homework-release', '新增作业', 'interaction-homework-release-add');
-                    }
                 }],
                 columns: [{
                     text: 'id',
@@ -124,15 +124,15 @@ Ext.define('school.view.interaction.homework.List', {
                     text: '标题',
                     dataIndex: 'task_title',
                     width: 120,
-                    tdCls: 'x-detail-column',
-                    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('task_title') + ')', gridConfig.addXtype + '-' + record.get(gridConfig.idField), {
-                                initId: record.get(gridConfig.idField)
-                            });
-                        }
-                    }
+                    // tdCls: 'x-detail-column',
+                    // 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('task_title') + ')', gridConfig.addXtype + '-' + record.get(gridConfig.idField), {
+                    //             initId: record.get(gridConfig.idField)
+                    //         });
+                    //     }
+                    // }
                 }, {
                     text: '内容',
                     dataIndex: 'task_context',
@@ -156,69 +156,5 @@ Ext.define('school.view.interaction.homework.List', {
             },
         });
         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;
     }
 });

+ 45 - 14
frontend/pc-web/app/view/Interaction/homework/Release.js

@@ -28,31 +28,53 @@ Ext.define('school.view.interaction.homework.Release', {
                 xtype: "textfield",
                 name: "task_creator",
                 fieldLabel: "发布人",
-                columnWidth: 0.5
+                defaultValue: school.util.BaseUtil.getCurrentUser().username,
+                readOnly: true
             }, {
-                xtype: 'textfield',
+                xtype: 'gradecombo',
                 name: 'grade_name',
-                fieldLabel: '年级'
+                fieldLabel: '年级',
+                listeners: {
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('classz_name').setValue(null);
+                    }
+                },
+                allowBlank: false
             }, {
-                xtype: 'textfield',
+                xtype: 'classcombo',
                 name: 'classz_name',
-                fieldLabel: '班级'
+                fieldLabel: '班级',
+                listeners: {
+                    expand: function (combo, eOpts) {
+                        combo.store.clearFilter();
+
+                        var gradeCombo = combo.up('form').getForm().findField('grade_name');
+                        var gradeName = gradeCombo.getValue();
+
+                        var filter = new Ext.util.Filter({
+                            property: 'gradeName',
+                            value: gradeName
+                        });
+
+                        if (!!gradeName) {
+                            combo.store.setFilters([filter]);
+                        }
+                    },
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('grade_name').setValue(record.get('gradeName'));
+                    }
+                },
+                allowBlank: false
             }, {
                 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
+                allowBlank: false
             }, {
                 xtype: 'combobox',
                 name: 'task_status',
@@ -73,13 +95,22 @@ Ext.define('school.view.interaction.homework.Release', {
                 name: 'publish_date',
                 fieldLabel: '发布时间',
                 readOnly: true,
-                format: 'Y-m-d H:i:s'
+                format: 'Y-m-d H:i:s',
+                defaultValue: new Date(),
+                readOnly: true
+            }, {
+                xtype: "textfield",
+                name: "task_title",
+                fieldLabel: "标题",
+                columnWidth: 1,
+                allowBlank: false
             }, {
                 xtype: "textareafield",
                 name: 'task_context',
                 fieldLabel: "内容",
                 columnWidth: 1,
-                height: 250
+                height: 250,
+                allowBlank: false
             }, {
                 xtype: 'textfield',
                 name: 'fj',

+ 2 - 4
frontend/pc-web/app/view/Interaction/mailbox/List.js

@@ -25,12 +25,10 @@ Ext.define('school.view.interaction.mailbox.List', {
                 totalProperty: 'data.total',
                 actionColumn: [],
                 selModel: {
-                    checkOnly:true,
-                    type:'checkboxmodel',
-                    mode : "MULTI" ,
-                    ignoreRightMouseSelection : false
+                    type: 'cellmodel'
                 },
                 hiddenTools: false,
+                disableDetail: true,
                 toolBtns: [{
                     xtype: 'button',
                     text: '导出'

+ 22 - 86
frontend/pc-web/app/view/Interaction/notice/List.js

@@ -36,18 +36,18 @@ Ext.define('school.view.interaction.notice.List', {
                 }),
                 minChars: 0,
                 queryMode: 'local'
-            }, {
-                xtype: 'condatefield',
-                name: 'publish_date',
-                fieldLabel: '发布时间',
-                columnWidth: 0.5
+            // }, {
+            //     xtype: 'condatefield',
+            //     name: 'publish_date',
+            //     fieldLabel: '发布时间',
+            //     columnWidth: 0.5
             }],
         
             gridConfig: {
                 addTitle: '学校通知',
                 addXtype: 'interaction-notice-schoolnotice',
                 idField: 'notify_id',
-                codeField: null,
+                codeField: 'notify_title',
                 detailField: 'notify_title',
                 dataUrl: me.dataUrl,
                 caller: null,
@@ -62,6 +62,12 @@ Ext.define('school.view.interaction.notice.List', {
                 },
                 hiddenTools: false,
                 toolBtns: [{
+                    xtype: 'button',
+                    text: '新增',
+                    handler: function() {
+                        school.util.BaseUtil.openTab('interaction-notice-schoolnotice', '新增学校通知', 'interaction-notice-schoolnotice-add');
+                    }
+                }, {
                     xtype: 'button',
                     text: '删除',
                     handler: function() {
@@ -97,12 +103,6 @@ Ext.define('school.view.interaction.notice.List', {
                             school.util.BaseUtil.showErrorToast('删除失败: ' + e.message);
                         });
                     }
-                }, {
-                    xtype: 'button',
-                    text: '新增',
-                    handler: function() {
-                        school.util.BaseUtil.openTab('interaction-notice-schoolnotice', '新增学校通知', 'interaction-notice-schoolnotice-add');
-                    }
                 }],
                 columns : [{
                     text: 'id',
@@ -112,15 +112,15 @@ Ext.define('school.view.interaction.notice.List', {
                     text: '标题',
                     dataIndex: 'notify_title',
                     width: 120,
-                    tdCls: 'x-detail-column',
-                    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('notify_title') + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
-                                initId: record.get(gridConfig.idField)
-                            });
-                        }
-                    }
+                    // tdCls: 'x-detail-column',
+                    // 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('notify_title') + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
+                    //             initId: record.get(gridConfig.idField)
+                    //         });
+                    //     }
+                    // }
                 }, {
                     text: '内容',
                     dataIndex: 'notify_details',
@@ -146,69 +146,5 @@ Ext.define('school.view.interaction.notice.List', {
             },
         });
         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;
-     },
+    }
 });

+ 9 - 3
frontend/pc-web/app/view/Interaction/notice/SchoolNotice.js

@@ -28,7 +28,9 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
                 xtype: "textfield",
                 name: "notify_creator",
                 fieldLabel: "发布人",
-                columnWidth: 0.5
+                columnWidth: 0.5,
+                defaultValue: school.util.BaseUtil.getCurrentUser().username,
+                readOnly: true
             }, {
                 xtype: 'combobox',
                 name: 'notify_status',
@@ -49,18 +51,22 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
                 name: 'publish_date',
                 fieldLabel: '发布时间',
                 readOnly: true,
-                format: 'Y-m-d H:i:s'
+                format: 'Y-m-d H:i:s',
+                defaultValue: new Date(),
+                readOnly: true
             }, {
                 xtype: "textfield",
                 name: "notify_title",
                 fieldLabel: "标题",
-                columnWidth: 1
+                columnWidth: 1,
+                allowBlank: false
             }, {
                 xtype: "textareafield",//文本域
                 name: 'notify_details',
                 fieldLabel: "内容",
                 height: 300,
                 columnWidth: 1,
+                allowBlank: false
             }, {
                 xtype: 'textfield',
                 name: 'fj',

+ 40 - 21
frontend/pc-web/app/view/Interaction/score/List.js

@@ -17,13 +17,38 @@ Ext.define('school.view.interaction.score.List', {
                 name: 'term',
                 fieldLabel: '学期'
             }, {
-                xtype: 'textfield',
+                xtype: 'gradecombo',
                 name: 'grade',
-                fieldLabel: '年级'
+                fieldLabel: '年级',
+                listeners: {
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('class').setValue(null);
+                    }
+                }
             }, {
-                xtype: 'textfield',
+                xtype: 'classcombo',
                 name: 'class',
-                fieldLabel: '班级'
+                fieldLabel: '班级',
+                listeners: {
+                    expand: function (combo, eOpts) {
+                        combo.store.clearFilter();
+
+                        var gradeCombo = combo.up('form').getForm().findField('grade');
+                        var gradeName = gradeCombo.getValue();
+
+                        var filter = new Ext.util.Filter({
+                            property: 'gradeName',
+                            value: gradeName
+                        });
+
+                        if (!!gradeName) {
+                            combo.store.setFilters([filter]);
+                        }
+                    },
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('grade').setValue(record.get('gradeName'));
+                    }
+                }
             }],
 
             caller: null,
@@ -54,41 +79,35 @@ Ext.define('school.view.interaction.score.List', {
                 hiddenTools: false,
                 toolBtns: [{
                     xtype: 'button',
-                    text: '导入'
+                    text: '新增',
+                    handler: 'onAddClick'
                 }, {
                     xtype: 'button',
-                    text: '删除'
+                    text: '导入'
                 }, {
                     xtype: 'button',
-                    text: '新增',
-                    // handler: 'onAddClick'
+                    text: '删除'
                 }],
                 columns: [{
                     text: 'ID',
                     dataIndex: 'score_id',
                     hidden: true
                 }, {
-                    text: '编号',
-                    dataIndex: 'score_num',
-                    width: 150
-                }, {
-                    text: '成绩类型',
-                    dataIndex: 'score_name',
-                    width: 120
+                    text: '考试标题',
+                    dataIndex: 'score_name'
                 }, {
                     text: '考试时间',
                     dataIndex: 'score_date',
                     width: 150
                 }, {
-                    text: '年级',
+                    text: '考试范围',
                     dataIndex: 'score_scope'
                 }, {
-                    text: '类型',
-                    dataIndex: 'score_type'
+                    text: '年级',
+                    dataIndex: ''
                 }, {
-                    text: '备注',
-                    dataIndex: 'score_remarks',
-                    width: 120
+                    text: '班级',
+                    dataIndex: ''
                 }]
             },
         });

+ 46 - 8
frontend/pc-web/app/view/Interaction/timetable/Detail.js

@@ -34,36 +34,74 @@ Ext.define('school.view.interaction.timetable.Detail', {
             }, {
                 xtype: 'numberfield',
                 name: 'gradeId',
-                fieldLabel: '年级ID'
+                fieldLabel: '年级ID',
+                hidden: true
             }, {
-                xtype: 'textfield',
+                xtype: 'gradecombo',
                 name: 'gradeName',
                 fieldLabel: '年级',
+                allowBlank: false,
+                listeners: {
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('gradeId').setValue(record.get('value'));
+                        combo.up('form').getForm().findField('clazzId').setValue(null);
+                        combo.up('form').getForm().findField('clazzName').setValue(null);
+                    }
+                }
             }, {
                 xtype: 'numberfield',
                 name: 'clazzId',
-                fieldLabel: '班级ID'
+                fieldLabel: '班级ID',
+                hidden: true
             }, {
-                xtype: 'textfield',
+                xtype: 'classcombo',
                 name: 'clazzName',
                 fieldLabel: '班级',
+                allowBlank: false,
+                listeners: {
+                    expand: function (combo, eOpts) {
+                        combo.store.clearFilter();
+
+                        var gradeCombo = combo.up('form').getForm().findField('gradeName');
+                        var gradeName = gradeCombo.getValue();
+
+                        var filter = new Ext.util.Filter({
+                            property: 'gradeName',
+                            value: gradeName
+                        });
+
+                        if (!!gradeName) {
+                            combo.store.setFilters([filter]);
+                        }
+                    },
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('clazzId').setValue(record.get('value'));
+                        combo.up('form').getForm().findField('gradeName').setValue(record.get('gradeName'));
+                    }
+                }
             }, {
                 xtype: 'textfield',
                 name: 'termPart',
-                fieldLabel: '学年'
+                fieldLabel: '学年',
+                allowBlank: false
             }, {
                 xtype: "textfield",
                 name: "termName",
-                fieldLabel: "学期"
+                fieldLabel: "学期",
+                allowBlank: false
             }, {
                 xtype: "textfield",
                 name: "creatorName",
-                fieldLabel: "录入人"
+                fieldLabel: "录入人",
+                defaultValue: school.util.BaseUtil.getCurrentUser().username,
+                readOnly: true
             }, {
                 xtype: 'datefield',
                 name: 'createTime',
                 fieldLabel: '录入时间',
-                format: 'Y-m-d H:i:s'
+                format: 'Y-m-d H:i:s',
+                defaultValue: new Date(),
+                readOnly: true
             }, {
                 xtype: 'textfield',
                 name: 'status',

+ 39 - 14
frontend/pc-web/app/view/Interaction/timetable/List.js

@@ -21,13 +21,38 @@ Ext.define('school.view.interaction.timetable.List', {
                 name: 'mcur_name',
                 fieldLabel: '课表名称'
             }, {
-                xtype: 'textfield',
+                xtype: 'gradecombo',
                 name: 'grade_name',
-                fieldLabel: '年级'
+                fieldLabel: '年级',
+                listeners: {
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('clazz_name').setValue(null);
+                    }
+                }
             }, {
-                xtype: 'textfield',
+                xtype: 'classcombo',
                 name: 'clazz_name',
-                fieldLabel: '班级'
+                fieldLabel: '班级',
+                listeners: {
+                    expand: function (combo, eOpts) {
+                        combo.store.clearFilter();
+
+                        var gradeCombo = combo.up('form').getForm().findField('grade_name');
+                        var gradeName = gradeCombo.getValue();
+
+                        var filter = new Ext.util.Filter({
+                            property: 'gradeName',
+                            value: gradeName
+                        });
+
+                        if (!!gradeName) {
+                            combo.store.setFilters([filter]);
+                        }
+                    },
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('grade_name').setValue(record.get('gradeName'));
+                    }
+                }
             }, {
                 xtype: 'textfield',
                 name: 'mcur_term_part',
@@ -42,7 +67,7 @@ Ext.define('school.view.interaction.timetable.List', {
                 addTitle: '课程表',
                 addXtype: 'interaction-timetable-detail',
                 idField: 'id',
-                codeField: null,
+                codeField: 'id',
                 detailField: 'name',
                 dataUrl: me.dataUrl,
                 caller: null,
@@ -115,15 +140,15 @@ Ext.define('school.view.interaction.timetable.List', {
                     text: '课表名称',
                     dataIndex: 'name',
                     width: 120,
-                    tdCls: 'x-detail-column',
-                    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('id') + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
-                                initId: record.get(gridConfig.idField)
-                            });
-                        }
-                    }
+                    // tdCls: 'x-detail-column',
+                    // 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('id') + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
+                    //             initId: record.get(gridConfig.idField)
+                    //         });
+                    //     }
+                    // }
                 }, {
                     text: '年级',
                     dataIndex: 'gradeName'

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

@@ -29,7 +29,7 @@ Ext.define('school.view.basic.class.ClassInfo', {
                 xtype: 'treepanel',
                 reference: 'treelist',
                 bind: {
-                    store: '{store_grade}',
+                    store: '{store_gradeclass}',
                     width: '{treeWidth}'
                 },
                 // viewConfig: {
@@ -83,7 +83,7 @@ Ext.define('school.view.basic.class.ClassInfo', {
                     onSuccess: function() {
                         let viewModel = me.getViewModel();
         
-                        viewModel.get('store_grade').load();
+                        viewModel.get('store_gradeclass').load();
                     }
                 }, '->'],
                 listeners: {

+ 3 - 2
frontend/pc-web/app/view/basic/class/ClassInfoController.js

@@ -7,7 +7,7 @@ Ext.define('school.view.basic.class.ClassInfoController', {
         view = me.getView(),
         viewModel = me.getViewModel();
 
-        viewModel.get('store_grade').load();
+        viewModel.get('store_gradeclass').load();
     },
 
     onItemMouseEnter: function(tree, record, item, index, e, eOpts)  {
@@ -209,7 +209,7 @@ Ext.define('school.view.basic.class.ClassInfoController', {
                             let url, params, headers;
                             if(type == 'SCHOOL') {
                                 currentNode = rootNode;
-                                childNode.leaf = false;
+                                childNode.leaf = true;
                                 childNode.children = [];
                                 // url = 'http://10.1.80.47:9560/grade/save';
                                 url = '/api/school/grade/save';
@@ -330,6 +330,7 @@ Ext.define('school.view.basic.class.ClassInfoController', {
                                 currentNode.set('text', text);
                                 currentNode.commit();
                                 win.close();
+                                listCard.showNode(currentNode);
                             }).catch(function(e) {
                                 view.setLoading(false);
                                 school.util.BaseUtil.showErrorToast(e.message);

+ 1 - 1
frontend/pc-web/app/view/basic/class/ListCard.js

@@ -87,7 +87,7 @@ Ext.define('school.view.basic.class.ListCard', {
             if(node.data.type == 'GRADE') {
                 list = node.childNodes.map(function(c) {
                     return Ext.Object.merge(c.data, {
-                        pathText: node.data.text + c.data.text
+                        pathText: node.data.text + ' ' + c.data.text
                     })
                 });
             }else {

+ 1 - 1
frontend/pc-web/app/view/basic/class/ListCardController.js

@@ -6,7 +6,7 @@ Ext.define('school.view.basic.class.ListCardController', {
         var me = this,
         view = me.view,
         viewModel = me.getViewModel(),
-        grade = viewModel.get('store_grade');
+        grade = viewModel.get('store_gradeclass');
 
         view.showNode(grade.getRootNode());
     },

+ 14 - 6
frontend/pc-web/app/view/basic/staff/StaffDetail.js

@@ -30,19 +30,24 @@ Ext.define('school.view.basic.staff.StaffDetail', {
             },{
                 xtype: 'textfield',
                 name: 'teacher_number',
-                fieldLabel: '工号'
+                fieldLabel: '工号',
+                allowBlank: false
             }, {
                 xtype: 'textfield',
                 name: 'teacher_name',
-                fieldLabel: '姓名'
+                fieldLabel: '姓名',
+                allowBlank: false
             }, {
                 xtype: 'gendercombo',
                 name: 'teacher_sex',
                 fieldLabel: '性别',
+                allowBlank: false
             }, {
                 xtype: 'textfield',
                 name: 'teacher_phone',
-                fieldLabel: '手机号'
+                fieldLabel: '手机号',
+                maxLength: 25,
+                allowBlank: false
             }, {
                 xtype: 'textfield',
                 name: 'teacher_email',
@@ -102,16 +107,19 @@ Ext.define('school.view.basic.staff.StaffDetail', {
                     data: [['博士后'], ['博士'], ['硕士'], ['研究生'], ['本科(统招)'], ['本科(成人高考)'], ['本科(专升本)'], ['大专'], ['高中'], ['职高'], ['初中'], ['小学']]
                 }),
                 minChars: 0,
-                queryMode: 'local'
+                queryMode: 'local',
+                allowBlank: false
             }, {
                 xtype: 'textfield',
                 name: 'teacher_major',
-                fieldLabel: '专业'
+                fieldLabel: '专业',
+                allowBlank: false
             }, {
                 xtype: 'textfield',
                 name: 'teacher_address',
                 fieldLabel: '现居住址',
-                columnWidth: 0.5
+                columnWidth: 0.5,
+                allowBlank: false
             }, {
                 name: "detailGridField",
                 xtype: "detailGridField",

+ 71 - 16
frontend/pc-web/app/view/basic/student/StudentDetail.js

@@ -30,11 +30,13 @@ Ext.define('school.view.basic.student.StudentDetail', {
             }, {
                 xtype: 'textfield',
                 name: 'stu_number',
-                fieldLabel: '学号'
+                fieldLabel: '学号',
+                allowBlank: false
             }, {
                 xtype: 'textfield',
                 name: 'stu_name',
-                fieldLabel: '姓名'
+                fieldLabel: '姓名',
+                allowBlank: false
             }, {
                 xtype: 'combobox',
                 name: 'stu_sex',
@@ -46,7 +48,8 @@ Ext.define('school.view.basic.student.StudentDetail', {
                     type: 'store_gender'
                 },
                 minChars: 0,
-                queryMode: 'local'
+                queryMode: 'local',
+                allowBlank: false
             }, {
                 xtype: 'textfield',
                 name: 'stu_native',
@@ -64,14 +67,20 @@ Ext.define('school.view.basic.student.StudentDetail', {
                 editable: false,
                 store: Ext.create('Ext.data.ArrayStore', {
                     fields: ['name'],
-                    data: [['中共党员'], ['中共预备党员'], ['共青团员'], ['群众']]
+                    data: [
+                        ['中共党员'],
+                        ['中共预备党员'],
+                        ['共青团员'],
+                        ['群众']
+                    ]
                 }),
                 minChars: 0,
                 queryMode: 'local'
             }, {
                 xtype: 'datefield',
                 name: 'stu_birthday',
-                fieldLabel: '出生日期'
+                fieldLabel: '出生日期',
+                allowBlank: false
             }, {
                 xtype: 'numberfield',
                 name: 'stu_age',
@@ -80,24 +89,58 @@ Ext.define('school.view.basic.student.StudentDetail', {
                 xtype: "textfield",
                 name: "stu_address",
                 fieldLabel: "家庭住址",
-                columnWidth: 0.5
+                columnWidth: 0.5,
+                allowBlank: false
             }, {
                 xtype: 'datefield',
                 name: 'stu_enroll_date',
-                fieldLabel: '入学日期'
+                fieldLabel: '入学日期',
+                allowBlank: false
             }, {
-                xtype: 'textfield',
+                xtype: 'gradecombo',
                 name: 'stu_grade',
-                fieldLabel: '年级'
+                valueField: 'name',
+                fieldLabel: '年级',
+                listeners: {
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('clazz_id').setValue(null);
+                        combo.up('form').getForm().findField('stu_class').setValue(null);
+                    }
+                },
+                allowBlank: false
             }, {
                 xtype: 'textfield',
                 name: 'clazz_id',
                 fieldLabel: '班级id',
-                hidden: true
+                hidden: true,
+                allowBlank: false
             }, {
-                xtype: 'textfield',
+                xtype: 'classcombo',
                 name: 'stu_class',
-                fieldLabel: '班级'
+                fieldLabel: '班级',
+                valueField: 'name',
+                listeners: {
+                    expand: function (combo, eOpts) {
+                        combo.store.clearFilter();
+
+                        var gradeCombo = combo.up('form').getForm().findField('stu_grade');
+                        var gradeName = gradeCombo.getValue();
+
+                        var filter = new Ext.util.Filter({
+                            property: 'gradeName',
+                            value: gradeName
+                        });
+
+                        if (!!gradeName) {
+                            combo.store.setFilters([filter]);
+                        }
+                    },
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('clazz_id').setValue(record.get('value'));
+                        combo.up('form').getForm().findField('stu_grade').setValue(record.get('gradeName'));
+                    }
+                },
+                allowBlank: false
             }, {
                 name: "parent",
                 xtype: "detailGridField",
@@ -109,9 +152,13 @@ Ext.define('school.view.basic.student.StudentDetail', {
                 allowEmpty: true,
                 showCount: false,
                 columns: [{
-                    text: '家长姓名',
+                    text: '关系id',
                     dataIndex: 'parent_stu_id',
                     hidden: true
+                }, {
+                    text: '家长id',
+                    dataIndex: 'parent_id',
+                    hidden: true
                 }, {
                     text: '家长姓名',
                     dataIndex: 'parents_name',
@@ -126,10 +173,18 @@ Ext.define('school.view.basic.student.StudentDetail', {
                     }
                 }, {
                     text: '关系',
-                    dataIndex: 'parent_rel',
+                    dataIndex: 'ps_relation',
                     editor: {
-                        xtype: 'textfield'
-                    }
+                        xtype: 'combobox',
+                        displayField: 'name',
+                        valueField: 'name',
+                        editable: true,
+                        store: Ext.create('Ext.data.ArrayStore', {
+                            fields: ['name'],
+                            data: [['父子'], ['母子'], ['兄弟'], ['兄妹'], ['姐弟'], ['姐妹'], ['祖孙'], ['其他']]
+                        }),
+                        queryMode: 'local'
+                    },
                 }]
             }],
         });

+ 46 - 73
frontend/pc-web/app/view/basic/student/StudentList.js

@@ -6,6 +6,7 @@ Ext.define('school.view.basic.student.StudentList', {
     xtype: 'basic-student-studentlist',
 
     dataUrl: '/api/school/student/list',
+    // dataUrl: 'http:/api/school/student/list',
     _title: '学生信息',
     caller: 'Student',
     pathKey: 'student',
@@ -14,13 +15,40 @@ Ext.define('school.view.basic.student.StudentList', {
         var me = this;
         Ext.apply(this, {
             searchField: [{
-                xtype: 'textfield',
-                name: 'grade',
-                fieldLabel: '年级'
+                xtype: 'gradecombo',
+                name: 'stu_grade',
+                fieldLabel: '年级',
+                valueField: 'name',
+                listeners: {
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('stu_class').setValue(null);
+                    }
+                }
             }, {
-                xtype: 'textfield',
-                name: 'class',
-                fieldLabel: '班级'
+                xtype: 'classcombo',
+                name: 'stu_class',
+                fieldLabel: '班级',
+                valueField: 'name',
+                listeners: {
+                    expand: function (combo, eOpts) {
+                        combo.store.clearFilter();
+
+                        var gradeCombo = combo.up('form').getForm().findField('stu_grade');
+                        var gradeName = gradeCombo.getValue();
+
+                        var filter = new Ext.util.Filter({
+                            property: 'gradeName',
+                            value: gradeName
+                        });
+
+                        if (!!gradeName) {
+                            combo.store.setFilters([filter]);
+                        }
+                    },
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('stu_grade').setValue(record.get('gradeName'));
+                    }
+                }
             }, {
                 xtype: 'textfield',
                 name: 'stu_number',
@@ -128,10 +156,19 @@ Ext.define('school.view.basic.student.StudentList', {
                     }
                 }, {
                     text: '年级',
-                    dataIndex: 'grade'
+                    dataIndex: 'stu_grade',
+                    editor: {
+                        xtype: 'combobox',
+                        displayField: 'name',
+                        valueField: 'value',
+                        store: {
+                            type: 'store_grade'
+                        },
+                        queryMode: 'local'
+                    },
                 }, {
                     text: '班级',
-                    dataIndex: 'class'
+                    dataIndex: 'stu_class'
                 }, {
                     text: '入学日期',
                     dataIndex: 'stu_enroll_date',
@@ -147,69 +184,5 @@ Ext.define('school.view.basic.student.StudentList', {
             },
         });
         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;
-     },
+    }
 });

+ 8 - 10
frontend/pc-web/app/view/core/base/BasePanel.js

@@ -43,16 +43,14 @@ Ext.define('school.view.core.base.BasePanel', {
             xtype: 'core-base-gridpanel',
             padding: '8 12',
             _columns: gridColumns.map(function(c) {
-                if(c.dataIndex == gridConfig.detailField) {
-                    c.listeners = c.listeners || {};
-                    if(!c.listeners['click']) {
-                        c.tdCls = c.tdCls ? (c.tdCls + ' x-detail-column') : 'x-detail-column'
-                        c.listeners['click'] = function(view, td, row, col, e, record, tr, eOpts, event) {
-                            school.util.BaseUtil.openTab(gridConfig.addXtype, gridConfig.addTitle + '(' + record.get(gridConfig.codeField) + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
-                                initId: record.get(gridConfig.idField)
-                            });
-                        };
-                    }
+                c.listeners = c.listeners || {};
+                if(!gridConfig.disableDetail && !c.listeners['click']) {
+                    // c.tdCls = c.tdCls ? (c.tdCls + ' x-detail-column') : 'x-detail-column'
+                    c.listeners['click'] = function(view, td, row, col, e, record, tr, eOpts, event) {
+                        school.util.BaseUtil.openTab(gridConfig.addXtype, gridConfig.addTitle + '(' + record.get(gridConfig.codeField) + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
+                            initId: record.get(gridConfig.idField)
+                        });
+                    };
                 }
                 return Object.assign({}, c);
             }),

+ 20 - 0
frontend/pc-web/app/view/core/form/field/ClassComboBox.js

@@ -0,0 +1,20 @@
+Ext.define('school.view.core.form.field.ClassComboBox', {
+    extend: 'Ext.form.field.ComboBox',
+    alias: 'widget.classcombo',
+
+    fieldLabel: '班级',
+    displayField: 'name',
+    valueField: 'name',
+    editable: true,
+    minChars: 0,
+    queryMode: 'local',
+    initComponent: function() {
+        var me = this;
+
+        Ext.apply(me, {
+            store: Ext.StoreMgr.get('store_class'),
+        });
+
+        me.callParent(arguments);
+    }
+});

+ 20 - 0
frontend/pc-web/app/view/core/form/field/GradeComboBox.js

@@ -0,0 +1,20 @@
+Ext.define('school.view.core.form.field.GradeComboBox', {
+    extend: 'Ext.form.field.ComboBox',
+    alias: 'widget.gradecombo',
+
+    fieldLabel: '年级',
+    displayField: 'name',
+    valueField: 'name',
+    editable: true,
+    minChars: 0,
+    queryMode: 'local',
+    initComponent: function() {
+        var me = this;
+
+        Ext.apply(me, {
+            store: Ext.StoreMgr.get('store_grade'),
+        });
+
+        me.callParent(arguments);
+    }
+});

+ 1 - 1
frontend/pc-web/app/view/core/grid/column/SubjectColumn.js

@@ -10,7 +10,7 @@ Ext.define('school.view.core.grid.column.SubjectColumn', {
         displayField: 'name',
         valueField: 'code',
         store: {
-            type: 'subject'
+            type: 'store_subject'
         },
         queryMode: 'local'
     },

+ 1 - 1
frontend/pc-web/app/view/viewport/ViewportController.js

@@ -63,7 +63,7 @@ Ext.define('school.view.viewport.ViewportController', {
                     schoolSecret: res.data.school_secret,
                 };
                 me.getViewModel().setData(d);
-                me.getViewModel().get('store_grade').load();
+                me.getViewModel().get('store_gradeclass').load();
             }
         })
         .catch(function(e) {

+ 18 - 11
frontend/pc-web/app/view/viewport/ViewportModel.js

@@ -25,7 +25,7 @@ Ext.define('school.view.viewport.ViewportModel', {
                 }
             }
         },
-        store_grade: {
+        store_gradeclass: {
             type: 'tree',
             autoLoad: false,
             // model: 'school.model.Grade',
@@ -64,18 +64,25 @@ Ext.define('school.view.viewport.ViewportModel', {
             },
             listeners: {
                 load: function(store, records) {
-                    let stores = school.store;
-                    let mainModel = Ext.getCmp('mainView').getViewModel();
-                    let gradeStore = Ext.create('school.store.Grade', {
-                        data: records.map(function(r) {
-                            let d = r.data;
+                    let classData = [];
+                    let gradeData = records.map(function(r) {
+                        let d = r.data;
+                        let c = d.children.map(function(h) {
                             return {
-                                grade_id: d._id,
-                                grade_name: d.text,
+                                value: h._id,
+                                name: h.text,
+                                gradeId: d._id,
+                                gradeName: d.text
                             }
-                        })
-                    });
-                    mainModel.set('grade_store', gradeStore);
+                        });
+                        classData = classData.concat(c);
+                        return {
+                            value: d._id,
+                            name: d.text,
+                        }
+                    })
+                    Ext.StoreMgr.get('store_grade').loadData(gradeData);
+                    Ext.StoreMgr.get('store_class').loadData(classData);
                 }
             }
         }