perf: 移动端表格调整

feature/pivot
Lei OT 2 years ago
parent e9bccf450d
commit a9c21a54e6

@ -86,7 +86,7 @@ const Customer_care_inchina = () => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "在华客人.xlsx");
}}>导出excel</a></Divider>
<Table id="table_to_xlsx" pagination={false} loading={inchina_data.loading} dataSource={inchina_data.data_detail} columns={
<Table id="table_to_xlsx" pagination={false} loading={inchina_data.loading} dataSource={inchina_data.data_detail} scroll={{x: 1200 }} columns={
[
{
title: '订单号',

@ -81,7 +81,7 @@ const Customer_care_potential = () => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "潜力客户.xlsx");
}}>导出excel</a></Divider>
<Table id="table_to_xlsx" pagination={false} loading={potential_data.loading} dataSource={potential_data.data_detail} columns={
<Table id="table_to_xlsx" pagination={false} loading={potential_data.loading} dataSource={potential_data.data_detail} scroll={{x: 1200 }} columns={
[
{
title: '订单号',

@ -86,7 +86,7 @@ const Customer_care_regular = () => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "老客户.xlsx");
}}>导出excel</a></Divider>
<Table id="table_to_xlsx" pagination={false} loading={regular_data.loading} dataSource={regular_data.data_detail} columns={
<Table id="table_to_xlsx" pagination={false} loading={regular_data.loading} dataSource={regular_data.data_detail} scroll={{x: 1200 }} columns={
[
{
title: '订单号',

@ -297,8 +297,10 @@ class CustomerServices {
{
title: '城市',
dataIndex: 'COLD_ServiceCityName',
fix: 'left',
children: [{
dataIndex: 'COLD_ServiceCityName',
fix: 'left',
render: (text, record) => <NavLink to={`/destination/${record.COLD_ServiceCity}/group/list`}>{record.COLD_ServiceCityName}</NavLink>
}
]
@ -492,7 +494,7 @@ class CustomerServices {
inProgress;
agentList = [];
groupList = [];
groupListColumns = [];
@ -518,6 +520,7 @@ class CustomerServices {
{
title: '地接社名称',
dataIndex: 'VendorName',
fix: 'left',
render: (text, record) => {
if (record.EOI_ObjSN === -1) {
return text;
@ -569,4 +572,4 @@ class CustomerServices {
];
}
export default CustomerServices;
export default CustomerServices;

@ -136,7 +136,7 @@ const AgentGroupCount = () => {
<Row>
<Col span={24}>
<Typography.Title level={3}>地接社团信息</Typography.Title>
<Table
<Table sticky
id="agentGroupList"
dataSource={agentGroupList}
columns={agentGroupListColumns}
@ -144,7 +144,7 @@ const AgentGroupCount = () => {
rowKey={(record) => record.key}
loading={inProgress}
pagination={false}
scroll={{ x: '100%' }}
scroll={{ x: 1000 }}
/>
<Divider orientation="right" plain>
<a

@ -81,14 +81,14 @@ const AgentGroupList = () => {
<Row>
<Col span={24}>
<Typography.Title level={3}>{customerServicesStore.agentCompany}</Typography.Title>
<Table
<Table sticky
dataSource={groupList}
columns={groupListColumns}
size="small"
rowKey={(record) => record.key}
loading={inProgress}
pagination={false}
scroll={{ x: "100%" }}
scroll={{ x: 1000 }}
expandable={{
expandedRowRender: (record) => (

@ -103,7 +103,7 @@ const DestinationGroupCount = () => {
<Row>
<Col span={24}>
<Typography.Title level={3}>目的地团信息</Typography.Title>
<Table
<Table sticky
id="destinationGroupCount"
dataSource={destinationGroupCount}
columns={destinationGroupCountColumns}
@ -111,7 +111,7 @@ const DestinationGroupCount = () => {
rowKey={(record) => record.key}
loading={inProgress}
pagination={false}
scroll={{ x: "100%" }}
scroll={{ x: 1000 }}
/>
<Divider orientation="right" plain>
<a

@ -82,14 +82,14 @@ const DestinationGroupList = () => {
</Row>
<Row>
<Col span={24}>
<Table
<Table sticky
dataSource={destinationGroupList}
columns={destinationGroupListColumns}
size="small"
rowKey={(record) => record.key}
loading={inProgress}
pagination={false}
scroll={{ x: "100%" }}
scroll={{ x: 600 }}
expandable={{
expandedRowRender: (record) => (

@ -29,6 +29,7 @@ class Orders extends Component {
result.columns = [
{
title: "",
fixed: 'left',
children: [
{
title: (
@ -42,6 +43,7 @@ class Orders extends Component {
</span>
),
dataIndex: "OrderType",
fixed: 'left',
render: (text, record) => <NavLink to={`/orders_sub/${orders_store.active_tab_key}/${record.OrderTypeSN}/${record.OrderType}`}>{text}</NavLink>,
},
],
@ -164,6 +166,7 @@ class Orders extends Component {
result.columns = [
{
title: "",
fixed: 'left',
children: [
{
title: (
@ -173,7 +176,8 @@ class Orders extends Component {
</div>
</span>
),
dataIndex: "OrderType",
fixed: 'left',
dataIndex: "OrderType",
render: (text, record) => <NavLink to={`/orders_sub/${orders_store.active_tab_key}/${record.OrderTypeSN}/${record.OrderType}`}>{text}</NavLink>,
},
],
@ -313,11 +317,11 @@ class Orders extends Component {
columns: table_data.columns,
size: 'small',
pagination: false,
scroll: { x: '100%' },
scroll: { x: (100*(table_data.columns.length)) },
loading: orders_store.loading,
};
return (
return (
<div>
<Row gutter={16} style={{ margin: '-16px -8px', position: 'relative', top: 0, zIndex: 10 }}>
<Col className="gutter-row" span={24}>

@ -199,6 +199,9 @@ const Sale = () => {
),
},
];
const tableColumns = type_data.columns.map((ele, i) =>
i === 0 ? { ...ele, fix: 'left', children: (ele?.children || []).map((ele_child, i_child) => (i_child === 0 ? { ...ele_child, fix: 'left' } : { ...ele_child })) } : { ...ele }
);
return (
<div>
@ -277,15 +280,15 @@ const Sale = () => {
></Tabs>
<Row>
<Col span={24}>
<Table
<Table sticky
id="table_to_xlsx_sale"
dataSource={type_data.dataSource}
columns={type_data.columns}
columns={tableColumns}
size="small"
rowKey={(record) => record.key}
loading={sale_store.loading_table}
pagination={false}
scroll={{ x: '100%' }}
scroll={{ x: (100*(tableColumns.length)) }}
/>
<Divider orientation="right" plain>
<a

Loading…
Cancel
Save