| | |
| | | |
| | | class CustomMenuForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | config: PropTypes.object, |
| | | MenuId: PropTypes.string, |
| | | adapters: PropTypes.array, |
| | |
| | | } |
| | | |
| | | this.props.updateConfig(_config) |
| | | // if (key === 'cacheUseful') { |
| | | // this.props.updateConfig({...config, cacheUseful: value}) |
| | | // } else if (key === 'timeUnit') { |
| | | // this.props.updateConfig({...config, timeUnit: value}) |
| | | // } else if (key === 'advertUrl') { |
| | | // this.props.updateConfig({...config, advertUrl: value}) |
| | | // } else if (key === 'advertTime') { |
| | | // this.props.updateConfig({...config, advertTime: value}) |
| | | // } else if (key === 'pullRefresh') { |
| | | // this.props.updateConfig({...config, pullRefresh: value}) |
| | | // } else if (key === 'statusBarbgColor') { |
| | | // this.props.updateConfig({...config, statusBarbgColor: value}) |
| | | // } else if (key === 'permission') { |
| | | // this.props.updateConfig({...config, permission: value}) |
| | | // } else if (key === 'share') { |
| | | // this.props.updateConfig({...config, share: value}) |
| | | // } |
| | | } |
| | | |
| | | // 菜单名称 |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { dict, config, adapters } = this.props |
| | | const { config, adapters } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | <Form {...formItemLayout} className="custom-menu-form"> |
| | | <Row> |
| | | <Col span={24}> |
| | | <Form.Item label={dict['mob.menu'] + dict['mob.name']}> |
| | | <Form.Item label="菜单名称"> |
| | | {getFieldDecorator('MenuName', { |
| | | initialValue: config.MenuName, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.name'] + '!' |
| | | message: '请输入菜单名称!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" onChange={this.changeName}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label={dict['mob.menu'] + dict['mob.param']}> |
| | | <Form.Item label="菜单参数"> |
| | | {getFieldDecorator('MenuNo', { |
| | | initialValue: config.MenuNo, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.param'] + '!' |
| | | message: '请输入菜单参数!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" onChange={this.changeNo}/>)} |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | {/* <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="跳过权限验证时,页面中组件及按钮不在进行权限控制。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | </Col> */} |
| | | <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="使用登录验证后,用户必须登录系统后才可以访问,注:含有登录组件的页面中无效。"> |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['mob.required.input'] + '时长!' |
| | | message: '请输入时长!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['mob.required.input'] + '停留时间!' |
| | | message: '请输入停留时间!' |
| | | } |
| | | ] |
| | | })( |