Browse Source

【看板展示】【分模块打包、文件结构调整】

zhuth 8 years ago
parent
commit
db4c3486d0
53 changed files with 77 additions and 9480 deletions
  1. 3 1
      kanban-client/.gitignore
  2. 0 0
      kanban-client/app/assets/FixedBox/index.css
  3. 0 0
      kanban-client/app/assets/FixedBox/index.less
  4. 0 0
      kanban-client/app/assets/Form/index.css
  5. 0 0
      kanban-client/app/assets/Form/index.less
  6. 0 0
      kanban-client/app/assets/Table/animation.css
  7. 0 0
      kanban-client/app/assets/Table/animation.less
  8. 0 0
      kanban-client/app/assets/Table/index.css
  9. 0 0
      kanban-client/app/assets/Table/index.less
  10. 0 0
      kanban-client/app/assets/Table/motion.css
  11. 0 0
      kanban-client/app/assets/Table/motion.less
  12. 0 0
      kanban-client/app/assets/Title/index.css
  13. 0 0
      kanban-client/app/assets/Title/index.less
  14. 0 0
      kanban-client/app/assets/images/log.png
  15. 5 5
      kanban-client/app/component/Layout.js
  16. 3 3
      kanban-client/app/component/Table.jsx
  17. 8 8
      kanban-client/app/component/factory.js
  18. 0 248
      kanban-client/app/data/BoardConfig.json
  19. 0 240
      kanban-client/app/data/BoardConfig2.json
  20. 0 307
      kanban-client/app/data/BoardConfig3.json
  21. 0 289
      kanban-client/app/data/BoardConfig4.json
  22. 0 6
      kanban-client/app/data/RefreshData.json
  23. 1 1
      kanban-client/app/src/Charts/ECharts.js
  24. 0 0
      kanban-client/app/src/Charts/Theme/Theme.js
  25. 0 0
      kanban-client/app/src/Charts/Theme/dark.js
  26. 1 1
      kanban-client/app/src/FixedBox/FixedBox.jsx
  27. 1 1
      kanban-client/app/src/Form/Form.jsx
  28. 0 1
      kanban-client/app/src/Form/FormItem.jsx
  29. 0 0
      kanban-client/app/src/Form/index.js
  30. 0 0
      kanban-client/app/src/Table/Column.jsx
  31. 0 0
      kanban-client/app/src/Table/ColumnGroup.jsx
  32. 0 0
      kanban-client/app/src/Table/ColumnManager.js
  33. 0 0
      kanban-client/app/src/Table/ExpandIcon.jsx
  34. 0 0
      kanban-client/app/src/Table/Table.jsx
  35. 0 0
      kanban-client/app/src/Table/TableCell.jsx
  36. 0 0
      kanban-client/app/src/Table/TableHeader.jsx
  37. 0 0
      kanban-client/app/src/Table/TableRow.jsx
  38. 0 0
      kanban-client/app/src/Table/createStore.js
  39. 0 0
      kanban-client/app/src/Table/index.js
  40. 0 0
      kanban-client/app/src/Table/utils.js
  41. 1 1
      kanban-client/app/src/Title/Title.jsx
  42. 1 1
      kanban-client/app/utils/RenderUtils.js
  43. 0 7916
      kanban-client/build/bundle.js
  44. 1 1
      kanban-client/build/index.html
  45. 0 175
      kanban-client/build/lib/echarts-for-react/lib/core.js
  46. 0 39
      kanban-client/build/lib/echarts-for-react/lib/index.js
  47. 0 0
      kanban-client/build/lib/my_echarts.min.js
  48. 1 1
      kanban-client/package.json
  49. 0 56
      kanban-client/src/Charts/Bar.jsx
  50. 0 39
      kanban-client/src/Charts/G2.js
  51. 0 56
      kanban-client/src/Charts/Line.jsx
  52. 0 56
      kanban-client/src/Charts/Pie.jsx
  53. 51 28
      kanban-client/webpack.config.js

+ 3 - 1
kanban-client/.gitignore

@@ -1 +1,3 @@
-node_modules/
+node_modules/
+*.bundle.js
+data/

+ 0 - 0
kanban-client/assets/FixedBox/index.css → kanban-client/app/assets/FixedBox/index.css


+ 0 - 0
kanban-client/assets/FixedBox/index.less → kanban-client/app/assets/FixedBox/index.less


+ 0 - 0
kanban-client/assets/Form/index.css → kanban-client/app/assets/Form/index.css


+ 0 - 0
kanban-client/assets/Form/index.less → kanban-client/app/assets/Form/index.less


+ 0 - 0
kanban-client/assets/Table/animation.css → kanban-client/app/assets/Table/animation.css


+ 0 - 0
kanban-client/assets/Table/animation.less → kanban-client/app/assets/Table/animation.less


+ 0 - 0
kanban-client/assets/Table/index.css → kanban-client/app/assets/Table/index.css


+ 0 - 0
kanban-client/assets/Table/index.less → kanban-client/app/assets/Table/index.less


+ 0 - 0
kanban-client/assets/Table/motion.css → kanban-client/app/assets/Table/motion.css


+ 0 - 0
kanban-client/assets/Table/motion.less → kanban-client/app/assets/Table/motion.less


+ 0 - 0
kanban-client/assets/Title/index.css → kanban-client/app/assets/Title/index.css


+ 0 - 0
kanban-client/assets/Title/index.less → kanban-client/app/assets/Title/index.less


+ 0 - 0
kanban-client/assets/images/log.png → kanban-client/app/assets/images/log.png


+ 5 - 5
kanban-client/app/component/Layout.js

@@ -4,11 +4,11 @@ import {WidthProvider} from 'react-grid-layout';
 var ReactGridLayout = WidthProvider(require('react-grid-layout'));
 import '../css/layoutStyle.css';
 
-import Title from '../../src/Title/Title.jsx';
-import Form from '../../src/Form/index.js';
-import Table from '../../app/component/Table.jsx';
-import Charts from '../../src/Charts/ECharts.js';
-import '../../app/css/form.less';
+import Title from '../src/Title/Title.jsx';
+import Form from '../src/Form/index.js';
+import Table from './Table.jsx';
+import Charts from '../src/Charts/ECharts.js';
+import '../css/form.less';
 
 
 class BasicLayout extends React.Component {

+ 3 - 3
kanban-client/app/component/Table.jsx

@@ -1,10 +1,10 @@
 import React from 'react';
 import ReactDOM from 'react-dom';
-import Table from '../../src/Table/index.js';
+import Table from '../src/Table/index.js';
 import Animate from 'rc-animate';
 import renders from '../utils/RenderUtils.js';
-import '../../assets/Table/index.less';
-import '../../assets/Table/animation.less';
+import '../assets/Table/index.less';
+import '../assets/Table/animation.less';
 
 
 class TableModel extends React.Component {

+ 8 - 8
kanban-client/app/component/factory.js

@@ -1,9 +1,9 @@
 import React from 'react';
-import Container from '../../app/component/Layout.js';
-import Title from '../../src/Title/Title.jsx';
-import FixedBox from '../../src/FixedBox/FixedBox.jsx';
+import Container from './Layout.js';
+import Title from '../src/Title/Title.jsx';
+import FixedBox from '../src/FixedBox/FixedBox.jsx';
 import DateFormatter from '../utils/DateTimeUtils.js';
-import {converter} from '../component/converter.js';
+import {converter} from './converter.js';
 import RenderUtils from '../utils/RenderUtils.js';
 import URL from '../constants/url.json';
 
@@ -93,10 +93,10 @@ class Factory extends React.Component {
 
     componentWillMount() {
         let {code} = this.props;
-        this.getModelConfig(code[0]);
-        // this.setState({
-        //         model: converter(tempdata.data[0]),
-        //     });
+        // this.getModelConfig(code[0]);
+        this.setState({
+                model: converter(tempdata.data[0]),
+            });
     }
 
     componentDidMount() {

+ 0 - 248
kanban-client/app/data/BoardConfig.json

@@ -1,248 +0,0 @@
-[{
-    "type": "charts",
-    "config": {
-        "option": {
-            "title": {
-                "text": "直通率1",
-                "subtext": "First Pass Yield(FPY)",
-                "textAlign": "center",
-                "left": "50%",
-                "right": "50%",
-                "itemGap": 0,
-                "padding": 0
-            },
-            "grid": {
-                "show": true,
-                "top": "20%"
-            },
-            "tooltip": {
-                "trigger": "axis",
-                "axisPointer": {
-                    "type": "line"
-                }
-            },
-            "legend": {
-                "right": "3%",
-                "data": [
-                    {"name": "直通率"}, 
-                    {"name": "收益率"}
-                ]
-            },
-            "xAxis": [{
-                "type": "category",
-                "data": ["08:00~08:59", "09:00~09:59", "10:00~10:59", "11:00~11:59"],
-                "fetch": "xaixsFetch",
-                "axisLine": {
-                    "lineStyle": {
-                        "color": "white"
-                    }
-                }
-            }],
-            "yAxis": [{
-                "type": "value",
-                "min": 0,
-                "max": 1,
-                "axisLabel": {
-                    "formatter": "perRender"
-                },
-                "axisLine": {
-                    "lineStyle": {
-                        "color": "white"
-                    }
-                }
-            }],
-            "series": [{
-                "type": "line",
-                "name": "直通率",
-                "label": {
-                    "normal": {
-                        "show": true,
-                        "position": "inside",
-                        "formatter": "{c}"
-                    }
-                },
-                "data":[0.938, 1, 1],
-                "fetch": "ztlbhFetch"
-            },{
-                "type": "line",
-                "name": "收益率",
-                "label": {
-                    "normal": {
-                        "show": true,
-                        "position": "inside",
-                        "formatter": "{c}"
-                    }
-                },
-                "data":[0.913, 0.986, 0.929, 1],
-                "fetch": "ztlbhFetch"
-            }]
-        }
-    },
-    "layout": {
-        "x": 0, "y": 5, "w": 7, "h": 5
-    }
-},{
-    "type": "charts",
-    "config": {
-        "option": {
-          "title":{
-            "show": true,
-            "text": "投入/产出柱状图",
-            "subtext": "Input/outPut Histogram",
-            "textAlign": "center",
-            "left": "50%",
-            "right": "50%",
-            "itemGap": 0,
-            "padding": 0
-          },
-          "color": ["#6395EC", "#FFFE03"],
-          "tooltip" : {
-              "trigger": "axis",
-              "axisPointer" : {            
-                  "type" : "shadow"       
-              }
-          },
-          "legend": {
-            "right": "3%",
-            "data": [
-              {"name": "投入"},
-              {"name": "产出"}
-            ]
-          },
-          "xAxis" : [
-            {
-                "type": "category",
-                "data": [
-                    "08:00~08:59",
-                    "09:00~09:59",
-                    "10:00~10:59"
-                ],
-                "axisTick": {
-                    "alignWithLabel": true
-                },
-                "axisLine": {
-                    "lineStyle": {
-                        "color": "white"
-                    }
-                }
-            }
-        ],
-        "yAxis" : [
-              {
-                  "type" : "value",
-                  "axisLine": {
-                      "lineStyle": {
-                          "color": "white"
-                      }
-                  }
-              }
-          ],
-          "series" : [
-              {
-                  "name":"投入",
-                  "type":"bar",
-                  "label": {
-                    "normal": {
-                      "show": true,
-                      "position": "top",
-                      "formatter": "{c}",
-                      "textStyle": {
-                        "color": "white"
-                      }
-                    }
-                  },
-                  "data":[64,87,12]
-              },
-                {
-                  "name":"产出",
-                  "type":"bar",
-                  "label": {
-                    "normal": {
-                      "show": true,
-                      "position": "top",
-                      "formatter": "{c}",
-                      "textStyle": {
-                        "color": "white"
-                      }
-                    }
-                  },
-                  "barGap": 0,
-                  "data":[32,71,11]
-              }
-          ]
-      }
-    },
-    "layout": {
-        "x": 0, "y": 0, "w": 7, "h": 5 
-    }
-},{
-    "type": "charts",
-    "config": {
-        "option": {
-            "title": {
-                "text": "前五大不良代码",
-                "subtext": "Top 5 Error code",
-                "textAlign": "center",
-                "top": "5",
-                "left": "50%",
-                "right": "50%",
-                "itemGap": 0,
-                "padding": 0
-            },
-            "tooltip" : {
-                "trigger": "item",
-                "formatter": "{a} <br/>{b} : {c} ({d}%)"
-            },
-            "legend": {
-                "bottom": "5%",
-                "data": [
-                    {"name": "亮块"},
-                    {"name": "黑屏亮点"},
-                    {"name": "LED灯不亮"},
-                    {"name": "自动对齐"},
-                    {"name": "图像图异"},
-                    {"name": "其他"}
-                ]
-            },
-            "series": [{
-                "type": "pie",
-                "name": "不良代码",
-                "radius" : "30%",
-                "label": {
-                    "normal": {
-                        "formatter": "{b} \n {d}%"
-                    }
-                },
-                "data":[
-                    {"value": 34, "name":"亮块"},
-                    {"value": 27, "name":"黑屏亮点"},
-                    {"value": 45, "name":"LED灯不亮"},
-                    {"value": 13, "name":"自动对齐"},
-                    {"value": 39, "name":"图像图异"},
-                    {"value": 2, "name":"其他"}
-                ]
-            }]
-        }
-    },
-    "layout": {
-        "x": 7, "y": 3, "w": 3, "h": 7 
-    }
-},{
-    "type": "form",
-    "config": {
-        "key": "form",
-        "header": "当天投入/产出统计1",
-        "valueStyle": {
-            "color": "red"
-        },
-        "columns": 1,
-        "data": [
-            {"field": "总投入", "value": "163"},
-            {"field": "总产出", "value": "114"},
-            {"field": "不良数", "value": {"text": 7, "style": {"color": "blue"}}}
-        ]
-    },
-    "layout": {
-        "x": 7, "y": 0, "w": 3, "h": 3 
-    }
-}]

+ 0 - 240
kanban-client/app/data/BoardConfig2.json

@@ -1,240 +0,0 @@
-[{
-    "type": "charts",
-    "config": {
-        "option": {
-            "title": {
-                "text": "直通率2",
-                "subtext": "First Pass Yield(FPY)",
-                "textAlign": "center",
-                "left": "50%",
-                "right": "50%",
-                "itemGap": 0,
-                "padding": 0
-            },
-            "tooltip": {
-                "trigger": "axis",
-                "axisPointer": {
-                    "type": "line"
-                }
-            },
-            "legend": {
-                "right": "3%",
-                "data": [
-                    {"name": "直通率"}, 
-                    {"name": "收益率"}
-                ]
-            },
-            "xAxis": [{
-                "type": "category",
-                "data": ["12:00~12:59", "13:00~13:59", "14:00~14:59", "15:00~15:59"],
-                "fetch": "xaixsFetch",
-                "axisLine": {
-                    "lineStyle": {
-                        "color": "white"
-                    }
-                }
-            }],
-            "yAxis": [{
-                "type": "value",
-                "min": 0,
-                "max": 1,
-                "axisLabel": {
-                    "formatter": "perRender"
-                },
-                "axisLine": {
-                    "lineStyle": {
-                        "color": "white"
-                    }
-                }
-            }],
-            "series": [{
-                "type": "line",
-                "name": "直通率",
-                "label": {
-                    "normal": {
-                        "show": true,
-                        "position": "inside",
-                        "formatter": "{c}"
-                    }
-                },
-                "data":[0.738, 1, 0.564, 0.900],
-                "fetch": "ztlbhFetch"
-            },{
-                "type": "line",
-                "name": "收益率",
-                "label": {
-                    "normal": {
-                        "show": true,
-                        "position": "inside",
-                        "formatter": "{c}"
-                    }
-                },
-                "data":[0.683, 0.965, 0.789, 0.911],
-                "fetch": "ztlbhFetch"
-            }]
-        }
-    },
-    "layout": {
-        "x": 0, "y": 5, "w": 7, "h": 5
-    }
-},{
-    "type": "charts",
-    "config": {
-        "option": {
-          "title":{
-            "show": true,
-            "text": "投入/产出柱状图",
-            "subtext": "Input/outPut Histogram",
-            "textAlign": "center",
-            "left": "50%",
-            "right": "50%",
-            "itemGap": 0,
-            "padding": 0
-          },
-          "color": ["#6395EC", "#FFFE03"],
-          "tooltip" : {
-              "trigger": "axis",
-              "axisPointer" : {            
-                  "type" : "shadow"       
-              }
-          },
-          "legend": {
-            "right": "3%",
-            "data": [
-              {"name": "投入"},
-              {"name": "产出"}
-            ]
-          },
-          "xAxis" : [
-              {
-                  "type" : "category",
-                  "data" : ["11:00~11:59", "12:00~12:59", "13:00~13:59"],
-                  "axisTick": {
-                      "alignWithLabel": true
-                  },
-                  "axisLine": {
-                    "lineStyle": {
-                        "color": "white"
-                    }
-                }
-              }
-          ],
-          "yAxis" : [
-              {
-                  "type" : "value",
-                  "axisLine": {
-                    "lineStyle": {
-                        "color": "white"
-                    }
-                }
-              }
-          ],
-          "series" : [
-              {
-                  "name":"投入",
-                  "type":"bar",
-                  "label": {
-                    "normal": {
-                      "show": true,
-                      "position": "top",
-                      "formatter": "{c}",
-                      "textStyle": {
-                        "color": "white"
-                      }
-                    }
-                  },
-                  "data":[78,69,44]
-              },
-                {
-                  "name":"产出",
-                  "type":"bar",
-                  "label": {
-                    "normal": {
-                      "show": true,
-                      "position": "top",
-                      "formatter": "{c}",
-                      "textStyle": {
-                        "color": "white"
-                      }
-                    }
-                  },
-                  "barGap": 0,
-                  "data":[34,50,22]
-              }
-          ]
-      }
-    },
-    "layout": {
-        "x": 0, "y": 0, "w": 7, "h": 5 
-    }
-},{
-    "type": "charts",
-    "config": {
-        "option": {
-            "title": {
-                "text": "前五大不良代码",
-                "subtext": "Top 5 Error code",
-                "textAlign": "center",
-                "top": "5",
-                "left": "50%",
-                "right": "50%",
-                "itemGap": 0,
-                "padding": 0
-            },
-            "tooltip" : {
-                "trigger": "item",
-                "formatter": "{a} <br/>{b} : {c} ({d}%)"
-            },
-            "legend": {
-                "bottom": "5%",
-                "data": [
-                    {"name": "亮块"},
-                    {"name": "黑屏亮点"},
-                    {"name": "LED灯不亮"},
-                    {"name": "自动对齐"},
-                    {"name": "图像图异"},
-                    {"name": "其他"}
-                ]
-            },
-            "series": [{
-                "type": "pie",
-                "name": "不良代码",
-                "radius" : "30%",
-                "label": {
-                    "normal": {
-                        "formatter": "{b} \n {d}%"
-                    }
-                },
-                "data":[
-                    {"value": 29, "name":"亮块"},
-                    {"value": 17, "name":"黑屏亮点"},
-                    {"value": 48, "name":"LED灯不亮"},
-                    {"value": 22, "name":"自动对齐"},
-                    {"value": 36, "name":"图像图异"},
-                    {"value": 5, "name":"其他"}
-                ]
-            }]
-        }
-    },
-    "layout": {
-        "x": 7, "y": 3, "w": 3, "h": 7 
-    }
-},{
-    "type": "form",
-    "config": {
-        "key": "form",
-        "header": "当天投入/产出统计",
-        "valueStyle": {
-            "color": "red"
-        },
-        "columns": 1,
-        "data": [
-            {"field": "总投入", "value": "100"},
-            {"field": "总产出", "value": "100"},
-            {"field": "不良数", "value": 12}
-        ]
-    },
-    "layout": {
-        "x": 7, "y": 0, "w": 3, "h": 3 
-    }
-}]

+ 0 - 307
kanban-client/app/data/BoardConfig3.json

@@ -1,307 +0,0 @@
-{
-    "title": {
-        "config": {
-            "render": "titleRender",
-            "state": {},
-            "cls": "",
-            "style": {},
-            "width": "",
-            "height": 55
-        }
-    },
-    "content": {
-        "items": [{
-            "type": "charts",
-            "config": {
-                "option": {
-                    "graphic": [{
-                        "type": "group",
-                        "rotation": "0.1",
-                        "left": "10%",
-                        "top": "center",
-                        "children": [{
-                            "type": "rect",
-                            "z": 100,
-                            "left": "center",
-                            "top": "middle",
-                            "shape": {
-                                "width": 190,
-                                "height": 90
-                            },
-                            "style": {
-                                "fill": "#fff",
-                                "stroke": "#555",
-                                "lineWidth": 2,
-                                "shadowBlur": 8,
-                                "shadowOffsetX": 3,
-                                "shadowOffsetY": 3,
-                                "shadowColor": "rgba(0,0,0,0.3)"
-                            }
-                        },{
-                            "type": "text",
-                            "z": 100,
-                            "left": "center",
-                            "top": "middle",
-                            "style": {
-                                "fill": "#333",
-                                "text": "这也是一个浮动标签\n这也是一个浮动标签\n这也是一个浮动标签",
-                                "font": "14px Microsoft YaHei"
-                            }
-                        }]
-                    }],
-                    "title": {
-                        "text": "直通率1",
-                        "subtext": "First Pass Yield(FPY)",
-                        "textAlign": "center",
-                        "left": "50%",
-                        "right": "50%",
-                        "itemGap": 0,
-                        "padding": 0
-                    },
-                    "grid": {
-                        "show": true,
-                        "top": "20%"
-                    },
-                    "tooltip": {
-                        "trigger": "axis",
-                        "axisPointer": {
-                            "type": "line"
-                        }
-                    },
-                    "legend": {
-                        "right": "3%",
-                        "data": [
-                            {"name": "直通率"}, 
-                            {"name": "收益率"}
-                        ]
-                    },
-                    "xAxis": [{
-                        "type": "category",
-                        "data": ["08:00~08:59", "09:00~09:59", "10:00~10:59", "11:00~11:59"],
-                        "fetch": "xaixsFetch",
-                        "axisLine": {
-                            "lineStyle": {
-                                "color": "white"
-                            }
-                        }
-                    }],
-                    "yAxis": [{
-                        "type": "value",
-                        "min": 0,
-                        "max": 1,
-                        "axisLabel": {
-                            "formatter": "perRender"
-                        },
-                        "axisLine": {
-                            "lineStyle": {
-                                "color": "white"
-                            }
-                        }
-                    }],
-                    "series": [{
-                        "type": "line",
-                        "name": "直通率",
-                        "label": {
-                            "normal": {
-                                "show": true,
-                                "position": "inside",
-                                "formatter": "{c}"
-                            }
-                        },
-                        "data":[0.938, 1, 1],
-                        "fetch": "ztlbhFetch"
-                    },{
-                        "type": "line",
-                        "name": "收益率",
-                        "label": {
-                            "normal": {
-                                "show": true,
-                                "position": "inside",
-                                "formatter": "{c}"
-                            }
-                        },
-                        "data":[0.913, 0.986, 0.929, 1],
-                        "fetch": "ztlbhFetch"
-                    }]
-                }
-            },
-            "layout": {
-                "x": 0, "y": 5, "w": 7, "h": 5
-            }
-        },{
-            "type": "table",
-            "config": {
-                "title": "产线表一览",
-                "columns": [
-                    {
-                        "title": "时段",
-                        "dataIndex": "time",
-                        "key": "time"
-                    },
-                    {
-                        "title": "计划数",
-                        "dataIndex": "inplan",
-                        "sort": 1,
-                        "key": "inplan"
-                    },
-                    {
-                        "title": "投入数",
-                        "dataIndex": "trs",
-                        "key": "trs"
-                    },
-                    {
-                        "title": "产出数",
-                        "dataIndex": "ccs",
-                        "key": "ccs"
-                    },
-                    {
-                        "title": "差异数",
-                        "dataIndex": "cys",
-                        "key": "cys"
-                    },
-                    {
-                        "title": "达成率%",
-                        "dataIndex": "dcl",
-                        "key": "dcl"
-                    },
-                    {
-                        "title": "直通率%",
-                        "dataIndex": "ztl",
-                        "key": "ztl"
-                    },
-                    {
-                        "title": "收益率%",
-                        "dataIndex": "syl",
-                        "key": "syl"
-                    },
-                    {
-                        "title": "备注",
-                        "dataIndex": "desc",
-                        "key": "desc",
-                        "render": "descRender"
-                    }
-                ],
-                "data":[{
-                    "key": "1",
-                    "time": "上午",
-                    "inplan": 400,
-                    "trs": 200,
-                    "ccs": 98,
-                    "cys": 62,
-                    "dcl": "75.2%",
-                    "ztl": "23.3%",
-                    "syl": "45.4%",
-                    "desc": "良好"
-                },{
-                    "key": "2",
-                    "time": "上午",
-                    "inplan": 199,
-                    "trs": 45,
-                    "ccs": 188,
-                    "cys": 9,
-                    "dcl": "75.2%",
-                    "ztl": "50.3%",
-                    "syl": "73.4%",
-                    "desc": "良好"
-                },{
-                    "key": "3",
-                    "time": "上午",
-                    "inplan": 250,
-                    "trs": 77,
-                    "ccs": 188,
-                    "cys": 62,
-                    "dcl": "78.2%",
-                    "ztl": "50.3%",
-                    "syl": "73.4%",
-                    "desc": "良好"
-                }]
-            },
-            "layout": {
-                "x": 0, "y": 0, "w": 7, "h": 5 
-            }
-        },{
-            "type": "charts",
-            "config": {
-                "option": {
-                    "title": {
-                        "text": "前五大不良代码",
-                        "subtext": "Top 5 Error code",
-                        "textAlign": "center",
-                        "top": "5",
-                        "left": "50%",
-                        "right": "50%",
-                        "itemGap": 0,
-                        "padding": 0
-                    },
-                    "tooltip" : {
-                        "trigger": "item",
-                        "formatter": "{a} <br/>{b} : {c} ({d}%)"
-                    },
-                    "legend": {
-                        "bottom": "5%",
-                        "data": [
-                            {"name": "亮块"},
-                            {"name": "黑屏亮点"},
-                            {"name": "LED灯不亮"},
-                            {"name": "自动对齐"},
-                            {"name": "图像图异"},
-                            {"name": "其他"}
-                        ]
-                    },
-                    "series": [{
-                        "type": "pie",
-                        "name": "不良代码",
-                        "radius" : "30%",
-                        "label": {
-                            "normal": {
-                                "formatter": "{b} \n {d}%"
-                            }
-                        },
-                        "data":[
-                            {"value": 34, "name":"亮块"},
-                            {"value": 27, "name":"黑屏亮点"},
-                            {"value": 45, "name":"LED灯不亮"},
-                            {"value": 13, "name":"自动对齐"},
-                            {"value": 39, "name":"图像图异"},
-                            {"value": 2, "name":"其他"}
-                        ]
-                    }]
-                }
-            },
-            "layout": {
-                "x": 7, "y": 3, "w": 3, "h": 5 
-            }
-        },{
-            "type": "form",
-            "config": {
-                "header": "当天投入/产出统计1",
-                "valueStyle": {
-                    "color": "red"
-                },
-                "columns": 1,
-                "data": [
-                    {"field": "总投入", "value": "163"},
-                    {"field": "总产出", "value": "114"},
-                    {"field": "不良数", "value": {"text": 7, "style": {"color": "blue"}}}
-                ]
-            },
-            "layout": {
-                "x": 7, "y": 0, "w": 3, "h": 5
-            }
-        }]
-    },
-    "fixedbox": {
-        "items": [{
-            "type": "div",
-            "config": {
-                "render": "这是一个浮动标签\n这是一个浮动标签\n这是一个浮动标签\n这是一个浮动标签\n这是一个浮动标签\n",
-                "style": {
-                    "color": "white"
-                }
-            },
-            "layout": {
-                "x": 3, "y": 3, "w": 3, "h": 1 
-            }
-        }]
-    }
-}

+ 0 - 289
kanban-client/app/data/BoardConfig4.json

@@ -1,289 +0,0 @@
-{
-    "title": {
-        "config": {
-            "render": "titleRender",
-            "state": {},
-            "cls": "",
-            "style": {},
-            "width": "",
-            "height": 55
-        }
-    },
-    "content": {
-        "items": [{
-            "type": "charts",
-            "config": {
-                "option": {
-                    "graphic": [{
-                        "type": "group",
-                        "rotation": "0.5",
-                        "right": "0%",
-                        "top": "center",
-                        "children": [{
-                            "type": "rect",
-                            "z": 100,
-                            "left": "center",
-                            "top": "middle",
-                            "shape": {
-                                "width": 190,
-                                "height": 90
-                            },
-                            "style": {
-                                "fill": "#fff",
-                                "stroke": "#555",
-                                "lineWidth": 2,
-                                "shadowBlur": 8,
-                                "shadowOffsetX": 3,
-                                "shadowOffsetY": 3,
-                                "shadowColor": "rgba(0,0,0,0.3)"
-                            }
-                        },{
-                            "type": "text",
-                            "z": 100,
-                            "left": "center",
-                            "top": "middle",
-                            "style": {
-                                "fill": "#333",
-                                "text": "4\n5\n6",
-                                "font": "14px Microsoft YaHei"
-                            }
-                        }]
-                    }],
-                    "title": {
-                        "text": "直通率2",
-                        "subtext": "First Pass Yield(FPY)",
-                        "textAlign": "center",
-                        "left": "50%",
-                        "right": "50%",
-                        "itemGap": 0,
-                        "padding": 0
-                    },
-                    "tooltip": {
-                        "trigger": "axis",
-                        "axisPointer": {
-                            "type": "line"
-                        }
-                    },
-                    "legend": {
-                        "right": "3%",
-                        "data": [
-                            {"name": "直通率"}, 
-                            {"name": "收益率"}
-                        ]
-                    },
-                    "xAxis": [{
-                        "type": "category",
-                        "data": ["12:00~12:59", "13:00~13:59", "14:00~14:59", "15:00~15:59"],
-                        "fetch": "xaixsFetch",
-                        "axisLine": {
-                            "lineStyle": {
-                                "color": "white"
-                            }
-                        }
-                    }],
-                    "yAxis": [{
-                        "type": "value",
-                        "min": 0,
-                        "max": 1,
-                        "axisLabel": {
-                            "formatter": "perRender"
-                        },
-                        "axisLine": {
-                            "lineStyle": {
-                                "color": "white"
-                            }
-                        }
-                    }],
-                    "series": [{
-                        "type": "line",
-                        "name": "直通率",
-                        "label": {
-                            "normal": {
-                                "show": true,
-                                "position": "inside",
-                                "formatter": "{c}"
-                            }
-                        },
-                        "data":[0.738, 1, 0.564, 0.900],
-                        "fetch": "ztlbhFetch"
-                    },{
-                        "type": "line",
-                        "name": "收益率",
-                        "label": {
-                            "normal": {
-                                "show": true,
-                                "position": "inside",
-                                "formatter": "{c}"
-                            }
-                        },
-                        "data":[0.683, 0.965, 0.789, 0.911],
-                        "fetch": "ztlbhFetch"
-                    }]
-                }
-            },
-            "layout": {
-                "x": 0, "y": 5, "w": 7, "h": 5
-            }
-        },{
-            "type": "charts",
-            "config": {
-                "option": {
-                  "title":{
-                    "show": true,
-                    "text": "投入/产出柱状图",
-                    "subtext": "Input/outPut Histogram",
-                    "textAlign": "center",
-                    "left": "50%",
-                    "right": "50%",
-                    "itemGap": 0,
-                    "padding": 0
-                  },
-                  "color": ["#6395EC", "#FFFE03"],
-                  "tooltip" : {
-                      "trigger": "axis",
-                      "axisPointer" : {            
-                          "type" : "shadow"       
-                      }
-                  },
-                  "legend": {
-                    "right": "3%",
-                    "data": [
-                      {"name": "投入"},
-                      {"name": "产出"}
-                    ]
-                  },
-                  "xAxis" : [
-                      {
-                          "type" : "category",
-                          "data" : ["11:00~11:59", "12:00~12:59", "13:00~13:59"],
-                          "axisTick": {
-                              "alignWithLabel": true
-                          },
-                          "axisLine": {
-                            "lineStyle": {
-                                "color": "white"
-                            }
-                        }
-                      }
-                  ],
-                  "yAxis" : [
-                      {
-                          "type" : "value",
-                          "axisLine": {
-                            "lineStyle": {
-                                "color": "white"
-                            }
-                        }
-                      }
-                  ],
-                  "series" : [
-                      {
-                          "name":"投入",
-                          "type":"bar",
-                          "label": {
-                            "normal": {
-                              "show": true,
-                              "position": "top",
-                              "formatter": "{c}",
-                              "textStyle": {
-                                "color": "white"
-                              }
-                            }
-                          },
-                          "data":[78,69,44]
-                      },
-                        {
-                          "name":"产出",
-                          "type":"bar",
-                          "label": {
-                            "normal": {
-                              "show": true,
-                              "position": "top",
-                              "formatter": "{c}",
-                              "textStyle": {
-                                "color": "white"
-                              }
-                            }
-                          },
-                          "barGap": 0,
-                          "data":[34,50,22]
-                      }
-                  ]
-              }
-            },
-            "layout": {
-                "x": 0, "y": 0, "w": 7, "h": 5 
-            }
-        },{
-            "type": "charts",
-            "config": {
-                "option": {
-                    "title": {
-                        "text": "前五大不良代码",
-                        "subtext": "Top 5 Error code",
-                        "textAlign": "center",
-                        "top": "5",
-                        "left": "50%",
-                        "right": "50%",
-                        "itemGap": 0,
-                        "padding": 0
-                    },
-                    "tooltip" : {
-                        "trigger": "item",
-                        "formatter": "{a} <br/>{b} : {c} ({d}%)"
-                    },
-                    "legend": {
-                        "bottom": "5%",
-                        "data": [
-                            {"name": "亮块"},
-                            {"name": "黑屏亮点"},
-                            {"name": "LED灯不亮"},
-                            {"name": "自动对齐"},
-                            {"name": "图像图异"},
-                            {"name": "其他"}
-                        ]
-                    },
-                    "series": [{
-                        "type": "pie",
-                        "name": "不良代码",
-                        "radius" : "30%",
-                        "label": {
-                            "normal": {
-                                "formatter": "{b} \n {d}%"
-                            }
-                        },
-                        "data":[
-                            {"value": 29, "name":"亮块"},
-                            {"value": 17, "name":"黑屏亮点"},
-                            {"value": 48, "name":"LED灯不亮"},
-                            {"value": 22, "name":"自动对齐"},
-                            {"value": 36, "name":"图像图异"},
-                            {"value": 5, "name":"其他"}
-                        ]
-                    }]
-                }
-            },
-            "layout": {
-                "x": 7, "y": 3, "w": 3, "h": 7 
-            }
-        },{
-            "type": "form",
-            "config": {
-                "key": "form",
-                "header": "当天投入/产出统计",
-                "valueStyle": {
-                    "color": "red"
-                },
-                "columns": 1,
-                "data": [
-                    {"field": "总投入", "value": "100"},
-                    {"field": "总产出", "value": "100"},
-                    {"field": "不良数", "value": 12}
-                ]
-            },
-            "layout": {
-                "x": 7, "y": 0, "w": 3, "h": 3 
-            }
-        }]
-    }
-}

+ 0 - 6
kanban-client/app/data/RefreshData.json

@@ -1,6 +0,0 @@
-{
-    "model": [{"mid": "config2"}, "config2"],
-    "refresh": {
-        "interval": 0
-    }
-}

+ 1 - 1
kanban-client/src/Charts/ECharts.js → kanban-client/app/src/Charts/ECharts.js

@@ -1,5 +1,5 @@
 import React, { Component } from 'react';
-import RenderUtils from '../../app/utils/RenderUtils.js';
+import RenderUtils from '../../utils/RenderUtils.js';
 // 导入echarts
 import ReactEcharts from 'echarts-for-react';
 import {dark} from './Theme/Theme.js';

+ 0 - 0
kanban-client/src/Charts/Theme/Theme.js → kanban-client/app/src/Charts/Theme/Theme.js


+ 0 - 0
kanban-client/src/Charts/Theme/dark.js → kanban-client/app/src/Charts/Theme/dark.js


+ 1 - 1
kanban-client/src/FixedBox/FixedBox.jsx → kanban-client/app/src/FixedBox/FixedBox.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import PropTypes from 'prop-types';
 import '../../assets/FixedBox/index.less';
-import renders from '../../app/utils/RenderUtils.js';
+import renders from '../../utils/RenderUtils.js';
 
 export default class FixedBox extends React.Component {
     static propTypes = {

+ 1 - 1
kanban-client/src/Form/Form.jsx → kanban-client/app/src/Form/Form.jsx

@@ -2,7 +2,7 @@ import React from 'react';
 import PropTypes from 'prop-types';
 import FormItem from './FormItem.jsx';
 import '../../assets/Form/index.less';
-import renders from '../../app/utils/RenderUtils.js';
+import renders from '../../utils/RenderUtils.js';
 
 export default class Form extends React.Component {
     static propTypes = {

+ 0 - 1
kanban-client/src/Form/FormItem.jsx → kanban-client/app/src/Form/FormItem.jsx

@@ -1,6 +1,5 @@
 import React from 'react';
 import PropTypes from 'prop-types';
-import get from 'lodash.get';
 
 export default class FormItem extends React.Component {
 

+ 0 - 0
kanban-client/src/Form/index.js → kanban-client/app/src/Form/index.js


+ 0 - 0
kanban-client/src/Table/Column.jsx → kanban-client/app/src/Table/Column.jsx


+ 0 - 0
kanban-client/src/Table/ColumnGroup.jsx → kanban-client/app/src/Table/ColumnGroup.jsx


+ 0 - 0
kanban-client/src/Table/ColumnManager.js → kanban-client/app/src/Table/ColumnManager.js


+ 0 - 0
kanban-client/src/Table/ExpandIcon.jsx → kanban-client/app/src/Table/ExpandIcon.jsx


+ 0 - 0
kanban-client/src/Table/Table.jsx → kanban-client/app/src/Table/Table.jsx


+ 0 - 0
kanban-client/src/Table/TableCell.jsx → kanban-client/app/src/Table/TableCell.jsx


+ 0 - 0
kanban-client/src/Table/TableHeader.jsx → kanban-client/app/src/Table/TableHeader.jsx


+ 0 - 0
kanban-client/src/Table/TableRow.jsx → kanban-client/app/src/Table/TableRow.jsx


+ 0 - 0
kanban-client/src/Table/createStore.js → kanban-client/app/src/Table/createStore.js


+ 0 - 0
kanban-client/src/Table/index.js → kanban-client/app/src/Table/index.js


+ 0 - 0
kanban-client/src/Table/utils.js → kanban-client/app/src/Table/utils.js


+ 1 - 1
kanban-client/src/Title/Title.jsx → kanban-client/app/src/Title/Title.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import PropTypes from 'prop-types';
-import renders from '../../app/utils/RenderUtils.js';
+import renders from '../../utils/RenderUtils.js';
 import '../../assets/Title/index.less';
 
 export default class Title extends React.Component {

+ 1 - 1
kanban-client/app/utils/RenderUtils.js

@@ -1,5 +1,5 @@
 import React from 'react';
-import logeImg from '../../assets/images/log.png';
+import logeImg from '../assets/images/log.png';
 
 function titleRender(state) {
     let time1 = new Date().format('HH:mm:ss');

File diff suppressed because it is too large
+ 0 - 7916
kanban-client/build/bundle.js


+ 1 - 1
kanban-client/build/index.html

@@ -7,6 +7,6 @@
 <body style="margin:0px">
   <div id="root"></div>
   <script type="text/javascript" src="./lib/echarts-for-react/echarts.min.js"></script>
-  <script src="bundle.js"></script>
+  <script src="main.bundle.js"></script>
 </body>
 </html>

+ 0 - 175
kanban-client/build/lib/echarts-for-react/lib/core.js

@@ -1,175 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-var _react = require('react');
-
-var _react2 = _interopRequireDefault(_react);
-
-var _propTypes = require('prop-types');
-
-var _propTypes2 = _interopRequireDefault(_propTypes);
-
-var _elementResizeEvent = require('element-resize-event');
-
-var _elementResizeEvent2 = _interopRequireDefault(_elementResizeEvent);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-var ReactEcharts = function (_React$Component) {
-  _inherits(ReactEcharts, _React$Component);
-
-  function ReactEcharts(props) {
-    _classCallCheck(this, ReactEcharts);
-
-    var _this = _possibleConstructorReturn(this, (ReactEcharts.__proto__ || Object.getPrototypeOf(ReactEcharts)).call(this, props));
-
-    _this.getEchartsInstance = function () {
-      return _this.echartsInstance.getInstanceByDom(_this.echartsElement) || _this.echartsInstance.init(_this.echartsElement, _this.props.theme);
-    };
-
-    _this.bindEvents = function (instance, events) {
-      var _loopEvent = function _loopEvent(eventName) {
-        // ignore the event config which not satisfy
-        if (typeof eventName === 'string' && typeof events[eventName] === 'function') {
-          // binding event
-          instance.off(eventName);
-          instance.on(eventName, function (param) {
-            events[eventName](param, instance);
-          });
-        }
-      };
-
-      for (var eventName in events) {
-        if (Object.prototype.hasOwnProperty.call(events, eventName)) {
-          _loopEvent(eventName);
-        }
-      }
-    };
-
-    _this.renderEchartDom = function () {
-      // init the echart object
-      var echartObj = _this.getEchartsInstance();
-      // set the echart option
-      echartObj.setOption(_this.props.option, _this.props.notMerge || false, _this.props.lazyUpdate || false);
-      // set loading mask
-      if (_this.props.showLoading) echartObj.showLoading(_this.props.loadingOption || null);else echartObj.hideLoading();
-
-      return echartObj;
-    };
-
-    _this.echartsInstance = _this.props.echarts; // the echarts object.
-    _this.echartsElement = null; // echarts div element
-    return _this;
-  }
-
-  // first add
-
-
-  _createClass(ReactEcharts, [{
-    key: 'componentDidMount',
-    value: function componentDidMount() {
-      var echartObj = this.renderEchartDom();
-      var onEvents = this.props.onEvents || {};
-
-      this.bindEvents(echartObj, onEvents);
-      // on chart ready
-      if (typeof this.props.onChartReady === 'function') this.props.onChartReady(echartObj);
-
-      // on resize
-      (0, _elementResizeEvent2['default'])(this.echartsElement, function () {
-        echartObj.resize();
-      });
-    }
-
-    // update
-
-  }, {
-    key: 'componentDidUpdate',
-    value: function componentDidUpdate() {
-      this.renderEchartDom();
-      this.bindEvents(this.getEchartsInstance(), this.props.onEvents || []);
-    }
-
-    // remove
-
-  }, {
-    key: 'componentWillUnmount',
-    value: function componentWillUnmount() {
-      if (this.echartsElement) {
-        // if elementResizeEvent.unbind exist, just do it.
-        if (typeof _elementResizeEvent2['default'].unbind === 'function') {
-          _elementResizeEvent2['default'].unbind(this.echartsElement);
-        }
-        this.echartsInstance.dispose(this.echartsElement);
-      }
-    }
-    // return the echart object
-
-
-    // bind the events
-
-
-    // render the dom
-
-  }, {
-    key: 'render',
-    value: function render() {
-      var _this2 = this;
-
-      var style = this.props.style || {
-        height: '300px'
-      };
-      // for render
-      return _react2['default'].createElement('div', {
-        ref: function ref(e) {
-          _this2.echartsElement = e;
-        },
-        style: style,
-        className: this.props.className
-      });
-    }
-  }]);
-
-  return ReactEcharts;
-}(_react2['default'].Component);
-
-exports['default'] = ReactEcharts;
-
-
-ReactEcharts.propTypes = {
-  option: _propTypes2['default'].object.isRequired, // eslint-disable-line react/forbid-prop-types
-  echarts: _propTypes2['default'].object.isRequired, // eslint-disable-line react/forbid-prop-types
-  notMerge: _propTypes2['default'].bool,
-  lazyUpdate: _propTypes2['default'].bool,
-  style: _propTypes2['default'].object, // eslint-disable-line react/forbid-prop-types
-  className: _propTypes2['default'].string,
-  theme: _propTypes2['default'].string,
-  onChartReady: _propTypes2['default'].func,
-  showLoading: _propTypes2['default'].bool,
-  loadingOption: _propTypes2['default'].object, // eslint-disable-line react/forbid-prop-types
-  onEvents: _propTypes2['default'].object // eslint-disable-line react/forbid-prop-types
-};
-
-ReactEcharts.defaultProps = {
-  echarts: {},
-  notMerge: false,
-  lazyUpdate: false,
-  style: { height: '300px' },
-  className: '',
-  theme: null,
-  onChartReady: function onChartReady() {},
-  showLoading: false,
-  loadingOption: null,
-  onEvents: {}
-};

+ 0 - 39
kanban-client/build/lib/echarts-for-react/lib/index.js

@@ -1,39 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-
-var _echarts = require('echarts');
-
-var _echarts2 = _interopRequireDefault(_echarts);
-
-var _core = require('./core');
-
-var _core2 = _interopRequireDefault(_core);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-// export the Component the echarts Object.
-var EchartsReact = function (_Core) {
-  _inherits(EchartsReact, _Core);
-
-  function EchartsReact(props) {
-    _classCallCheck(this, EchartsReact);
-
-    var _this = _possibleConstructorReturn(this, (EchartsReact.__proto__ || Object.getPrototypeOf(EchartsReact)).call(this, props));
-
-    _this.echartsInstance = _echarts2['default'];
-    return _this;
-  }
-
-  return EchartsReact;
-}(_core2['default']);
-
-exports['default'] = EchartsReact;

File diff suppressed because it is too large
+ 0 - 0
kanban-client/build/lib/my_echarts.min.js


+ 1 - 1
kanban-client/package.json

@@ -9,7 +9,7 @@
     "start:prod": "webpack && node server.js"
   },
   "keywords": [
-    "rc-table"
+    "board"
   ],
   "author": "zhuth",
   "license": "ISC",

+ 0 - 56
kanban-client/src/Charts/Bar.jsx

@@ -1,56 +0,0 @@
-import React, { Component } from 'react';
-import RenderUtils from '../../app/utils/RenderUtils.js';
-//导入echarts
-import ReactEcharts from 'echarts-for-react/lib/core';
-import echarts from 'echarts/lib/echarts';
-
-import 'echarts/lib/chart/bar';
-import 'echarts/lib/component/title';
-import 'echarts/lib/component/legend';
-
-export class ReactEchart extends React.Component {
-    constructor(props) {
-        super(props);
-        this.getOtion = this.getOtion.bind(this);
-    }
-
-    initOption(option) {
-        if(typeof option === 'object') {
-            for(let key in option) {
-                if(key === 'formatter') {
-                    if(typeof option[key] === 'function') {
-
-                    }else if(option[key].endsWith('Render')) {
-                       option[key] = RenderUtils[option[key]]
-                    }
-                }
-                this.initOption(option[key])
-            }
-        }else {
-            return;
-        }
-    }
-
-    getOtion() {
-        const { option } = this.props;
-        let opts = Object.assign({},option);
-        this.initOption(opts);
-        return opts;
-    }
-
-    componentDidMount() {
-    }
-    componentDidUpdate() {
-    }
-    render() {
-        return (
-            <ReactEcharts
-            echarts={echarts}
-            option={this.getOtion()}
-            style={{height: '100%', width: '100%'}}
-            className='react-echarts' />
-        )
-    }
-}
-
-export default ReactEchart;

+ 0 - 39
kanban-client/src/Charts/G2.js

@@ -1,39 +0,0 @@
-import data from '../../app/data/g2testdata.json';
-import createG2 from 'g2-react';
-import { Stat } from 'g2';
-import React, { Component } from 'react';
-import ReactDOM from 'react-dom';
-
-const Line = createG2(chart => {
-  chart.line().position('time*price').color('name').shape('spline').size(2);
-  chart.render();
-});
-
-class MyComponent extends Component {
-  state = {
-    data: data.slice(0, data.length / 2 - 1),
-    width: "100%",
-    height: "100%",
-  }
-
-  changeHandler = () => {
-    this.setState({
-      data: data.slice(data.length / 2, data.length - 1),
-    });
-  }
-
-  render() {
-    return (
-      <div>
-        <Line
-          data={this.state.data}
-          width={this.state.width}
-          height={this.state.height}
-        />
-        <button onClick={this.changeHandler}>Change Data</button>
-      </div>
-    );
-  }
-}
-
-export default MyComponent;

+ 0 - 56
kanban-client/src/Charts/Line.jsx

@@ -1,56 +0,0 @@
-import React, { Component } from 'react';
-import RenderUtils from '../../app/utils/RenderUtils.js';
-//导入echarts
-import ReactEcharts from 'echarts-for-react/lib/core';
-import echarts from 'echarts/lib/echarts';
-
-import 'echarts/lib/chart/line';
-import 'echarts/lib/component/title';
-import 'echarts/lib/component/legend';
-
-export class ReactEchart extends React.Component {
-    constructor(props) {
-        super(props);
-        this.getOtion = this.getOtion.bind(this);
-    }
-
-    initOption(option) {
-        if(typeof option === 'object') {
-            for(let key in option) {
-                if(key === 'formatter') {
-                    if(typeof option[key] === 'function') {
-
-                    }else if(option[key].endsWith('Render')) {
-                       option[key] = RenderUtils[option[key]]
-                    }
-                }
-                this.initOption(option[key])
-            }
-        }else {
-            return;
-        }
-    }
-
-    getOtion() {
-        const { option } = this.props;
-        let opts = Object.assign({},option);
-        this.initOption(opts);
-        return opts;
-    }
-
-    componentDidMount() {
-    }
-    componentDidUpdate() {
-    }
-    render() {
-        return (
-            <ReactEcharts
-            echarts={echarts}
-            option={this.getOtion()}
-            style={{height: '100%', width: '100%'}}
-            className='react-echarts' />
-        )
-    }
-}
-
-export default ReactEchart;

+ 0 - 56
kanban-client/src/Charts/Pie.jsx

@@ -1,56 +0,0 @@
-import React, { Component } from 'react';
-import RenderUtils from '../../app/utils/RenderUtils.js';
-//导入echarts
-import ReactEcharts from 'echarts-for-react/lib/core';
-import echarts from 'echarts/lib/echarts';
-
-import 'echarts/lib/chart/pie';
-import 'echarts/lib/component/title';
-import 'echarts/lib/component/legend';
-
-export class ReactEchart extends React.Component {
-    constructor(props) {
-        super(props);
-        this.getOtion = this.getOtion.bind(this);
-    }
-
-    initOption(option) {
-        if(typeof option === 'object') {
-            for(let key in option) {
-                if(key === 'formatter') {
-                    if(typeof option[key] === 'function') {
-
-                    }else if(option[key].endsWith('Render')) {
-                       option[key] = RenderUtils[option[key]]
-                    }
-                }
-                this.initOption(option[key])
-            }
-        }else {
-            return;
-        }
-    }
-
-    getOtion() {
-        const { option } = this.props;
-        let opts = Object.assign({},option);
-        this.initOption(opts);
-        return opts;
-    }
-
-    componentDidMount() {
-    }
-    componentDidUpdate() {
-    }
-    render() {
-        return (
-            <ReactEcharts
-            echarts={echarts}
-            option={this.getOtion()}
-            style={{height: '100%', width: '100%'}}
-            className='react-echarts' />
-        )
-    }
-}
-
-export default ReactEchart;

+ 51 - 28
kanban-client/webpack.config.js

@@ -1,37 +1,42 @@
 var path = require('path');
+var webpack = require('webpack');
 
 module.exports = {
-  entry: ['whatwg-fetch', path.resolve(__dirname, './app/main.js')],
-  externals: {
-    echarts: 'window.echarts',
-  },
-  output: {
-    path: path.resolve(__dirname, './build'),
-    filename: 'bundle.js',
-	publicPath: '/'
-  },
-  module: {
-		loaders: [
-			{
-				test: /\.js$/,
-				exclude: /node_modules/,
-				loader: 'babel-loader'
+    //   entry: ['whatwg-fetch', path.resolve(__dirname, './app/main.js')],
+    entry: {
+        fetch: 'whatwg-fetch',
+        main: './app/main.js',
+        title: './app/src/Title/Title.jsx',
+        table: './app/component/Table.jsx',
+        form: './app/src/Form/index.js',
+        chart: './app/src/Charts/ECharts.js'
+    },
+    externals: {
+        echarts: 'window.echarts',
+    },
+    output: {
+        path: path.resolve(__dirname, './build'),
+        // filename: 'bundle.js',
+        // publicPath: '/',
+        filename: '[name].bundle.js'
+    },
+    module: {
+        loaders: [
+            {
+                test: /\.js$/,
+                exclude: /node_modules/,
+                loader: 'babel-loader'
             },
             {
                 test: /\.jsx?$/,
                 loader: 'babel-loader'
             },
-			{
-				test: /\.css$/,
-				exclude: /node_modules/,
-				loaders: 'style-loader!css-loader'
-            },
-            {   
-                test: /\.less$/,
+            {
+                test: /\.(less|css)$/,
                 exclude: /node_modules/,
                 loader: 'style-loader!css-loader!less-loader'
             },
-            {   
+            {
                 test: /\.json$/,
                 exclude: /node_modules/,
                 loader: 'json-loader'
@@ -39,9 +44,27 @@ module.exports = {
             {
                 test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192&name=images/[hash:8].[name].[ext]'
             }
-		]
-	},
-	devServer: {
-        historyApiFallback: true
-    }
+        ]
+    },
+    plugins: [
+        new webpack.LoaderOptionsPlugin({
+            options: {
+                devServer: {
+                    historyApiFallback: true, //不跳转
+                    inline: true //实时刷新
+                }
+            }
+        }),
+        // 压缩
+        new webpack.optimize.UglifyJsPlugin({
+            compress: {
+                warnings: false
+            }
+        }),
+        new webpack.DefinePlugin({
+            "process.env": {
+                NODE_ENV: JSON.stringify("production")
+            }
+        })
+    ]
 };

Some files were not shown because too many files changed in this diff