From 9ad3dc5a07e5a437393ed7529fda933a8a9b1eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Tue, 28 Nov 2023 11:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E7=AE=A1=E7=90=86=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/comp/controller/CompController.java | 23 +++++++++++++++++++ .../src/views/comp/Comp.api.ts | 2 ++ .../src/views/comp/CompList.vue | 4 ++-- 3 files changed, 27 insertions(+), 2 deletions(-) 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,