import React, {Component} from 'react'
|
import PropTypes from 'prop-types'
|
import { is, fromJS } from 'immutable'
|
// import { Button, Select, Input, DatePicker } from 'antd'
|
// import { EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
|
|
import Api from '@/api'
|
// import MKEmitter from '@/utils/events.js'
|
import './index.scss'
|
|
class AccountModule extends Component {
|
static propTpyes = {
|
config: PropTypes.object
|
}
|
|
state = {
|
BID: '',
|
type: '',
|
config: null
|
}
|
|
UNSAFE_componentWillMount () {
|
const { config } = this.props
|
|
let BID = ''
|
let BData = ''
|
|
if (config.wrap.supModule) {
|
BData = window.GLOB.CacheData.get(config.wrap.supModule)
|
} else {
|
BData = window.GLOB.CacheData.get(config.$pageId)
|
}
|
if (BData) {
|
BID = BData.$BID || ''
|
}
|
|
this.setState({
|
config: fromJS(config).toJS(),
|
BID: BID || '',
|
type: config.wrap.type
|
}, () => {
|
this.loadData()
|
})
|
}
|
|
componentDidMount () {
|
|
}
|
|
shouldComponentUpdate (nextProps, nextState) {
|
return !is(fromJS(this.state), fromJS(nextState))
|
}
|
|
/**
|
* @description 组件销毁,清除state更新,清除快捷键设置
|
*/
|
componentWillUnmount () {
|
this.setState = () => {
|
return
|
}
|
}
|
|
loadData = () => {
|
let param = {
|
func: 's_get_fcc_account_data'
|
}
|
Api.genericInterface(param)
|
|
let _param = {
|
func: 's_get_fcc_book_data'
|
}
|
Api.genericInterface(_param)
|
}
|
|
render() {
|
const { config } = this.state
|
|
return (
|
<div className="menu-account-wrap" style={config.style}>
|
|
</div>
|
)
|
}
|
}
|
|
export default AccountModule
|