| | |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | menu: PropTypes.object, // 菜单信息 |
| | | permFuncField: PropTypes.any, // 存储过程可用开始字符 |
| | | setting: PropTypes.object, // 数据源配置 |
| | | inputSubmit: PropTypes.func // 触发提交 |
| | | } |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { setting, permFuncField } = this.props |
| | | const { setting } = this.props |
| | | |
| | | let usefulFields = sessionStorage.getItem('permFuncField') |
| | | let tooltip = null |
| | | let rules = [] |
| | | |
| | | if (permFuncField && permFuncField.length > 0) { |
| | | tooltip = '开头可用字符:' + permFuncField.join(', ') |
| | | let str = '^(' + permFuncField.join('|') + ')' |
| | | if (usefulFields) { |
| | | try { |
| | | usefulFields = JSON.parse(usefulFields) |
| | | } catch (e) { |
| | | usefulFields = [] |
| | | } |
| | | } else { |
| | | usefulFields = [] |
| | | } |
| | | |
| | | if (usefulFields.length > 0) { |
| | | tooltip = '开头可用字符:' + usefulFields.join(', ') |
| | | let str = '^(' + usefulFields.join('|') + ')' |
| | | let _patten = new RegExp(str + formRule.func.innerPattern + '$', 'g') |
| | | |
| | | rules.push({ |
| | |
| | | message: dict['form.required.input'] + '表名!' |
| | | }, |
| | | { |
| | | max: formRule.input.max, |
| | | message: formRule.input.message |
| | | max: 50, |
| | | message: '表名最长为50个字符!' |
| | | } |
| | | ] |
| | | })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)} |
| | |
| | | <Col span={12}> |
| | | <Form.Item label="排序"> |
| | | {getFieldDecorator('order', { |
| | | initialValue: setting.order || '', |
| | | initialValue: setting.order || 'ID desc', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title={'父级字段值与顶级标识(默认值为空)相同时,视为顶级节点。'}> |
| | | <Tooltip placement="topLeft" title={'父级字段值与顶级标识相同时,视为顶级节点。'}> |
| | | <Icon type="question-circle" /> |
| | | 顶级标识 |
| | | </Tooltip> |
| | |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title={'每行分为24份,树形比例可设置为2-12(最大50%)'}> |
| | | <Tooltip placement="topLeft" title={'栅格布局,每行等分为24列,树形比例可设置为2-12(最大50%)'}> |
| | | <Icon type="question-circle" /> |
| | | 宽度 |
| | | </Tooltip> |