From 2787202948c40b68681bba3c8322cf6c582097be Mon Sep 17 00:00:00 2001 From: lzttt <1803073139@qq.com> Date: Mon, 14 Oct 2024 18:33:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=88=98=E9=98=9F=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/cms/api/HitCompetitionAPI.java | 15 +--- .../cms/controller/HitRegInfoController.java | 10 +++ .../ruoyi/cms/service/IHitRegInfoService.java | 8 ++ .../service/impl/HitRegInfoServiceImpl.java | 12 +++ .../src/main/resources/application-druid.yml | 6 +- .../src/main/resources/application.yml | 2 +- .../target/classes/application-druid.yml | 6 +- ruoyi-admin/target/classes/application.yml | 17 ++-- ruoyi-ui/.env.development | 5 +- .../src/api/hit/registrationStudentInfo.js | 8 ++ .../hit/registrationStudentInfo/index.vue | 83 ++++++++++++++++--- 11 files changed, 134 insertions(+), 38 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/cms/api/HitCompetitionAPI.java b/ruoyi-admin/src/main/java/com/ruoyi/cms/api/HitCompetitionAPI.java index c475ee9..4e44d19 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/cms/api/HitCompetitionAPI.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/cms/api/HitCompetitionAPI.java @@ -2,23 +2,16 @@ package com.ruoyi.cms.api; import com.ruoyi.cms.domain.HitCompetition; import com.ruoyi.cms.service.IHitCompetitionService; -import com.ruoyi.common.annotation.Anonymous; -import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.poi.ExcelUtil; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** * 大赛信息Controller - * + * * @author 点亮信息 * @date 2024-07-26 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/cms/controller/HitRegInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/cms/controller/HitRegInfoController.java index 0e9edce..28899ac 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/cms/controller/HitRegInfoController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/cms/controller/HitRegInfoController.java @@ -104,6 +104,16 @@ public class HitRegInfoController extends BaseController util.exportExcel(response, list1, "报名信息数据"); } + /** + * 管理员修改战队信息 + */ + @PutMapping("/editTeam") + public AjaxResult editTeam(@RequestBody HitRegInfo hitRegInfo) + { + return toAjax(hitRegInfoService.editTeam(hitRegInfo)); + } + + /** * 获取报名信息详细信息 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/cms/service/IHitRegInfoService.java b/ruoyi-admin/src/main/java/com/ruoyi/cms/service/IHitRegInfoService.java index 25f1fcd..e678c43 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/cms/service/IHitRegInfoService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/cms/service/IHitRegInfoService.java @@ -76,4 +76,12 @@ public interface IHitRegInfoService List selectStudentHitRegInfoList(HitRegInfo hitRegInfo); int studentEdit(HitRegInfo hitRegInfo); + + /** + * 管理员修改战队信息 + * + * @param hitRegInfo 报名信息 + * @return 修改结果 + */ + int editTeam(HitRegInfo hitRegInfo); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/cms/service/impl/HitRegInfoServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/cms/service/impl/HitRegInfoServiceImpl.java index dd48cf3..f6607f7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/cms/service/impl/HitRegInfoServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/cms/service/impl/HitRegInfoServiceImpl.java @@ -60,6 +60,7 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService private HitRegInfoUserMapper hitRegInfoUserMapper; + /** * 查询报名信息 * @@ -458,6 +459,17 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService return i; } + /** + * 管理员修改战队信息 + * + * @param hitRegInfo 报名信息 + * @return 修改结果 + */ + @Override + public int editTeam(HitRegInfo hitRegInfo) { + return hitRegInfoMapper.updateById(hitRegInfo); + } + /** * 更新队员信息 * @param teamId diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index a1c6cad..2d2ca3e 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,11 +6,11 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://61.156.90.46:3360/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true + url: jdbc:mysql://localhost:3306/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true # url: jdbc:mysql://localhost:3306/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true - username: obrhgd + username: root # username: root - password: Obr7890&*() + password: 123456 # password: 123456 # 从库数据源 slave: diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 47ebe09..c9f6092 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -74,7 +74,7 @@ spring: # 数据库索引 database: 9 # 密码 - password: Obr1234!@#$ + password: # password: 123456 # password: # 连接超时时间 diff --git a/ruoyi-admin/target/classes/application-druid.yml b/ruoyi-admin/target/classes/application-druid.yml index a1c6cad..2d2ca3e 100644 --- a/ruoyi-admin/target/classes/application-druid.yml +++ b/ruoyi-admin/target/classes/application-druid.yml @@ -6,11 +6,11 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://61.156.90.46:3360/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true + url: jdbc:mysql://localhost:3306/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true # url: jdbc:mysql://localhost:3306/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true - username: obrhgd + username: root # username: root - password: Obr7890&*() + password: 123456 # password: 123456 # 从库数据源 slave: diff --git a/ruoyi-admin/target/classes/application.yml b/ruoyi-admin/target/classes/application.yml index 6649b08..c9f6092 100644 --- a/ruoyi-admin/target/classes/application.yml +++ b/ruoyi-admin/target/classes/application.yml @@ -16,7 +16,7 @@ ruoyi: # 开发环境配置 server: # 服务器的HTTP端口,默认为8080 - port: 8080 + port: 8081 servlet: # 应用的访问路径 context-path: /hgdWebsite @@ -74,20 +74,27 @@ spring: # 数据库索引 database: 9 # 密码 - password: 123456 + password: +# password: 123456 # password: # 连接超时时间 - timeout: 10s + timeout: 60s lettuce: + cluster: + refresh: + adaptive: true + period: 10000 pool: # 连接池中的最小空闲连接 min-idle: 0 # 连接池中的最大空闲连接 max-idle: 8 # 连接池的最大数据库连接数 - max-active: 8 + max-active: 20 # #连接池最大阻塞等待时间(使用负值表示没有限制) - max-wait: -1ms + max-wait: 6000ms + time-between-eviction-runs: 1s + shutdown-timeout: 100ms # token配置 token: diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index 4dd390c..66983c5 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -4,8 +4,9 @@ VUE_APP_TITLE = 虚拟仿真实验教学中心 # 开发环境配置 ENV = 'development' # 若依管理系统/开发环境 -VUE_APP_BASE_API = 'http://192.168.31.25:8080' -# VUE_APP_BASE_API = 'http://localhost:8080/hgdWebsite' +# VUE_APP_BASE_API = 'http://192.168.1.54:8080' +VUE_APP_BASE_API = 'http://localhost:8081/hgdWebsite' +# VUE_APP_BASE_API = 'http://192.168.1.54:8080/hgdWebsite' # VUE_APP_BASE_API = '/dev-api' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/ruoyi-ui/src/api/hit/registrationStudentInfo.js b/ruoyi-ui/src/api/hit/registrationStudentInfo.js index c193042..0e17f5f 100644 --- a/ruoyi-ui/src/api/hit/registrationStudentInfo.js +++ b/ruoyi-ui/src/api/hit/registrationStudentInfo.js @@ -16,6 +16,14 @@ export function listHitRegistrationStudentInfoExport(query) { params: query }) } +// 管理员修改战队信息 +export function adminUpdateTeamInformation(data) { + return request({ + url: '/system/hit_reg_info/editTeam', + method: 'put', + data: data + }) +} // 查询报名信息列表学生 export function listHitRegistrationStudentInfoStudent(query) { return request({ diff --git a/ruoyi-ui/src/views/hit/registrationStudentInfo/index.vue b/ruoyi-ui/src/views/hit/registrationStudentInfo/index.vue index f5cae20..71dc1c4 100644 --- a/ruoyi-ui/src/views/hit/registrationStudentInfo/index.vue +++ b/ruoyi-ui/src/views/hit/registrationStudentInfo/index.vue @@ -110,7 +110,6 @@ 下载 - @@ -144,8 +143,8 @@ v-if="techerType != '0' && (scope.row.auditStatus == '0' || scope.row.auditStatus == '2')" @confirm="auditData(scope.row, '1')"> 通过 - + @@ -154,25 +153,61 @@ - 同意 - + @confirm="submitData(scope.row.registrationInformation,1)" + v-if="techerType == '0' && scope.row.zdTeacherList.includes(userId) && scope.row.auditStatus == '9'"> + 同意 + + v-if="techerType == '0' && scope.row.zdTeacherList.includes(userId) && scope.row.auditStatus == '9'" + @confirm="submitData(scope.row.registrationInformation,2)"> 拒绝 - - - + + 修改 + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + + + + @@ -184,7 +219,8 @@ import { addHitRegistrationStudentInfo, updateHitRegistrationStudentInfo, listHitRegistrationStudentInfoExport, - getTeachInfoByIds + getTeachInfoByIds, + adminUpdateTeamInformation } from "@/api/hit/registrationStudentInfo"; import { selectBaseInfo, editStatus } from '@/api/cms/baseInfo' import { getHitRegistrationTeachInfoByUserId, selectByUserId } from '@/api/hit/teacherInfo' @@ -225,6 +261,10 @@ export default { zdTeacherList: [], //当前登录老师的报名信息 registrationInformation: {}, + // 修改对话框是否显示 + editDialogVisible: false, + currentRow: {}, + // 查询参数 queryParams: { pageNum: 1, @@ -286,6 +326,7 @@ export default { this.getTeachInfoByIds(this.$store.state.user.id) }, + methods: { /** 查询报名信息列表 */ getList() { @@ -505,8 +546,24 @@ export default { } return years.sort((a, b) => b.label - a.label); }, - } + editData(row) { + this.currentRow = { ...row }; + this.editDialogVisible = true; + }, + saveData() { + console.log('保存数据', this.currentRow); + adminUpdateTeamInformation(this.currentRow).then(response => { + this.$modal.msgSuccess("团队信息修改成功"); + this.editDialogVisible = false; + this.getList(); + }).catch(error => { + this.$modal.msgError("团队信息修改失败"); + }); + }, + }, + }; +