|
|
@ -2,8 +2,8 @@ import { useContext, useEffect, useState } from 'react';
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
import { useParams } from 'react-router-dom';
|
|
|
|
import { useParams } from 'react-router-dom';
|
|
|
|
import { stores_Context } from '../config';
|
|
|
|
import { stores_Context } from '../config';
|
|
|
|
import { Row, Col, Spin, Table, Button, Select, Typography, Card } from 'antd';
|
|
|
|
import { Row, Col, Spin, Table, Select, Typography, Card, Button } from 'antd';
|
|
|
|
import { cloneDeep, groupBy, isEmpty, omit, sortBy } from '../utils/commons';
|
|
|
|
import { cloneDeep, groupBy, isEmpty, omit, pick, sortBy, unique } from '../utils/commons';
|
|
|
|
import { dataFieldAlias, pivotBy } from '../libs/ht';
|
|
|
|
import { dataFieldAlias, pivotBy } from '../libs/ht';
|
|
|
|
import SearchForm from '../components/search/SearchForm';
|
|
|
|
import SearchForm from '../components/search/SearchForm';
|
|
|
|
import { Line } from '@ant-design/plots';
|
|
|
|
import { Line } from '@ant-design/plots';
|
|
|
@ -18,26 +18,27 @@ const filterFields = [
|
|
|
|
{ key: 'guestGroupType', label: '客群类别' },
|
|
|
|
{ key: 'guestGroupType', label: '客群类别' },
|
|
|
|
{ key: 'travelMotivation', label: '出行动机' },
|
|
|
|
{ key: 'travelMotivation', label: '出行动机' },
|
|
|
|
{ key: 'operatorName', label: '顾问' },
|
|
|
|
{ key: 'operatorName', label: '顾问' },
|
|
|
|
|
|
|
|
{ key: 'WebCode', label: '来源站点' },
|
|
|
|
// todo: 目的地, 目的地国家, 页面类型[PPC, NL...]
|
|
|
|
// todo: 目的地, 目的地国家, 页面类型[PPC, NL...]
|
|
|
|
];
|
|
|
|
];
|
|
|
|
const filterFieldsMapped = filterFields.reduce((r, v) => ({ ...r, [v.key]: v }), {});
|
|
|
|
const filterFieldsMapped = filterFields.reduce((r, v) => ({ ...r, [v.key]: v }), {});
|
|
|
|
|
|
|
|
const quickOptions = [
|
|
|
|
|
|
|
|
{ label: '国籍×产品', fields: [['country'], ['productType']] },
|
|
|
|
|
|
|
|
{ label: '产品×客群', fields: [['productType'], ['guestGroupType']] },
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
const combineArrays = (arr, sep = '_') => {
|
|
|
|
/**
|
|
|
|
// if (arr.length === 0) return [];
|
|
|
|
* 计算笛卡尔积
|
|
|
|
if (arr.length === 1) return arr[0].map((item) => item);
|
|
|
|
*/
|
|
|
|
|
|
|
|
const cartesianProductArray = (arr, sep = '_', index = 0, prefix = '') => {
|
|
|
|
const output = [];
|
|
|
|
let result = [];
|
|
|
|
const head = arr[0];
|
|
|
|
if(index === arr.length){
|
|
|
|
const tail = arr.slice(1);
|
|
|
|
return [prefix];
|
|
|
|
|
|
|
|
}
|
|
|
|
head.forEach((item) => {
|
|
|
|
arr[index].forEach(item => {
|
|
|
|
const suffixes = combineArrays(tail, sep);
|
|
|
|
result = result.concat(cartesianProductArray(arr, sep, index+1, prefix ? `${prefix}${sep}${item}` : `${item}`));
|
|
|
|
suffixes.forEach((suffix) => {
|
|
|
|
|
|
|
|
output.push(`${item}${sep}${suffix}`);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
return result;
|
|
|
|
return output;
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 注意TdCell要提到DataTable作用域外声明
|
|
|
|
// 注意TdCell要提到DataTable作用域外声明
|
|
|
@ -48,23 +49,23 @@ const TdCell = (tdprops) => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default observer((props) => {
|
|
|
|
export default observer((props) => {
|
|
|
|
const { field } = useParams();
|
|
|
|
const { page } = useParams();
|
|
|
|
const { date_picker_store: searchFormStore, orders_store, DistributionStore } = useContext(stores_Context);
|
|
|
|
const { date_picker_store: searchFormStore, orders_store, DistributionStore, DataPivotStore } = useContext(stores_Context);
|
|
|
|
const { formValues, formValuesToSub } = searchFormStore;
|
|
|
|
const { formValues, formValuesToSub } = searchFormStore;
|
|
|
|
// const { curTab, scatterDays, detailData } = DistributionStore;
|
|
|
|
const { originData } = DataPivotStore.detailData[page];
|
|
|
|
|
|
|
|
|
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
|
const [rawData, setRawData] = useState([]);
|
|
|
|
const [rawData, setRawData] = useState(originData || []);
|
|
|
|
const [dataBeforePick, setDataBeforePick] = useState([]);
|
|
|
|
const [dataBeforePick, setDataBeforePick] = useState([]);
|
|
|
|
const [dataBeforeXChange, setDataBeforeXChange] = useState([]);
|
|
|
|
const [dataBeforeXChange, setDataBeforeXChange] = useState([]);
|
|
|
|
const [dataSource, setDataSource] = useState([]);
|
|
|
|
const [dataSource, setDataSource] = useState([]);
|
|
|
|
const [dataSourceMapped, setDataSourceMapped] = useState({});
|
|
|
|
// const [dataSourceMapped, setDataSourceMapped] = useState({});
|
|
|
|
|
|
|
|
|
|
|
|
const [pivotTableDataSource, setPivotTableDataSource] = useState([]);
|
|
|
|
const [pivotTableDataSource, setPivotTableDataSource] = useState([]);
|
|
|
|
|
|
|
|
const [pivotTableColumnSummary, setPivotTableColumnSummary] = useState({}); // 列单选, 只有一组结果
|
|
|
|
|
|
|
|
|
|
|
|
const [pivotColumns, setPivotColumns] = useState([]);
|
|
|
|
|
|
|
|
const [pivotDateColumns, setPivotDateColumns] = useState([[], []]);
|
|
|
|
const [pivotDateColumns, setPivotDateColumns] = useState([[], []]);
|
|
|
|
const [pivotDateColumnsValues, setPivotDateColumnsValues] = useState([]);
|
|
|
|
const [pivotDateColumnsValues, setPivotDateColumnsValues] = useState([[], []]);
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
calcDataByDate();
|
|
|
|
calcDataByDate();
|
|
|
@ -84,40 +85,50 @@ export default observer((props) => {
|
|
|
|
|
|
|
|
|
|
|
|
const detailRefresh = async (obj) => {
|
|
|
|
const detailRefresh = async (obj) => {
|
|
|
|
setLoading(true);
|
|
|
|
setLoading(true);
|
|
|
|
DistributionStore.getDetailData({
|
|
|
|
DataPivotStore.getDetailData({
|
|
|
|
...(obj || formValuesToSub),
|
|
|
|
...(obj || formValuesToSub),
|
|
|
|
}).then((resData) => {
|
|
|
|
}, page).then((resData) => {
|
|
|
|
setLoading(false);
|
|
|
|
setLoading(false);
|
|
|
|
setRawData(resData);
|
|
|
|
setRawData(resData);
|
|
|
|
// const { data, columnValues } = pivotBy(resData, ['country', 'guestGroupType', 'applyDate'], 'personNum');
|
|
|
|
|
|
|
|
// setPivotDateColumns(['applyDate']);
|
|
|
|
|
|
|
|
calcDataByDate(resData);
|
|
|
|
calcDataByDate(resData);
|
|
|
|
// setLineChartX('day');
|
|
|
|
|
|
|
|
resetX();
|
|
|
|
resetX();
|
|
|
|
resetItemFilter();
|
|
|
|
resetItemFilter();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const valKey = 'SumOrder';
|
|
|
|
|
|
|
|
const timesKey = 'applyDate';
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 走势的数据
|
|
|
|
* 走势的数据
|
|
|
|
* 汇总
|
|
|
|
* 汇总
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
const calcDataByDate = (_rawData) => {
|
|
|
|
const calcDataByDate = (_rawData) => {
|
|
|
|
// console.log(';;;;;', pivotDateColumns);
|
|
|
|
// console.log(';;;;;', pivotDateColumns);
|
|
|
|
const { data, columnValues, summary } = pivotBy(_rawData || rawData, [].concat(pivotDateColumns, ['applyDate']));
|
|
|
|
const { data, columnValues, summaryRows, summaryColumns } = pivotBy(_rawData || rawData, [].concat(pivotDateColumns, [timesKey]));
|
|
|
|
setPivotDateColumnsValues(cloneDeep(columnValues).slice(0, -1));
|
|
|
|
// console.log('data====', data, '\ncolumnValues', columnValues, '\nsummaryRows', summaryRows, '\nsummaryColumns', summaryColumns);
|
|
|
|
setDataBeforePick(data.sort(sortBy('applyDate')));
|
|
|
|
setDataBeforePick(data.sort(sortBy(timesKey)));
|
|
|
|
setDataSource(data.sort(sortBy('applyDate')));
|
|
|
|
// 折线图数据
|
|
|
|
|
|
|
|
setDataSource(data.sort(sortBy(timesKey)));
|
|
|
|
setPivotTableDataSource(summary.sort(sortBy('SumOrder')).reverse());
|
|
|
|
// 表格数据
|
|
|
|
|
|
|
|
const sortRowData = cloneDeep(summaryRows).sort(sortBy(valKey)).reverse();
|
|
|
|
|
|
|
|
setPivotTableDataSource(sortRowData);
|
|
|
|
|
|
|
|
// 列汇总
|
|
|
|
|
|
|
|
const sortColData = summaryColumns.sort(sortBy(valKey)).reverse();
|
|
|
|
|
|
|
|
const colDataMapped = isEmpty(pivotDateColumns[1]) ? sortColData[0] : sortColData.reduce((r, v) => ({...r, [v[pivotDateColumns[1][0]]]: v}), {});
|
|
|
|
|
|
|
|
setPivotTableColumnSummary(colDataMapped);
|
|
|
|
|
|
|
|
// 行列的选项值
|
|
|
|
|
|
|
|
const _r = (pivotDateColumns[0].map(eleR => unique(sortRowData.map(ele => ele[eleR]))));
|
|
|
|
|
|
|
|
const _c = (pivotDateColumns[1].map(eleC => unique(sortColData.map(ele => ele[eleC]))));
|
|
|
|
|
|
|
|
// console.log('_r', _r, '_c', _c);
|
|
|
|
|
|
|
|
setPivotDateColumnsValues([_r, _c, columnValues[2]]);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const line_config = {
|
|
|
|
const line_config = {
|
|
|
|
// data: dataSource,
|
|
|
|
// data: dataSource,
|
|
|
|
padding: 'auto',
|
|
|
|
padding: 'auto',
|
|
|
|
xField: 'applyDate',
|
|
|
|
xField: timesKey,
|
|
|
|
yField: 'SumOrder',
|
|
|
|
yField: valKey,
|
|
|
|
seriesField: 'rowKey',
|
|
|
|
seriesField: 'rowLabel',
|
|
|
|
// xAxis: {
|
|
|
|
// xAxis: {
|
|
|
|
// type: 'timeCat',
|
|
|
|
// type: 'timeCat',
|
|
|
|
// },
|
|
|
|
// },
|
|
|
@ -139,11 +150,21 @@ export default observer((props) => {
|
|
|
|
const [lineConfig, setLineConfig] = useState(cloneDeep(line_config));
|
|
|
|
const [lineConfig, setLineConfig] = useState(cloneDeep(line_config));
|
|
|
|
|
|
|
|
|
|
|
|
// 透视配置:行列选项
|
|
|
|
// 透视配置:行列选项
|
|
|
|
const [leftFields, setLeftFields] = useState(filterFields);
|
|
|
|
// const [leftFields, setLeftFields] = useState(filterFields);
|
|
|
|
const [rightFields, setRightFields] = useState(filterFields);
|
|
|
|
const [rightFields, setRightFields] = useState(filterFields);
|
|
|
|
const [rowFields, setRowFields] = useState([]);
|
|
|
|
const [rowFields, setRowFields] = useState([]);
|
|
|
|
const [columnFields, setColumnFields] = useState([]);
|
|
|
|
const [columnFields, setColumnFields] = useState([]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [rowSelection, setRowSelection] = useState();
|
|
|
|
|
|
|
|
const [columnSelection, setColumnSelection] = useState();
|
|
|
|
|
|
|
|
const quickOpt = (i) => {
|
|
|
|
|
|
|
|
const { fields: pivotFields } = quickOptions[i];
|
|
|
|
|
|
|
|
const [row, col] = pivotFields;
|
|
|
|
|
|
|
|
setRowSelection(Object.values(pick(filterFieldsMapped, row)));
|
|
|
|
|
|
|
|
setColumnSelection(filterFieldsMapped[col[0]]);
|
|
|
|
|
|
|
|
setPivotDateColumns(pivotFields);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const handleRowsPick = (v) => {
|
|
|
|
const handleRowsPick = (v) => {
|
|
|
|
const pickKeys = v.map((ele) => ele.key);
|
|
|
|
const pickKeys = v.map((ele) => ele.key);
|
|
|
|
setRowFields(pickKeys);
|
|
|
|
setRowFields(pickKeys);
|
|
|
@ -196,14 +217,13 @@ export default observer((props) => {
|
|
|
|
const dataMappedByRows = groupBy(dataBeforePick, (row) => rowsFilterFields.map((kk) => `${row[kk]}`).join('=@='));
|
|
|
|
const dataMappedByRows = groupBy(dataBeforePick, (row) => rowsFilterFields.map((kk) => `${row[kk]}`).join('=@='));
|
|
|
|
const rowsFilterKey = isEmpty(rowsFilterFields)
|
|
|
|
const rowsFilterKey = isEmpty(rowsFilterFields)
|
|
|
|
? []
|
|
|
|
? []
|
|
|
|
: combineArrays(
|
|
|
|
: cartesianProductArray(
|
|
|
|
Object.values(currentFilterMerge.rows)
|
|
|
|
Object.values(currentFilterMerge.rows)
|
|
|
|
.map((kv) => kv.map((kf) => kf.key))
|
|
|
|
.map((kv) => kv.map((kf) => kf.key))
|
|
|
|
.filter((s) => s.length),
|
|
|
|
.filter((s) => s.length),
|
|
|
|
'=@='
|
|
|
|
'=@='
|
|
|
|
);
|
|
|
|
);
|
|
|
|
const afterRowsFilter = isEmpty(rowsFilterFields) ? dataBeforePick : rowsFilterKey.reduce((r, _key) => r.concat(dataMappedByRows[_key]), []);
|
|
|
|
const afterRowsFilter = isEmpty(rowsFilterFields) ? dataBeforePick : rowsFilterKey.reduce((r, _key) => r.concat(dataMappedByRows[_key]), []);
|
|
|
|
// console.log('afterRowsFilter', rowsFilterFields, afterRowsFilter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const columnsFilterFields = Object.keys(currentFilterMerge.columns).filter((ele) => currentFilterMerge.rows[ele].length);
|
|
|
|
const columnsFilterFields = Object.keys(currentFilterMerge.columns).filter((ele) => currentFilterMerge.rows[ele].length);
|
|
|
|
const allFilterValues = [].concat(
|
|
|
|
const allFilterValues = [].concat(
|
|
|
@ -214,15 +234,15 @@ export default observer((props) => {
|
|
|
|
const dataMapped = groupBy(afterRowsFilter, (row) => row[columnsName]);
|
|
|
|
const dataMapped = groupBy(afterRowsFilter, (row) => row[columnsName]);
|
|
|
|
const pickData = isEmpty(v) ? afterRowsFilter : Array.isArray(v) ? v.reduce((r, v) => r.concat(dataMapped[v.value]), []) : dataMapped[v.value];
|
|
|
|
const pickData = isEmpty(v) ? afterRowsFilter : Array.isArray(v) ? v.reduce((r, v) => r.concat(dataMapped[v.value]), []) : dataMapped[v.value];
|
|
|
|
|
|
|
|
|
|
|
|
setDataSource(allFilterValues.length === 0 ? dataBeforePick : pickData.sort(sortBy('applyDate')));
|
|
|
|
setDataSource(allFilterValues.length === 0 ? dataBeforePick : pickData.sort(sortBy(timesKey)));
|
|
|
|
resetX();
|
|
|
|
resetX();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 日月年切换 debug: raw data action
|
|
|
|
// 日月年切换
|
|
|
|
const [lineChartX, setLineChartX] = useState('day');
|
|
|
|
const [lineChartX, setLineChartX] = useState('day');
|
|
|
|
const [avgLine1, setAvgLine1] = useState(0);
|
|
|
|
const [avgLine1, setAvgLine1] = useState(0);
|
|
|
|
const orderCountDataMapper = { data1: 'data1', data2: undefined };
|
|
|
|
const orderCountDataMapper = { data1: 'data1', data2: undefined };
|
|
|
|
const orderCountDataFieldMapper = { 'dateKey': 'applyDate', 'valueKey': 'SumOrder', 'seriesKey': 'rowKey', _f: 'sum' };
|
|
|
|
const orderCountDataFieldMapper = { 'dateKey': timesKey, 'valueKey': valKey, 'seriesKey': 'rowLabel', _f: 'sum' };
|
|
|
|
const resetX = () => {
|
|
|
|
const resetX = () => {
|
|
|
|
setLineChartX('day');
|
|
|
|
setLineChartX('day');
|
|
|
|
setAvgLine1(0);
|
|
|
|
setAvgLine1(0);
|
|
|
@ -260,16 +280,17 @@ export default observer((props) => {
|
|
|
|
pagination: false,
|
|
|
|
pagination: false,
|
|
|
|
columns: [
|
|
|
|
columns: [
|
|
|
|
...pivotDateColumns[0].map((ele) => ({ key: ele, title: filterFieldsMapped[ele].label, dataIndex: ele, width: '6em', fixed: 'left' })),
|
|
|
|
...pivotDateColumns[0].map((ele) => ({ key: ele, title: filterFieldsMapped[ele].label, dataIndex: ele, width: '6em', fixed: 'left' })),
|
|
|
|
// { key: 'groupsLabel', title: '', dataIndex: 'groupsLabel' },
|
|
|
|
|
|
|
|
{ key: 'SumOrder', title: '订单数', dataIndex: 'SumOrder', width: '5em' },
|
|
|
|
{ key: 'SumOrder', title: '订单数', dataIndex: 'SumOrder', width: '5em' },
|
|
|
|
...pivotDateColumns[1].map((ele) => ({
|
|
|
|
...pivotDateColumns[1].map((ele) => ({
|
|
|
|
key: ele,
|
|
|
|
key: ele,
|
|
|
|
title: filterFieldsMapped[ele].label,
|
|
|
|
title: filterFieldsMapped[ele].label,
|
|
|
|
align: 'left',
|
|
|
|
align: 'left', className: 'p-s1',
|
|
|
|
children: cloneDeep(pivotDateColumnsValues)
|
|
|
|
children: cloneDeep(pivotDateColumnsValues[1][0] || []).map((col) => ({
|
|
|
|
.slice(-1)[0]
|
|
|
|
key: col,
|
|
|
|
.sort()
|
|
|
|
title: `${col || '(空)'}: ${pivotTableColumnSummary[col]?.[valKey]}`,
|
|
|
|
.map((col) => ({ key: col, title: col || '(空)', dataIndex: col, width: '6em', render: (_, r) => r.columns[col]?.SumOrder || '' })),
|
|
|
|
dataIndex: ['columns', col, valKey],
|
|
|
|
|
|
|
|
width: '6em',
|
|
|
|
|
|
|
|
})),
|
|
|
|
})),
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -299,7 +320,15 @@ export default observer((props) => {
|
|
|
|
</Row>
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
|
|
{/* extra={<Button type="link">重置</Button>} */}
|
|
|
|
{/* extra={<Button type="link">重置</Button>} */}
|
|
|
|
<Card size={'small'} title={'透视选项'}>
|
|
|
|
<Card
|
|
|
|
|
|
|
|
size={'small'}
|
|
|
|
|
|
|
|
title={'透视选项'}
|
|
|
|
|
|
|
|
// extra={quickOptions.map((ele, elei) => (
|
|
|
|
|
|
|
|
// <Button key={ele.label} type="link" onClick={() => quickOpt(elei)}>
|
|
|
|
|
|
|
|
// {ele.label}
|
|
|
|
|
|
|
|
// </Button>
|
|
|
|
|
|
|
|
// ))}
|
|
|
|
|
|
|
|
>
|
|
|
|
<Row gutter={16}>
|
|
|
|
<Row gutter={16}>
|
|
|
|
<Col span={24}>
|
|
|
|
<Col span={24}>
|
|
|
|
{/* todo: 拖拽的操作 */}
|
|
|
|
{/* todo: 拖拽的操作 */}
|
|
|
@ -324,6 +353,7 @@ export default observer((props) => {
|
|
|
|
placeholder={`选择`}
|
|
|
|
placeholder={`选择`}
|
|
|
|
onChange={(v) => handleRowsPick(v)}
|
|
|
|
onChange={(v) => handleRowsPick(v)}
|
|
|
|
// value={sale_store.salesTrade.pickSales}
|
|
|
|
// value={sale_store.salesTrade.pickSales}
|
|
|
|
|
|
|
|
// value={rowSelection}
|
|
|
|
maxTagCount={2}
|
|
|
|
maxTagCount={2}
|
|
|
|
maxTagPlaceholder={(omittedValues) => ` + ${omittedValues.length} 更多...`}
|
|
|
|
maxTagPlaceholder={(omittedValues) => ` + ${omittedValues.length} 更多...`}
|
|
|
|
allowClear={true}
|
|
|
|
allowClear={true}
|
|
|
@ -337,12 +367,12 @@ export default observer((props) => {
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
<Col span={24}>
|
|
|
|
<Col span={24}>
|
|
|
|
{rowFields.length > 0
|
|
|
|
{rowFields.length > 0
|
|
|
|
? cloneDeep(pivotDateColumnsValues)
|
|
|
|
? cloneDeep(pivotDateColumnsValues)[0]
|
|
|
|
.slice(0, rowFields.length)
|
|
|
|
// .slice(0, rowFields.length)
|
|
|
|
.map((_colArr, _colIndex) => (
|
|
|
|
.map((_colArr, _colIndex) => (
|
|
|
|
<Row gutter={8} key={_colArr.join('_')}>
|
|
|
|
<Row gutter={8} key={_colArr.join('_')}>
|
|
|
|
<Col flex={'5em'} align={'end'}>
|
|
|
|
<Col flex={'5em'} align={'end'}>
|
|
|
|
<Text strong>{filterFieldsMapped[pivotDateColumns[0][_colIndex]].label}: </Text>
|
|
|
|
<Text strong>{filterFieldsMapped[pivotDateColumns[0][_colIndex]]?.label}: </Text>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
<Col flex={'auto'}>
|
|
|
|
<Col flex={'auto'}>
|
|
|
|
<Select
|
|
|
|
<Select
|
|
|
@ -358,7 +388,7 @@ export default observer((props) => {
|
|
|
|
maxTagPlaceholder={(omittedValues) => ` + ${omittedValues.length} 更多...`}
|
|
|
|
maxTagPlaceholder={(omittedValues) => ` + ${omittedValues.length} 更多...`}
|
|
|
|
allowClear={true}
|
|
|
|
allowClear={true}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{pivotDateColumnsValues[_colIndex].map((ele) => (
|
|
|
|
{pivotDateColumnsValues[0][_colIndex].map((ele) => (
|
|
|
|
<Select.Option key={ele} value={ele}>
|
|
|
|
<Select.Option key={ele} value={ele}>
|
|
|
|
{ele}
|
|
|
|
{ele}
|
|
|
|
</Select.Option>
|
|
|
|
</Select.Option>
|
|
|
@ -384,6 +414,7 @@ export default observer((props) => {
|
|
|
|
placeholder={`选择`}
|
|
|
|
placeholder={`选择`}
|
|
|
|
onChange={(v) => handleColsPick(v)}
|
|
|
|
onChange={(v) => handleColsPick(v)}
|
|
|
|
// value={sale_store.salesTrade.pickSales}
|
|
|
|
// value={sale_store.salesTrade.pickSales}
|
|
|
|
|
|
|
|
// value={columnSelection}
|
|
|
|
maxTagCount={2}
|
|
|
|
maxTagCount={2}
|
|
|
|
maxTagPlaceholder={(omittedValues) => ` + ${omittedValues.length} 更多...`}
|
|
|
|
maxTagPlaceholder={(omittedValues) => ` + ${omittedValues.length} 更多...`}
|
|
|
|
allowClear={true}
|
|
|
|
allowClear={true}
|