| | |
| | | group: ['label', 'type', 'field', 'datefield', 'initval', 'blacklist', 'ratio', 'items', 'required', 'labelShow', 'query', 'labelwidth'], |
| | | switch: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'openVal', 'closeVal', 'openText', 'closeText', 'Hide', 'labelShow', 'advanced', 'query', 'labelwidth'], |
| | | check: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'openVal', 'closeVal', 'checkTip', 'Hide', 'labelShow', 'advanced', 'query', 'labelwidth'], |
| | | range: ['label', 'type', 'field', 'initval', 'match', 'blacklist', 'Hide', 'required', 'maxValue', 'minValue', 'step', 'labelShow', 'query', 'labelwidth'] |
| | | range: ['label', 'type', 'field', 'initval', 'match', 'ratio', 'blacklist', 'Hide', 'required', 'maxValue', 'minValue', 'step', 'labelShow', 'query', 'labelwidth', 'advanced'] |
| | | } |
| | | |
| | | class MainSearch extends Component { |
| | |
| | | reOptions.match = matchReg.class1 |
| | | } else if (type === 'switch' || type === 'check') { |
| | | reOptions.match = matchReg.class2 |
| | | if (type === 'switch') { |
| | | reLabel.openVal = '开启值' |
| | | reLabel.closeVal = '关闭值' |
| | | } else { |
| | | reLabel.openVal = '勾选值' |
| | | reLabel.closeVal = '不勾选值' |
| | | } |
| | | } else if (type === 'date') { |
| | | reOptions.match = matchReg.class4 |
| | | } else if (type === 'datemonth') { |
| | |
| | | |
| | | if (values.type === 'range') { |
| | | let error = '' |
| | | if (sessionStorage.getItem('appType') === 'mob') { |
| | | if (values.maxValue <= values.minValue) { |
| | | error = '最大值必须大于最小值' |
| | | } else if (values.step <= 0) { |
| | |
| | | } |
| | | } |
| | | } |
| | | } else if (values.initval) { |
| | | let vals = values.initval.split(',') |
| | | if (vals.length !== 2) { |
| | | error = '初始值设置错误!' |
| | | } else if (isNaN(parseFloat(vals[0])) || isNaN(parseFloat(vals[1]))) { |
| | | error = '初始值设置错误!' |
| | | } |
| | | } |
| | | |
| | | if (error) { |
| | | notification.warning({ |
| | | top: 92, |