Browse Source

报表布局最小高度为1

zhuth 6 years ago
parent
commit
4ae92a71c9

+ 1 - 1
src/components/dashboardDesigner/viewLayout.jsx

@@ -132,7 +132,7 @@ class ViewLayout extends React.PureComponent {
                 autoSize={true}
                 autoSize={true}
                 cols={12}
                 cols={12}
                 margin = {editMode ? [12, 12] : [12, 12]}
                 margin = {editMode ? [12, 12] : [12, 12]}
-                rowHeight = {50}
+                rowHeight = {40}
                 isDraggable={editMode && !editingKey}
                 isDraggable={editMode && !editingKey}
                 isResizable={editMode && !editingKey}
                 isResizable={editMode && !editingKey}
                 draggableHandle='.mover'
                 draggableHandle='.mover'

+ 15 - 5
src/components/dashboardDesigner/viewLayout.less

@@ -14,24 +14,33 @@
     }
     }
   }
   }
   .chartview {
   .chartview {
-    padding-top: 30px;
+    padding-top: 40px;
     z-index: 1;
     z-index: 1;
     border: 1px solid #CCCCCC;
     border: 1px solid #CCCCCC;
     background: white;
     background: white;
+    &:hover {
+      .chartview-toolbar {
+        .chart-tools {
+          display: block;
+        }
+      }
+    }
     .chartview-toolbar {
     .chartview-toolbar {
-      height: 30px;
-      margin-top: -30px;
+      height: 40px;
+      margin-top: -40px;
       display: flex;
       display: flex;
       padding: 0 10px;
       padding: 0 10px;
       justify-content: space-between;
       justify-content: space-between;
       .chart-title {
       .chart-title {
         font-size: 16px;
         font-size: 16px;
-        line-height: 2;
+        line-height: 40px;
         display: flex;
         display: flex;
         flex-wrap: nowrap;
         flex-wrap: nowrap;
       }
       }
       .chart-tools {
       .chart-tools {
+        display: none;
         font-size: 20px;
         font-size: 20px;
+        line-height: 40px;
         .anticon {
         .anticon {
           display: none;
           display: none;
           margin-left: 10px;
           margin-left: 10px;
@@ -43,6 +52,7 @@
       }
       }
     }
     }
     .chartview-content {
     .chartview-content {
+      overflow: hidden;
       .dashboard-table { // 表格
       .dashboard-table { // 表格
         height: 100%;
         height: 100%;
         .ant-spin-nested-loading {
         .ant-spin-nested-loading {
@@ -83,7 +93,7 @@
         padding-bottom: 10px;
         padding-bottom: 10px;
         height: 100%;
         height: 100%;
         .w-e-toolbar {
         .w-e-toolbar {
-          height: 30px;
+          height: 40px;
           background-color: white !important;
           background-color: white !important;
           position: absolute;
           position: absolute;
           top: 0;
           top: 0;

+ 1 - 1
src/models/dashboardDesigner.js

@@ -87,7 +87,7 @@ export default {
         originData: {
         originData: {
             code: null,
             code: null,
             name: '无标题',
             name: '无标题',
-            defaultLayout: { x: 0, y: 50, w: 12, h: 6, minW: 2, maxW: 12, minH: 4 },
+            defaultLayout: { x: 0, y: 50, w: 12, h: 6, minW: 2, maxW: 12, minH: 1 },
             items: [],
             items: [],
             chartCodes: [], // 报表包含的所有图表
             chartCodes: [], // 报表包含的所有图表
             description: '',
             description: '',