소스 검색

✨ feat<操作日志>: 模糊查询功能

xinyan 9 달 전
부모
커밋
c0f66be0f5
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      src/views/system/log/operationLog/crud.tsx

+ 6 - 1
src/views/system/log/operationLog/crud.tsx

@@ -3,7 +3,12 @@ import { UserPageQuery, AddReq, DelReq, EditReq, CrudExpose, CrudOptions, Create
 
 export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet {
 	const pageRequest = async (query: UserPageQuery) => {
-		return await api.GetList(query);
+		const { search, ...otherParams } = query;
+		const newQueryParams = {
+			request_modular: search,
+			...otherParams
+		};
+		return await api.GetList(newQueryParams);
 	};
 	const editRequest = async ({ form, row }: EditReq) => {
 		form.id = row.id;