Selaa lähdekoodia

Merge remote-tracking branch 'origin/dev' into dev

heqinwei 7 vuotta sitten
vanhempi
commit
ebf94fcd62

+ 2 - 2
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -21,10 +21,10 @@ Ext.define('saas.view.core.form.FormPanel', {
     initId: 0,
     initId: 0,
     layout: 'column',
     layout: 'column',
     autoScroll: true,
     autoScroll: true,
-    bodyPadding: 5,
+    bodyPadding: 0,
 
 
     fieldDefaults: {
     fieldDefaults: {
-        margin: '0 0 5 0',
+        margin: '0 0 10 0',
         labelAlign: 'right',
         labelAlign: 'right',
         labelWidth: 90,
         labelWidth: 90,
         columnWidth: 0.25,
         columnWidth: 0.25,

+ 4 - 1
frontend/saas-web/app/view/core/form/FormPanel.scss

@@ -1,6 +1,9 @@
 .x-core-form {
 .x-core-form {
-    padding: 24px;
+    padding: 8px 12px 8px 12px;
 
 
+    .x-toolbar-default-docked-top{
+        padding: 6px 0 12px 8px;
+    }
     .x-tb {
     .x-tb {
         color: #A2A2A2;
         color: #A2A2A2;
         letter-spacing: 0.72px;
         letter-spacing: 0.72px;

+ 3 - 50
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -7,12 +7,11 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
     cls: 'x-detailgridfield',
     cls: 'x-detailgridfield',
 
 
     border: 1,
     border: 1,
-    margin: '0 0 5 0', // formpanel的fieldDefaults未生效
+    margin: '0 0 10 0', // formpanel的fieldDefaults未生效
     height: 245,
     height: 245,
     columnWidth : 1.0, 
     columnWidth : 1.0, 
 
 
     requires: [
     requires: [
-        'Ext.Action',
         'Ext.grid.plugin.CellEditing',
         'Ext.grid.plugin.CellEditing',
         'Ext.selection.CellModel'
         'Ext.selection.CellModel'
     ],
     ],
@@ -27,10 +26,6 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
     allowEmpty: false, // 表格为空时校验合法
     allowEmpty: false, // 表格为空时校验合法
     showCount: true, // 显示合计栏
     showCount: true, // 显示合计栏
 
 
-    // Clearing selection disables the Actions.
-    allowDeselect: true,
-    defaultActionType: 'button',
-
     initComponent: function() {
     initComponent: function() {
         var me = this;
         var me = this;
         me.initColumns();
         me.initColumns();
@@ -44,15 +39,6 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         };
         };
 
 
         Ext.apply(me, {
         Ext.apply(me, {
-            actions: {
-                copy: {
-                    iconCls: 'x-fa fa-copy',
-                    text: '复制单元格',
-                    handler: function() {
-                        me.onCopy(me.selectedData);
-                    }
-                }
-            },
             plugins: {
             plugins: {
                 cellediting: {
                 cellediting: {
                     clicksToEdit: 1,
                     clicksToEdit: 1,
@@ -65,15 +51,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
             },
             },
             normalViewConfig: {
             normalViewConfig: {
                 deferEmptyText: false,
                 deferEmptyText: false,
-                emptyText: '无数据',
-                listeners: {
-                    itemcontextmenu: function(view, rec, node, index, e) {
-                        e.stopEvent();
-                        me.getContextMenu().show().setLocalXY(e.getXY());
-                        me.selectedData = e.target.innerText;
-                        return false;
-                    }
-                }
+                emptyText: '无数据'
             },
             },
             lockedGridConfig: {
             lockedGridConfig: {
                 // scrollable: {
                 // scrollable: {
@@ -486,31 +464,6 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
             }
             }
         });
         });
         return trueData;
         return trueData;
-    },
-
-    getContextMenu: function() {
-        var me = this;
-
-        return me.contextMenu || (me.contextMenu = me.add({
-            xtype: 'menu',
-            items: [
-                // Actions can be converted into MenuItems
-                '@copy',
-            ]
-        }));
-    },
-
-    onCopy: function(text) {
-		var target = Ext.DomHelper.append(document.body, {
-			tag: 'textarea',
-			style: 'opacity: 0;position: absolute;top: -10000px;right: 0;',
-			html: text
-		});
-		target.focus();
-		target.select();
-	    document.execCommand('Copy');
-	    target.blur();
-	    document.body.removeChild(target);
-	},
+    }
 
 
 });
 });

+ 14 - 14
frontend/saas-web/app/view/core/form/field/Month.js

@@ -29,17 +29,23 @@ Ext.define('saas.view.core.form.field.Month', {
         if(isString(max)){
         if(isString(max)){
             me.maxValue = me.parseDate(max);
             me.maxValue = me.parseDate(max);
         }
         }
-        me.disabledDatesRE = null;
-        if(Ext.isEmpty(me.value)){
+     /*   if(Ext.isEmpty(me.value)){
             me.value=me.getCurrentVal();
             me.value=me.getCurrentVal();
-        }
+        }*/
         me.callParent();
         me.callParent();
     },
     },
+    listeners : {
+        afterrender: function (field) {
+            if(field.autoValue && Ext.isEmpty(field.value)){
+                field.setValue(field.getCurrentVal());
+            }
+        }
+    },
     createPicker: function() {
     createPicker: function() {
         var me = this,
         var me = this,
             picker = me.monthPicker,
             picker = me.monthPicker,
             format = Ext.String.format;
             format = Ext.String.format;
-       return me.monthPicker=picker=new Ext.picker.Month({
+        return me.monthPicker=picker=new Ext.picker.Month({
             id: me.id + '-picker',
             id: me.id + '-picker',
             pickerField: me,
             pickerField: me,
             floating: true,
             floating: true,
@@ -89,7 +95,7 @@ Ext.define('saas.view.core.form.field.Month', {
         me.onSelect();
         me.onSelect();
     },
     },
     getCurrentVal:function(){
     getCurrentVal:function(){
-        return Ext.Date.format(new Date(), this.format);
+        return Ext.Date.format(new Date(),this.format);
     },
     },
     onCancelClick: function() {
     onCancelClick: function() {
         this.onSelect();
         this.onSelect();
@@ -106,17 +112,11 @@ Ext.define('saas.view.core.form.field.Month', {
         }
         }
         return [month, year];
         return [month, year];
     },
     },
-    setValue: function (value) {
+    setValue : function(value) {
         if (Ext.isEmpty(value)) {
         if (Ext.isEmpty(value)) {
-            value =this.getCurrentVal();
-        }
-        var f = value.match(/^(\d{4})(\d{2})$/);
-        if(f) {
-            var d = f[1] + '-' + f[2];
-            value = Ext.Date.format(new Date(d), this.format);
+            value =me.getCurrentVal();
         }
         }
-        this.callParent([value]);
-        this.publishState('value', value);
+        this.callParent(arguments);
     },
     },
     onSelect: function() {
     onSelect: function() {
         this.monthPicker.hide();
         this.monthPicker.hide();

+ 3 - 2
frontend/saas-web/app/view/core/query/QueryFormPanel.js

@@ -4,13 +4,14 @@ Ext.define('saas.view.core.query.QueryFormPanel', {
 
 
     layout: 'column',
     layout: 'column',
     autoScroll: true,
     autoScroll: true,
-    bodyPadding: '16 10 0 10',
+    //padding: 8px 12px 8px 12px;//'16 10 0 10',
+    bodyPadding: '14 10 0 10',
     labelSeparator : ':',
     labelSeparator : ':',
 
 
     cls: 'x-queryform',
     cls: 'x-queryform',
 
 
     defaults:{
     defaults:{
-		margin: '0 5 5 0',
+        margin: '0 0 10 0',
         labelAlign: 'right',
         labelAlign: 'right',
         labelWidth: 90,
         labelWidth: 90,
         columnWidth: 0.25,
         columnWidth: 0.25,

+ 2 - 2
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -17,8 +17,8 @@ Ext.define('saas.view.core.query.QueryPanel', {
         xtype: 'core-query-queryformpanel',
         xtype: 'core-query-queryformpanel',
         width: '100%',
         width: '100%',
     }, {
     }, {
-        margin: '24 0 0 0',
-        padding: '24',
+        margin: '12 0 0 0',
+        padding: '8 12 8 12',// padding: 8px 12px 8px 12px;
         reference: 'querygrid',
         reference: 'querygrid',
         xtype: 'core-query-querygridpanel',
         xtype: 'core-query-querygridpanel',
         width: '100%',
         width: '100%',

+ 0 - 1
frontend/saas-web/app/view/core/query/QueryPanel.scss

@@ -30,7 +30,6 @@
                         .x-panel-bodyWrap {
                         .x-panel-bodyWrap {
 
 
                             .x-toolbar {
                             .x-toolbar {
-                                margin-bottom: 16px;
                                 border: none;
                                 border: none;
 
 
                                 .x-box-inner {
                                 .x-box-inner {

+ 14 - 1
frontend/saas-web/app/view/main/Main.scss

@@ -47,8 +47,10 @@ $treelist-nav-ui: (
 
 
         #main-tab-panel-body {
         #main-tab-panel-body {
             background: #EEF4F9;
             background: #EEF4F9;
+
         }
         }
     }
     }
+
 }
 }
 
 
 .main-logo-wrap {
 .main-logo-wrap {
@@ -82,7 +84,18 @@ $treelist-nav-ui: (
         }
         }
     }
     }
 }
 }
-
+/*.x-tab-bar-default-top > .x-tab-bar-body-default {
+    padding: 0px 4px 0 0px;
+}
+.x-tab-bar-default-top .x-box-scroller-tab-bar-default {
+    margin-top: -2px;
+}
+.x-tab-default-top{
+    padding: 12px 12px 12px 12px;
+}*/
+.x-keyboard-mode .x-tab-focus.x-tab-default {
+    outline: 0px;
+}
 .main-headerbar {
 .main-headerbar {
     padding: 0 30px 0 0;
     padding: 0 30px 0 0;
     position: fixed;
     position: fixed;

+ 1 - 1
frontend/saas-web/app/view/main/MainContainerWrap.js

@@ -29,7 +29,7 @@ Ext.define('saas.view.main.MainContainerWrap', {
             itemId: 'contentPanel',
             itemId: 'contentPanel',
             defaults: {
             defaults: {
                 closable: true,
                 closable: true,
-                margin: 20
+                margin: 16
             },
             },
             plugins: [new Ext.ux.TabCloseMenu({
             plugins: [new Ext.ux.TabCloseMenu({
                 closeTabText: '关闭当前页',
                 closeTabText: '关闭当前页',