优化部分接口查询、n+1问题, 添加logs
This commit is contained in:
@@ -53,4 +53,11 @@ async function deleteDept(id: string) {
|
||||
return requestClient.delete(`/system/dept/${id}/`);
|
||||
}
|
||||
|
||||
export { createDept, deleteDept, getDeptList, updateDept };
|
||||
/**
|
||||
* 查询tree
|
||||
*/
|
||||
async function treeDept() {
|
||||
return requestClient.get(`/system/dept/tree/`);
|
||||
}
|
||||
|
||||
export { createDept, deleteDept, getDeptList, treeDept, updateDept };
|
||||
|
||||
@@ -11,7 +11,7 @@ import { Plus } from '@vben/icons';
|
||||
import { Button, message } from 'ant-design-vue';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { deleteDept, getDeptList } from '#/api/system/dept';
|
||||
import { deleteDept, treeDept } from '#/api/system/dept';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import { useColumns } from './data';
|
||||
@@ -108,7 +108,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
proxyConfig: {
|
||||
ajax: {
|
||||
query: async (_params) => {
|
||||
return await getDeptList();
|
||||
return await treeDept();
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user