Browse Source

修改component文件夹名称

zhuth 7 years ago
parent
commit
e5ccaea5ee

+ 0 - 0
app/component/chartDesigner/charts/echartsView.jsx → app/components/chartDesigner/charts/echartsView.jsx


+ 0 - 0
app/component/chartDesigner/charts/table.jsx → app/components/chartDesigner/charts/table.jsx


+ 0 - 0
app/component/chartDesigner/content.jsx → app/components/chartDesigner/content.jsx


+ 0 - 0
app/component/chartDesigner/content.less → app/components/chartDesigner/content.less


+ 0 - 0
app/component/chartDesigner/header.jsx → app/components/chartDesigner/header.jsx


+ 0 - 0
app/component/chartDesigner/header.less → app/components/chartDesigner/header.less


+ 0 - 0
app/component/chartDesigner/layout.jsx → app/components/chartDesigner/layout.jsx


+ 0 - 0
app/component/chartDesigner/layout.less → app/components/chartDesigner/layout.less


+ 0 - 0
app/component/chartDesigner/sections/aggregateTableConfigForm.jsx → app/components/chartDesigner/sections/aggregateTableConfigForm.jsx


+ 0 - 0
app/component/chartDesigner/sections/baseConfigForm.jsx → app/components/chartDesigner/sections/baseConfigForm.jsx


+ 0 - 0
app/component/chartDesigner/sections/dataViewConfigForm.jsx → app/components/chartDesigner/sections/dataViewConfigForm.jsx


+ 9 - 3
app/component/chartDesigner/sections/filterBox.jsx → app/components/chartDesigner/sections/filterBox.jsx

@@ -1,9 +1,9 @@
 import React from 'react';
+import PropTypes from 'prop-types';
 import { Form, Row, Col, Input, Icon, Button, Select, InputNumber, DatePicker } from 'antd';
 const FormItem = Form.Item;
 const SelectOption = Select.Option;
 import emitter from '../../../eventManger/ev';
-import { isEqual } from '../../../utils/baseUtils.js';
 import OPERATORS from './filterOperators.json';
 import './filterBox.less';
 
@@ -40,6 +40,11 @@ class FilterBox extends React.Component {
         }
     }
 
+    static propTypes = {
+        columns: PropTypes.array,
+        filterData: PropTypes.array
+    }
+
     componentDidMount() {
         // 将原本的过滤条件生成可视化组件
         const { filterData } = this.state;
@@ -80,6 +85,7 @@ class FilterBox extends React.Component {
         const filters = form.getFieldValue('filters');
         const nextFilters = filters.concat(filtes || {
             key: uuid++,
+            using: true
         });
         form.setFieldsValue({
             filters: nextFilters,
@@ -276,10 +282,10 @@ class FilterBox extends React.Component {
                             </FormItem>
                         </Col>
                     </Col>
-                    <Col span={2} className='' >
+                    <Col span={2} className='filter-remove-col' >
                         <Icon
                             className="dynamic-delete-button"
-                            type="close"
+                            type="minus-circle"
                             onClick={() => { this.removeFilter(key) }}
                         />
                     </Col>

+ 3 - 0
app/component/chartDesigner/sections/filterBox.less → app/components/chartDesigner/sections/filterBox.less

@@ -17,4 +17,7 @@
   .ant-input-number, .ant-calendar-picker {
     width: 100%;
   }
+}
+.filter-remove-col {
+  text-align: center;
 }

+ 0 - 0
app/component/chartDesigner/sections/filterOperators.json → app/components/chartDesigner/sections/filterOperators.json


+ 0 - 0
app/component/chartDesigner/sections/lineConfigForm.jsx → app/components/chartDesigner/sections/lineConfigForm.jsx


+ 0 - 0
app/component/chartDesigner/sections/preparingForm.jsx → app/components/chartDesigner/sections/preparingForm.jsx


+ 0 - 0
app/component/chartDesigner/sections/styleEditor.jsx → app/components/chartDesigner/sections/styleEditor.jsx


+ 0 - 0
app/component/chartDesigner/sections/toolBar.less → app/components/chartDesigner/sections/toolBar.less


+ 5 - 5
app/component/chartDesigner/sections/toolbar.jsx → app/components/chartDesigner/sections/toolbar.jsx

@@ -64,7 +64,7 @@ class Toolar extends React.Component {
         }else if(type == 'number') {
             if(operator == 'null') {
                 filterLabel = `${label} ${operatorLabel}`;
-            }else if(operator == 'betwen') {
+            }else if(operator == 'between') {
                 filterLabel = `${label} ${operatorLabel} ${value1} ~ ${value2}`; 
             }else {
                 filterLabel = `${label} ${operatorLabel} ${value1}`; 
@@ -74,16 +74,16 @@ class Toolar extends React.Component {
             value2 = new Date(value2).format('yyyy/MM/dd');
             if(operator == 'null') {
                 filterLabel = `${label} ${operatorLabel}`;
-            }else if(operator == 'betwen') {
-                filterLabel = `${label} ${operatorLabel} ${value1} ~ ${value2}`; 
+            }else if(operator == 'between') {
+                filterLabel = `${label} ${operatorLabel} ${value1} ~ ${value2}`;
             }else {
-                filterLabel = `${label} ${operatorLabel} ${value1}`; 
+                filterLabel = `${label} ${operatorLabel} ${value1}`;
             }
         }else if(type == 'categorical') {
             if(operator == 'null') {
                 filterLabel = `${label} ${operatorLabel}`;
             }else {
-                filterLabel = `${label} ${operatorLabel} ${value1}`; 
+                filterLabel = `${label} ${operatorLabel} ${value1}`;
             }
         }else {
             filterLabel = '错误条件';

+ 1 - 0
package.json

@@ -10,6 +10,7 @@
     "echarts-for-react": "^2.0.12-beta.0",
     "events": "^3.0.0",
     "moment": "^2.19.3",
+    "prop-types": "^15.6.2",
     "react": "^16.2.0",
     "react-dom": "^16.2.0",
     "react-router": "^4.3.1",