فهرست منبع

【看板客户端】【去除console】

zhuth 8 سال پیش
والد
کامیت
214b4ec427

+ 0 - 1
kanban-client/app/component/Layout.js

@@ -60,7 +60,6 @@ class BasicLayout extends React.Component {
   // 设置每个div的属性
   generateLayout() {
     const {items} = this.newProps;
-    console.log('11');
     return items.map(function(item, i) {
       let {layout} = item;
       let {x, y, w, h} = layout;

+ 6 - 2
kanban-client/app/component/converter.js

@@ -200,7 +200,11 @@ function lineConfig(model) {
 function pieConfig(model) {
     let { type, config, layout } = model;
     let { title, subtitle, series} = config;
-    
+    series = series.map((v, i) => {
+        v.value = v.data;
+        delete v.data;
+        return v;
+    });
     return {
         type: 'charts',
         config: {
@@ -225,7 +229,7 @@ function pieConfig(model) {
                         return v.name
                     })
                 },
-                series: getPieSeries(series)
+                series: [getPieSeries(series)]
             }
         },
         layout: getLayout(layout)

+ 2 - 3
kanban-client/app/component/factory.js

@@ -5,6 +5,7 @@ import FixedBox from '../../src/FixedBox/FixedBox.jsx';
 import DateFormatter from '../utils/DateTimeUtils.js';
 import {converter} from '../component/converter.js';
 import RenderUtils from '../utils/RenderUtils.js';
+import config from '../data/cc.json';
 
 class Factory extends React.Component {
 
@@ -19,17 +20,15 @@ class Factory extends React.Component {
         fetch('http://10.10.100.191:8082/kanbanInstance/parseData/4F75DDBB413', {
             method: 'GET'
         }).then(function (response) {
-            console.log(response);
             return (response.json())
         }).then((json) => {
             return json;
         }).then(function (json) {
             let s = ''+json.replace(/\s+/g,"");
             let t = JSON.parse(s);
-            console.log(t)
             me.setState({
                 model: converter(t)
-            },()=>{console.log('change')});
+            });
         }).catch(function (ex) {
             console.log('parsing failed', ex);
         });

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

@@ -49,7 +49,7 @@ export class ReactEchart extends React.Component {
         let opts = Object.assign({},option);
         this.initOption(opts, 'option_');
         if(opts.series[0].type === 'bar') {
-            opts.animation = false;
+            // opts.animation = false;
             // opts.animationDurationUpdate = 100;
         }