From bc4d90535ad5f2ad9240a31939fd5830e517ec6d Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 11 Sep 2024 16:39:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A5=96=E9=A1=B9=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AwardPersionController.java | 180 +++++++++++++++++- .../awardpersion/entity/AwardPersion.java | 2 +- 2 files changed, 179 insertions(+), 3 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java index b23edd3a..eaeacdca 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java @@ -459,8 +459,184 @@ public class AwardPersionController extends JeecgController sysRoleList = sysUserRoleService.getUserRoleByUserId(user.getId()); + if(sysRoleList.get(0).getId().equals("1724327596426760194")){ + //学生(上传证书和查询)(根据学号查询筛选) + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, request.getParameterMap()); + queryWrapper.eq("studentcode",sysUserService.getById(user.getId()).getWorkNo()); + // 过滤选中数据 + String selections = request.getParameter("selections"); + if (oConvertUtils.isNotEmpty(selections)) { + List selectionList = Arrays.asList(selections.split(",")); + queryWrapper.in("id",selectionList); + } + // Step.2 获取导出数据 + List exportList = awardPersionService.list(queryWrapper); + + // Step.3 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + //此处设置的filename无效 ,前端会重更新设置一下 + mv.addObject(NormalExcelConstants.FILE_NAME, "获奖管理"); + mv.addObject(NormalExcelConstants.CLASS, AwardPersion.class); + //update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置-------------------- + ExportParams exportParams=new ExportParams("获奖管理" + "报表", "导出人:" + user.getRealname(), "获奖管理"); + exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload()); + //update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置---------------------- + mv.addObject(NormalExcelConstants.PARAMS,exportParams); + mv.addObject(NormalExcelConstants.DATA_LIST, exportList); + return mv; + }else if(sysRoleList.get(0).getId().equals("1693451972151386114")){ + //组委会(全部都可以)(根据比赛负责人查询比赛id筛选) + Comp comp = new Comp(); + QueryWrapper queryWrappercomp = QueryGenerator.initQueryWrapper(comp, request.getParameterMap()); + queryWrappercomp.eq("comp_admin",user.getUsername()); + if(awardPersion.getComType()!=null){ + queryWrappercomp.eq("comp_type_id",awardPersion.getComType()); + } + List list = compService.list(queryWrappercomp); + if(list.size()==0){ + return null; +/* if(awardPersion.getComType()==null){ + return Result.error("未绑定比赛"); + }else { + return Result.error("未绑定该比赛类型的比赛"); + }*/ + } + List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); + QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); + queryWrapperAnnual.in("compid",ids); + List listAnnual = annualCompService.list(queryWrapperAnnual); + if(listAnnual.size()==0){ + /*return Result.error("未创建年度比赛");*/ + return null; + } + List annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, request.getParameterMap()); + queryWrapper.in("annal_comp",annualIds); + + AnnualCompPoint annualCompPoint = new AnnualCompPoint(); + QueryWrapper queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, request.getParameterMap()); + queryWrapperacp.in("annual_comp_id",annualIds); + queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的 + if(awardPersion.getObjLevel()!=null){ + queryWrapperacp.eq("obj_level",awardPersion.getObjLevel()); + } + List listacp = annualCompPointService.list(queryWrapperacp); + if(listacp.size()==0){ + /*if(awardPersion.getObjLevel()==null){ + return Result.error("未创建年度比赛项目"); + }else { + return Result.error("未创建该项目层次的年度比赛项目"); + }*/ + return null; + } + List acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); + queryWrapper.in("annual_comp_p",acpIds); + + // 过滤选中数据 + String selections = request.getParameter("selections"); + if (oConvertUtils.isNotEmpty(selections)) { + List selectionList = Arrays.asList(selections.split(",")); + queryWrapper.in("id",selectionList); + } + // Step.2 获取导出数据 + List exportList = awardPersionService.list(queryWrapper); + + // Step.3 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + //此处设置的filename无效 ,前端会重更新设置一下 + mv.addObject(NormalExcelConstants.FILE_NAME, "获奖管理"); + mv.addObject(NormalExcelConstants.CLASS, AwardPersion.class); + //update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置-------------------- + ExportParams exportParams=new ExportParams("获奖管理" + "报表", "导出人:" + user.getRealname(), "获奖管理"); + exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload()); + //update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置---------------------- + mv.addObject(NormalExcelConstants.PARAMS,exportParams); + mv.addObject(NormalExcelConstants.DATA_LIST, exportList); + return mv; + }else if(sysRoleList.get(0).getId().equals("1693452352310517762")){ + //学院(上传和查询)(根据部门查询数据,该学院下所有学生的获奖信息) + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, request.getParameterMap()); + queryWrapper.eq("studentorg",sysDepartService.queryDepartsByUsername(user.getUsername()).get(0).getId()); + + // 过滤选中数据 + String selections = request.getParameter("selections"); + if (oConvertUtils.isNotEmpty(selections)) { + List selectionList = Arrays.asList(selections.split(",")); + queryWrapper.in("id",selectionList); + } + // Step.2 获取导出数据 + List exportList = awardPersionService.list(queryWrapper); + + // Step.3 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + //此处设置的filename无效 ,前端会重更新设置一下 + mv.addObject(NormalExcelConstants.FILE_NAME, "获奖管理"); + mv.addObject(NormalExcelConstants.CLASS, AwardPersion.class); + //update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置-------------------- + ExportParams exportParams=new ExportParams("获奖管理" + "报表", "导出人:" + user.getRealname(), "获奖管理"); + exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload()); + //update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置---------------------- + mv.addObject(NormalExcelConstants.PARAMS,exportParams); + mv.addObject(NormalExcelConstants.DATA_LIST, exportList); + return mv; + }else { + //学校和超级管理员(全部都可以)(查全部数据) + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, request.getParameterMap()); + if (awardPersion.getComType() != null) { + QueryWrapper queryWrappercomp = new QueryWrapper<>(); + queryWrappercomp.eq("comp_type_id", awardPersion.getComType()); + List list = compService.list(queryWrappercomp); + if (list.size() == 0) { + return null; + } + List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); + QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); + queryWrapperAnnual.in("compid", ids); + List listAnnual = annualCompService.list(queryWrapperAnnual); + if (listAnnual.size() == 0) { + return null; + } + List annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); + queryWrapper.in("annal_comp", annualIds); + } + if (awardPersion.getObjLevel() != null) { + QueryWrapper queryWrapperacp = new QueryWrapper<>(); + queryWrapperacp.eq("obj_level", awardPersion.getObjLevel()); + List listacp = annualCompPointService.list(queryWrapperacp); + if (listacp.size() == 0) { + return null; + } + List acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); + queryWrapper.in("annual_comp_p", acpIds); + } + // 过滤选中数据 + String selections = request.getParameter("selections"); + if (oConvertUtils.isNotEmpty(selections)) { + List selectionList = Arrays.asList(selections.split(",")); + queryWrapper.in("id", selectionList); + } + // Step.2 获取导出数据 + List exportList = awardPersionService.list(queryWrapper); + + // Step.3 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + //此处设置的filename无效 ,前端会重更新设置一下 + mv.addObject(NormalExcelConstants.FILE_NAME, "获奖管理"); + mv.addObject(NormalExcelConstants.CLASS, AwardPersion.class); + //update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置-------------------- + ExportParams exportParams = new ExportParams("获奖管理" + "报表", "导出人:" + user.getRealname(), "获奖管理"); + exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload()); + //update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置---------------------- + mv.addObject(NormalExcelConstants.PARAMS, exportParams); + mv.addObject(NormalExcelConstants.DATA_LIST, exportList); + return mv; + } + + } /** * 奖项推荐导出excel diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java index b16e7b15..74eece40 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java @@ -118,7 +118,7 @@ public class AwardPersion implements Serializable { private String sczs; /**推荐*/ - @Excel(name = "是否推荐", width = 15, dicCode = "yn") + //@Excel(name = "是否推荐", width = 15, dicCode = "yn") @Dict(dicCode = "yn") @ApiModelProperty(value = "推荐") private String tj; From 940252937603a0fe16c4fb00ce06ae3b1b4d6833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Fri, 13 Sep 2024 08:53:04 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysConfigurationController.java | 8 ++++++++ .../sysconfiguration/mapper/SysConfigurationMapper.java | 3 +++ .../service/ISysConfigurationService.java | 1 + .../service/impl/SysConfigurationServiceImpl.java | 8 ++++++++ 4 files changed, 20 insertions(+) diff --git a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/controller/SysConfigurationController.java b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/controller/SysConfigurationController.java index 4ab3ac42..2f7841c4 100644 --- a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/controller/SysConfigurationController.java +++ b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/controller/SysConfigurationController.java @@ -173,4 +173,12 @@ public class SysConfigurationController extends JeecgController findconfig(){ + SysConfiguration sysConfiguration = sysConfigurationService.findconfig(); + return Result.ok(sysConfiguration); + } } diff --git a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/mapper/SysConfigurationMapper.java b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/mapper/SysConfigurationMapper.java index 73da150d..d838c68d 100644 --- a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/mapper/SysConfigurationMapper.java +++ b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/mapper/SysConfigurationMapper.java @@ -3,6 +3,7 @@ package org.jeecg.modules.sysconfiguration.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.jeecg.modules.sysconfiguration.entity.SysConfiguration; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -14,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface SysConfigurationMapper extends BaseMapper { + @Select("select * from sys_configuration ") + SysConfiguration findconfig(); } diff --git a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/service/ISysConfigurationService.java b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/service/ISysConfigurationService.java index c75bbdc0..def53628 100644 --- a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/service/ISysConfigurationService.java +++ b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/service/ISysConfigurationService.java @@ -11,4 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface ISysConfigurationService extends IService { + SysConfiguration findconfig(); } diff --git a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/service/impl/SysConfigurationServiceImpl.java b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/service/impl/SysConfigurationServiceImpl.java index a4f82b1e..2b7c1a0c 100644 --- a/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/service/impl/SysConfigurationServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/service/impl/SysConfigurationServiceImpl.java @@ -3,6 +3,7 @@ package org.jeecg.modules.sysconfiguration.service.impl; import org.jeecg.modules.sysconfiguration.entity.SysConfiguration; import org.jeecg.modules.sysconfiguration.mapper.SysConfigurationMapper; import org.jeecg.modules.sysconfiguration.service.ISysConfigurationService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -16,4 +17,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @Service public class SysConfigurationServiceImpl extends ServiceImpl implements ISysConfigurationService { + @Autowired + private SysConfigurationMapper sysConfigurationMapper; + + @Override + public SysConfiguration findconfig() { + return sysConfigurationMapper.findconfig(); + } } From 15d8cc4c6f9f371caa8556dd032cc8ef953ba336 Mon Sep 17 00:00:00 2001 From: significative <163999932+significative@users.noreply.github.com> Date: Sat, 14 Sep 2024 15:50:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=8F=90=E4=BA=A4jeecg-b?= =?UTF-8?q?oot-master/**/target?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 24 + .../teamseq/controller/TeamSeqController.java | 16 +- .../service/impl/TeamSeqServiceImpl.java | 2 +- jeecgboot-vue3-master/index.html | 2 +- jeecgboot-vue3-master/pnpm-lock.yaml | 14446 ++++++++++++++++ .../public/resource/img/comp/jingsaibjc.png | Bin 0 -> 496056 bytes jeecgboot-vue3-master/src/App.vue | 10 + .../src/assets/icons/gengduo.svg | 1 + .../src/assets/icons/status0.svg | 1 + .../src/assets/icons/status1.svg | 1 + .../src/assets/icons/status2.svg | 1 + .../src/assets/icons/status3.svg | 1 + .../components/Application/src/AppLogo.vue | 4 +- .../src/hooks/setting/index.ts | 9 +- .../src/store/modules/useSettingStore.ts | 35 + .../committee/AnnualCompPointList.vue | 766 +- .../committee/AnnualCompPointList1.vue | 528 + .../committee/components/cardItem.vue | 250 + .../annualcomp/uncommitted/AnnualCompList.vue | 111 +- ...nnualCompList1.vue => AnnualCompList2.vue} | 0 .../uncommitted/components/cardItem.vue | 243 +- jeecgboot-vue3-master/vite.config.ts | 161 +- 22 files changed, 15951 insertions(+), 661 deletions(-) create mode 100644 .gitignore create mode 100644 jeecgboot-vue3-master/pnpm-lock.yaml create mode 100644 jeecgboot-vue3-master/public/resource/img/comp/jingsaibjc.png create mode 100644 jeecgboot-vue3-master/src/assets/icons/gengduo.svg create mode 100644 jeecgboot-vue3-master/src/assets/icons/status0.svg create mode 100644 jeecgboot-vue3-master/src/assets/icons/status1.svg create mode 100644 jeecgboot-vue3-master/src/assets/icons/status2.svg create mode 100644 jeecgboot-vue3-master/src/assets/icons/status3.svg create mode 100644 jeecgboot-vue3-master/src/store/modules/useSettingStore.ts create mode 100644 jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList1.vue create mode 100644 jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/cardItem.vue rename jeecgboot-vue3-master/src/views/annualcomp/uncommitted/{AnnualCompList1.vue => AnnualCompList2.vue} (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java index 5fea5817..be3f920e 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java @@ -77,14 +77,14 @@ public class TeamSeqController extends JeecgController * @param teamSeq * @return */ - @AutoLog(value = "团队赛队员积分计算配置-添加") - @ApiOperation(value = "团队赛队员积分计算配置-添加", notes = "团队赛队员积分计算配置-添加") -// @RequiresPermissions("teamseq:team_seq:add") - @PostMapping(value = "/add") - public Result add(@RequestBody TeamSeq teamSeq) { - teamSeqService.save(teamSeq); - return Result.OK("添加成功!"); - } +// @AutoLog(value = "团队赛队员积分计算配置-添加") +// @ApiOperation(value = "团队赛队员积分计算配置-添加", notes = "团队赛队员积分计算配置-添加") +//// @RequiresPermissions("teamseq:team_seq:add") +// @PostMapping(value = "/add") +// public Result add(@RequestBody TeamSeq teamSeq) { +// teamSeqService.save(teamSeq); +// return Result.OK("添加成功!"); +// } @AutoLog(value = "团队赛队员积分计算配置-添加") @ApiOperation(value = "团队赛队员积分计算配置-添加", notes = "团队赛队员积分计算配置-添加") diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java index 7a5c6575..db3de9bb 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java @@ -28,7 +28,7 @@ public class TeamSeqServiceImpl extends ServiceImpl impl } String pointId = list.get(0).getPointId(); if (StrUtil.isEmpty(pointId)) { - throw new JeecgBootException("比赛项目不能为空!"); + throw new JeecgBootException("比赛项目未创建完成,请在编辑操作中配置!"); } this.remove(new LambdaQueryWrapper().eq(TeamSeq::getPointId, pointId)); diff --git a/jeecgboot-vue3-master/index.html b/jeecgboot-vue3-master/index.html index 79df3dd2..ee7e9e31 100644 --- a/jeecgboot-vue3-master/index.html +++ b/jeecgboot-vue3-master/index.html @@ -10,7 +10,7 @@ /> <%= title %> - + - /** - * 成绩汇总事件 - */ - async function cjhzgl(record) { - await cjhz({id: record.id}, handleSuccess); + diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList1.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList1.vue new file mode 100644 index 00000000..f940e452 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList1.vue @@ -0,0 +1,528 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/cardItem.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/cardItem.vue new file mode 100644 index 00000000..3b223e82 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/cardItem.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualCompList.vue b/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualCompList.vue index 3c1df9e7..714de756 100644 --- a/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualCompList.vue +++ b/jeecgboot-vue3-master/src/views/annualcomp/uncommitted/AnnualCompList.vue @@ -4,24 +4,28 @@
@@ -29,10 +33,20 @@
点击添加比赛
- + @@ -44,19 +58,29 @@ import { Pagination } from 'ant-design-vue'; import { ref } from 'vue'; import cardItem from './components/cardItem.vue'; - import { list,deleteOne } from './AnnualComp.api'; + import { list, deleteOne, submit, enable, deactivate } from './AnnualComp.api'; import { useModal } from '/@/components/Modal'; + import { useMessage } from '/@/hooks/web/useMessage'; - const [registerModal, { openModal }] = useModal(); import AnnualCompModal from './components/AnnualCompModal.vue'; + import { getDictItems } from '/@/api/common/api'; + const [registerModal, { openModal }] = useModal(); + const { createMessage } = useMessage(); - const filterYearList = ref(['全部比赛', '2024年', '2023年', '其他年份']); const activeIndex = ref(0); - const current = ref(2); + const current = ref(1); // 搜索 const searchValue = ref(''); const onSearch = () => { console.log(searchValue.value); + const value = yearList.value.find((item) => item.title === searchValue.value); + console.log(value); + if (value) { + page.annualid = value.values; + getList(); + }else{ + createMessage.warn(`没有查询到${searchValue.value}年的信息`) + } }; // 单选 @@ -65,8 +89,18 @@ // 获取比赛列表 const raceList = ref([]); const total = ref(0); + const page = { + pageSize: 7, + pageNo: 1, + annualid: '', + }; const getList = async () => { - const res = await list({ pageSize: 7 }); + for (const key in page) { + if (!page[key]) { + delete page[key]; + } + } + const res = await list(page); console.log(res); raceList.value = res.records; total.value = res.total; @@ -100,18 +134,61 @@ isUpdate: true, showFooter: false, }); - } - /** + }; + /** * 删除事件 */ async function handleDelete(record) { - console.log(record,'record'); - + console.log(record, 'record'); + await deleteOne({ id: record.value.id }, handleSuccess); } + + // 提交事件 + const handleSubmit = async (record) => { + await submit({ id: record.value.id }, handleSuccess); + }; + // 启用事件 + const handleEnable = async (record) => { + await enable({ id: record.value.id }, handleSuccess); + }; + // 停用事件 + const handleDeactivate = async (record) => { + await deactivate({ id: record.value.id }, handleSuccess); + }; + // 分页 + const pageChange = (pageNo) => { + console.log(pageNo); + page.pageNo = pageNo; + getList(); + }; + + // 获取年度 + const yearList = ref([{ title: '全部比赛', value: '' }]); + const getDictItemsEvent = async () => { + const date = new Date().getTime(); + const res = await getDictItems('annual,annual_name,id?_t=' + date); + yearList.value = res.reverse(); + yearList.value.unshift({ title: '全部比赛', value: '' }); + }; + getDictItemsEvent(); + + // 年度筛选事件 + const filteryear = (id: any, index: number) => { + activeIndex.value = index; + page.annualid = id; + getList(); + };