| | |
| | | UNSAFE_componentWillMount () { |
| | | const { MenuId, config } = this.props |
| | | let _param = {func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'} |
| | | if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { |
| | | _param.linkurl = window.GLOB.linkurl |
| | | } |
| | | _param.pro_sys = window.GLOB.systemType === 'production' ? 'Y' : '' |
| | | |
| | | Api.getSystemConfig(_param).then(result => { |
| | |
| | | }) |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps(nextProps) { |
| | | const { config } = this.props |
| | | if (!config && nextProps.config) { |
| | | this.props.form.setFieldsValue({easyCode: nextProps.config.easyCode}) |
| | | } |
| | | } |
| | | |
| | | // 一二级菜单切换 |
| | | selectChange = (key, value) => { |
| | | const { config } = this.props |
| | |
| | | this.props.updateConfig({...config, cacheUseful: value}) |
| | | } else if (key === 'timeUnit') { |
| | | this.props.updateConfig({...config, timeUnit: value}) |
| | | } else if (key === 'OpenType') { |
| | | this.props.updateConfig({...config, OpenType: value}) |
| | | } |
| | | } |
| | | |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label="打开方式"> |
| | | {getFieldDecorator('OpenType', { |
| | | initialValue: config.OpenType || 'newtab', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.select'] + dict['model.openway'] + '!' |
| | | } |
| | | ] |
| | | })( |
| | | <Select onChange={(value) => {this.selectChange('OpenType', value)}}> |
| | | <Select.Option value="newtab">标签页</Select.Option> |
| | | <Select.Option value="newpage">新页面</Select.Option> |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="对于不经常性变动的信息,缓存数据有助于提高查询效率。"> |
| | | <Icon type="question-circle" /> |