Ver Fonte

bug修复

zhuth há 7 anos atrás
pai
commit
86801afb1b

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

@@ -9,7 +9,7 @@ Ext.define('school.store.Class', {
 
     model: 'school.model.Grade',
 
-    autoLoad: true,
+    autoLoad: false,
     proxy: {
         type: 'ajax',
         url: '/api/school/mirror/findClazz',

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

@@ -9,7 +9,7 @@ Ext.define('school.store.Grade', {
 
     model: 'school.model.Grade',
 
-    autoLoad: true,
+    autoLoad: false,
     proxy: {
         type: 'ajax',
         url: '/api/school/mirror/findGrade',

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

@@ -7,7 +7,7 @@ Ext.define('school.store.Subject', {
     storeId: 'store_subject',
 
     model: 'school.model.Subject',
-    autoLoad: true,
+    autoLoad: false,
     proxy: {
         type: 'ajax',
         url: '/api/school/mirror/findSubject',

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

@@ -124,6 +124,15 @@ Ext.define('school.view.interaction.mailbox.List', {
                 }, {
                     text: '内容',
                     dataIndex: 'mailbox_context',
+                    xtype: 'widgetcolumn',
+                    tdCls: 'content-column',
+                    widget: {
+                        xtype: 'textareatrigger',
+                        winTitle: '内容',
+                        margin: '0',
+                        editable: false
+                    },
+
                     width: 300
                 }, {
                     xtype: 'datecolumn',
@@ -167,7 +176,7 @@ Ext.define('school.view.interaction.mailbox.List', {
                     align: 'center',
                     items: [{
                         tooltip: '回复',
-                        iconCls: 'x-fa fa-pencil fa-fw',
+                        iconCls: 'x-ss ss-reply fa-fw',
                         scope:this
                     }],
                     listeners: {

+ 7 - 0
frontend/pc-web/app/view/Interaction/mailbox/List.scss

@@ -0,0 +1,7 @@
+.content-column {
+    vertical-align: middle;
+
+    .x-form-trigger-wrap-default {
+        border: none;
+    }
+}

+ 31 - 0
frontend/pc-web/app/view/core/form/field/TextAreaTrigger.js

@@ -0,0 +1,31 @@
+Ext.define('school.view.core.form.field.TextAreaTrigger', {
+    extend: 'Ext.form.field.Text',
+    alias: 'widget.textareatrigger',
+
+    triggers: {
+        foo: {
+            cls: 'x-ss ss-detail',
+            weight: -2,
+            handler: function() {
+                var win = Ext.getCmp('textareatrigger-win');
+                if(!win) {
+                    win = Ext.create('Ext.window.Window', {
+                        title: this.winTitle || this.fieldLabel || '内容',
+                        width: 600,
+                        height: 280,
+                        layout: 'fit',
+                        items: [{
+                            xtype: 'form',
+                            layout: 'fit',
+                            items: [{
+                                xtype: 'textareafield',
+                                value: this.value
+                            }]
+                        }]
+                    });
+                }
+                win.show();
+            }
+        }
+    }
+});

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

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

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

@@ -39,18 +39,21 @@ Ext.define('school.view.viewport.ViewportModel', {
                 reader: {
                     transform: {
                         fn: function(data) {
-                            let grades = data.data.children;
-                            grades.map(function(s) {
-                                s._id = s.id;
-                                s.id = 'grade-' + s.id;
-                                let classes = s.children;
-                                let d = classes.map(function(c) {
-                                    c._id = c.id;
-                                    c.id = 'class-' + c.id;
-                                    return c;
+                            let grades = [];
+                            if(!!data.data) {
+                                grades = data.data.children || [];
+                                grades.map(function(s) {
+                                    s._id = s.id;
+                                    s.id = 'grade-' + s.id;
+                                    let classes = s.children;
+                                    let d = classes.map(function(c) {
+                                        c._id = c.id;
+                                        c.id = 'class-' + c.id;
+                                        return c;
+                                    });
+                                    return s;
                                 });
-                                return s;
-                            });
+                            }
                             return grades;
                         },
                         scope: this

BIN
frontend/pc-web/packages/font-school/resources/fonts/iconfont.eot


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
frontend/pc-web/packages/font-school/resources/fonts/iconfont.js


+ 6 - 0
frontend/pc-web/packages/font-school/resources/fonts/iconfont.svg

@@ -20,6 +20,9 @@ Created by iconfont
   />
     <missing-glyph />
     
+    <glyph glyph-name="detail" unicode="&#59657;" d="M792.064 719.8720000000001h-83.968v56.32h-75.264c-24.064 33.28-68.608 55.808-120.32 55.808s-96.256-22.528-120.32-55.808H316.416v-55.808H232.448c-61.952 0-112.128-50.176-112.128-112.128v-559.616c0-61.952 50.176-112.128 112.128-112.128h559.616c61.952 0 112.128 50.176 112.128 112.128V608.256c0 61.952-50.176 111.616-112.128 111.616z m-419.84 0h61.952c0 30.72 34.816 55.808 77.824 55.808s77.824-25.088 77.824-55.808h61.952v-112.128H372.224V719.8720000000001z m475.648-671.232c0-30.72-25.088-55.808-55.808-55.808H232.448c-30.72 0-55.808 25.088-55.808 55.808V608.256c0 30.72 25.088 55.808 55.808 55.808h83.968v-112.128h391.68V664.064h83.968c30.72 0 55.808-25.088 55.808-55.808v-559.616zM315.904 367.10400000000004h391.68c15.36 0 28.16 12.288 28.16 28.16 0 15.36-12.288 28.16-28.16 28.16H315.904c-15.36 0-28.16-12.288-28.16-28.16 0.512-15.36 12.8-28.16 28.16-28.16zM708.096 199.168H315.904c-15.36 0-28.16-12.288-28.16-28.16 0-15.36 12.288-28.16 28.16-28.16h391.68c15.36 0 28.16 12.288 28.16 28.16s-12.288 28.16-27.648 28.16zM708.096 311.29600000000005H315.904c-15.36 0-28.16-12.288-28.16-28.16s12.288-28.16 28.16-28.16h391.68c15.36 0 28.16 12.288 28.16 28.16s-12.288 28.16-27.648 28.16z"  horiz-adv-x="1024" />
+
+    
     <glyph glyph-name="nav-interaction" unicode="&#59653;" d="M512 896A512 512 0 1 1 1024 384 512.470805 512.470805 0 0 1 512 896z m0-988.689655A476.689655 476.689655 0 1 0 988.689655 384 477.16046 477.16046 0 0 0 512-92.68965500000002zM641.942069 572.321839H287.661609a61.204598 61.204598 0 0 1-58.144368-63.794023v-284.601379a61.204598 61.204598 0 0 1 58.144368-63.794023h30.131494v29.425287h-33.427126A27.777471 27.777471 0 0 0 258.942529 218.98298899999998V511.352644a29.66069 29.66069 0 0 0 25.423448 31.308505h361.107126a29.66069 29.66069 0 0 0 25.423449-31.308505v-292.134253A27.542069 27.542069 0 0 0 645.473103 189.79310299999997h-229.517241a14.594943 14.594943 0 0 1-8.945287-4.472643l-52.965518-60.262989a14.665563 14.665563 0 0 1 21.892414-19.538391l48.257472 54.142529h217.747126a61.44 61.44 0 0 1 58.37977 64.264828V508.527816a61.44 61.44 0 0 1-58.37977 63.794023zM342.03954 357.39954m-30.602299 0a30.602299 30.602299 0 1 1 61.204598 0 30.602299 30.602299 0 1 1-61.204598 0ZM587.79954 357.39954m-30.602299 0a30.602299 30.602299 0 1 1 61.204598 0 30.602299 30.602299 0 1 1-61.204598 0ZM464.91954 357.39954m-30.602299 0a30.602299 30.602299 0 1 1 61.204598 0 30.602299 30.602299 0 1 1-61.204598 0ZM736.102989 666.482759H381.822529a61.204598 61.204598 0 0 1-58.144368-63.794023v-16.242759H353.103448v19.067586a29.66069 29.66069 0 0 0 25.423449 31.308506h361.107126a29.66069 29.66069 0 0 0 25.423448-31.308506v-292.134253A27.542069 27.542069 0 0 0 739.634023 283.954023h-23.54023v-29.425287h19.538391a61.44 61.44 0 0 1 58.850575 63.55862V602.6887360000001a61.44 61.44 0 0 1-58.37977 63.794023z"  horiz-adv-x="1024" />
 
     
@@ -44,6 +47,9 @@ Created by iconfont
     <glyph glyph-name="add" unicode="&#59649;" d="M512 384m-512 0a512 512 0 1 1 1024 0 512 512 0 1 1-1024 0ZM585.142857 457.142857h219.428572v-146.285714H585.142857v-219.428572H438.857143V310.85714299999995H219.428571V457.142857h219.428572V676.571429h146.285714v-219.428572z"  horiz-adv-x="1024" />
 
     
+    <glyph glyph-name="reply" unicode="&#59664;" d="M511.3-29.799999999999955L408.8 137.29999999999995H192.2c-64.5 0-117 52.5-117 117V680.8c0 64.5 52.5 117 117 117h639.7c64.5 0 117-52.5 117-117v-426.4c0-64.5-52.5-117-117-117H621.4L511.3-29.799999999999955zM192.2 750.3c-38.3 0-69.5-31.2-69.5-69.5v-426.4c0-38.4 31.2-69.6 69.5-69.6h243.1l77.4-126.1 83.1 126.1h236c38.3 0 69.5 31.2 69.5 69.6V680.8c0 38.3-31.2 69.5-69.5 69.5H192.2zM292.1 460.9m-60 0a60 60 0 1 1 120 0 60 60 0 1 1-120 0ZM512 460.9m-60 0a60 60 0 1 1 120 0 60 60 0 1 1-120 0ZM731.9 460.9m-60 0a60 60 0 1 1 120 0 60 60 0 1 1-120 0Z"  horiz-adv-x="1024" />
+
+    
 
 
   </font>

BIN
frontend/pc-web/packages/font-school/resources/fonts/iconfont.ttf


BIN
frontend/pc-web/packages/font-school/resources/fonts/iconfont.woff


BIN
frontend/pc-web/packages/font-school/resources/fonts/iconfont.woff2


+ 8 - 0
frontend/pc-web/packages/font-school/sass/etc/icons.scss

@@ -1,3 +1,7 @@
+.ss-detail:before {
+  content: "\e909";
+}
+
 .ss-nav-interaction:before {
   content: "\e905";
 }
@@ -30,3 +34,7 @@
   content: "\e901";
 }
 
+.ss-reply:before {
+  content: "\e910";
+}
+

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 2
frontend/pc-web/packages/font-school/sass/src/all.scss


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff