From 7ea1c5f53702951fc4df60e969fc67ef5d7af4dd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 一月 2020 10:13:05 +0800
Subject: [PATCH] 2020-01-14

---
 src/tabviews/tableshare/mutilform/index.jsx |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/src/tabviews/tableshare/mutilform/index.jsx b/src/tabviews/tableshare/mutilform/index.jsx
index 83fe6a0..064cd74 100644
--- a/src/tabviews/tableshare/mutilform/index.jsx
+++ b/src/tabviews/tableshare/mutilform/index.jsx
@@ -8,6 +8,7 @@
 import './index.scss'
 
 const {MonthPicker} = DatePicker
+const { TextArea } = Input
 
 class MainSearch extends Component {
   static propTpyes = {
@@ -61,7 +62,7 @@
     let _inputfields = formlist.filter(item => item.type === 'text' || item.type === 'number') // 鐢ㄤ簬杩囨护涓嬫媺鑿滃崟鍏宠仈琛ㄥ崟
 
     formlist = formlist.map(item => {
-      if (item.type === 'select' || item.type === 'link') {
+      if (item.type === 'select' || item.type === 'link' || item.type === 'multiselect') {
         if (item.setAll === 'true') {
           item.options.unshift({
             key: Utils.getuuid(),
@@ -461,6 +462,32 @@
             </Form.Item>
           </Col>
         )
+      } else if (item.type === 'textarea') {
+        let _labelcol = cols !== 3 ? 8 / cols : 3
+        let _wrapcol = cols !== 3 ? 16 + (cols - 1) * 4 : 21
+        let _style = {}
+        if (cols === 2) {
+          _style.paddingLeft = '7px'
+        }
+        fields.push(
+          <Col span={24} key={index} className="textarea-row" style={{..._style}}>
+            <Form.Item label={item.label} labelCol={{xs: { span: 24 }, sm: { span: _labelcol }}} wrapperCol={ {xs: { span: 24 }, sm: { span: _wrapcol }} }>
+              {getFieldDecorator(item.field, {
+                initialValue: item.initval || '',
+                rules: [
+                  {
+                    required: item.required === 'true',
+                    message: this.props.dict['form.required.input'] + item.label + '!'
+                  },
+                  {
+                    max: formRule.textarea.max,
+                    message: formRule.textarea.message
+                  }
+                ]
+              })(<TextArea autosize={{ minRows: 2, maxRows: 6 }} disabled={item.readonly === 'true'} />)}
+            </Form.Item>
+          </Col>
+        )
       }
     })
     

--
Gitblit v1.8.0