Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/platform-bi-web

zhuth 7 years ago
parent
commit
44dce33b8f

+ 7 - 1
src/components/dashboardDesigner/header.jsx

@@ -2,12 +2,14 @@ import React from 'react'
 import { Input, Icon, Button, Popconfirm } from 'antd'
 import { connect } from 'dva'
 import './header.less'
+import SettingBox from './settingBox';
 
 class Header extends React.Component {
     constructor(props) {
         super(props);
         this.state = {
             visibleConfirm: false,
+            visibleSettingBox: false
         }
     }
 
@@ -79,7 +81,11 @@ class Header extends React.Component {
                     />
                 </div>
                 <div className='header-item toolbar-buttons'>
-                    
+                    <Button onClick={() => this.setState({ visibleSettingBox: true})}>属性设置</Button>
+                    <SettingBox 
+                        visibleSettingBox={this.state.visibleSettingBox} 
+                        hideBox={() => this.setState({visibleSettingBox:false})}
+                    />
                 </div>
             </div>
         );

+ 56 - 0
src/components/dashboardDesigner/settingBox.jsx

@@ -0,0 +1,56 @@
+import React from 'react'
+import { Modal, Tabs, Row, Col, Form } from 'antd'
+const TabPane = Tabs.TabPane;
+
+const parameter = [
+    {
+        label: '部门',
+        type: '字符串',
+        operator: '等于',
+        value1: '销售',
+        nullable: true
+    },{
+        label: '业务员',
+        type: '字符串',
+        operator: '等于',
+        value1: '销售',
+        nullable: false
+    }
+]
+/**
+ * 用于设定看板的属性,重点在于公共参数(parameter)配置的界面,以上为暂定字段
+ *
+ * @class SettingBox
+ * @extends {React.Component}
+ */
+
+
+ 
+class SettingBox extends React.Component {
+    render() {
+        const { visibleSettingBox, hideBox } = this.props
+
+        return (
+            <Modal 
+                visible={visibleSettingBox}
+                onCancel={hideBox}
+                // onOk={() => {onOk();hideBox();}}
+                destroyOnClose={true}
+            >
+                <div>
+                    <Tabs tabPosition='left'>
+                        <TabPane tab="basic" key="1">Content of Tab 1</TabPane>
+                        <TabPane tab="publicParameter" key="2">
+                            <Row>
+                                <Col>
+                                </Col>
+                            </Row>
+                        </TabPane>
+                    </Tabs>
+                </div>
+            </Modal>
+        )
+    }
+}
+
+export default SettingBox