| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | card: PropTypes.any, |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: this.props.dict['model.name'], |
| | | label: '名称', |
| | | initVal: this.props.card.label, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'Align', |
| | | label: this.props.dict['model.form.align'], |
| | | label: '对齐方式', |
| | | initVal: this.props.card.Align, |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'left', |
| | | text: this.props.dict['model.form.alignLeft'] |
| | | text: '左对齐' |
| | | }, { |
| | | MenuID: 'right', |
| | | text: this.props.dict['model.form.alignRight'] |
| | | text: '右对齐' |
| | | }, { |
| | | MenuID: 'center', |
| | | text: this.props.dict['model.form.alignCenter'] |
| | | text: '居中' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'Width', |
| | | decimal: 0, |
| | | label: this.props.dict['model.form.columnWidth'], |
| | | label: '列宽', |
| | | initVal: this.props.card.Width, |
| | | required: true |
| | | }, |
| | |
| | | rules: [ |
| | | { |
| | | required: !!item.required, |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | message: '请输入' + item.label + '!' |
| | | }, |
| | | { |
| | | max: formRule.input.max, |
| | |
| | | rules: [ |
| | | { |
| | | required: !!item.required, |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | message: '请输入' + item.label + '!' |
| | | } |
| | | ] |
| | | })(<InputNumber min={1} max={1000} precision={item.decimal} />)} |
| | |
| | | rules: [ |
| | | { |
| | | required: !!item.required, |
| | | message: this.props.dict['form.required.select'] + item.label + '!' |
| | | message: '请选择' + item.label + '!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | rules: [ |
| | | { |
| | | required: !!item.required, |
| | | message: this.props.dict['form.required.select'] + item.label + '!' |
| | | message: '请选择' + item.label + '!' |
| | | } |
| | | ] |
| | | })( |