Browse Source

系统设置界面样式调整

zhuth 6 years ago
parent
commit
4e9d347351

+ 2 - 2
src/components/admin/userGroupDetailBox.jsx

@@ -97,8 +97,8 @@ class DetailBox extends React.Component {
                                 rules: [
                                     { validator(rule, value, callback, source, options) {
                                         let msg;
-                                        if((value+'').length > 500) {
-                                            msg = '用户组描述不能大于500个字符'
+                                        if((value+'').length > 150) {
+                                            msg = '用户组描述不能大于150个字符'
                                         }
                                         me.setState({
                                             okButtonDisabled: !!msg

+ 1 - 1
src/components/admin/userManagement.less

@@ -42,7 +42,7 @@
                                 .ant-table-content {
                                     .ant-table-scroll {
                                         .ant-table-header {
-                                            margin-bottom: -20px !important;
+                                            margin-bottom: -10px !important;
                                         }
                                         .ant-table-body {
                                             overflow-x: hidden !important;

+ 5 - 4
src/components/authority/index.jsx

@@ -271,10 +271,11 @@ class DashBoardTree extends React.Component {
     }
 
     tableSize = () => {
-        const tableWrapper = document.getElementsByClassName('ant-table-wrapper')[0];
-        const content = tableWrapper.getElementsByClassName('ant-spin-nested-loading')[0];
-        const tableHeader = content.querySelector('thead');
-        const padding = content.getBoundingClientRect().top - tableWrapper.getBoundingClientRect().top;
+        const content = document.getElementsByClassName('content-setting')[0];
+        const tableWrapper = content.getElementsByClassName('ant-table-wrapper')[0];
+        const tableContent = tableWrapper.getElementsByClassName('ant-spin-nested-loading')[0];
+        const tableHeader = tableContent.querySelector('thead');
+        const padding = tableContent.getBoundingClientRect().top - tableWrapper.getBoundingClientRect().top;
         // 容器高度 - padding * 2 - 表头高度 - 边框线
         let tableScrollHeight = tableWrapper.offsetHeight - padding * 2 - tableHeader.offsetHeight - 2;
         this.setState({

+ 1 - 0
src/components/authority/index.less

@@ -81,6 +81,7 @@
         }
     }
     .ant-layout-content {
+        height: auto;
         margin: 12px;
         padding: 8px;
         background: #fafafa;

+ 3 - 3
src/components/chartDesigner/sections/style/bar.jsx

@@ -29,7 +29,7 @@ class BarStyle extends React.Component {
             <FormItem label={<Tooltip title="柱条的最大宽度,支持设置成绝对数值或相对于类目宽度的百分比">柱条最大宽度</Tooltip>} {...formItemLayout}>
                 <Input
                     defaultValue={barStyle.barMaxWidth ? barStyle.barMaxWidth : null}
-                    placeholder='80'
+                    placeholder='60'
                     onBlur={e => {
                         let value = e.target.value;
                         let fields = [{ name: 'styleConfig', value: deepAssign(styleConfig, { bar: { barMaxWidth: value } }) }];
@@ -37,7 +37,7 @@ class BarStyle extends React.Component {
                             let seriesArr = [];
                             for(let i = 0; i < chartOption.baseOption.series.length; i++) {
                                 seriesArr.push({
-                                    barMaxWidth: value || '80'
+                                    barMaxWidth: value || '60'
                                 });
                             }
                             fields.push({ name: 'chartOption', value: deepAssign(chartOption, { baseOption: { series: seriesArr } } ) });
@@ -55,7 +55,7 @@ class BarStyle extends React.Component {
                                 let seriesArr = [];
                                 for(let i = 0; i < chartOption.baseOption.series.length; i++) {
                                     seriesArr.push({
-                                        barMaxWidth: value || '80'
+                                        barMaxWidth: value || '60'
                                     });
                                 }
                                 fields.push({ name: 'chartOption', value: deepAssign(chartOption, { baseOption: { series: seriesArr } } ) });

+ 6 - 2
src/components/logs/logs.less

@@ -26,6 +26,7 @@
                             .btn-refresh {
                                 border: none;
                                 font-size: 18px;
+                                background: transparent;
                                 &:after {
                                     content: none;
                                 }
@@ -40,8 +41,11 @@
                 background: #FAFAFA;
                 padding: 12px;
                 border: 1px solid rgba(0, 0, 0, 0.1);
-                .ant-table-body {
-                    margin-top: 0;
+                .ant-table {
+                    padding-bottom: 40px;
+                    .ant-table-body {
+                        margin-top: 0;
+                    }
                 }
                 .ant-pagination {
                     margin: 9px 0;

+ 15 - 5
src/models/parseChartOption.js

@@ -61,8 +61,8 @@ function barOption(data, barConfig, themeConfig, styleConfig) {
     const { barMaxWidth, barMinHeight, barGap, stack, labelVisible, labelPosition, labelDistance,
         labelRotate, xNameLocation, xNameGap, xNameRotate, xLabelHiddenCover, xLabelRotate, dataZoomVisible,
         xLabelMargin, yNameLocation, yNameGap, yNameRotate, labelZeroVisible } = styleConfig;
-    let xTitle = xAxis?`${xAxis.column.label}${xAxis.granularity.value?'('+xAxis.granularity.label+')':''}`:null
-    let yTitle = yAxis?`${yAxis.column.label}${yAxis.gauge.value?'('+yAxis.gauge.label+')':''}`:null
+    let xTitle = xAxis?`${xAxis.column.label}`:null
+    let yTitle = yAxis?`${yAxis.column.label}`:null
     let legendVisible = !!groupBy && !!groupBy.key;
     data.serieses = data.serieses || [];
 
@@ -71,6 +71,16 @@ function barOption(data, barConfig, themeConfig, styleConfig) {
             trigger: "axis",
             axisPointer: {
                 type: "cross"
+            // },
+            // formatter: function (params, ticket, callback) {
+            //     var str = `${params[0].name}<br />`;
+            //     params.forEach((p) => {
+            //         const { marker, seriesName, value } = p;
+            //         if(value !== undefined) {
+            //             str += `${marker}${seriesName}: ${value}<br />`
+            //         }
+            //     });
+            //     return str;
             }
         },
         legend: {
@@ -114,10 +124,10 @@ function barOption(data, barConfig, themeConfig, styleConfig) {
         }],
         series: data.serieses.map(s => {
             return {
-                name: groupBy ? s.name : (yAxis.column.label || s.name),
+                name: !!groupBy && !!groupBy.key ? s.name : yAxis.column.label,
                 type: 'bar',
                 data: s.value.map(v => numberFormat(v)),
-                barMaxWidth: barMaxWidth || 80,
+                barMaxWidth: barMaxWidth || 60,
                 barMinHeight: barMinHeight || 0,
                 barGap: barGap || '30%',
                 stack: !!groupBy && !!groupBy.key && !!stack,
@@ -206,7 +216,7 @@ function lineOption(data, lineConfig, themeConfig, styleConfig) {
         }],
         series: data.serieses.map(s => {
             return {
-                name: groupBy ? s.name : (yAxis.column.label || s.name),
+                name: !!groupBy && !!groupBy.key ? s.name : yAxis.column.label,
                 type: 'line',
                 data: s.value.map(v => numberFormat(v)),
                 stack: !!groupBy && !!groupBy.key && !!stack,

+ 6 - 0
src/themes/default/base.less

@@ -170,12 +170,18 @@
     color: #cccccc;
 }
 
+// toast message
 .ant-message {
     .ant-message-notice-content {
         border: 1px solid @border-color-base;
     }
 }
 
+// 错误提示
+.ant-form-explain {
+    font-size: 12px;
+}
+
 
 // 滚动条
 *::-webkit-scrollbar {