@@ -391,6 +391,12 @@ class TableModel extends React.Component {
$el.stop();
}
+ componentWillReceiveProps(nextProps) {
+ this.setState({
+ columns: nextProps.columns,
+ data: nextProps.data
+ });
+ }
getBodyWrapper(body) {
return (
<Animate transitionName="fade" component="tbody" className={body.props.className}
@@ -1,7 +1,6 @@
import React from 'react';
import Container from '../../app/component/Layout.js';
import Title from '../../src/Title/Title.jsx';
-import Charts from '../../src/Charts/ECharts.js';
import DateFormatter from '../utils/DateTimeUtils.js';
// 模拟动态数据
@@ -51,7 +51,7 @@
width: 100%;
.react-grid-layout {
- background: #eee;
+ background: #2f2e2c;
.layoutJSON {
background: #ddd;
@@ -75,7 +75,7 @@
opacity: 0.9;
.react-grid-item.static {
- background: #cce;
.react-grid-item .text {
font-size: 24px;
@@ -23,8 +23,6 @@
},
"legend": {
"right": "3%",
- "orient": "vertical",
- "show": true,
"data": [
{"name": "直通率"},
{"name": "收益率"}
@@ -105,9 +103,7 @@
- "top": "12%",
{"name": "投入"},
{"name": "产出"}
@@ -19,8 +19,6 @@
@@ -101,9 +99,7 @@
@@ -0,0 +1,34 @@
+[{
+ "key": "1",
+ "time": "下午",
+ "inplan": 400,
+ "trs": 120,
+ "ccs": 98,
+ "cys": 62,
+ "dcl": "75.2%",
+ "ztl": "23.3%",
+ "syl": "45.4%",
+ "desc": "不好"
+},{
+ "key": "2",
+ "time": "上午",
+ "inplan": 199,
+ "trs": 48,
+ "ccs": 188,
+ "cys": 9,
+ "ztl": "50.3%",
+ "syl": "73.4%",
+ "desc": "良好"
+ "key": "3",
+ "inplan": 250,
+ "trs": 77,
+ "ccs": 122,
+ "dcl": "78.2%",
+}]
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import RenderUtils from '../../app/utils/RenderUtils.js';
// 导入echarts
import ReactEcharts from 'echarts-for-react';
-import './dark.js';
+import {dark} from './Theme/Theme.js';
export class ReactEchart extends React.Component {
constructor(props) {
@@ -0,0 +1,3 @@
+import dark from './dark.js';
+
+export {dark};
@@ -39,7 +39,7 @@
splitLine: {
lineStyle: {
- type: 'dashed',
+ type: 'solid',
color: '#aaa'
@@ -44,7 +44,7 @@ export default class Title extends React.Component {
if (renders[title]) {
tel = renders[title](this.props.state);
}else {
- tel = title;
+ tel = <div style={{height: 55, color: 'white', textAlign: 'center'}}>{title}</div>;
if (tel) {
return tel;