import React, { Component, Fragment } from 'react';
import Debounce from 'lodash-decorators/debounce';
import Bind from 'lodash-decorators/bind';
import { connect } from 'dva';
import {
Button,
Menu,
Dropdown,
Icon,
Row,
Col,
Steps,
Card,
Popover,
Badge,
Table,
Tooltip,
Divider,
} from 'antd';
import classNames from 'classnames';
import DescriptionList from '@/components/DescriptionList';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import styles from './AdvancedProfile.less';
const { Step } = Steps;
const { Description } = DescriptionList;
const ButtonGroup = Button.Group;
const getWindowWidth = () => window.innerWidth || document.documentElement.clientWidth;
const menu = (
);
const action = (
);
const extra = (
状态
待审批
订单金额
¥ 568.08
);
const description = (
曲丽丽
XX 服务
2017-07-07
12421
2017-07-07 ~ 2017-08-08
请于两个工作日内确认
);
const tabList = [
{
key: 'detail',
tab: '详情',
},
{
key: 'rule',
tab: '规则',
},
];
const desc1 = (
);
const desc2 = (
);
const popoverContent = (
);
const customDot = (dot, { status }) =>
status === 'process' ? (
{dot}
) : (
dot
);
const operationTabList = [
{
key: 'tab1',
tab: '操作日志一',
},
{
key: 'tab2',
tab: '操作日志二',
},
{
key: 'tab3',
tab: '操作日志三',
},
];
const columns = [
{
title: '操作类型',
dataIndex: 'type',
key: 'type',
},
{
title: '操作人',
dataIndex: 'name',
key: 'name',
},
{
title: '执行结果',
dataIndex: 'status',
key: 'status',
render: text =>
text === 'agree' ? (
) : (
),
},
{
title: '操作时间',
dataIndex: 'updatedAt',
key: 'updatedAt',
},
{
title: '备注',
dataIndex: 'memo',
key: 'memo',
},
];
@connect(({ profile, loading }) => ({
profile,
loading: loading.effects['profile/fetchAdvanced'],
}))
export default class AdvancedProfile extends Component {
state = {
operationkey: 'tab1',
stepDirection: 'horizontal',
};
componentDidMount() {
const { dispatch } = this.props;
dispatch({
type: 'profile/fetchAdvanced',
});
this.setStepDirection();
window.addEventListener('resize', this.setStepDirection, { passive: true });
}
componentWillUnmount() {
window.removeEventListener('resize', this.setStepDirection);
this.setStepDirection.cancel();
}
onOperationTabChange = key => {
this.setState({ operationkey: key });
};
@Bind()
@Debounce(200)
setStepDirection() {
const { stepDirection } = this.state;
const w = getWindowWidth();
if (stepDirection !== 'vertical' && w <= 576) {
this.setState({
stepDirection: 'vertical',
});
} else if (stepDirection !== 'horizontal' && w > 576) {
this.setState({
stepDirection: 'horizontal',
});
}
}
render() {
const { stepDirection, operationkey } = this.state;
const { profile, loading } = this.props;
const { advancedOperation1, advancedOperation2, advancedOperation3 } = profile;
const contentList = {
tab1: (
),
tab2: (
),
tab3: (
),
};
return (
}
action={action}
content={description}
extraContent={extra}
tabList={tabList}
>
付小小
32943898021309809423
3321944288191034921
18112345678
曲丽丽 18100000000 浙江省杭州市西湖区黄姑山路工专路交叉路口
725
2017-08-08
某某数据
}
>
725
2017-08-08
信息组
林东东
1234567
XX公司 - YY部
2017-08-08
这段描述很长很长很长很长很长很长很长很长很长很长很长很长很长很长...
Citrullus lanatus (Thunb.) Matsum. et
Nakai一年生蔓生藤本;茎、枝粗壮,具明显的棱。卷须较粗..
付小小
1234568
暂无数据
{contentList[operationkey]}
);
}
}