diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java index a179a2e0..513d6858 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java @@ -106,6 +106,29 @@ public class CompController extends JeecgController { return Result.OK(pageList); } + /** + * 分页列表查询 + * + * @param compExp + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "比赛专家-分页列表查询") + @ApiOperation(value="比赛专家-分页列表查询", notes="比赛专家-分页列表查询") + @GetMapping(value = "/listSTU") + public Result> listSTU(Comp compExp, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(compExp, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = compService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** * 添加 * diff --git a/jeecgboot-vue3-master/src/views/comp/Comp.api.ts b/jeecgboot-vue3-master/src/views/comp/Comp.api.ts index 8ce81cc1..d4a73eda 100644 --- a/jeecgboot-vue3-master/src/views/comp/Comp.api.ts +++ b/jeecgboot-vue3-master/src/views/comp/Comp.api.ts @@ -5,6 +5,7 @@ const { createConfirm } = useMessage(); enum Api { list = '/comp/comp/list', + listSTU = '/comp/comp/listSTU', save = '/comp/comp/add', edit = '/comp/comp/edit', deleteOne = '/comp/comp/delete', @@ -30,6 +31,7 @@ export const getImportUrl = Api.importExcel; * @param params */ export const list = (params) => defHttp.get({ url: Api.list, params }); +export const listSTU = (params) => defHttp.get({ url: Api.listSTU, params }); /** * 删除单个 diff --git a/jeecgboot-vue3-master/src/views/comp/CompList.vue b/jeecgboot-vue3-master/src/views/comp/CompList.vue index 3b59cc83..cad003ce 100644 --- a/jeecgboot-vue3-master/src/views/comp/CompList.vue +++ b/jeecgboot-vue3-master/src/views/comp/CompList.vue @@ -92,7 +92,7 @@ import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { useListPage } from '/@/hooks/system/useListPage'; import { columns } from './Comp.data'; - import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getCompType } from './Comp.api'; + import { listSTU, deleteOne, batchDelete, getImportUrl, getExportUrl, getCompType } from './Comp.api'; import { downloadFile } from '/@/utils/common/renderUtils'; import CompModal from './components/CompModal.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; @@ -108,7 +108,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ tableProps: { title: '比赛', - api: list, + api: listSTU, columns, canResize: false, useSearchForm: false,