feat:【antd】【crm】优化 statistics 的整体代码
This commit is contained in:
@@ -38,8 +38,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
ajax: {
|
||||
query: async (_, formValues) => {
|
||||
const res = await getDatas(activeTabName.value, formValues);
|
||||
renderLeftEcharts(getChartOptions(activeTabName.value, res).left);
|
||||
renderRightEcharts(getChartOptions(activeTabName.value, res).right);
|
||||
await renderLeftEcharts(getChartOptions(activeTabName.value, res).left);
|
||||
await renderRightEcharts(getChartOptions(activeTabName.value, res).right);
|
||||
return res;
|
||||
},
|
||||
},
|
||||
@@ -54,12 +54,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
} as VxeTableGridOptions<CrmStatisticsCustomerApi.CustomerSummaryByUser>,
|
||||
});
|
||||
|
||||
/** tab 切换 */
|
||||
async function handleTabChange(key: any) {
|
||||
activeTabName.value = key;
|
||||
gridApi.setGridOptions({
|
||||
columns: useGridColumns(key),
|
||||
});
|
||||
gridApi.reload();
|
||||
await gridApi.reload();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user