Browse Source

Merge remote-tracking branch 'origin/dev'

zhuth 7 years ago
parent
commit
d0b2526e2e

+ 0 - 2
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/interceptor/AuthRestInterceptor.java

@@ -19,8 +19,6 @@ import java.util.Enumeration;
  * @author chenwei
  * @date 2019/2/18
  */
-@Component
-@Configuration
 public class AuthRestInterceptor extends HandlerInterceptorAdapter {
 
     private static final Logger logger = LoggerFactory.getLogger(AuthRestInterceptor.class);

+ 23 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/interceptor/InterceptorConfig.java

@@ -0,0 +1,23 @@
+package com.usoftchina.smartschool.school.interceptor;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+/**
+ * @author: guq
+ * @create: 2019-03-01 16:00
+ **/
+@Configuration
+public class InterceptorConfig implements WebMvcConfigurer {
+    @Bean
+    public AuthRestInterceptor authRestInterceptor() {
+        return new AuthRestInterceptor();
+    }
+
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        registry.addInterceptor(authRestInterceptor());
+    }
+}

+ 7 - 7
frontend/pc-web/app/model/Timetable.js

@@ -4,19 +4,19 @@
 Ext.define('school.model.Timetable', {
     extend: 'school.model.Base',
     fields: [{
-        name: 'mon', type: 'string'
+        name: 'mon', type: 'int'
     }, {
-        name: 'tues', type: 'string'
+        name: 'tues', type: 'int'
     }, {
-        name: 'wed', type: 'string'
+        name: 'wed', type: 'int'
     }, {
-        name: 'thur', type: 'string'
+        name: 'thur', type: 'int'
     }, {
-        name: 'fri', type: 'string'
+        name: 'fri', type: 'int'
     }, {
-        name: 'sat', type: 'string'
+        name: 'sat', type: 'int'
     }, {
-        name: 'sunday', type: 'string'
+        name: 'sunday', type: 'int'
     }, {
         name: 'startTime', type: 'string',
     }, {

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

@@ -5,8 +5,8 @@ Ext.define('school.view.interaction.homework.List', {
     extend: 'school.view.core.base.BasePanel',
     xtype: 'interaction-homework-list',
 
-    dataUrl: 'http://10.1.80.180:9520/api/school/homework/list',
-    // dataUrl: '/api/school/homework/list',
+    // dataUrl: 'http://10.1.80.180:9520/api/school/homework/list',
+    dataUrl: '/api/school/homework/list',
     _title: '作业发布',
 
     initComponent: function () {

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

@@ -5,8 +5,8 @@ Ext.define('school.view.interaction.notice.List', {
     extend: 'school.view.core.base.BasePanel',
     xtype: 'interaction-notice-list',
 
-    dataUrl: 'http://10.1.80.180:9520/api/school/notice/list',
-    // dataUrl: '/api/school/notice/list',
+    // dataUrl: 'http://10.1.80.180:9520/api/school/notice/list',
+    dataUrl: '/api/school/notice/list',
     _title: '学校通知',
 
     initComponent: function() {

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

@@ -7,10 +7,10 @@ Ext.define('school.view.interaction.timetable.Detail', {
     _title: '课程表',
     _idField: 'id',
     _codeField: null,
-    _readUrl: 'http://10.1.80.47:9520/api/school/curriculum/read',
-    // _readUrl: '/api/school/curriculum/read',
-    _saveUrl: 'http://10.1.80.47:9520/api/school/curriculum/save',
-    // _saveUrl: '/api/school/curriculum/save',
+    // _readUrl: 'http://10.1.80.47:9520/api/school/curriculum/read',
+    _readUrl: '/api/school/curriculum/read',
+    // _saveUrl: 'http://10.1.80.47:9520/api/school/curriculum/save',
+    _saveUrl: '/api/school/curriculum/save',
     _deleteUrl: '/api/school/curriculum/delete',
     initId: 0,
     cls: 'timetable',

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

@@ -7,7 +7,7 @@ Ext.define('school.view.interaction.timetable.List', {
 
     controller: 'interaction-timetable-list',
 
-    // dataUrl: 'http://10.1.80.36:9520/api/school/curriculum/list',
+    // dataUrl: 'http://10.1.80.47:9520/api/school/curriculum/list',
     dataUrl: '/api/school/curriculum/list',
     _title: '课程表',
     caller: 'Curriculum',

+ 22 - 18
frontend/pc-web/app/view/core/form/FormPanelController.js

@@ -13,24 +13,28 @@ Ext.define('school.view.core.form.FormPanelController', {
     },
 
     refresh: function() {
-        var me = this,
-        form = me.getView(),
-        xtype = form.xtype,
-        _config = {
-            initId: form.initId,
-        },
-        currentTab = school.util.BaseUtil.getCurrentTab();
-        
-        var view = {
-            _config: _config,
-            xtype: xtype
-        };
-        Ext.apply(view, _config);
-        
-        Ext.suspendLayouts();
-        currentTab.removeAll();
-        currentTab.add(view);
-        Ext.resumeLayouts(true);
+        try {
+            var me = this,
+            form = me.getView(),
+            xtype = form.xtype,
+            _config = {
+                initId: form.initId,
+            },
+            currentTab = school.util.BaseUtil.getCurrentTab();
+            
+            var view = {
+                _config: _config,
+                xtype: xtype
+            };
+            Ext.apply(view, _config);
+            
+            Ext.suspendLayouts();
+            currentTab.removeAll();
+            currentTab.add(view);
+            Ext.resumeLayouts(true);
+        }catch(e) {
+            console.error(e);
+        }
     },
 
     add: function(){

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

@@ -15,9 +15,9 @@ Ext.define('school.view.core.grid.column.SubjectColumn', {
 
         if(idx != -1) {
             let subject = store.getAt(idx);
-            v = subject.get('subject_name');
+            return subject.get('subject_name');
+        }else {
+            return null
         }
-
-        return v;
     }
 });