|
|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
import { useContext } from 'react';
|
|
|
|
|
import { Row, Col, Tabs, Table, Divider, Spin } from 'antd';
|
|
|
|
|
import { Row, Col, Tabs, Table, Divider, Spin, Checkbox, Space } from 'antd';
|
|
|
|
|
import { ContainerOutlined, BlockOutlined, SmileOutlined, MobileOutlined, CustomerServiceOutlined } from '@ant-design/icons';
|
|
|
|
|
import { Line } from '@ant-design/charts';
|
|
|
|
|
import { Line, Pie } from '@ant-design/charts';
|
|
|
|
|
import { NavLink } from 'react-router-dom';
|
|
|
|
|
import * as comm from '../../utils/commons';
|
|
|
|
|
import DateGroupRadio from '../../components/DateGroupRadio';
|
|
|
|
|
@ -94,7 +94,27 @@ const BizOrder = observer(() => {
|
|
|
|
|
return ret;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
smooth: true,
|
|
|
|
|
// smooth: true,
|
|
|
|
|
};
|
|
|
|
|
const pieConfig = {
|
|
|
|
|
appendPadding: 10,
|
|
|
|
|
data: [],
|
|
|
|
|
angleField: 'OrderCount',
|
|
|
|
|
colorField: 'OrderType',
|
|
|
|
|
radius: 0.8,
|
|
|
|
|
label: {
|
|
|
|
|
type: 'outer',
|
|
|
|
|
content: '{name} {value} \n {percentage}',
|
|
|
|
|
},
|
|
|
|
|
legend: false, // 不显示图例
|
|
|
|
|
interactions: [
|
|
|
|
|
{
|
|
|
|
|
type: 'element-selected',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'element-active',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const tableProps = {
|
|
|
|
|
@ -111,9 +131,7 @@ const BizOrder = observer(() => {
|
|
|
|
|
{showDiff ? <div>{result.ordercountTotal2?.groups}</div> : null}
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
titleX:
|
|
|
|
|
`${result.ordercountTotal1?.groups}` +
|
|
|
|
|
(showDiff ? ` vs ${result.ordercountTotal2?.groups}` : ''),
|
|
|
|
|
titleX: `${result.ordercountTotal1?.groups}` + (showDiff ? ` vs ${result.ordercountTotal2?.groups}` : ''),
|
|
|
|
|
dataIndex: 'OrderType',
|
|
|
|
|
fixed: 'left',
|
|
|
|
|
render: (text, record) => <NavLink to={`/biz_orders_sub/${activeTab}/${record.OrderTypeSN}/${encodeURIComponent(record.OrderType)}`}>{text}</NavLink>,
|
|
|
|
|
@ -395,14 +413,24 @@ const BizOrder = observer(() => {
|
|
|
|
|
};
|
|
|
|
|
})}
|
|
|
|
|
/>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col sm={24} lg={12}>
|
|
|
|
|
{/* <Pie {...pie_config} data={pie_data} /> */}
|
|
|
|
|
</Col>
|
|
|
|
|
<Col sm={24} lg={12}>
|
|
|
|
|
{/* <Pie {...pie_config} data={pie_data2} /> */}
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<h3>各项占比</h3>
|
|
|
|
|
{/* <Checkbox
|
|
|
|
|
checked={true}
|
|
|
|
|
// onChange={(e) => setIsShowEmpty(e.target.checked)}
|
|
|
|
|
>
|
|
|
|
|
包含空值
|
|
|
|
|
</Checkbox> */}
|
|
|
|
|
</div>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col sm={24} lg={12}>
|
|
|
|
|
<Pie {...pieConfig} data={result?.ordercount1 || []} />
|
|
|
|
|
</Col>
|
|
|
|
|
<Col sm={24} lg={12}>
|
|
|
|
|
<Pie {...pieConfig} data={result?.ordercount2 || []} />
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</div>
|
|
|
|
|
|