From 0bff15b120b3e3ff1f1c3d2ce4d9aa8d3ad3917e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 06 十一月 2020 13:49:44 +0800
Subject: [PATCH] 2020-11-06

---
 src/menu/components/card/data-card/wrapsetting/settingform/index.jsx |   47 +++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx b/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx
index 863b152..c495e78 100644
--- a/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx
+++ b/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx
@@ -1,14 +1,16 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Input, Radio, Tooltip, Icon, InputNumber } from 'antd'
+import { Form, Row, Col, Input, Radio, Tooltip, Icon, InputNumber, Select } from 'antd'
 
 import './index.scss'
 
 class SettingForm extends Component {
   static propTpyes = {
+    sysRoles: PropTypes.array,   // 瑙掕壊鍒楄〃
     dict: PropTypes.object,      // 瀛楀吀椤�
     config: PropTypes.object,    // 鍗$墖琛屼俊鎭�
     wrap: PropTypes.object,      // 鏁版嵁婧愰厤缃�
+    inputSubmit: PropTypes.func  // 鍥炶溅浜嬩欢
   }
 
   handleConfirm = () => {
@@ -24,8 +26,16 @@
     })
   }
 
+  handleSubmit = (e) => {
+    e.preventDefault()
+
+    if (this.props.inputSubmit) {
+      this.props.inputSubmit()
+    }
+  }
+
   render() {
-    const { wrap, config } = this.props
+    const { wrap, config, sysRoles } = this.props
     const { getFieldDecorator } = this.props.form
 
     const formItemLayout = {
@@ -58,7 +68,7 @@
                       message: this.props.dict['form.required.input'] + '缁勪欢鍚嶇О!'
                     }
                   ]
-                })(<Input placeholder={''} autoComplete="off" />)}
+                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
               </Form.Item>
             </Col>
             <Col span={12}>
@@ -76,7 +86,7 @@
                       message: this.props.dict['form.required.input'] + '瀹藉害!'
                     }
                   ]
-                })(<InputNumber min={1} max={24} precision={0} />)}
+                })(<InputNumber min={1} max={24} precision={0} onPressEnter={this.handleSubmit} />)}
               </Form.Item>
             </Col>
             {config.subtype === 'propcard' ? <Col span={12}>
@@ -130,6 +140,35 @@
                 )}
               </Form.Item>
             </Col>
+            <Col span={12}>
+              <Form.Item label={
+                <Tooltip placement="topLeft" title="鍗$墖澶栬竟妗嗙殑鏈�灏忛珮搴︼紝鎺у埗鏁版嵁鍔犺浇鏃剁粍浠剁殑鍗犱綅銆�">
+                  <Icon type="question-circle" />
+                  鏈�灏忛珮搴�
+                </Tooltip>
+              }>
+                {getFieldDecorator('minHeight', {
+                  initialValue: wrap.minHeight || 100
+                })(<InputNumber min={20} max={2000} precision={0} onPressEnter={this.handleSubmit} />)}
+              </Form.Item>
+            </Col>
+            <Col span={12}>
+              <Form.Item label="榛戝悕鍗�">
+                {getFieldDecorator('blacklist', {
+                  initialValue: wrap.blacklist || []
+                })(
+                  <Select
+                    showSearch
+                    mode="multiple"
+                    filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+                  >
+                    {sysRoles.map(option =>
+                      <Select.Option key={option.uuid} value={option.value}>{option.text}</Select.Option>
+                    )}
+                  </Select>
+                )}
+              </Form.Item>
+            </Col>
           </Row>
         </Form>
       </div>

--
Gitblit v1.8.0