From c41b93d4c5e2146a1d1568887fb8ce1e3144d7fb Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 31 十二月 2019 18:24:36 +0800
Subject: [PATCH] 2019-12-31

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

diff --git a/src/tabviews/tableshare/mutilform/index.jsx b/src/tabviews/tableshare/mutilform/index.jsx
index 08adc5d..ca13bc6 100644
--- a/src/tabviews/tableshare/mutilform/index.jsx
+++ b/src/tabviews/tableshare/mutilform/index.jsx
@@ -272,6 +272,33 @@
             </Form.Item>
           </Col>
         )
+      } else if (item.type === 'multiselect') { // 澶氶��
+        let _initval = item.initval ? item.initval.split(',').filter(Boolean) : []
+        fields.push(
+          <Col span={24 / cols} key={index}>
+            <Form.Item label={item.label}>
+              {getFieldDecorator(item.field, {
+                initialValue: _initval,
+                rules: [
+                  {
+                    required: item.required === 'true',
+                    message: this.props.dict['form.required.select'] + item.label + '!'
+                  }
+                ]
+              })(
+                <Select
+                  showSearch
+                  mode="multiple"
+                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+                >
+                  {item.options.map(option =>
+                    <Select.Option id={option.key} title={option.Text} key={option.key} value={option.Value}>{option.Text}</Select.Option>
+                  )}
+                </Select>
+              )}
+            </Form.Item>
+          </Col>
+        )
       } else if (item.type === 'date') { // 鏃堕棿鎼滅储
         let _initval = this.props.data ? this.props.data[item.field] : ''
         if (_initval) {
@@ -398,6 +425,13 @@
                 key: key,
                 value: values[key]
               })
+            } else if (this.state.datatype[key] === 'multiselect') {
+              search.push({
+                type: this.state.datatype[key],
+                readonly: this.state.readtype[key],
+                key: key,
+                value: values[key] ? values[key].join(',') : ''
+              })
             } else {
               search.push({
                 type: this.state.datatype[key],

--
Gitblit v1.8.0