You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
GHHub/src/views/reservation/Detail.jsx

102 lines
2.1 KiB
React

import { useParams } from "react-router-dom";
import { useEffect } from 'react';
import { observer } from "mobx-react";
import { toJS } from "mobx";
import moment from "moment";
import { Row, Col, Space, Button, Table, Tag, Typography, DatePicker } from 'antd';
import { useStore } from '../../stores/StoreContext.js';
const { Title } = Typography;
const dataSource = [
{
key: '1',
name: '2',
age: '二',
address: '5月2日',
},
{
key: '2',
name: '胡彦祖',
age: 42,
address: '西湖区湖底公园1号',
},
];
const columns = [
{
title: '天数',
dataIndex: 'name',
key: 'name',
},
{
title: '星期',
dataIndex: 'age',
key: 'age',
},
{
title: '日期',
dataIndex: 'address',
key: 'address',
},
{
title: '始发城市',
dataIndex: 'address',
key: 'address',
},
{
title: '抵达城市',
dataIndex: 'address',
key: 'address',
},
{
title: '交通',
dataIndex: 'address',
key: 'address',
},
{
title: '酒店',
dataIndex: 'address',
key: 'address',
},
{
title: '餐饮 [午、晚]',
dataIndex: 'address',
key: 'address',
},
{
title: '景点及旅游服务安排',
dataIndex: 'address',
key: 'address',
},
];
function Detail() {
const { reservationId } = useParams();
const { reservationStore } = useStore();
const { reservationList } = reservationStore;
useEffect(() => {
console.info('Detail.useEffect: ' + reservationId);
}, [reservationId]);
return (
<Space direction="vertical" style={{ width: '100%' }}>
<Row gutter={{ md: 24 }}>
<Col span={20}>
<Title level={4}>Reservation Detail 中华游111029-N111025076</Title>
</Col>
<Col span={4}>
<Button type="link" onClick={() => plan.fetchRecent()}>Return</Button>
</Col>
</Row>
<Row>
<Col span={24}>
<Table dataSource={dataSource} columns={columns} />
</Col>
</Row>
</Space>
);
}
export default observer(Detail);