| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | menu: PropTypes.object, |
| | | config: PropTypes.object, |
| | | updatemenu: PropTypes.func |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { dict, menu, config } = this.props |
| | | const { menu, config } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | <Form {...formItemLayout} className="comtable-menu-form" id="subqazxcvbn"> |
| | | <Row gutter={24}> |
| | | <Col span={24}> |
| | | <Form.Item label={dict['model.menu.level1']}> |
| | | <Form.Item label="一级菜单"> |
| | | {getFieldDecorator('fstMenuId', { |
| | | initialValue: menu.fstMenuId, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.select'] + dict['model.menu.level1'] + '!' |
| | | message: '请选择一级菜单!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label={dict['model.menu.level2']}> |
| | | <Form.Item label="二级菜单"> |
| | | {getFieldDecorator('ParentId', { |
| | | initialValue: menu.ParentId, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.select'] + dict['model.menu.level2'] + '!' |
| | | message: '请选择二级菜单!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label={dict['model.menu'] + dict['model.name']}> |
| | | <Form.Item label="菜单名称"> |
| | | {getFieldDecorator('MenuName', { |
| | | initialValue: menu.MenuName, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.input'] + dict['model.menu'] + dict['model.name'] + '!' |
| | | message: '请输入菜单名称!' |
| | | }, |
| | | { |
| | | max: formRule.input.max, |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label={dict['model.menu'] + dict['model.param']}> |
| | | <Form.Item label="菜单参数"> |
| | | {getFieldDecorator('MenuNo', { |
| | | initialValue: menu.MenuNo, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.input'] + dict['model.menu'] + dict['model.param'] + '!' |
| | | message: '请输入菜单参数!' |
| | | }, |
| | | { |
| | | max: formRule.input.max, |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label={dict['model.openway']}> |
| | | <Form.Item label="打开方式"> |
| | | {getFieldDecorator('opentype', { |
| | | initialValue: menu.PageParam ? menu.PageParam.OpenType : 'newtab', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.select'] + dict['model.openway'] + '!' |
| | | message: '请选择打开方式!' |
| | | } |
| | | ] |
| | | })( |
| | | <Select onChange={(value) => {this.selectChange('opentype', value)}}> |
| | | <Select.Option value="newtab">{dict['model.form.tab']}</Select.Option> |
| | | <Select.Option value="newpage">{dict['model.form.newpage']}</Select.Option> |
| | | {/* <Select.Option value="currenttab">{dict['model.form.currenttab']}</Select.Option> */} |
| | | <Select.Option value="newtab">标签页</Select.Option> |
| | | <Select.Option value="newpage">新页面</Select.Option> |
| | | </Select> |
| | | )} |
| | | </Form.Item> |