import React from 'react'
import {
toJS
} from 'mobx'
import {
inject,
observer,
} from 'mobx-react'
import {
WeaTop,
WeaAlertPage,
WeaBrowser
} from 'ecCom'
import {
Spin,
} from 'antd';
import {
i18n
} from '../../public/i18n';
import '../../style/import.css';
import { addContentPath } from '../../util/index.js';
import StepDialog from './stepDialog';
@inject("newImport")
@observer
export default class newImport extends React.Component {
constructor(props) {
super(props);
this.state = ({
title: '基础数据导入',
})
}
componentWillMount() {
}
componentDidMount() {
}
getImportCard = () => {
const {
newImport
} = this.props, {
isMouseOver,
curIndex,
cardConfig,
setMouseStatus,
} = newImport;
let arr = [];
cardConfig.map((c, index) => {
arr.push(
setMouseStatus(index, true)} onMouseLeave={() => setMouseStatus(index, false)}>
{curIndex == index && isMouseOver ? this.getLinkName(c.linkName, index) : this.getIcon(c.icon)}
{curIndex == index && isMouseOver ? this.getSubTitle(c.subTitle, c.url) : this.getTitle(c.title)}
)
});
return arr;
}
getIcon = (icon) => {
return (
)
}
getTitle = (title) => {
return ({title}
)
}
getLinkName = (linkName, index) => {
return ()
}
getSubTitle = (subTitle, url) => {
return ()
}
handleClick = (index) => {
const {
newImport
} = this.props, {
} = newImport;
switch (index) {
case 0:
newImport.importType = 'company';
break;
case 1:
newImport.importType = 'department';
break;
case 2:
newImport.importType = 'jobtitle';
break;
case 3:
newImport.importType = 'resource';
break;
}
newImport.buttonTitle = i18n.button.nextStep();
newImport.current = 0;
newImport.visible = true;
newImport.getImportField();
}
render() {
const {
newImport,
} = this.props, {
visible
} = newImport, {
title,
} = this.state;
return (
}
iconBgcolor='#217346'
loading={true}
showDropIcon={true}
>
{this.getImportCard()}
{visible && }
)
}
}