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]); const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "在华客人.xlsx"); writeFileXLSX(wb, "在华客人.xlsx");
}}>导出excel</a></Divider> }}>导出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: '订单号', title: '订单号',

@ -81,7 +81,7 @@ const Customer_care_potential = () => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]); const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "潜力客户.xlsx"); writeFileXLSX(wb, "潜力客户.xlsx");
}}>导出excel</a></Divider> }}>导出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: '订单号', title: '订单号',

@ -86,7 +86,7 @@ const Customer_care_regular = () => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]); const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "老客户.xlsx"); writeFileXLSX(wb, "老客户.xlsx");
}}>导出excel</a></Divider> }}>导出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: '订单号', title: '订单号',

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

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

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

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

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

@ -29,6 +29,7 @@ class Orders extends Component {
result.columns = [ result.columns = [
{ {
title: "", title: "",
fixed: 'left',
children: [ children: [
{ {
title: ( title: (
@ -42,6 +43,7 @@ class Orders extends Component {
</span> </span>
), ),
dataIndex: "OrderType", dataIndex: "OrderType",
fixed: 'left',
render: (text, record) => <NavLink to={`/orders_sub/${orders_store.active_tab_key}/${record.OrderTypeSN}/${record.OrderType}`}>{text}</NavLink>, 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 = [ result.columns = [
{ {
title: "", title: "",
fixed: 'left',
children: [ children: [
{ {
title: ( title: (
@ -173,6 +176,7 @@ class Orders extends Component {
</div> </div>
</span> </span>
), ),
fixed: 'left',
dataIndex: "OrderType", dataIndex: "OrderType",
render: (text, record) => <NavLink to={`/orders_sub/${orders_store.active_tab_key}/${record.OrderTypeSN}/${record.OrderType}`}>{text}</NavLink>, render: (text, record) => <NavLink to={`/orders_sub/${orders_store.active_tab_key}/${record.OrderTypeSN}/${record.OrderType}`}>{text}</NavLink>,
}, },
@ -313,7 +317,7 @@ class Orders extends Component {
columns: table_data.columns, columns: table_data.columns,
size: 'small', size: 'small',
pagination: false, pagination: false,
scroll: { x: '100%' }, scroll: { x: (100*(table_data.columns.length)) },
loading: orders_store.loading, loading: orders_store.loading,
}; };

@ -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 ( return (
<div> <div>
@ -277,15 +280,15 @@ const Sale = () => {
></Tabs> ></Tabs>
<Row> <Row>
<Col span={24}> <Col span={24}>
<Table <Table sticky
id="table_to_xlsx_sale" id="table_to_xlsx_sale"
dataSource={type_data.dataSource} dataSource={type_data.dataSource}
columns={type_data.columns} columns={tableColumns}
size="small" size="small"
rowKey={(record) => record.key} rowKey={(record) => record.key}
loading={sale_store.loading_table} loading={sale_store.loading_table}
pagination={false} pagination={false}
scroll={{ x: '100%' }} scroll={{ x: (100*(tableColumns.length)) }}
/> />
<Divider orientation="right" plain> <Divider orientation="right" plain>
<a <a

Loading…
Cancel
Save