| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, Select, Radio, Tooltip, Input, notification } from 'antd' |
| | | import { Form, Row, Col, Select, Radio, Tooltip, Input } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | |
| | | } |
| | | |
| | | onOptionChange = (value, key) => { |
| | | const { verify, setting } = this.props |
| | | const { verify } = this.props |
| | | |
| | | let _verify = {...verify, [key]: value} |
| | | |
| | |
| | | if (this.state.selectTemp) { |
| | | this.setState({selectTemp: null}) |
| | | } |
| | | } |
| | | |
| | | if (verify.invalid !== 'true' && _verify.invalid === 'true' && setting.maxScript && setting.maxScript >= 300) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '数据源中自定义脚本过于复杂,不能使用失效验证!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | this.props.onChange(_verify) |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {card.intertype !== 'inner' ? <Col span={8}> |
| | | <Form.Item label={'失效验证'}> |
| | | <Radio.Group value={verify.invalid} onChange={(e) => {this.onOptionChange(e.target.value, 'invalid')}}> |
| | | <Form.Item label={ |
| | | verify.limitText ? <Tooltip placement="bottomLeft" title={verify.limitText}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 失效验证 |
| | | </Tooltip> : '失效验证' |
| | | }> |
| | | <Radio.Group value={verify.invalid} disabled={verify.limitInvalid} onChange={(e) => {this.onOptionChange(e.target.value, 'invalid')}}> |
| | | <Radio value="true">开启</Radio> |
| | | <Radio value="false">不开启</Radio> |
| | | </Radio.Group> |