|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
import { useContext, useEffect, useState } from 'react';
|
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
|
import { Row, Col, Spin, Space, Radio, Table, Button } from 'antd';
|
|
|
|
|
import { Row, Col, Spin, Space, Radio, Table, Button, } from 'antd';
|
|
|
|
|
import { CheckCircleTwoTone, MoneyCollectTwoTone, FlagTwoTone, SmileTwoTone } from '@ant-design/icons';
|
|
|
|
|
import { stores_Context } from '../config';
|
|
|
|
|
import StatisticCard2 from '../components/StatisticCard2';
|
|
|
|
@ -25,6 +25,7 @@ const topSeries = [
|
|
|
|
|
{ key: 'country', value: 'country', label: '国籍', graphVisible: true },
|
|
|
|
|
{ key: 'webcode', value: 'webcode', label: '站点', graphVisible: false },
|
|
|
|
|
{ key: 'bizarea', value: 'bizarea', label: '国境', graphVisible: false },
|
|
|
|
|
{ key: 'destinationcountry', value: 'destinationcountry', label: '目的地国籍', graphVisible: false },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const allGroupTypes = [
|
|
|
|
@ -37,17 +38,27 @@ const iconSets = [CheckCircleTwoTone, MoneyCollectTwoTone, FlagTwoTone, SmileTwo
|
|
|
|
|
|
|
|
|
|
export default observer(() => {
|
|
|
|
|
// const navigate = useNavigate();
|
|
|
|
|
const { TradeStore, date_picker_store: searchFormStore } = useContext(stores_Context);
|
|
|
|
|
const { TradeStore, date_picker_store: searchFormStore, DistributionStore } = useContext(stores_Context);
|
|
|
|
|
const { searchValues, sideData, summaryData, BuData, topData, timeData, timeLineKey, targetTableProps, timeDiffData, groupKey } = TradeStore;
|
|
|
|
|
const { formValues, siderBroken } = searchFormStore;
|
|
|
|
|
const { formValues, formValuesToSub, siderBroken } = searchFormStore;
|
|
|
|
|
|
|
|
|
|
const { curTab, dateStringQ, dateStringY } = DistributionStore;
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (empty(summaryData.dataSource)) {
|
|
|
|
|
// pageRefresh();
|
|
|
|
|
}
|
|
|
|
|
DistributionStore.setCurTab('destinationCountry');
|
|
|
|
|
// if (empty(summaryData.dataSource)) {
|
|
|
|
|
// // pageRefresh();
|
|
|
|
|
// }
|
|
|
|
|
return () => {};
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
const getDestinationCountry = (obj) => {
|
|
|
|
|
DistributionStore.setCurTab('destinationCountry');
|
|
|
|
|
DistributionStore.getApartData({
|
|
|
|
|
...(obj || formValuesToSub),
|
|
|
|
|
}, false);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const [topSeriesSet, setTopSeriesSet] = useState(topSeries);
|
|
|
|
|
const [overviewFlag, setOverviewFlag] = useState(true);
|
|
|
|
|
const [groupTypeVal, setGroupTypeVal] = useState('overview');
|
|
|
|
@ -200,6 +211,7 @@ export default observer(() => {
|
|
|
|
|
onSubmit={(_err, obj, form, str) => {
|
|
|
|
|
TradeStore.setSearch(obj, form);
|
|
|
|
|
pageRefresh(obj);
|
|
|
|
|
getDestinationCountry(obj);
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
@ -308,10 +320,21 @@ export default observer(() => {
|
|
|
|
|
</Col>
|
|
|
|
|
) : null
|
|
|
|
|
)}
|
|
|
|
|
<Col key={'mapG'} flex={'1 0 600px'} >
|
|
|
|
|
<Col key={'mapG'} span={24}>
|
|
|
|
|
<hr />
|
|
|
|
|
<h3>来源国籍分布</h3>
|
|
|
|
|
<Spin spinning={topData?.country?.loading || false}>
|
|
|
|
|
<div id="topC" style={{ height: '700px' }}>
|
|
|
|
|
<MapCountry sourceField={'groupsLabel'} valueField={BUConfig.measureField} dataSource={topData?.country?.dataSource || []} />
|
|
|
|
|
<MapCountry sourceField={'groupsLabel'} valueField={BUConfig.measureField} dataSource={topData?.country?.dataSource || []} containerNode='#topC' />
|
|
|
|
|
</div>
|
|
|
|
|
</Spin>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col key={'mapDestinationCountry'} span={24}>
|
|
|
|
|
<hr />
|
|
|
|
|
<h3>目的地国籍分布</h3>
|
|
|
|
|
<Spin spinning={DistributionStore.pageLoading || false}>
|
|
|
|
|
<div id="mapDestinationCountry" style={{ height: '700px' }}>
|
|
|
|
|
<MapCountry sourceField={'label'} valueField={BUConfig.measureField} dataSource={DistributionStore.destinationCountry.originData || []} containerNode='#mapDestinationCountry' />
|
|
|
|
|
</div>
|
|
|
|
|
</Spin>
|
|
|
|
|
</Col>
|
|
|
|
|