| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Form, Row, Col, Input, Select, InputNumber, Radio, Tooltip, Modal, notification, Popover } from 'antd' |
| | | import { Form, Row, Col, Input, Select, InputNumber, Radio, Checkbox, Tooltip, Modal, notification, Popover } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | |
| | | _options.push('hourFormat') |
| | | } |
| | | } |
| | | if (this.record.type === 'formula' && this.record.eval === 'true') { |
| | | if (this.record.type === 'formula') { |
| | | if (this.record.eval === 'true') { |
| | | _options.push('decimal') |
| | | } |
| | | if (this.record.eval !== 'func') { |
| | | _options.push('evalchars') |
| | | } |
| | | } else if (this.record.type === 'custom' && this.record.IsSort === 'true') { |
| | | _options.push('sortField') |
| | | } |
| | |
| | | content = <Radio.Group onChange={(e) => {this.typeChange(item.key, e.target.value)}}> |
| | | {item.options.map(option => <Radio key={option.value} value={option.value}>{option.text}</Radio>)} |
| | | </Radio.Group> |
| | | } else if (item.type === 'checkbox') { |
| | | rules = [ |
| | | { required: item.required, message: '请选择' + item.label + '!' } |
| | | ] |
| | | initVal = item.initVal |
| | | |
| | | content = <Checkbox.Group onChange={(e) => {this.typeChange(item.key, e.target.value)}}> |
| | | {item.options.map(option => <Checkbox key={option.value} value={option.value}>{option.text}</Checkbox>)} |
| | | </Checkbox.Group> |
| | | } else if (item.type === 'multiselect') { // 多选 |
| | | content = <Select |
| | | showSearch |