| | |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification } from 'antd' |
| | | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import SettingForm from './settingform' |
| | | import Api from '@/api' |
| | | import './index.scss' |
| | |
| | | } |
| | | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | visible: false, |
| | | } |
| | | |
| | |
| | | return |
| | | } |
| | | |
| | | Api.getSystemConfig({ |
| | | Api.getCloudConfig({ |
| | | func: 'sPC_Get_LongParam', |
| | | TypeCharOne: sessionStorage.getItem('kei_no'), |
| | | typename: 'pc', |
| | | typename: sessionStorage.getItem('typename') || 'pc', |
| | | MenuID: res.keys_id |
| | | }).then(result => { |
| | | if (!result.status) { |
| | |
| | | |
| | | config.components.unshift(_config) |
| | | |
| | | if (sessionStorage.getItem('appType') !== 'pc' && !config.style.paddingBottom) { |
| | | config.style.paddingBottom = '50px' |
| | | } else if (sessionStorage.getItem('appType') === 'pc' && !config.style.paddingTop) { |
| | | config.style.paddingTop = '50px' |
| | | } |
| | | |
| | | this.setState({ |
| | | visible: false |
| | | }) |
| | |
| | | |
| | | render () { |
| | | const { config } = this.props |
| | | const { visible, dict } = this.state |
| | | const { visible } = this.state |
| | | |
| | | return ( |
| | | <div className="quote-wrap"> |
| | | <Button icon="appstore" onClick={() => {this.setState({visible: true})}}>组件引用</Button> |
| | | <Button icon="appstore" onClick={() => {this.setState({visible: true})}}>关联菜单栏</Button> |
| | | <Modal |
| | | title="组件引用" |
| | | title="关联菜单栏" |
| | | visible={visible} |
| | | width={500} |
| | | maskClosable={false} |
| | | okText={dict['model.submit']} |
| | | okText="提交" |
| | | onOk={this.verifySubmit} |
| | | onCancel={() => { this.setState({ visible: false }) }} |
| | | destroyOnClose |
| | | > |
| | | <SettingForm |
| | | dict={dict} |
| | | config={config} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> |