| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, Select, notification, Switch } from 'antd' |
| | | import { Form, Row, Col, Input, Select, notification, Switch, Radio } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import './index.scss' |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { config } = this.props |
| | | |
| | | if (sessionStorage.getItem('thdMenuList') && sessionStorage.getItem('fstMenuList')) { |
| | | this.setMenus() |
| | | } else { |
| | | this.getMenus() |
| | | } |
| | | |
| | | window.GLOB.process = config.process === 'true' |
| | | } |
| | | |
| | | setMenus = () => { |
| | |
| | | this.props.form.setFieldsValue({parentId: _id}) |
| | | this.props.updateConfig({...config, fstMenuId: value, parentId: _id}) |
| | | }) |
| | | } else if (key === 'parentId') { |
| | | this.props.updateConfig({...config, parentId: value}) |
| | | } else if (key === 'OpenType') { |
| | | this.props.updateConfig({...config, OpenType: value}) |
| | | } else if (key === 'hidden') { |
| | | this.props.updateConfig({...config, hidden: value}) |
| | | } else { |
| | | if (key === 'process') { |
| | | window.GLOB.process = value === 'true' |
| | | } |
| | | |
| | | this.props.updateConfig({...config, [key]: value}) |
| | | } |
| | | } |
| | | |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label="工作流"> |
| | | {getFieldDecorator('process', { |
| | | initialValue: config.process || 'false' |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.selectChange('process', e.target.value)}}> |
| | | <Radio value="true">使用</Radio> |
| | | <Radio value="false">不使用</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label={'隐藏菜单'}> |
| | | <Switch checkedChildren={'是'} checked={config.hidden === 'true'} unCheckedChildren={'否'} onChange={(value) => { |
| | | this.selectChange('hidden', value + '') |