king
2019-12-30 84e806945ef8982508a79e0b62a7bcb0881b108c
src/templates/comtableconfig/tabform/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Select, Icon } from 'antd'
import { Form, Row, Col, Input, Select, Icon, Tooltip } from 'antd'
import Utils from '@/utils/utils.js'
import './index.scss'
@@ -150,6 +150,31 @@
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'mutilselect') {
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="标签可关联下级标签,下级标签可选范围:相邻的下侧标签组中未被同级或主表关联的标签。">
                <Icon type="question-circle" />
                {item.label}
              </Tooltip>
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal
              })(
                <Select
                  mode="multiple"
                  style={{ width: '100%' }}
                  placeholder="Please select"
                >
                  {item.options.map((option, index) =>
                    <Select.Option id={option.uuid} title={option.label} key={index} value={option.uuid}>{option.label}</Select.Option>
                  )}
                </Select>
              )}
            </Form.Item>
          </Col>
        )
      }
    })
@@ -163,6 +188,7 @@
        if (!err) {
          values.uuid = this.props.card.uuid
          values.groupId = this.props.card.groupId
          if (!values.linkTab) { // 没有关联标签(新建时),创建新标签Id
            values.linkTab = Utils.getuuid()