feat:【antd】【crm】优化 statistics 的整体代码
This commit is contained in:
@@ -100,9 +100,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
allowClear: true,
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择员工',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -36,8 +36,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
ajax: {
|
||||
query: async (_, formValues) => {
|
||||
const res = await getChartDatas(activeTabName.value, formValues);
|
||||
renderEcharts(getChartOptions(activeTabName.value, res));
|
||||
return await getDatas(activeTabName.value, formValues);
|
||||
await renderEcharts(getChartOptions(activeTabName.value, res));
|
||||
return getDatas(activeTabName.value, formValues);
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -51,12 +51,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