Browse Source

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

chenw 7 years ago
parent
commit
e28fda0d27
34 changed files with 969 additions and 155 deletions
  1. 46 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/SubjectController.java
  2. 16 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/SubjectService.java
  3. 87 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/SubjectServiceImpl.java
  4. 23 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SubjectMapper.java
  5. 48 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/Subject.java
  6. 91 0
      applications/school/school-server/src/main/resources/mapper/SubjectMapper.xml
  7. 16 1
      frontend/pc-web/app.json
  8. 1 6
      frontend/pc-web/app/model/Grade.js
  9. 28 0
      frontend/pc-web/app/model/basic/Subject.js
  10. 11 0
      frontend/pc-web/app/store/Grade.js
  11. 8 8
      frontend/pc-web/app/view/Interaction/access/List.js
  12. 10 6
      frontend/pc-web/app/view/Interaction/homework/List.js
  13. 24 30
      frontend/pc-web/app/view/Interaction/homework/Release.js
  14. 22 0
      frontend/pc-web/app/view/Interaction/homework/ReleaseController.js
  15. 3 3
      frontend/pc-web/app/view/Interaction/notice/List.js
  16. 4 21
      frontend/pc-web/app/view/Interaction/notice/SchoolNotice.js
  17. 22 0
      frontend/pc-web/app/view/Interaction/notice/SchoolNoticeController.js
  18. 21 25
      frontend/pc-web/app/view/Interaction/timetable/Detail.js
  19. 8 11
      frontend/pc-web/app/view/Interaction/timetable/List.js
  20. 30 11
      frontend/pc-web/app/view/basic/class/ClassDetail.js
  21. 40 0
      frontend/pc-web/app/view/basic/class/ClassDetailController.js
  22. 6 1
      frontend/pc-web/app/view/basic/class/ClassInfo.js
  23. 15 4
      frontend/pc-web/app/view/basic/class/ListCard.js
  24. 8 4
      frontend/pc-web/app/view/basic/school/SchoolInfo.js
  25. 147 0
      frontend/pc-web/app/view/basic/subject/List.js
  26. 185 0
      frontend/pc-web/app/view/basic/subject/ListController.js
  27. 4 0
      frontend/pc-web/app/view/basic/subject/ListViewModel.js
  28. 21 5
      frontend/pc-web/app/view/viewport/ViewportModel.js
  29. 2 1
      frontend/pc-web/package.json
  30. BIN
      frontend/pc-web/resources/images/auth-background.jpg
  31. 19 15
      frontend/pc-web/resources/json/navigation.json
  32. 1 1
      frontend/wechat-web/src/configs/router.config.js
  33. 1 1
      frontend/wechat-web/src/modules/vote/VoteListParent.jsx
  34. 1 1
      frontend/wechat-web/src/modules/vote/VoteListTeacher.jsx

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

@@ -0,0 +1,46 @@
+package com.usoftchina.smartschool.school.basic.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.page.PageDefault;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.basic.service.SubjectService;
+import com.usoftchina.smartschool.school.dto.BatchDealBaseDTO;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.Subject;
+import com.usoftchina.smartschool.school.po.SysTeacher;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author: guq
+ * @create: 2019-02-27 10:09
+ **/
+@RestController
+@RequestMapping("subject")
+public class SubjectController {
+
+
+    @Autowired
+    private SubjectService subjectService;
+
+    @GetMapping("/list")
+    public Result getList(@PageDefault PageRequest page, ListReqDTO listReqDTO) {
+        PageInfo<Subject> student = subjectService.getListData(page, listReqDTO);
+        return Result.success(student);
+    }
+
+    @PostMapping("/save")
+    public Result getFormData(@RequestBody Subject data) {
+        DocBaseDTO formData = subjectService.saveFormData(data);
+        return Result.success(formData);
+    }
+
+    @PostMapping("/batchDelete")
+    public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs) {
+        subjectService.batchDelete(baseDTOs);
+        return Result.success();
+    }
+
+}

+ 16 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/SubjectService.java

@@ -0,0 +1,16 @@
+package com.usoftchina.smartschool.school.basic.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.dto.BatchDealBaseDTO;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.Subject;
+
+public interface SubjectService {
+    PageInfo<Subject> getListData(PageRequest page, ListReqDTO listReqDTO);
+
+    DocBaseDTO saveFormData(Subject teacher);
+
+    void batchDelete(BatchDealBaseDTO baseDTOs);
+}

+ 87 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/SubjectServiceImpl.java

@@ -0,0 +1,87 @@
+package com.usoftchina.smartschool.school.basic.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.context.BaseContextHolder;
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.basic.service.SubjectService;
+import com.usoftchina.smartschool.school.dto.BatchDealBaseDTO;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.exception.BizExceptionCode;
+import com.usoftchina.smartschool.school.mapper.SubjectMapper;
+import com.usoftchina.smartschool.school.po.Subject;
+import com.usoftchina.smartschool.school.po.SysStudent;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-02-27 10:10
+ **/
+@Service
+public class SubjectServiceImpl implements SubjectService {
+
+    @Autowired
+    private SubjectMapper subjectMapper;
+
+
+    @Override
+    public PageInfo<Subject> 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){
+            condition = "1=1";
+        }
+        List<Subject> data = subjectMapper.selectByConditon(condition, schoolId);
+        PageInfo<Subject> list = new PageInfo<>(data);
+        return list;
+    }
+
+    @Override
+    public DocBaseDTO saveFormData(Subject formdata) {
+        if (null == formdata){
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
+        }
+        Long id = formdata.getSubject_id();
+        Long school = BaseContextHolder.getSchoolId();
+        school = 1l;
+        if (StringUtils.isEmpty(id) || "0".equals(id.toString())) {
+            formdata.setSchool_id(school);
+            formdata.setSubject_status(1);
+            subjectMapper.insertSelective(formdata);
+           id = formdata.getSubject_id();
+        } else {
+            //更新
+            subjectMapper.updateByPrimaryKeySelective(formdata);
+        }
+        return new DocBaseDTO(formdata.getSubject_id());
+    }
+
+    @Override
+    public void batchDelete(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            delete(base.getId());
+        }
+    }
+
+
+
+    private void delete(Long id) {
+        if (null == id || "0".equals(id)) {
+            return;
+        }
+        subjectMapper.deleteByPrimaryKey(id);
+    }
+}

+ 23 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SubjectMapper.java

@@ -0,0 +1,23 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.Subject;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+@Mapper
+public interface SubjectMapper {
+    int deleteByPrimaryKey(Long subject_id);
+
+    int insert(Subject record);
+
+    int insertSelective(Subject record);
+
+    Subject selectByPrimaryKey(Long subject_id);
+
+    int updateByPrimaryKeySelective(Subject record);
+
+    int updateByPrimaryKey(Subject record);
+
+    List<Subject> selectByConditon(@Param("con") String con, @Param("school_id") Long school_id);
+}

+ 48 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/Subject.java

@@ -0,0 +1,48 @@
+package com.usoftchina.smartschool.school.po;
+
+/**
+ * @author: guq
+ * @create: 2019-02-27 11:49
+ **/
+public class Subject {
+
+    private Long subject_id;
+
+    private String subject_name;
+
+    private Integer subject_status;
+
+    private Long school_id;
+
+    public Long getSubject_id() {
+        return subject_id;
+    }
+
+    public void setSubject_id(Long subject_id) {
+        this.subject_id = subject_id;
+    }
+
+    public String getSubject_name() {
+        return subject_name;
+    }
+
+    public void setSubject_name(String subject_name) {
+        this.subject_name = subject_name == null ? null : subject_name.trim();
+    }
+
+    public Integer getSubject_status() {
+        return subject_status;
+    }
+
+    public void setSubject_status(Integer subject_status) {
+        this.subject_status = subject_status;
+    }
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+}

+ 91 - 0
applications/school/school-server/src/main/resources/mapper/SubjectMapper.xml

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.smartschool.school.mapper.SubjectMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.Subject" >
+    <id column="subject_id" property="subject_id" jdbcType="BIGINT" />
+    <result column="subject_name" property="subject_name" jdbcType="VARCHAR" />
+    <result column="subject_status" property="subject_status" jdbcType="INTEGER" />
+    <result column="school_id" property="school_id" jdbcType="BIGINT" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    subject_id, subject_name, subject_status, school_id
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from subject
+    where subject_id = #{subject_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from subject
+    where subject_id = #{subject_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.Subject" >
+    insert into subject (subject_id, subject_name, subject_status, 
+      school_id)
+    values (#{subject_id,jdbcType=BIGINT}, #{subject_name,jdbcType=VARCHAR}, #{subject_status,jdbcType=INTEGER}, 
+      #{school_id,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.Subject" >
+    <selectKey  resultType="java.lang.Long" keyProperty="subject_id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into subject
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="subject_name != null" >
+        subject_name,
+      </if>
+      <if test="subject_status != null" >
+        subject_status,
+      </if>
+      <if test="school_id != null" >
+        school_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="subject_name != null" >
+        #{subject_name,jdbcType=VARCHAR},
+      </if>
+      <if test="subject_status != null" >
+        #{subject_status,jdbcType=INTEGER},
+      </if>
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.Subject" >
+    update subject
+    <set >
+      <if test="subject_name != null" >
+        subject_name = #{subject_name,jdbcType=VARCHAR},
+      </if>
+      <if test="subject_status != null" >
+        subject_status = #{subject_status,jdbcType=INTEGER},
+      </if>
+      <if test="school_id != null" >
+        school_id = #{school_id,jdbcType=BIGINT},
+      </if>
+    </set>
+    where subject_id = #{subject_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.Subject" >
+    update subject
+    set subject_name = #{subject_name,jdbcType=VARCHAR},
+      subject_status = #{subject_status,jdbcType=INTEGER},
+      school_id = #{school_id,jdbcType=BIGINT}
+    where subject_id = #{subject_id,jdbcType=BIGINT}
+  </update>
+
+  <select id="selectByConditon" resultMap="BaseResultMap">
+    select * from subject <where>
+    <if test="con != null">
+      ${con}
+    </if>
+    <if test="school_id != null">
+      and  school_id = #{school_id}
+    </if>
+  </where>
+    order by subject_id DESC
+  </select>
+</mapper>

+ 16 - 1
frontend/pc-web/app.json

@@ -307,8 +307,23 @@
      * Settings specific to testing builds.
      */
     "testing": {
+        "output": {
+            "appCache": {
+                "enable": true,
+                "path": "cache.appcache"
+            }
+        },
+        "loader": {
+            "cache": "${build.timestamp}"
+        },
+        "cache": {
+            "enable": true
+        },
+        "compressor": {
+            "type": "yui"
+        },
         "server": {
-            "basePath": "https://saas-test-api.usoftchina.com",
+            "basePath": "https://school-api.ydyhz.com",
             "urlPattern": "^\/api\/"
         }
     },

+ 1 - 6
frontend/pc-web/app/model/Grade.js

@@ -21,10 +21,5 @@ Ext.define('school.model.Grade', {
     }, {
         name: 'school_id', // 所属学校
         type: 'int'
-    }],
-
-    hasMany: {
-        associatedName: 'classList',
-        model: 'school.model.Class'
-    }
+    }]
 });

+ 28 - 0
frontend/pc-web/app/model/basic/Subject.js

@@ -0,0 +1,28 @@
+/**
+ * 学科
+ */
+Ext.define('school.model.basic.Subject', {
+    extend: 'school.model.Base',
+    fields: [{
+        name: 'teacher_clazz_id',
+        type: 'int'
+    }, {
+        name: 'subject_id',
+        type: 'int'
+    }, {
+        name: 'subject_name',
+        type: 'string'
+    }, {
+        name: 'clazz_id',
+        type: 'string'
+    }, {
+        name: 'clazz_name',
+        type: 'date'
+    }, {
+        name: 'teacher_id',
+        type: 'int'
+    }, {
+        name: 'teacher_name',
+        type: 'string'
+    }],
+});

+ 11 - 0
frontend/pc-web/app/store/Grade.js

@@ -0,0 +1,11 @@
+/**
+ * 学科
+ */
+Ext.define('school.store.Grade', {
+    extend: 'Ext.data.Store',
+    alias: 'store.subject',
+
+    model: 'school.model.Grade',
+
+    data: []
+});

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

@@ -48,17 +48,17 @@ Ext.define('school.view.interaction.access.List', {
                     text: '类型',
                     dataIndex: 'record_name'
                 }, {
-                    text: '学',
-                    dataIndex: 'stu_id'
+                    text: '学',
+                    dataIndex: 'stu_number'
                 }, {
-                    text: '班级',
-                    dataIndex: 'class'
+                    text: '姓名',
+                    dataIndex: 'stu_name'
                 }, {
-                    text: '学号',
-                    dataIndex: 'StudentID'
+                    text: '年级',
+                    dataIndex: 'grade_name'
                 }, {
-                    text: '状态',
-                    dataIndex: 'state'
+                    text: '班级',
+                    dataIndex: 'clazz_name'
                 }, {
                     text: '时间',
                     dataIndex: 'in_date',

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

@@ -33,7 +33,7 @@ Ext.define('school.view.interaction.homework.List', {
                 fieldLabel: '发布状态',
                 displayField: 'name',
                 valueField: 'value',
-                editable: false,
+                editable: true,
                 store: Ext.create('Ext.data.ArrayStore', {
                     fields: ['name', 'value'],
                     data: [
@@ -45,7 +45,7 @@ Ext.define('school.view.interaction.homework.List', {
                 queryMode: 'local'
             }, {
                 xtype: 'condatefield',
-                name: 'start_date',
+                name: 'publish_date',
                 fieldLabel: '发布时间',
                 columnWidth: 0.5
             }],
@@ -116,10 +116,10 @@ Ext.define('school.view.interaction.homework.List', {
                     hidden: true
                 }, {
                     text: '年级',
-                    dataIndex: 'nj'
+                    dataIndex: 'grade_name'
                 }, {
                     text: '班级',
-                    dataIndex: 'bj'
+                    dataIndex: 'classz_name'
                 }, {
                     text: '标题',
                     dataIndex: 'task_title',
@@ -143,10 +143,14 @@ Ext.define('school.view.interaction.homework.List', {
                     width: 150
                 }, {
                     text: '发布状态',
-                    dataIndex: 'zt'
+                    dataIndex: 'task_status',
+                    width: 120,
+                    renderer: function(v) {
+                        return !!v ? (v == 2 ? '未发布' : '已发布') : '未发布'
+                    }
                 }, {
                     text: '发布时间',
-                    dataIndex: 'start_date',
+                    dataIndex: 'publish_date',
                     width: 120
                 }, ]
             },

+ 24 - 30
frontend/pc-web/app/view/Interaction/homework/Release.js

@@ -31,21 +31,11 @@ Ext.define('school.view.interaction.homework.Release', {
                 columnWidth: 0.5
             }, {
                 xtype: 'textfield',
-                name: 'njid',
-                fieldLabel: '年级id',
-                hidden: true
-            }, {
-                xtype: 'textfield',
-                name: 'nj',
+                name: 'grade_name',
                 fieldLabel: '年级'
             }, {
                 xtype: 'textfield',
-                name: 'bjid',
-                fieldLabel: '班级id',
-                hidden: true
-            }, {
-                xtype: 'textfield',
-                name: 'bj',
+                name: 'classz_name',
                 fieldLabel: '班级'
             }, {
                 xtype: 'datefield',
@@ -63,6 +53,27 @@ Ext.define('school.view.interaction.homework.Release', {
                 name: "task_title",
                 fieldLabel: "标题",
                 columnWidth: 1
+            }, {
+                xtype: 'combobox',
+                name: 'task_status',
+                fieldLabel: '发布状态',
+                displayField: 'name',
+                valueField: 'value',
+                editable: false,
+                readOnly: true,
+                defaultValue: 2,
+                store: Ext.create('Ext.data.ArrayStore', {
+                    fields: ['name', 'value'],
+                    data: [['未发布', 2], ['已发布', 1]]
+                }),
+                minChars: 0,
+                queryMode: 'local'
+            }, {
+                xtype: 'datefield',
+                name: 'publish_date',
+                fieldLabel: '发布时间',
+                readOnly: true,
+                format: 'Y-m-d H:i:s'
             }, {
                 xtype: "textareafield",
                 name: 'task_context',
@@ -80,24 +91,7 @@ Ext.define('school.view.interaction.homework.Release', {
                 bind: {
                     hidden: '{!task_id}'
                 },
-                handler: function() {
-                    let id = me.getViewModel().data.task_id;
-                    me.setLoading(true);
-                    school.util.BaseUtil.request({
-                        url: '/api/school/homework/publish/' + id,
-                        method: 'POST'
-                    })
-                    .then(function() {
-                        me.setLoading(false);
-                        school.util.BaseUtil.showSuccessToast('发布成功');
-                        me.getViewModel().set('notify_status', 1);
-                        me.clearDirty();
-                    })
-                    .catch(function(e) {
-                        me.setLoading(false);
-                        school.util.BaseUtil.showErrorToast('发布失败: ' + e.message);
-                    });
-                }
+                handler: 'onPublish'
             }]
         });
         this.callParent();

+ 22 - 0
frontend/pc-web/app/view/Interaction/homework/ReleaseController.js

@@ -18,4 +18,26 @@ Ext.define('school.view.interaction.homework.ReleaseController', {
             school.util.BaseUtil.refreshTabTitle(newId, newTitle);
         });
     },
+
+    onPublish: function() {
+        let me = this,
+        view = me.getView(),
+        viewModel = me.getViewModel(),
+        id = viewModel.data.task_id;
+        view.setLoading(true);
+        school.util.BaseUtil.request({
+            url: '/api/school/homework/publish/' + id,
+            method: 'POST'
+        })
+        .then(function() {
+            view.setLoading(false);
+            school.util.BaseUtil.showSuccessToast('发布成功');
+            viewModel.set('task_status', 1);
+            me.refresh();
+        })
+        .catch(function(e) {
+            view.setLoading(false);
+            school.util.BaseUtil.showErrorToast('发布失败: ' + e.message);
+        });
+    }
 });

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

@@ -29,7 +29,7 @@ Ext.define('school.view.interaction.notice.List', {
                 fieldLabel: '发布状态',
                 displayField: 'name',
                 valueField: 'value',
-                editable: false,
+                editable: true,
                 store: Ext.create('Ext.data.ArrayStore', {
                     fields: ['name', 'value'],
                     data: [['已发布', 1], ['未发布', 2]]
@@ -38,7 +38,7 @@ Ext.define('school.view.interaction.notice.List', {
                 queryMode: 'local'
             }, {
                 xtype: 'condatefield',
-                name: 'create_date',
+                name: 'publish_date',
                 fieldLabel: '发布时间',
                 columnWidth: 0.5
             }],
@@ -140,7 +140,7 @@ Ext.define('school.view.interaction.notice.List', {
                     xtype: 'datecolumn',
                     formate: 'Y-m-d H:i:s',
                     text: '发布时间',
-                    dataIndex: 'create_date',
+                    dataIndex: 'publish_date',
                     width: 120
                 }]
             },

+ 4 - 21
frontend/pc-web/app/view/Interaction/notice/SchoolNotice.js

@@ -46,10 +46,10 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
                 queryMode: 'local'
             }, {
                 xtype: 'datefield',
-                name: 'create_date',
+                name: 'publish_date',
                 fieldLabel: '发布时间',
-                columnWidth: 0.5,
-                formatter: 'Y-m-d H:i:s'
+                readOnly: true,
+                format: 'Y-m-d H:i:s'
             }, {
                 xtype: "textfield",
                 name: "notify_title",
@@ -72,24 +72,7 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
                 bind: {
                     hidden: '{!notify_id}'
                 },
-                handler: function() {
-                    let id = me.getViewModel().data.notify_id;
-                    me.setLoading(true);
-                    school.util.BaseUtil.request({
-                        url: '/api/school/notice/publish/' + id,
-                        method: 'POST'
-                    })
-                    .then(function() {
-                        me.setLoading(false);
-                        school.util.BaseUtil.showSuccessToast('发布成功');
-                        me.getViewModel().set('notify_status', 1);
-                        me.clearDirty();
-                    })
-                    .catch(function(e) {
-                        me.setLoading(false);
-                        school.util.BaseUtil.showErrorToast('发布失败: ' + e.message);
-                    });
-                }
+                handler: 'onPublish'
             }]
         });
         this.callParent();

+ 22 - 0
frontend/pc-web/app/view/Interaction/notice/SchoolNoticeController.js

@@ -18,4 +18,26 @@ Ext.define('school.view.interaction.notice.SchoolNoticeController', {
             school.util.BaseUtil.refreshTabTitle(newId, newTitle);
         });
     },
+
+    onPublish: function() {
+        let me = this,
+        view = me.getView(),
+        viewModel = me.getViewModel(),
+        id = viewModel.data.notify_id;
+        view.setLoading(true);
+        school.util.BaseUtil.request({
+            url: '/api/school/notice/publish/' + id,
+            method: 'POST'
+        })
+        .then(function() {
+            view.setLoading(false);
+            school.util.BaseUtil.showSuccessToast('发布成功');
+            viewModel.set('notify_status', 1);
+            me.refresh();
+        })
+        .catch(function(e) {
+            view.setLoading(false);
+            school.util.BaseUtil.showErrorToast('发布失败: ' + e.message);
+        });
+    }
 });

+ 21 - 25
frontend/pc-web/app/view/Interaction/timetable/Detail.js

@@ -7,7 +7,7 @@ Ext.define('school.view.interaction.timetable.Detail', {
     _title: '课程表',
     _idField: 'id',
     _codeField: null,
-    // _readUrl: 'http://10.1.80.35:8560/api/sale/saledown/read',
+    // _readUrl: 'http://10.1.80.36:9520/api/school/curriculum/read',
     _readUrl: '/api/school/curriculum/read',
     // _saveUrl: 'http://10.1.80.36:9520/api/school/curriculum/save',
     _saveUrl: '/api/school/curriculum/save',
@@ -34,44 +34,40 @@ Ext.define('school.view.interaction.timetable.Detail', {
             }, {
                 xtype: 'numberfield',
                 name: 'gradeId',
-                fieldLabel: '年级(id)',
-                allowBlank: false
+                fieldLabel: '年级ID'
+            }, {
+                xtype: 'textfield',
+                name: 'gradeName',
+                fieldLabel: '年级',
             }, {
                 xtype: 'numberfield',
                 name: 'clazzId',
-                fieldLabel: '班级(id)',
-                allowBlank: false
+                fieldLabel: '班级ID'
             }, {
                 xtype: 'textfield',
-                name: 'creatorName',
-                fieldLabel: '录入人'
-            }, {
-                xtype: 'datefield',
-                name: 'createTime',
-                fieldLabel: '录入时间',
-                format: 'Y-m-d H:i:s'
+                name: 'clazzName',
+                fieldLabel: '班级',
             }, {
                 xtype: 'textfield',
-                name: 'status',
-                fieldLabel: '状态'
+                name: 'termPart',
+                fieldLabel: '学年'
             }, {
                 xtype: "textfield",
                 name: "termName",
-                fieldLabel: "学期名称"
+                fieldLabel: "学期"
             }, {
-                xtype: "datefield",
-                name: "termStart",
-                fieldLabel: "学期开始时间",
-                format: 'Y-m-d'
+                xtype: "textfield",
+                name: "creatorName",
+                fieldLabel: "录入人"
             }, {
                 xtype: 'datefield',
-                name: 'termEnd',
-                fieldLabel: '学期结束时间',
-                format: 'Y-m-d'
+                name: 'createTime',
+                fieldLabel: '录入时间',
+                format: 'Y-m-d H:i:s'
             }, {
-                xtype: 'numberfield',
-                name: 'weekNum',
-                fieldLabel: '周数'
+                xtype: 'textfield',
+                name: 'status',
+                fieldLabel: '状态'
             }, {
                 name: "timetable",
                 xtype: "detailGridField",

+ 8 - 11
frontend/pc-web/app/view/Interaction/timetable/List.js

@@ -18,26 +18,23 @@ Ext.define('school.view.interaction.timetable.List', {
         Ext.apply(this, {
             searchField: [{
                 xtype: 'textfield',
-                name: 'name',
+                name: 'mcur_name',
                 fieldLabel: '课表名称'
             }, {
                 xtype: 'textfield',
-                name: 'gradeName',
+                name: 'grade_name',
                 fieldLabel: '年级'
             }, {
                 xtype: 'textfield',
-                name: 'clazzName',
+                name: 'clazz_name',
                 fieldLabel: '班级'
             }, {
-                xtype: 'numberfield',
-                name: 'text',
-                fieldLabel: '学年',
-                getCondition: function(v) {
-                    return '1=1';
-                }
+                xtype: 'textfield',
+                name: 'mcur_term_part',
+                fieldLabel: '学年'
             }, {
                 xtype: 'textfield',
-                name: 'termName',
+                name: 'mcur_term_name',
                 fieldLabel: '学期'
             }],
         
@@ -135,7 +132,7 @@ Ext.define('school.view.interaction.timetable.List', {
                     dataIndex: 'clazzName'
                 }, {
                     text: '学年',
-                    dataIndex: 'xn'
+                    dataIndex: 'termPart'
                 }, {
                     text: '学期',
                     dataIndex: 'termName',

+ 30 - 11
frontend/pc-web/app/view/basic/class/ClassDetail.js

@@ -2,6 +2,7 @@ Ext.define('school.view.basic.class.ClassDetail', {
     extend: 'school.view.core.form.FormPanel',
     xtype: 'classdetail',
 
+    controller: 'classdetail',
     viewModel: 'classdetail',
 
     //字段属性
@@ -9,7 +10,9 @@ Ext.define('school.view.basic.class.ClassDetail', {
     _idField: 'clazz_id',
     _codeField: null,
 
+    // _readUrl: 'http://10.1.80.47:9560/class/read',
     _readUrl: '/api/school/class/read',
+    // _saveUrl: 'http://10.1.80.47:9560/class/save',
     _saveUrl: '/api/school/class/save',
     _deleteUrl: '/api/school/class/delete',
 
@@ -33,7 +36,7 @@ Ext.define('school.view.basic.class.ClassDetail', {
             //     fieldLabel: '班级代码',
             // }, {
                 xtype: 'textfield',
-                name: 'currentDetail.grade',
+                name: 'clazz_grade',
                 fieldLabel: '所属年级',
                 columnWidth: 0.5,
                 group: '班级信息',
@@ -60,9 +63,9 @@ Ext.define('school.view.basic.class.ClassDetail', {
                 xtype: "detailGridField",
                 detnoColumn: 'sd_detno',
                 storeModel: 'school.model.basic.Student',
-                deleteDetailUrl: '/api/sale/sale/deleteDetail',
                 allowEmpty: true,
                 showCount: false,
+                readOnly: true,
                 group: '学生信息',
                 columns: [{
                     text: 'id',
@@ -105,23 +108,39 @@ Ext.define('school.view.basic.class.ClassDetail', {
             }, {
                 name: "detail1",
                 xtype: "detailGridField",
-                idColumn: 'teacher_id',
-                detnoColumn: 'sd_detno',
-                storeModel: 'school.model.basic.Student',
-                deleteDetailUrl: '/api/sale/sale/deleteDetail',
+                idColumn: 'teacher_clazz_id',
+                detnoColumn: 'no',
+                storeModel: 'school.model.basic.Subject',
+                deleteDetailUrl: '/api/school/class/deleteDetail',
                 allowEmpty: true,
                 showCount: false,
-                group: '任课教师信息',
+                group: '学科信息',
                 columns: [{
                     text: 'id',
-                    dataIndex: 'teacher_id',
+                    dataIndex: 'teacher_clazz_id',
                     hidden: true
                 }, {
-                    text: '姓名',
-                    dataIndex: 'teacher'
+                    text: '学科id',
+                    dataIndex: 'subject_id',
+                    editor: {
+                        xtype: 'textfield'
+                    }
                 }, {
                     text: '学科',
-                    dataIndex: 'subject'
+                    dataIndex: 'subject_name',
+                    xtype: 'subjectcolumn'
+                }, {
+                    text: '任课教师id',
+                    dataIndex: 'teacher_id',
+                    editor: {
+                        xtype: 'textfield'
+                    }
+                }, {
+                    text: '任课教师',
+                    dataIndex: 'teacher_name',
+                    editor: {
+                        xtype: 'textfield'
+                    }
                 }]
             }]
         });

+ 40 - 0
frontend/pc-web/app/view/basic/class/ClassDetailController.js

@@ -0,0 +1,40 @@
+Ext.define('school.view.basic.class.ClassDetailController', {
+    extend: 'school.view.core.form.FormPanelController',
+    alias: 'controller.classdetail',
+
+    onAfterSave: function(localJson) {
+        let me = this;
+
+        me.refresh(localJson.data.id);
+    },
+
+    refresh: function(id) {
+        let me = this,
+        view = me.getView();
+
+        school.util.BaseUtil.request({
+            url: view._readUrl + '/' + id
+        }).then(function(res) {
+            view.setLoading(false);
+            if(res.success) {
+                let d = res.data;
+                let o = {
+                    main: d.main
+                };
+                if(d.hasOwnProperty('items')) {
+                    o.detail0 = d.items;
+                }else {
+                    let idx = 1;
+                    while(d.hasOwnProperty('items' + idx)) {
+                        o['detail' + (idx - 1)] = d['items' + idx];
+                        idx++;
+                    }
+                }
+                view.initFormData(o);
+                view.fireEvent('load', classDetail, o);
+            }
+        }).catch(function(e) {
+            school.util.BaseUtil.showErrorToast('请求数据失败: ' + e.message);
+        });
+    }
+});

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

@@ -110,8 +110,13 @@ Ext.define('school.view.basic.class.ClassInfo', {
                         handler: 'onToggleTree'
                     }, {
                         xtype: 'tbtext',
+                        maxWidth: 200,
+                        style: {
+                            'overflow': 'hidden',
+                            'text-overflow': 'ellipsis'
+                        },
                         bind: {
-                            text: '{currentNodeData.text}'
+                            text: '{currentNodeData.pathText || currentNodeData.text}'
                         }
                     }, {
                         xtype: 'button',

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

@@ -56,7 +56,7 @@ Ext.define('school.view.basic.class.ListCard', {
             classDetail.setVisible(true);
             classDetail.setLoading(true);
             school.util.BaseUtil.request({
-                url: '/api/school/class/read/' + node.data._id
+                url: classDetail._readUrl + '/' + node.data._id
             }).then(function(res) {
                 classDetail.setLoading(false);
                 if(res.success) {
@@ -84,9 +84,20 @@ Ext.define('school.view.basic.class.ListCard', {
             listCard.setVisible(true);
             classDetail.setVisible(false);
 
-            list = node.childNodes.map(function(c) {
-                return c.data
-            });
+            if(node.data.type == 'GRADE') {
+                list = node.childNodes.map(function(c) {
+                    return Ext.Object.merge(c.data, {
+                        pathText: node.data.text + c.data.text
+                    })
+                });
+            }else {
+                node.data.pathText = node.data.text;
+                list = node.childNodes.map(function(c) {
+                    return Ext.Object.merge(c.data, {
+                        pathText: c.data.text
+                    })
+                });
+            }
 
             cardList = Ext.Array.merge(list, [{
                 addBtn: true,

+ 8 - 4
frontend/pc-web/app/view/basic/school/SchoolInfo.js

@@ -51,20 +51,23 @@ Ext.define('school.view.basic.school.SchoolInfo', {
                 bind: '{schoolName}',
                 fieldLabel: "学校名称",
                 allowBlank: false,
-                columnWidth: 1
+                columnWidth: 1,
+                maxLength: 100
             }, {
                 xtype: "textfield",
                 name: 'school_phone',
                 bind: '{schoolPhone}',
                 fieldLabel: '联系电话',
-                columnWidth: 1
+                columnWidth: 1,
+                maxLength: 50
             }, {
                 xtype: "textfield",
                 name: "school_address",
                 bind: '{schoolAddress}',
                 fieldLabel: "学校地址",
                 allowBlank: true,
-                columnWidth: 1
+                columnWidth: 1,
+                maxLength: 200
             }, {
                 xtype: 'combobox',
                 name: 'school_status',
@@ -104,7 +107,8 @@ Ext.define('school.view.basic.school.SchoolInfo', {
                 name: 'school_remarks',
                 bind: '{schoolRemarks}',
                 fieldLabel: '备注',
-                columnWidth: 1
+                columnWidth: 1,
+                maxLength: 250
             }]
         });
         this.callParent();

+ 147 - 0
frontend/pc-web/app/view/basic/subject/List.js

@@ -0,0 +1,147 @@
+/**
+ * 学科信息
+ */
+Ext.define('school.view.basic.subject.List', {
+    extend: 'school.view.core.base.BasePanel',
+    xtype: 'basic-subject-list',
+
+    // dataUrl: 'http://10.1.80.47:9560/subject/list',
+    dataUrl: '/api/school/subject/list',
+    _title: '学科信息',
+    caller: 'Subject',
+    pathKey: 'subject',
+    
+    controller: 'basic-subject-list',
+    viewModel: 'basic-subject-list',
+
+    initComponent: function() {
+        var me = this;
+        Ext.apply(this, {
+            searchField: [{
+                xtype: 'textfield',
+                name: 'subject_name',
+                fieldLabel: '名称'
+            }],
+        
+            gridConfig: {
+                addTitle: '学科信息',
+                addXtype: 'basic-subject-detail',
+                idField: 'subject_id',
+                codeField: null,
+                detailField: null,
+                dataUrl: me.dataUrl,
+                caller: null,
+                rootProperty: 'data.list',
+                totalProperty: 'data.total',
+                actionColumn: [],
+                selModel: {
+                    type: 'cellmodel'
+                },
+                hiddenTools: false,
+                toolBtns: [{
+                    xtype: 'button',
+                    text: '新增',
+                    handler: 'onAddClick'
+                }],
+                columns : [{
+                    text: 'id',
+                    dataIndex: 'subject_id',
+                    hidden: true
+                }, {
+                    text: '名称',
+                    dataIndex: 'subject_name',
+                    width: 150
+                }, {
+                    xtype:'actioncolumn',
+                    width:70,
+                    dataIndex:'actioncolumn',
+                    text:'操作',
+                    align: 'center',
+                    items: [{
+                        tooltip: '编辑',
+                        iconCls: 'x-fa fa-pencil fa-fw',
+                        scope:this,
+                        listeners: {
+                            click: function() {
+                                debugger;
+                            }
+                        }
+                    },{
+                        text:'删除',
+                        iconCls:'x-fa fa-trash-o fa-fw',
+                        tooltip: '删除',
+                        scope:this
+                    }],
+                    listeners: {
+                        click: 'onActionClick'
+                    }
+                }]
+            },
+        });
+        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;
+     },
+});

+ 185 - 0
frontend/pc-web/app/view/basic/subject/ListController.js

@@ -0,0 +1,185 @@
+Ext.define('school.view.basic.subject.ListController', {
+    extend: 'school.view.core.base.BasePanelController',
+    alias: 'controller.basic-subject-list',
+
+    onAddClick: function () {
+        let me = this,
+        view = me.getView(),
+        win = Ext.getCmp('subject-addwin');
+
+        if (!win) {
+            win = Ext.create('Ext.window.Window', {
+                title: '新增学科信息',
+                width: 300,
+                height: 180,
+                id: 'subject-addwin',
+                constrain: true,
+                modal: true,
+                bodyPadding: 10,
+                layout: 'fit',
+                items: [{
+                    xtype: 'form',
+                    layout: 'column',
+                    defaults: {
+                        columnWidth: 1
+                    },
+                    items: [{
+                        xtype: 'textfield',
+                        name: 'text',
+                        emptyText: '学科名称',
+                        allowBlank: false,
+                        maxLength: 20
+                    }],
+                    buttonAlign: 'center',
+                    buttons: [{
+                        text: '确定',
+                        formBind: true,
+                        handler: function () {
+                            let form = this.up('form');
+                            let text = form.getValues().text;
+                            let url, params, headers;
+                            
+                            params = JSON.stringify({
+                                subject_name: text
+                            });
+
+                            view.setLoading(true);
+                            school.util.BaseUtil.request({
+                                url: '/api/school/subject/save',
+                                method: 'POST',
+                                params: params,
+                                headers: headers
+                            }).then(function (res) {
+                                view.setLoading(false);
+                                win.close();
+                                school.util.BaseUtil.showSuccessToast('添加成功');
+                                view.refresh();
+                            }).catch(function (e) {
+                                view.setLoading(false);
+                                school.util.BaseUtil.showErrorToast('添加失败: ' + e.message);
+                            });
+                        }
+                    }]
+                }]
+            });
+            view.add(win);
+        }
+        win.show();
+    },
+
+    onActionClick: function(tableView, td, row, col, e, record, tr) {
+        let me = this;
+        let targetCls = event.target.classList;
+        if(targetCls.contains('fa-pencil')) {
+            me.modifyClick(record.data);
+        }else if(targetCls.contains('fa-trash-o')) {
+            me.onDeleteClick(record.data.subject_id);
+        }
+    },
+
+    modifyClick: function (data) {
+        let me = this,
+        view = me.getView(),
+        win = Ext.getCmp('subject-modifywin');
+
+        if (!win) {
+            win = Ext.create('Ext.window.Window', {
+                title: '修改学科信息',
+                width: 300,
+                height: 180,
+                id: 'subject-modifywin',
+                constrain: true,
+                modal: true,
+                bodyPadding: 10,
+                layout: 'fit',
+                items: [{
+                    xtype: 'form',
+                    layout: 'column',
+                    defaults: {
+                        columnWidth: 1
+                    },
+                    items: [{
+                        xtype: 'textfield',
+                        name: 'text',
+                        emptyText: '学科名称',
+                        allowBlank: false,
+                        maxLength: 20
+                    }],
+                    buttonAlign: 'center',
+                    buttons: [{
+                        text: '确定',
+                        formBind: true,
+                        handler: function () {
+                            let form = this.up('form');
+                            let text = form.getValues().text;
+                            let url, params, headers;
+                            
+                            params = JSON.stringify({
+                                subject_id: data.subject_id,
+                                subject_name: text
+                            });
+
+                            view.setLoading(true);
+                            school.util.BaseUtil.request({
+                                url: '/api/school/subject/save',
+                                method: 'POST',
+                                params: params,
+                                headers: headers
+                            }).then(function (res) {
+                                view.setLoading(false);
+                                win.close();
+                                school.util.BaseUtil.showSuccessToast('修改成功');
+                                view.refresh();
+                            }).catch(function (e) {
+                                view.setLoading(false);
+                                school.util.BaseUtil.showErrorToast('修改失败: ' + e.message);
+                            });
+                        }
+                    }]
+                }]
+            });
+            view.add(win);
+            win.down('form').getForm().findField('text').setValue(data.subject_name);
+        }
+        win.show();
+    },
+
+    onDeleteClick: function(id) {
+        let me = this,
+        view = me.getView(),
+        grid = view.down('grid'),
+        selectedRecords = grid.getSelection(),
+        data;
+
+        data = id ? [{
+            id: id
+        }] : selectedRecords.map(function(r) {
+            return {
+                id: r.get('subject_id')
+            };
+        });
+
+        if(data.length == 0) {
+            school.util.BaseUtil.showErrorToast('请先勾选需要删除的记录');
+            return;
+        }
+
+        grid.setLoading(true);
+        school.util.BaseUtil.request({
+            // url: 'http://10.1.80.47:9560/student/batchDelete',
+            url: '/api/school/subject/batchDelete',
+            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);
+        });
+    }
+
+});

+ 4 - 0
frontend/pc-web/app/view/basic/subject/ListViewModel.js

@@ -0,0 +1,4 @@
+Ext.define('school.view.basic.subject.ListViewModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.basic-subject-list',
+});

+ 21 - 5
frontend/pc-web/app/view/viewport/ViewportModel.js

@@ -39,19 +39,19 @@ Ext.define('school.view.viewport.ViewportModel', {
                 reader: {
                     transform: {
                         fn: function(data) {
-                            let schools = data.data.children;
-                            schools.map(function(s) {
+                            let grades = data.data.children;
+                            grades.map(function(s) {
                                 s._id = s.id;
-                                s.id = 'school-' + s.id;
+                                s.id = 'grade-' + s.id;
                                 let classes = s.children;
-                                classes.map(function(c) {
+                                let d = classes.map(function(c) {
                                     c._id = c.id;
                                     c.id = 'class-' + c.id;
                                     return c;
                                 });
                                 return s;
                             });
-                            return schools;
+                            return grades;
                         },
                         scope: this
                     }
@@ -62,6 +62,22 @@ Ext.define('school.view.viewport.ViewportModel', {
                 type: 'SCHOOL',
                 expanded: true
             },
+            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;
+                            return {
+                                grade_id: d._id,
+                                grade_name: d.text,
+                            }
+                        })
+                    });
+                    mainModel.set('grade_store', gradeStore);
+                }
+            }
         }
     }
 });

+ 2 - 1
frontend/pc-web/package.json

@@ -6,7 +6,8 @@
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
     "dev": "sencha app watch",
-    "build": "sencha app build --production"
+    "build": "sencha app build --production",
+    "cloud": "sencha app build --testing"
   },
   "keywords": [
     "saas"

BIN
frontend/pc-web/resources/images/auth-background.jpg


+ 19 - 15
frontend/pc-web/resources/json/navigation.json

@@ -17,22 +17,10 @@
         "id": "basic-student-studentlist",
         "text": "学生信息",
         "view": "basic-student-studentlist"
-    }]
-}, {
-    "text": "系统设置",
-    "iconCls": "x-ss ss-nav-setting",
-    "items": [{
-        "id": "setting-access-roleaccess",
-        "text": "角色授权",
-        "view": "setting-access-roleaccess"
     }, {
-        "id": "device-param",
-        "text": "设备参数",
-        "view": "device-param"
-    }, {
-        "id": "setting-operatelog-operatelog",
-        "text": "操作日志",
-        "view": "setting-operatelog-operatelog"
+        "id": "basic-subject-list",
+        "text": "学科信息",
+        "view": "basic-subject-list"
     }]
 }, {
     "text": "家校互动",
@@ -62,4 +50,20 @@
         "text": "出入校记录",
         "view": "interaction-access-list"
     }]
+}, {
+    "text": "系统设置",
+    "iconCls": "x-ss ss-nav-setting",
+    "items": [{
+        "id": "setting-access-roleaccess",
+        "text": "角色授权",
+        "view": "setting-access-roleaccess"
+    }, {
+        "id": "device-param",
+        "text": "设备参数",
+        "view": "device-param"
+    }, {
+        "id": "setting-operatelog-operatelog",
+        "text": "操作日志",
+        "view": "setting-operatelog-operatelog"
+    }]
 }]

+ 1 - 1
frontend/wechat-web/src/configs/router.config.js

@@ -118,7 +118,7 @@ class RouteConfig extends Component {
 
                         <Route path='/voteList' component={VoteListParent}/>{/*家长端投票列表*/}
                         <Route path='/voteListTab' component={VoteListTeacher}/>{/*教师端投票列表*/}
-                        <Route path="/voteDetail/:id/:role?" component={VoteDetailPage}/>{/*投票详情*/}
+                        <Route path="/voteDetail/:role/:id" component={VoteDetailPage}/>{/*投票详情*/}
 
                         {/*测试demo*/}
                         <Route path='/chartDemo' component={ChartDemo}/>{/*图表测试页面*/}

+ 1 - 1
frontend/wechat-web/src/modules/vote/VoteListParent.jsx

@@ -164,7 +164,7 @@ class VoteListParent extends Component {
             pageIndex: mPageIndex,
             itemIndex: index,
         })()
-        this.props.history.push('/voteDetail/' + voteId +'/parent')
+        this.props.history.push('/voteDetail/parent/' + voteId)
     }
 }
 

+ 1 - 1
frontend/wechat-web/src/modules/vote/VoteListTeacher.jsx

@@ -356,7 +356,7 @@ class VoteListTeacher extends Component {
 
     onItemClick = (index, voteId) => {
         this.saveListStatus(false, index)
-        this.props.history.push('/voteDetail/' + voteId+'/'+'teacher')
+        this.props.history.push('/voteDetail/teacher/' + voteId)
     }
 
     onAddVote = () => {