import React, { Component, Fragment } from 'react';
import { Dispatch } from 'redux';
import { RouteContext, GridContent } from '@ant-design/pro-layout';
import { connect } from 'dva';
import {
Button,
Menu,
Dropdown,
Icon,
Row,
Col,
Steps,
Card,
Popover,
PageHeader,
Badge,
Table,
Tooltip,
Divider,
Typography,
Tabs,
} from 'antd';
import { TabsProps } from 'antd/lib/tabs';
import classNames from 'classnames';
import DescriptionList from './DescriptionList';
import styles from './style.less';
import { AdvancedProfileData } from './data';
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: '规则',
},
];
/**
* render Footer tabList
* In order to be compatible with the old version of the PageHeader
* basically all the functions are implemented.
*/
const RenderFooter = ({
tabList,
tabActiveKey,
onTabChange,
tabBarExtraContent,
}: {
tabList: Array<{
tab: string;
key: string;
}>;
tabActiveKey?: string;
onTabChange?: (key: string) => void;
tabBarExtraContent?: TabsProps['tabBarExtraContent'];
}) => {
return tabList && tabList.length ? (
{
if (onTabChange) {
onTabChange(key);
}
}}
tabBarExtraContent={tabBarExtraContent}
>
{tabList.map(item => (
))}
) : null;
};
const desc1 = (
);
const desc2 = (
);
const popoverContent = (
);
const customDot = (
dot: React.ReactNode,
{
status,
}: {
status: string;
}
) =>
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: string) =>
text === 'agree' ? (
) : (
),
},
{
title: '操作时间',
dataIndex: 'updatedAt',
key: 'updatedAt',
},
{
title: '备注',
dataIndex: 'memo',
key: 'memo',
},
];
@connect(
({
BLOCK_NAME_CAMEL_CASE,
loading,
}: {
BLOCK_NAME_CAMEL_CASE: AdvancedProfileData;
loading: {
effects: { [key: string]: boolean };
};
}) => ({
BLOCK_NAME_CAMEL_CASE,
loading: loading.effects['BLOCK_NAME_CAMEL_CASE/fetchAdvanced'],
})
)
class PAGE_NAME_UPPER_CAMEL_CASE extends Component<
{ loading: boolean; BLOCK_NAME_CAMEL_CASE: AdvancedProfileData; dispatch: Dispatch },
{
operationKey: string;
stepDirection: 'horizontal' | 'vertical';
}
> {
public state: {
operationKey: string;
stepDirection: 'horizontal' | 'vertical';
} = {
operationKey: 'tab1',
stepDirection: 'horizontal',
};
componentDidMount() {
const { dispatch, BLOCK_NAME_CAMEL_CASE } = this.props;
console.log(BLOCK_NAME_CAMEL_CASE);
dispatch({
type: 'BLOCK_NAME_CAMEL_CASE/fetchAdvanced',
});
this.setStepDirection();
window.addEventListener('resize', this.setStepDirection, { passive: true });
}
componentWillUnmount() {
window.removeEventListener('resize', this.setStepDirection);
}
onOperationTabChange = (key: string) => {
this.setState({ operationKey: key });
};
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 { BLOCK_NAME_CAMEL_CASE, loading } = this.props;
const { advancedOperation1, advancedOperation2, advancedOperation3 } = BLOCK_NAME_CAMEL_CASE;
const contentList = {
tab1: (
),
tab2: (
),
tab3: (
),
};
return (
{value => {
return (
<>
单号:234231029431
}
style={{
margin: -24,
}}
extra={action}
footer={}
>
{description}
{extra}
付小小
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]}
>
);
}}
);
}
}
export default PAGE_NAME_UPPER_CAMEL_CASE;