管理员修改战队信息

This commit is contained in:
lzttt 2024-10-14 18:33:48 +08:00
parent ad9b4b1846
commit 2787202948
11 changed files with 134 additions and 38 deletions

View File

@ -2,23 +2,16 @@ package com.ruoyi.cms.api;
import com.ruoyi.cms.domain.HitCompetition; import com.ruoyi.cms.domain.HitCompetition;
import com.ruoyi.cms.service.IHitCompetitionService; 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.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; 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.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/** /**
* 大赛信息Controller * 大赛信息Controller
* *
* @author 点亮信息 * @author 点亮信息
* @date 2024-07-26 * @date 2024-07-26
*/ */

View File

@ -104,6 +104,16 @@ public class HitRegInfoController extends BaseController
util.exportExcel(response, list1, "报名信息数据"); util.exportExcel(response, list1, "报名信息数据");
} }
/**
* 管理员修改战队信息
*/
@PutMapping("/editTeam")
public AjaxResult editTeam(@RequestBody HitRegInfo hitRegInfo)
{
return toAjax(hitRegInfoService.editTeam(hitRegInfo));
}
/** /**
* 获取报名信息详细信息 * 获取报名信息详细信息
*/ */

View File

@ -76,4 +76,12 @@ public interface IHitRegInfoService
List<HitRegInfo> selectStudentHitRegInfoList(HitRegInfo hitRegInfo); List<HitRegInfo> selectStudentHitRegInfoList(HitRegInfo hitRegInfo);
int studentEdit(HitRegInfo hitRegInfo); int studentEdit(HitRegInfo hitRegInfo);
/**
* 管理员修改战队信息
*
* @param hitRegInfo 报名信息
* @return 修改结果
*/
int editTeam(HitRegInfo hitRegInfo);
} }

View File

@ -60,6 +60,7 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
private HitRegInfoUserMapper hitRegInfoUserMapper; private HitRegInfoUserMapper hitRegInfoUserMapper;
/** /**
* 查询报名信息 * 查询报名信息
* *
@ -458,6 +459,17 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
return i; return i;
} }
/**
* 管理员修改战队信息
*
* @param hitRegInfo 报名信息
* @return 修改结果
*/
@Override
public int editTeam(HitRegInfo hitRegInfo) {
return hitRegInfoMapper.updateById(hitRegInfo);
}
/** /**
* 更新队员信息 * 更新队员信息
* @param teamId * @param teamId

View File

@ -6,11 +6,11 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: 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 # url: jdbc:mysql://localhost:3306/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true
username: obrhgd username: root
# username: root # username: root
password: Obr7890&*() password: 123456
# password: 123456 # password: 123456
# 从库数据源 # 从库数据源
slave: slave:

View File

@ -74,7 +74,7 @@ spring:
# 数据库索引 # 数据库索引
database: 9 database: 9
# 密码 # 密码
password: Obr1234!@#$ password:
# password: 123456 # password: 123456
# password: # password:
# 连接超时时间 # 连接超时时间

View File

@ -6,11 +6,11 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: 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 # url: jdbc:mysql://localhost:3306/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true
username: obrhgd username: root
# username: root # username: root
password: Obr7890&*() password: 123456
# password: 123456 # password: 123456
# 从库数据源 # 从库数据源
slave: slave:

View File

@ -16,7 +16,7 @@ ruoyi:
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口默认为8080 # 服务器的HTTP端口默认为8080
port: 8080 port: 8081
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: /hgdWebsite context-path: /hgdWebsite
@ -74,20 +74,27 @@ spring:
# 数据库索引 # 数据库索引
database: 9 database: 9
# 密码 # 密码
password: 123456 password:
# password: 123456
# password: # password:
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 60s
lettuce: lettuce:
cluster:
refresh:
adaptive: true
period: 10000
pool: pool:
# 连接池中的最小空闲连接 # 连接池中的最小空闲连接
min-idle: 0 min-idle: 0
# 连接池中的最大空闲连接 # 连接池中的最大空闲连接
max-idle: 8 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配置
token: token:

View File

@ -4,8 +4,9 @@ VUE_APP_TITLE = 虚拟仿真实验教学中心
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'
# 若依管理系统/开发环境 # 若依管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.31.25:8080' # VUE_APP_BASE_API = 'http://192.168.1.54:8080'
# VUE_APP_BASE_API = 'http://localhost:8080/hgdWebsite' 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_APP_BASE_API = '/dev-api'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -16,6 +16,14 @@ export function listHitRegistrationStudentInfoExport(query) {
params: query params: query
}) })
} }
// 管理员修改战队信息
export function adminUpdateTeamInformation(data) {
return request({
url: '/system/hit_reg_info/editTeam',
method: 'put',
data: data
})
}
// 查询报名信息列表学生 // 查询报名信息列表学生
export function listHitRegistrationStudentInfoStudent(query) { export function listHitRegistrationStudentInfoStudent(query) {
return request({ return request({

View File

@ -110,7 +110,6 @@
<el-link :href="`${baseUrl}${props.row.uploadFile}`" type="primary" :underline="false" target="_blank"> <el-link :href="`${baseUrl}${props.row.uploadFile}`" type="primary" :underline="false" target="_blank">
<span class="el-icon-document"> 下载 </span> <span class="el-icon-document"> 下载 </span>
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="报名时间" align="center" prop="createTime"> <el-table-column label="报名时间" align="center" prop="createTime">
@ -144,8 +143,8 @@
v-if="techerType != '0' && (scope.row.auditStatus == '0' || scope.row.auditStatus == '2')" v-if="techerType != '0' && (scope.row.auditStatus == '0' || scope.row.auditStatus == '2')"
@confirm="auditData(scope.row, '1')"> @confirm="auditData(scope.row, '1')">
<el-button size="mini" type="text" slot="reference">通过</el-button> <el-button size="mini" type="text" slot="reference">通过</el-button>
</el-popconfirm> </el-popconfirm>
<el-popconfirm title="确定当前操作?" style="margin-left: 10px" <el-popconfirm title="确定当前操作?" style="margin-left: 10px"
v-if="techerType != '0' && (scope.row.auditStatus == '0' || scope.row.auditStatus == '1')" v-if="techerType != '0' && (scope.row.auditStatus == '0' || scope.row.auditStatus == '1')"
@confirm="auditData(scope.row, '2')"> @confirm="auditData(scope.row, '2')">
@ -154,25 +153,61 @@
<!-- 指导老师 --> <!-- 指导老师 -->
<el-popconfirm title="确定当前操作" <el-popconfirm title="确定当前操作"
@confirm="submitData(scope.row.registrationInformation,1)" v-if="techerType == '0' && scope.row.zdTeacherList.includes(userId) && scope.row.auditStatus == '9'"> @confirm="submitData(scope.row.registrationInformation,1)"
<el-button size="mini" type="text" slot="reference" >同意</el-button> v-if="techerType == '0' && scope.row.zdTeacherList.includes(userId) && scope.row.auditStatus == '9'">
<el-button size="mini" type="text" slot="reference">同意</el-button>
</el-popconfirm> </el-popconfirm>
<el-popconfirm title="确定当前操作?" style="margin-left: 10px" <el-popconfirm title="确定当前操作?" style="margin-left: 10px"
v-if="techerType == '0' && scope.row.zdTeacherList.includes(userId) && scope.row.auditStatus == '9'" @confirm="submitData(scope.row.registrationInformation,2)"> v-if="techerType == '0' && scope.row.zdTeacherList.includes(userId) && scope.row.auditStatus == '9'"
@confirm="submitData(scope.row.registrationInformation,2)">
<el-button size="mini" type="text" slot="reference">拒绝</el-button> <el-button size="mini" type="text" slot="reference">拒绝</el-button>
</el-popconfirm> </el-popconfirm>
<!-- 修改团队信息 -->
<el-button size="mini" type="text" style="margin-left: 10px" @click="editData(scope.row)">修改</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <!-- 修改团队信息弹出层 对话框 -->
@pagination="getList" /> <el-dialog :visible.sync="editDialogVisible" title="编辑信息">
<el-form :model="currentRow">
<el-form-item label="所属赛区">
<el-input v-model="currentRow.division"></el-input>
</el-form-item>
<el-form-item label="学校名称">
<el-input v-model="currentRow.schoolName"></el-input>
</el-form-item>
<el-form-item label="院系名称">
<el-input v-model="currentRow.collegeName"></el-input>
</el-form-item>
<el-form-item label="团队名称">
<el-input v-model="currentRow.teamName"></el-input>
</el-form-item>
<el-form-item label="盲样邮寄地址">
<el-input v-model="currentRow.sampleAddress"></el-input>
</el-form-item>
<el-form-item label="收件人">
<el-input v-model="currentRow.sampleConcat"></el-input>
</el-form-item>
<el-form-item label="联系电话">
<el-input v-model="currentRow.sampleNumber"></el-input>
</el-form-item>
<el-form-item label="附件">
<FileUpload :file-type="['doc','zip', 'docx', 'pdf']" v-model="currentRow.uploadFile" ></FileUpload>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="editDialogVisible = false"> </el-button>
<el-button type="primary" @click="saveData"> </el-button>
</span>
</el-dialog>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- Existing pagination -->
</div> </div>
</template> </template>
@ -184,7 +219,8 @@ import {
addHitRegistrationStudentInfo, addHitRegistrationStudentInfo,
updateHitRegistrationStudentInfo, updateHitRegistrationStudentInfo,
listHitRegistrationStudentInfoExport, listHitRegistrationStudentInfoExport,
getTeachInfoByIds getTeachInfoByIds,
adminUpdateTeamInformation
} from "@/api/hit/registrationStudentInfo"; } from "@/api/hit/registrationStudentInfo";
import { selectBaseInfo, editStatus } from '@/api/cms/baseInfo' import { selectBaseInfo, editStatus } from '@/api/cms/baseInfo'
import { getHitRegistrationTeachInfoByUserId, selectByUserId } from '@/api/hit/teacherInfo' import { getHitRegistrationTeachInfoByUserId, selectByUserId } from '@/api/hit/teacherInfo'
@ -225,6 +261,10 @@ export default {
zdTeacherList: [], zdTeacherList: [],
// //
registrationInformation: {}, registrationInformation: {},
//
editDialogVisible: false,
currentRow: {},
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -286,6 +326,7 @@ export default {
this.getTeachInfoByIds(this.$store.state.user.id) this.getTeachInfoByIds(this.$store.state.user.id)
}, },
methods: { methods: {
/** 查询报名信息列表 */ /** 查询报名信息列表 */
getList() { getList() {
@ -505,8 +546,24 @@ export default {
} }
return years.sort((a, b) => b.label - a.label); 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("团队信息修改失败");
});
},
},
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">