更新
This commit is contained in:
parent
e854f75882
commit
4fec2aec95
@ -1,11 +1,14 @@
|
|||||||
package com.ruoyi.cms.controller;
|
package com.ruoyi.cms.controller;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.Year;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.ruoyi.cms.domain.HitRegInfoUser;
|
||||||
import com.ruoyi.cms.domain.vo.*;
|
import com.ruoyi.cms.domain.vo.*;
|
||||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||||
import com.ruoyi.common.utils.bean.BeanUtils;
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||||
@ -39,8 +42,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/hit_reg_info")
|
@RequestMapping("/system/hit_reg_info")
|
||||||
public class HitRegInfoController extends BaseController
|
public class HitRegInfoController extends BaseController {
|
||||||
{
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(HitRegInfoController.class);
|
private static final Logger log = LoggerFactory.getLogger(HitRegInfoController.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -51,18 +53,17 @@ public class HitRegInfoController extends BaseController
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(HitRegInfo hitRegInfo)
|
public TableDataInfo list(HitRegInfo hitRegInfo) {
|
||||||
{
|
|
||||||
|
|
||||||
List<HitRegInfo> list = hitRegInfoService.selectHitRegInfoList(hitRegInfo);
|
List<HitRegInfo> list = hitRegInfoService.selectHitRegInfoList(hitRegInfo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生查询报名信息列表
|
* 学生查询报名信息列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/studentList")
|
@GetMapping("/studentList")
|
||||||
public TableDataInfo studentList(HitRegInfo hitRegInfo)
|
public TableDataInfo studentList(HitRegInfo hitRegInfo) {
|
||||||
{
|
|
||||||
|
|
||||||
List<HitRegInfo> list = hitRegInfoService.selectStudentHitRegInfoList(hitRegInfo);
|
List<HitRegInfo> list = hitRegInfoService.selectStudentHitRegInfoList(hitRegInfo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -74,8 +75,7 @@ public class HitRegInfoController extends BaseController
|
|||||||
|
|
||||||
@Log(title = "报名信息", businessType = BusinessType.EXPORT)
|
@Log(title = "报名信息", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, HitRegInfo hitRegInfo)
|
public void export(HttpServletResponse response, HitRegInfo hitRegInfo) {
|
||||||
{
|
|
||||||
List<HitRegInfo> list = hitRegInfoService.selectHitRegInfoListExport(hitRegInfo);
|
List<HitRegInfo> list = hitRegInfoService.selectHitRegInfoListExport(hitRegInfo);
|
||||||
List<HitRegInfoExportVo> list1 = new ArrayList<>();
|
List<HitRegInfoExportVo> list1 = new ArrayList<>();
|
||||||
for (HitRegInfo hitRegInfo1 : list) {
|
for (HitRegInfo hitRegInfo1 : list) {
|
||||||
@ -105,7 +105,7 @@ public class HitRegInfoController extends BaseController
|
|||||||
|
|
||||||
hitRegInfoExportVo.setCreateTime(formattedCreateTime);
|
hitRegInfoExportVo.setCreateTime(formattedCreateTime);
|
||||||
list1.add(hitRegInfoExportVo);
|
list1.add(hitRegInfoExportVo);
|
||||||
}catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("导出错误,团队信息:{}", hitRegInfo1);
|
log.error("导出错误,团队信息:{}", hitRegInfo1);
|
||||||
log.error("导出错误,错误信息:{}", e.getMessage());
|
log.error("导出错误,错误信息:{}", e.getMessage());
|
||||||
}
|
}
|
||||||
@ -119,8 +119,7 @@ public class HitRegInfoController extends BaseController
|
|||||||
* 管理员修改战队信息
|
* 管理员修改战队信息
|
||||||
*/
|
*/
|
||||||
@PutMapping("/editTeam")
|
@PutMapping("/editTeam")
|
||||||
public AjaxResult editTeam(@RequestBody HitRegInfo hitRegInfo)
|
public AjaxResult editTeam(@RequestBody HitRegInfo hitRegInfo) {
|
||||||
{
|
|
||||||
return toAjax(hitRegInfoService.editTeam(hitRegInfo));
|
return toAjax(hitRegInfoService.editTeam(hitRegInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,8 +129,7 @@ public class HitRegInfoController extends BaseController
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
{
|
|
||||||
return success(hitRegInfoService.selectHitRegInfoById(id));
|
return success(hitRegInfoService.selectHitRegInfoById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,8 +139,7 @@ public class HitRegInfoController extends BaseController
|
|||||||
|
|
||||||
@Log(title = "报名信息", businessType = BusinessType.INSERT)
|
@Log(title = "报名信息", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody HitRegInfo hitRegInfo)
|
public AjaxResult add(@RequestBody HitRegInfo hitRegInfo) {
|
||||||
{
|
|
||||||
return toAjax(hitRegInfoService.insertHitRegInfo(hitRegInfo));
|
return toAjax(hitRegInfoService.insertHitRegInfo(hitRegInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,37 +149,36 @@ public class HitRegInfoController extends BaseController
|
|||||||
|
|
||||||
@Log(title = "报名信息", businessType = BusinessType.UPDATE)
|
@Log(title = "报名信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody HitRegInfo hitRegInfo)
|
public AjaxResult edit(@RequestBody HitRegInfo hitRegInfo) {
|
||||||
{
|
|
||||||
return toAjax(hitRegInfoService.updateHitRegInfo(hitRegInfo));
|
return toAjax(hitRegInfoService.updateHitRegInfo(hitRegInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改报名信息
|
* 修改报名信息
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Log(title = "报名信息", businessType = BusinessType.UPDATE)
|
@Log(title = "报名信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/studentEdit")
|
@PutMapping("/studentEdit")
|
||||||
public AjaxResult studentEdit(@RequestBody HitRegInfo hitRegInfo)
|
public AjaxResult studentEdit(@RequestBody HitRegInfo hitRegInfo) {
|
||||||
{
|
|
||||||
return toAjax(hitRegInfoService.studentEdit(hitRegInfo));
|
return toAjax(hitRegInfoService.studentEdit(hitRegInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改报名信息
|
* 修改报名信息
|
||||||
*/
|
*/
|
||||||
@Log(title = "报名信息", businessType = BusinessType.UPDATE)
|
@Log(title = "报名信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/edit2")
|
@PutMapping("/edit2")
|
||||||
public AjaxResult edit2(@RequestBody HitRegInfo hitRegInfo)
|
public AjaxResult edit2(@RequestBody HitRegInfo hitRegInfo) {
|
||||||
{
|
|
||||||
return toAjax(hitRegInfoService.updateHitRegInfo(hitRegInfo));
|
return toAjax(hitRegInfoService.updateHitRegInfo(hitRegInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除报名信息
|
* 删除报名信息
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Log(title = "报名信息", businessType = BusinessType.DELETE)
|
@Log(title = "报名信息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
{
|
|
||||||
return toAjax(hitRegInfoService.deleteHitRegInfoByIds(ids));
|
return toAjax(hitRegInfoService.deleteHitRegInfoByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,6 +195,7 @@ public class HitRegInfoController extends BaseController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入个人分数数据
|
* 导入个人分数数据
|
||||||
|
*
|
||||||
* @param file
|
* @param file
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
@ -224,6 +221,7 @@ public class HitRegInfoController extends BaseController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入团队分数数据
|
* 导入团队分数数据
|
||||||
|
*
|
||||||
* @param file
|
* @param file
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
@ -235,4 +233,21 @@ public class HitRegInfoController extends BaseController
|
|||||||
String message = hitRegInfoService.importTeamData(hitList);
|
String message = hitRegInfoService.importTeamData(hitList);
|
||||||
return success(message);
|
return success(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户是否已报名
|
||||||
|
*
|
||||||
|
* @param hitRegInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryIfReg")
|
||||||
|
public AjaxResult queryIfReg(HitRegInfo hitRegInfo) {
|
||||||
|
if (hitRegInfo.getYear() == null) {
|
||||||
|
hitRegInfo.setYear(String.valueOf(Year.now().getValue()));
|
||||||
|
}
|
||||||
|
// 设置用户id
|
||||||
|
hitRegInfo.setUserId(getUserId());
|
||||||
|
HitRegInfo hitRegInfo1 = hitRegInfoService.selectHitByUserIdAndRacetrack(hitRegInfo);
|
||||||
|
return success(hitRegInfo1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
package com.ruoyi.cms.controller;
|
package com.ruoyi.cms.controller;
|
||||||
|
|
||||||
|
import java.time.Year;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.ruoyi.cms.domain.HitRegInfo;
|
||||||
import com.ruoyi.cms.domain.HitRegInfoUser;
|
import com.ruoyi.cms.domain.HitRegInfoUser;
|
||||||
import com.ruoyi.cms.service.IHitRegInfoUserService;
|
import com.ruoyi.cms.service.IHitRegInfoUserService;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@ -31,8 +33,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/hitRegUser")
|
@RequestMapping("/system/hitRegUser")
|
||||||
public class HitRegInfoUserController extends BaseController
|
public class HitRegInfoUserController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IHitRegInfoUserService hitRegInfoUserService;
|
private IHitRegInfoUserService hitRegInfoUserService;
|
||||||
|
|
||||||
@ -41,8 +42,7 @@ public class HitRegInfoUserController extends BaseController
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(HitRegInfoUser hitRegInfoUser)
|
public TableDataInfo list(HitRegInfoUser hitRegInfoUser) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<HitRegInfoUser> list = hitRegInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
|
List<HitRegInfoUser> list = hitRegInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -54,8 +54,7 @@ public class HitRegInfoUserController extends BaseController
|
|||||||
|
|
||||||
@Log(title = "报名相关人员信息", businessType = BusinessType.EXPORT)
|
@Log(title = "报名相关人员信息", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, HitRegInfoUser hitRegInfoUser)
|
public void export(HttpServletResponse response, HitRegInfoUser hitRegInfoUser) {
|
||||||
{
|
|
||||||
List<HitRegInfoUser> list = hitRegInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
|
List<HitRegInfoUser> list = hitRegInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
|
||||||
ExcelUtil<HitRegInfoUser> util = new ExcelUtil<HitRegInfoUser>(HitRegInfoUser.class);
|
ExcelUtil<HitRegInfoUser> util = new ExcelUtil<HitRegInfoUser>(HitRegInfoUser.class);
|
||||||
util.exportExcel(response, list, "报名相关人员信息数据");
|
util.exportExcel(response, list, "报名相关人员信息数据");
|
||||||
@ -66,8 +65,7 @@ public class HitRegInfoUserController extends BaseController
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
{
|
|
||||||
return success(hitRegInfoUserService.selectHitRegInfoUserById(id));
|
return success(hitRegInfoUserService.selectHitRegInfoUserById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,8 +75,7 @@ public class HitRegInfoUserController extends BaseController
|
|||||||
|
|
||||||
@Log(title = "报名相关人员信息", businessType = BusinessType.INSERT)
|
@Log(title = "报名相关人员信息", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody HitRegInfoUser hitRegInfoUser)
|
public AjaxResult add(@RequestBody HitRegInfoUser hitRegInfoUser) {
|
||||||
{
|
|
||||||
return toAjax(hitRegInfoUserService.insertHitRegInfoUser(hitRegInfoUser));
|
return toAjax(hitRegInfoUserService.insertHitRegInfoUser(hitRegInfoUser));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,8 +84,7 @@ public class HitRegInfoUserController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@Log(title = "报名相关人员信息", businessType = BusinessType.UPDATE)
|
@Log(title = "报名相关人员信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody HitRegInfoUser hitRegInfoUser)
|
public AjaxResult edit(@RequestBody HitRegInfoUser hitRegInfoUser) {
|
||||||
{
|
|
||||||
return toAjax(hitRegInfoUserService.updateHitRegInfoUser(hitRegInfoUser));
|
return toAjax(hitRegInfoUserService.updateHitRegInfoUser(hitRegInfoUser));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,8 +94,7 @@ public class HitRegInfoUserController extends BaseController
|
|||||||
|
|
||||||
@Log(title = "报名相关人员信息", businessType = BusinessType.DELETE)
|
@Log(title = "报名相关人员信息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
{
|
|
||||||
return toAjax(hitRegInfoUserService.deleteHitRegInfoUserByIds(ids));
|
return toAjax(hitRegInfoUserService.deleteHitRegInfoUserByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
package com.ruoyi.cms.domain;
|
package com.ruoyi.cms.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础信息对象 base_info
|
* 基础信息对象 base_info
|
||||||
*
|
*
|
||||||
@ -54,4 +58,10 @@ public class BaseInfo extends BaseEntity
|
|||||||
/** 技术支持手机号 */
|
/** 技术支持手机号 */
|
||||||
@Excel(name = "技术支持手机号")
|
@Excel(name = "技术支持手机号")
|
||||||
private String technologyNumber;
|
private String technologyNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典数据(赛道信息)
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<SysDictData> dictDatas;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,7 +91,7 @@ public class HitCompetitionStudentInfo implements Serializable {
|
|||||||
@ApiModelProperty(value = "学生证")
|
@ApiModelProperty(value = "学生证")
|
||||||
private String studentIdCard;
|
private String studentIdCard;
|
||||||
|
|
||||||
@Excel(name = "个人选拔赛分数",type = IMPORT)
|
@Excel(name = "个人选拔赛分数")
|
||||||
@ApiModelProperty(value = "个人选拔赛分数")
|
@ApiModelProperty(value = "个人选拔赛分数")
|
||||||
private BigDecimal trialsScore;
|
private BigDecimal trialsScore;
|
||||||
// @Excel(name = "是否被选为参加地区选拔赛人员", readConverterExp = "false=待审核,true=已入选",type = EXPORT)
|
// @Excel(name = "是否被选为参加地区选拔赛人员", readConverterExp = "false=待审核,true=已入选",type = EXPORT)
|
||||||
|
|||||||
@ -99,6 +99,8 @@ public class HitRegInfo extends BaseEntity
|
|||||||
private List<HitCompetitionStudentInfo> studentUserss =new ArrayList<>();
|
private List<HitCompetitionStudentInfo> studentUserss =new ArrayList<>();
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String year;
|
private String year;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,7 @@ public interface HitCompetitionStudentInfoMapper extends BaseMapper<HitCompetiti
|
|||||||
|
|
||||||
|
|
||||||
public HitCompetitionStudentInfo selectHitCompetitionStudentInfoByUserId(@Param("userId") Long userId, @Param("year") String year);
|
public HitCompetitionStudentInfo selectHitCompetitionStudentInfoByUserId(@Param("userId") Long userId, @Param("year") String year);
|
||||||
|
public HitCompetitionStudentInfo selectHitCompetitionStudentInfoByUserIdAndRacetrack(@Param("userId") Long userId, @Param("year") String year, @Param("racetrack") String racetrack);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询大赛学生列表
|
* 查询大赛学生列表
|
||||||
|
|||||||
@ -63,6 +63,7 @@ public interface HitRegInfoMapper extends BaseMapper<HitRegInfo>
|
|||||||
public int deleteHitRegInfoByIds(Long[] ids);
|
public int deleteHitRegInfoByIds(Long[] ids);
|
||||||
HitRegInfo selectHitByUserId(@Param("userId") Long userId,@Param("status") String status,@Param("year") String year);
|
HitRegInfo selectHitByUserId(@Param("userId") Long userId,@Param("status") String status,@Param("year") String year);
|
||||||
HitRegInfo selectHitByUserId2(@Param("userId") Long userId,@Param("year") String year);
|
HitRegInfo selectHitByUserId2(@Param("userId") Long userId,@Param("year") String year);
|
||||||
|
HitRegInfo selectHitByUserIdAndRacetrack(@Param("userId") Long userId,@Param("year") String year, @Param("racetrack") String racetrack);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,6 +77,8 @@ public interface IHitRegInfoService {
|
|||||||
|
|
||||||
HitRegInfo selectHitByUserId2(Long userId);
|
HitRegInfo selectHitByUserId2(Long userId);
|
||||||
|
|
||||||
|
HitRegInfo selectHitByUserId2(Long userId, String racetrack);
|
||||||
|
|
||||||
|
|
||||||
List<HitRegInfo> selectStudentHitRegInfoList(HitRegInfo hitRegInfo);
|
List<HitRegInfo> selectStudentHitRegInfoList(HitRegInfo hitRegInfo);
|
||||||
|
|
||||||
@ -105,4 +107,12 @@ public interface IHitRegInfoService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String importTeamData(List<HitRegInfoTeamImportVo> hitList);
|
String importTeamData(List<HitRegInfoTeamImportVo> hitList);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询团队信息
|
||||||
|
* @param hitRegInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
HitRegInfo selectHitByUserIdAndRacetrack(HitRegInfo hitRegInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import java.util.List;
|
|||||||
|
|
||||||
import cn.hutool.core.lang.Snowflake;
|
import cn.hutool.core.lang.Snowflake;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
|
import com.ruoyi.system.service.ISysDictDataService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.cms.mapper.BaseInfoMapper;
|
import com.ruoyi.cms.mapper.BaseInfoMapper;
|
||||||
@ -21,6 +23,8 @@ public class BaseInfoServiceImpl extends ServiceImpl<BaseInfoMapper, BaseInfo> i
|
|||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private Snowflake snowflake;
|
private Snowflake snowflake;
|
||||||
|
@Autowired
|
||||||
|
private ISysDictDataService sysDictDataService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改基础信息
|
* 修改基础信息
|
||||||
@ -39,7 +43,12 @@ public class BaseInfoServiceImpl extends ServiceImpl<BaseInfoMapper, BaseInfo> i
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public BaseInfo getBaseInfo(){
|
public BaseInfo getBaseInfo(){
|
||||||
return baseMapper.selectBaseInfo();
|
SysDictData sysDictData = new SysDictData();
|
||||||
|
sysDictData.setDictType("com_racetrack");
|
||||||
|
List<SysDictData> sysDictDatas = sysDictDataService.selectDictDataList(sysDictData);
|
||||||
|
BaseInfo baseInfo = baseMapper.selectBaseInfo();
|
||||||
|
baseInfo.setDictDatas(sysDictDatas);
|
||||||
|
return baseInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -121,7 +121,7 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "1":
|
case "1":
|
||||||
HitCompetitionStudentInfo studentInfo = hitCompetitionStudentInfoMapper.selectHitCompetitionStudentInfoByUserId(regInfoUser.getUserId(), hitRegInfo.getYear());
|
HitCompetitionStudentInfo studentInfo = hitCompetitionStudentInfoMapper.selectHitCompetitionStudentInfoByUserIdAndRacetrack(regInfoUser.getUserId(), hitRegInfo.getYear(),regInfo.getRacetrack());
|
||||||
regInfo.getStudentUserss().add(studentInfo);
|
regInfo.getStudentUserss().add(studentInfo);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -167,7 +167,7 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "1":
|
case "1":
|
||||||
HitCompetitionStudentInfo studentInfo = hitCompetitionStudentInfoMapper.selectHitCompetitionStudentInfoByUserId(regInfoUser.getUserId(), hitRegInfo.getYear());
|
HitCompetitionStudentInfo studentInfo = hitCompetitionStudentInfoMapper.selectHitCompetitionStudentInfoByUserIdAndRacetrack(regInfoUser.getUserId(), hitRegInfo.getYear(), regInfo.getRacetrack());
|
||||||
regInfo.getStudentUserss().add(studentInfo);
|
regInfo.getStudentUserss().add(studentInfo);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -397,6 +397,20 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService {
|
|||||||
return hitRegInfo;
|
return hitRegInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HitRegInfo selectHitByUserId2(Long userId, String racetrack) {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
int year = calendar.get(Calendar.YEAR);
|
||||||
|
HitRegInfo hitRegInfo = hitRegInfoMapper.selectHitByUserIdAndRacetrack(userId, String.valueOf(year),racetrack);
|
||||||
|
if (ObjectUtils.isNotEmpty(hitRegInfo)) {
|
||||||
|
HitRegInfoUser hitRegInfoUser = new HitRegInfoUser();
|
||||||
|
hitRegInfoUser.setRegId(hitRegInfo.getId());
|
||||||
|
List<HitRegInfoUser> hitRegInfoUsers = regInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
|
||||||
|
hitRegInfo.setRegInfoUsers(hitRegInfoUsers);
|
||||||
|
}
|
||||||
|
return hitRegInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<HitRegInfo> selectStudentHitRegInfoList(HitRegInfo hitRegInfo) {
|
public List<HitRegInfo> selectStudentHitRegInfoList(HitRegInfo hitRegInfo) {
|
||||||
if (ObjectUtil.isEmpty(hitRegInfo.getYear())) {
|
if (ObjectUtil.isEmpty(hitRegInfo.getYear())) {
|
||||||
@ -577,6 +591,17 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService {
|
|||||||
return "导入完成";
|
return "导入完成";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询团队信息
|
||||||
|
*
|
||||||
|
* @param hitRegInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public HitRegInfo selectHitByUserIdAndRacetrack(HitRegInfo hitRegInfo) {
|
||||||
|
return hitRegInfoMapper.selectHitByUserIdAndRacetrack(hitRegInfo.getUserId(), hitRegInfo.getYear(), hitRegInfo.getRacetrack());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新队员信息
|
* 更新队员信息
|
||||||
*
|
*
|
||||||
|
|||||||
@ -79,11 +79,11 @@ public class HitTeamsServiceImpl extends ServiceImpl<HitTeamsMapper, HitTeams> i
|
|||||||
if (preliminary.getTeammateOne().equals(preliminary.getTeammateTwo())) {
|
if (preliminary.getTeammateOne().equals(preliminary.getTeammateTwo())) {
|
||||||
throw new Exception("队员不可重复");
|
throw new Exception("队员不可重复");
|
||||||
}
|
}
|
||||||
HitRegInfo hitRegInfo1 = regInfoService.selectHitByUserId2(preliminary.getTeammateOne());
|
HitRegInfo hitRegInfo1 = regInfoService.selectHitByUserId2(preliminary.getTeammateOne(),preliminary.getRacetrack());
|
||||||
if (ObjectUtils.isNotEmpty(hitRegInfo1)) {
|
if (ObjectUtils.isNotEmpty(hitRegInfo1)) {
|
||||||
throw new Exception("队员1已存在组队信息,不可重复组队");
|
throw new Exception("队员1已存在组队信息,不可重复组队");
|
||||||
}
|
}
|
||||||
HitRegInfo hitRegInfo2 = regInfoService.selectHitByUserId2(preliminary.getTeammateTwo());
|
HitRegInfo hitRegInfo2 = regInfoService.selectHitByUserId2(preliminary.getTeammateTwo(),preliminary.getRacetrack());
|
||||||
if (ObjectUtils.isNotEmpty(hitRegInfo2)) {
|
if (ObjectUtils.isNotEmpty(hitRegInfo2)) {
|
||||||
throw new Exception("队员2已存在组队信息,不可重复组队");
|
throw new Exception("队员2已存在组队信息,不可重复组队");
|
||||||
}
|
}
|
||||||
@ -103,7 +103,9 @@ public class HitTeamsServiceImpl extends ServiceImpl<HitTeamsMapper, HitTeams> i
|
|||||||
hitRegInfo.setSampleConcat(preliminary.getSampleConcat());
|
hitRegInfo.setSampleConcat(preliminary.getSampleConcat());
|
||||||
hitRegInfo.setSampleNumber(preliminary.getSampleNumber());
|
hitRegInfo.setSampleNumber(preliminary.getSampleNumber());
|
||||||
hitRegInfo.setUploadFile(preliminary.getUploadFile());
|
hitRegInfo.setUploadFile(preliminary.getUploadFile());
|
||||||
hitRegInfo.setAuditStatus("9");
|
// hitRegInfo.setAuditStatus("9");
|
||||||
|
// 修改为只需要领队老师审核
|
||||||
|
hitRegInfo.setAuditStatus("0");
|
||||||
hitRegInfo.setCreateTime(new Date());
|
hitRegInfo.setCreateTime(new Date());
|
||||||
log.info("插入数据:" + hitRegInfo);
|
log.info("插入数据:" + hitRegInfo);
|
||||||
hitRegInfo.setCompetition(preliminary.getCompetition());
|
hitRegInfo.setCompetition(preliminary.getCompetition());
|
||||||
|
|||||||
@ -106,6 +106,13 @@ public class SysDictDataController extends BaseController
|
|||||||
dict.setUpdateBy(getUsername());
|
dict.setUpdateBy(getUsername());
|
||||||
return toAjax(dictDataService.updateDictData(dict));
|
return toAjax(dictDataService.updateDictData(dict));
|
||||||
}
|
}
|
||||||
|
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/byDictType")
|
||||||
|
public AjaxResult editByDictType( @RequestBody SysDictData dict)
|
||||||
|
{
|
||||||
|
dict.setUpdateBy(getUsername());
|
||||||
|
return toAjax(dictDataService.updateDictDataByDictType(dict));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除字典类型
|
* 删除字典类型
|
||||||
|
|||||||
@ -75,6 +75,19 @@
|
|||||||
AND hcsi.create_time LIKE concat(#{year}, '%')
|
AND hcsi.create_time LIKE concat(#{year}, '%')
|
||||||
AND hu.create_time LIKE concat(#{year}, '%')
|
AND hu.create_time LIKE concat(#{year}, '%')
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectHitCompetitionStudentInfoByUserIdAndRacetrack"
|
||||||
|
resultType="com.ruoyi.cms.domain.HitCompetitionStudentInfo">
|
||||||
|
SELECT hcsi.*,
|
||||||
|
hu.virtual_score,
|
||||||
|
hu.assay_score
|
||||||
|
FROM hit_competition_student_info hcsi
|
||||||
|
LEFT JOIN hit_reg_info_user hu ON hu.user_id = hcsi.user_id
|
||||||
|
LEFT JOIN hit_reg_info hri ON hri.id = hu.reg_id
|
||||||
|
WHERE hcsi.user_id = #{userId}
|
||||||
|
AND hcsi.create_time LIKE concat(#{year}, '%')
|
||||||
|
AND hu.create_time LIKE concat(#{year}, '%')
|
||||||
|
AND hri.racetrack = #{racetrack}
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertHitCompetitionStudentInfo" parameterType="HitCompetitionStudentInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertHitCompetitionStudentInfo" parameterType="HitCompetitionStudentInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into hit_competition_student_info
|
insert into hit_competition_student_info
|
||||||
|
|||||||
@ -57,12 +57,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
SELECT DISTINCT hri.* from hit_reg_info hri
|
SELECT DISTINCT hri.* from hit_reg_info hri
|
||||||
LEFT JOIN hit_reg_info_user hriu on hri.id = hriu.reg_id
|
LEFT JOIN hit_reg_info_user hriu on hri.id = hriu.reg_id
|
||||||
WHERE user_id = #{userId} and hri.audit_status= #{status} and hri.create_time like concat(#{year},'%')
|
WHERE user_id = #{userId} and hri.audit_status= #{status} and hri.create_time like concat(#{year},'%')
|
||||||
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
<select id="selectHitByUserId2" resultType="com.ruoyi.cms.domain.HitRegInfo">
|
<select id="selectHitByUserId2" resultType="com.ruoyi.cms.domain.HitRegInfo">
|
||||||
SELECT DISTINCT hri.* from hit_reg_info hri
|
SELECT DISTINCT hri.* from hit_reg_info hri
|
||||||
LEFT JOIN hit_reg_info_user hriu on hri.id = hriu.reg_id
|
LEFT JOIN hit_reg_info_user hriu on hri.id = hriu.reg_id
|
||||||
WHERE user_id = #{userId} and hri.audit_status!= 2 and hri.create_time like concat(#{year},'%')
|
WHERE user_id = #{userId} and hri.audit_status!= 2 and hri.create_time like concat(#{year},'%')
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectHitByUserIdAndRacetrack" resultType="com.ruoyi.cms.domain.HitRegInfo">
|
||||||
|
SELECT DISTINCT hri.* from hit_reg_info hri
|
||||||
|
LEFT JOIN hit_reg_info_user hriu on hri.id = hriu.reg_id
|
||||||
|
WHERE user_id = #{userId} and hri.audit_status!= 2 and hri.create_time like concat(#{year},'%') and FIND_IN_SET(#{racetrack}, hri.racetrack) limit 1
|
||||||
|
</select>
|
||||||
<insert id="insertHitRegInfo" parameterType="HitRegInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertHitRegInfo" parameterType="HitRegInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into hit_reg_info
|
insert into hit_reg_info
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
|||||||
@ -116,7 +116,7 @@ public class SecurityConfig
|
|||||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||||
.antMatchers("/api/**", "/ueditor/**","/system/dict/data/type/sys_user_sex","/system/dict/data/type/imitation_type"
|
.antMatchers("/api/**", "/ueditor/**","/system/dict/data/type/sys_user_sex","/system/dict/data/type/imitation_type"
|
||||||
,"/system/dict/data/type/school_name","/system/dict/data/type/com_region").permitAll()
|
,"/system/dict/data/type/school_name","/system/dict/data/type/com_region","/system/dict/data/type/com_racetrack","/system/dict/data/type/com_nationality").permitAll()
|
||||||
.antMatchers("/system/hit_stu_info/*").permitAll()
|
.antMatchers("/system/hit_stu_info/*").permitAll()
|
||||||
// 除上面外的所有请求全部需要鉴权认证
|
// 除上面外的所有请求全部需要鉴权认证
|
||||||
.anyRequest().authenticated();
|
.anyRequest().authenticated();
|
||||||
|
|||||||
@ -94,4 +94,7 @@ public interface SysDictDataMapper
|
|||||||
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
|
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
|
||||||
|
|
||||||
int insertBatchDictData(@Param("dictDatas") List<SysDictData> dictDatas);
|
int insertBatchDictData(@Param("dictDatas") List<SysDictData> dictDatas);
|
||||||
|
|
||||||
|
|
||||||
|
int updateDictDataByDictType(SysDictData dict);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,4 +65,11 @@ public interface ISysDictDataService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateDictData(SysDictData dictData);
|
public int updateDictData(SysDictData dictData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字典类型查询字典数据
|
||||||
|
* @param dict
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateDictDataByDictType(SysDictData dict);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,4 +120,21 @@ public class SysDictDataServiceImpl implements ISysDictDataService
|
|||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字典类型查询字典数据
|
||||||
|
*
|
||||||
|
* @param dict
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateDictDataByDictType(SysDictData dict) {
|
||||||
|
int row = dictDataMapper.updateDictDataByDictType(dict);
|
||||||
|
if (row > 0)
|
||||||
|
{
|
||||||
|
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dict.getDictType());
|
||||||
|
DictUtils.setDictCache(dict.getDictType(), dictDatas);
|
||||||
|
}
|
||||||
|
return row;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,6 +92,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<update id="updateDictDataType" parameterType="String">
|
<update id="updateDictDataType" parameterType="String">
|
||||||
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateDictDataByDictType">
|
||||||
|
update sys_dict_data
|
||||||
|
<set>
|
||||||
|
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
||||||
|
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
|
||||||
|
<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
|
||||||
|
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||||
|
<if test="cssClass != null">css_class = #{cssClass},</if>
|
||||||
|
<if test="listClass != null">list_class = #{listClass},</if>
|
||||||
|
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
update_time = sysdate()
|
||||||
|
</set>
|
||||||
|
where dict_type = #{dictType} AND dict_value = #{dictValue}
|
||||||
|
</update>
|
||||||
|
|
||||||
<insert id="insertDictData" parameterType="SysDictData">
|
<insert id="insertDictData" parameterType="SysDictData">
|
||||||
insert into sys_dict_data(
|
insert into sys_dict_data(
|
||||||
|
|||||||
@ -92,6 +92,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<update id="updateDictDataType" parameterType="String">
|
<update id="updateDictDataType" parameterType="String">
|
||||||
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateDictDataByDictType">
|
||||||
|
update sys_dict_data
|
||||||
|
<set>
|
||||||
|
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
||||||
|
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
|
||||||
|
<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
|
||||||
|
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||||
|
<if test="cssClass != null">css_class = #{cssClass},</if>
|
||||||
|
<if test="listClass != null">list_class = #{listClass},</if>
|
||||||
|
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
update_time = sysdate()
|
||||||
|
</set>
|
||||||
|
where dict_type = #{dictType} AND dict_value = #{dictValue}
|
||||||
|
</update>
|
||||||
|
|
||||||
<insert id="insertDictData" parameterType="SysDictData">
|
<insert id="insertDictData" parameterType="SysDictData">
|
||||||
insert into sys_dict_data(
|
insert into sys_dict_data(
|
||||||
|
|||||||
@ -47,3 +47,10 @@ export function editStatus(status){
|
|||||||
url: "/cms/baseInfo/updateRegister?status=" + status,
|
url: "/cms/baseInfo/updateRegister?status=" + status,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function editRegister(data){
|
||||||
|
return request({
|
||||||
|
url: "/system/dict/data/byDictType",
|
||||||
|
method: "put",
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -127,3 +127,10 @@ export function updateRegInfo(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function queryIfReg(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/hit_reg_info/queryIfReg',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
BIN
ruoyi-ui/src/assets/images/teamReg.png
Normal file
BIN
ruoyi-ui/src/assets/images/teamReg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
353
ruoyi-ui/src/components/RegisterTeam/registerTeam.vue
Normal file
353
ruoyi-ui/src/components/RegisterTeam/registerTeam.vue
Normal file
@ -0,0 +1,353 @@
|
|||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:rules="formRules"
|
||||||
|
:model="formData"
|
||||||
|
label-width="150px"
|
||||||
|
class="team-registration-form"
|
||||||
|
>
|
||||||
|
<!-- 赛区和学校 -->
|
||||||
|
<div class="form-row">
|
||||||
|
<el-form-item label="赛区" prop="divisionLabel">
|
||||||
|
<el-input v-model="formData.divisionLabel" placeholder="请输入赛区" disabled></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="学校" prop="schoolName">
|
||||||
|
<el-input v-model="formData.schoolName" placeholder="请输入学校名称" disabled></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 赛道选择 -->
|
||||||
|
<!-- <div class="form-row">-->
|
||||||
|
<!-- <el-form-item label="赛道" prop="racetrackArr">-->
|
||||||
|
<!-- <el-checkbox-group v-model="formData.racetrackArr" @change="handleRacetrackChange">-->
|
||||||
|
<!-- <el-checkbox-->
|
||||||
|
<!-- v-for="item in racetrackOptions"-->
|
||||||
|
<!-- :key="item.value"-->
|
||||||
|
<!-- :label="item.value"-->
|
||||||
|
<!-- :disabled="item.disabled"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- {{ item.label }}-->
|
||||||
|
<!-- </el-checkbox>-->
|
||||||
|
<!-- </el-checkbox-group>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<!-- 赛事选择(条件显示) -->
|
||||||
|
<div class="form-row" v-if="showCompetition">
|
||||||
|
<el-form-item label="赛事" prop="competition">
|
||||||
|
<el-checkbox-group v-model="formData.competition">
|
||||||
|
<el-checkbox label="1">化验赛</el-checkbox>
|
||||||
|
<el-checkbox label="2">虚拟赛</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 领队老师和团队名称 -->
|
||||||
|
<div class="form-row">
|
||||||
|
<el-form-item label="领队老师" prop="ldTeacherInfo.teacherName">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.ldTeacherInfo.teacherName"
|
||||||
|
disabled
|
||||||
|
placeholder="自动获取领队老师信息"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="团队名称" prop="teamName">
|
||||||
|
<el-input v-model="formData.teamName" placeholder="请输入团队名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 队员选择 -->
|
||||||
|
<div class="form-row">
|
||||||
|
<el-form-item label="队员1" prop="teammateOne">
|
||||||
|
<el-select
|
||||||
|
v-model="formData.teammateOne"
|
||||||
|
placeholder="请选择第一个队友"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in formData.tdStudentList"
|
||||||
|
:key="item.userId"
|
||||||
|
:label="item.stuName"
|
||||||
|
:value="item.userId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="队员2" prop="teammateTwo">
|
||||||
|
<el-select
|
||||||
|
v-model="formData.teammateTwo"
|
||||||
|
placeholder="请选择第二个队友"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in formData.tdStudentList"
|
||||||
|
:key="item.userId"
|
||||||
|
:label="item.stuName"
|
||||||
|
:value="item.userId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 指导老师选择 -->
|
||||||
|
<div class="form-row">
|
||||||
|
<el-form-item label="指导老师1" prop="teacherOne">
|
||||||
|
<el-select
|
||||||
|
v-model="formData.teacherOne"
|
||||||
|
placeholder="请选择指导老师1"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in formData.zdTeacherList"
|
||||||
|
:key="item.userId"
|
||||||
|
:label="item.teacherName"
|
||||||
|
:value="item.userId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="指导老师2" prop="teacherTwo">
|
||||||
|
<el-select
|
||||||
|
v-model="formData.teacherTwo"
|
||||||
|
placeholder="请选择指导老师2"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in formData.zdTeacherList"
|
||||||
|
:key="item.userId"
|
||||||
|
:label="item.teacherName"
|
||||||
|
:value="item.userId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 盲样联系人信息 -->
|
||||||
|
<div class="form-row">
|
||||||
|
<el-form-item label="盲样联系人" prop="sampleConcat">
|
||||||
|
<el-input v-model="formData.sampleConcat" placeholder="请输入盲样联系人姓名"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="盲样联系人手机号" prop="sampleNumber">
|
||||||
|
<el-input v-model="formData.sampleNumber" placeholder="请输入联系人手机号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 盲样邮寄地址(条件显示) -->
|
||||||
|
<el-form-item
|
||||||
|
v-if="formData.competition.includes('1')"
|
||||||
|
label="盲样邮寄地址"
|
||||||
|
prop="sampleAddress"
|
||||||
|
>
|
||||||
|
<el-input v-model="formData.sampleAddress" placeholder="请输入邮寄地址"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- 附件上传 -->
|
||||||
|
<el-form-item label="附件(纸质报名表盖章)" prop="uploadFile" label-width="180px">
|
||||||
|
<file-upload
|
||||||
|
:fileSize="20"
|
||||||
|
:fileType="['pdf']"
|
||||||
|
v-model="formData.uploadFile"
|
||||||
|
@change="handleFileChange"
|
||||||
|
></file-upload>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- 操作按钮 -->
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleSubmit">提交</el-button>
|
||||||
|
<el-button @click="handleReset">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'TeamRegistrationForm',
|
||||||
|
props: {
|
||||||
|
// 赛道选项
|
||||||
|
racetrackOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
// 学生选项
|
||||||
|
studentOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
// 老师选项
|
||||||
|
teacherOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
// 是否显示赛事选项
|
||||||
|
showCompetition: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
// 初始表单数据
|
||||||
|
initialData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({
|
||||||
|
divisionLabel: '',
|
||||||
|
schoolName: '',
|
||||||
|
racetrackArr: [],
|
||||||
|
competition: [],
|
||||||
|
ldTeacherInfo: { teacherName: '' },
|
||||||
|
teamName: '',
|
||||||
|
teammateOne: '',
|
||||||
|
teammateTwo: '',
|
||||||
|
teacherOne: '',
|
||||||
|
teacherTwo: '',
|
||||||
|
sampleConcat: '',
|
||||||
|
sampleNumber: '',
|
||||||
|
sampleAddress: '',
|
||||||
|
uploadFile: null
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
// 手机号验证规则
|
||||||
|
const validatePhone = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
return callback(new Error('请输入手机号码'));
|
||||||
|
}
|
||||||
|
if (!/^1[3-9]\d{9}$/.test(value)) {
|
||||||
|
return callback(new Error('请输入正确的手机号码'));
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
formData: JSON.parse(JSON.stringify(this.initialData)),
|
||||||
|
formRules: {
|
||||||
|
divisionLabel: [
|
||||||
|
{required: true, message: '请输入赛区', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
schoolName: [
|
||||||
|
{required: true, message: '请输入学校名称', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
racetrackArr: [
|
||||||
|
{type: 'array', required: true, message: '请至少选择一个赛道', trigger: 'change'}
|
||||||
|
],
|
||||||
|
competition: [
|
||||||
|
{type: 'array', required: true, message: '请至少选择一个赛事', trigger: 'change'}
|
||||||
|
],
|
||||||
|
teamName: [
|
||||||
|
{required: true, message: '请输入团队名称', trigger: 'blur'},
|
||||||
|
{min: 2, max: 20, message: '长度在2到20个字符', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
sampleConcat: [
|
||||||
|
{required: true, message: '请输入盲样联系人', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
sampleNumber: [
|
||||||
|
{required: true, validator: validatePhone, trigger: 'blur'}
|
||||||
|
],
|
||||||
|
sampleAddress: [
|
||||||
|
{required: true, message: '请输入邮寄地址', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
uploadFile: [
|
||||||
|
{required: true, message: '请上传报名表', trigger: 'change'}
|
||||||
|
],
|
||||||
|
teammateOne: [
|
||||||
|
{required: true, message: '请选择第一个队友', trigger: 'change'}
|
||||||
|
],
|
||||||
|
teammateTwo: [
|
||||||
|
{required: true, message: '请选择第二个队友', trigger: 'change'}
|
||||||
|
],
|
||||||
|
teacherOne: [
|
||||||
|
{required: true, message: '请选择指导老师1', trigger: 'change'}
|
||||||
|
],
|
||||||
|
teacherTwo: [
|
||||||
|
{required: false, message: '请选择指导老师2', trigger: 'change'}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 赛道变更处理
|
||||||
|
handleRacetrackChange(val) {
|
||||||
|
this.$emit('racetrack-change', val);
|
||||||
|
},
|
||||||
|
// 文件变更处理
|
||||||
|
handleFileChange(file) {
|
||||||
|
this.$emit('file-change', file);
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
handleSubmit() {
|
||||||
|
console.log('表单提交',this.formData)
|
||||||
|
this.$refs.form.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.$emit('submit', this.formData);
|
||||||
|
} else {
|
||||||
|
this.$message.error('请检查表单填写是否正确');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
handleReset() {
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
this.$emit('reset');
|
||||||
|
},
|
||||||
|
// 外部调用方法 - 重置表单
|
||||||
|
resetForm() {
|
||||||
|
this.handleReset();
|
||||||
|
},
|
||||||
|
// 外部调用方法 - 验证表单
|
||||||
|
validate() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
this.$refs.form.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
resolve(this.formData);
|
||||||
|
} else {
|
||||||
|
reject(new Error('表单验证失败'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// 监听初始数据变化
|
||||||
|
initialData: {
|
||||||
|
handler(newVal) {
|
||||||
|
this.formData = JSON.parse(JSON.stringify(newVal));
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.team-registration-form {
|
||||||
|
padding: 20px;
|
||||||
|
max-width: 1000px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-row .el-form-item {
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-row .el-form-item:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-checkbox-group {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-checkbox {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
213
ruoyi-ui/src/components/select/select.vue
Normal file
213
ruoyi-ui/src/components/select/select.vue
Normal file
@ -0,0 +1,213 @@
|
|||||||
|
<template>
|
||||||
|
<div class="tenant-selector">
|
||||||
|
|
||||||
|
<div class="login-header">
|
||||||
|
<h2>{{ title }}</h2>
|
||||||
|
<p>{{ content }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tenant-list">
|
||||||
|
<div
|
||||||
|
v-for="tenant in tenants"
|
||||||
|
:key="tenant.dictValue"
|
||||||
|
class="tenant-item"
|
||||||
|
:class="{ 'active': selectedTenant === tenant.dictValue }"
|
||||||
|
v-if="tenant.remark == 1"
|
||||||
|
@click="selectTenant(tenant)"
|
||||||
|
>
|
||||||
|
<div class="tenant-avatar">
|
||||||
|
{{ tenant.dictLabel.charAt(0).toUpperCase() }}
|
||||||
|
</div>
|
||||||
|
<div class="tenant-info">
|
||||||
|
<h3>{{ tenant.dictLabel }}</h3>
|
||||||
|
<!-- <p>{{ tenant.description || '暂无描述' }}</p>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="login-actions">
|
||||||
|
<button
|
||||||
|
class="login-btn"
|
||||||
|
:disabled="!selectedTenant"
|
||||||
|
@click="confirmLogin"
|
||||||
|
>
|
||||||
|
确认选择
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
tenants: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: "选择数据"
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: "请选择数据"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selectedTenant: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
selectTenant(tenant) {
|
||||||
|
this.selectedTenant = tenant.dictValue;
|
||||||
|
},
|
||||||
|
confirmLogin() {
|
||||||
|
if (this.selectedTenant) {
|
||||||
|
this.$emit('selected', this.selectedTenant);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleBack() {
|
||||||
|
this.$emit('back');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.tenant-selector {
|
||||||
|
max-width: 400px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 20px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-header {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-header h2 {
|
||||||
|
font-size: 20px;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-header p {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tenant-list {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tenant-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 12px 16px;
|
||||||
|
border: 1px solid #eaeaea;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tenant-item:hover {
|
||||||
|
border-color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tenant-item.active {
|
||||||
|
border-color: #1890ff;
|
||||||
|
background-color: #f0f7ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tenant-avatar {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #1890ff;
|
||||||
|
color: white;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tenant-info h3 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tenant-info p {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-actions {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
background-color: #1890ff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-btn:hover {
|
||||||
|
background-color: #40a9ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-btn:disabled {
|
||||||
|
background-color: #d9d9d9;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tenant-selector {
|
||||||
|
max-width: 500px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 20px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-button {
|
||||||
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
left: 20px;
|
||||||
|
color: #1890ff;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-button:hover {
|
||||||
|
color: #40a9ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-button i {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-header {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
padding-top: 10px; /* 为返回按钮留出空间 */
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@ -91,6 +91,12 @@
|
|||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5" v-hasPermi="['hit:open']">
|
||||||
|
<el-switch style="margin-right: 10px" v-model="item.remark" v-for="item in baseInfo.dictDatas" @change="updateRegister(item)" active-value="1" inactive-value="0"
|
||||||
|
:active-text="'开启' + item.dictLabel + '报名'" :inactive-text="'关闭'+item.dictLabel+'报名'"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -167,6 +173,13 @@
|
|||||||
{{ props.row.createTime.substring(0, 10) }}
|
{{ props.row.createTime.substring(0, 10) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="大赛资料" align="center" prop="dsFile">
|
||||||
|
<template slot-scope="props" >
|
||||||
|
<el-link :href="`${baseUrl}${props.row.dsFile}`" v-if="props.row.dsFile" type="primary" :underline="false" target="_blank">
|
||||||
|
<span class="el-icon-document"> 下载 </span>
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="审核状态" align="center" prop="auditStatus">
|
<el-table-column label="审核状态" align="center" prop="auditStatus">
|
||||||
<template slot-scope="props">
|
<template slot-scope="props">
|
||||||
@ -353,7 +366,7 @@ import {
|
|||||||
getTeachInfoByIds,
|
getTeachInfoByIds,
|
||||||
adminUpdateTeamInformation
|
adminUpdateTeamInformation
|
||||||
} from '@/api/hit/registrationStudentInfo'
|
} from '@/api/hit/registrationStudentInfo'
|
||||||
import {selectBaseInfo, editStatus} from '@/api/cms/baseInfo'
|
import {selectBaseInfo, editStatus, editRegister} from '@/api/cms/baseInfo'
|
||||||
import {getHitRegistrationTeachInfoByUserId, selectByUserId} from '@/api/hit/teacherInfo'
|
import {getHitRegistrationTeachInfoByUserId, selectByUserId} from '@/api/hit/teacherInfo'
|
||||||
import {editRegUser} from '@/api/officialWebsite/registerStudent'
|
import {editRegUser} from '@/api/officialWebsite/registerStudent'
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
@ -367,6 +380,7 @@ export default {
|
|||||||
yearList: [],
|
yearList: [],
|
||||||
baseUrl: process.env.VUE_APP_BASE_API,
|
baseUrl: process.env.VUE_APP_BASE_API,
|
||||||
registerStatus: '',
|
registerStatus: '',
|
||||||
|
baseInfo: {},
|
||||||
leaderTeachList: [],
|
leaderTeachList: [],
|
||||||
guideTeachList: [],
|
guideTeachList: [],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -472,6 +486,7 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
selectBaseInfo().then(res => {
|
selectBaseInfo().then(res => {
|
||||||
this.registerStatus = res.data.registerStatus
|
this.registerStatus = res.data.registerStatus
|
||||||
|
this.baseInfo = res.data
|
||||||
})
|
})
|
||||||
this.yearList = this.years()
|
this.yearList = this.years()
|
||||||
// 获取当前登陆人的id
|
// 获取当前登陆人的id
|
||||||
@ -776,6 +791,18 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
updateRegister(item) {
|
||||||
|
const data = {
|
||||||
|
dictType: 'com_racetrack',
|
||||||
|
dictValue: item.dictValue,
|
||||||
|
remark: item.remark
|
||||||
|
}
|
||||||
|
editRegister(data).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess(item.remark === '1' ? '报名已开启' : '报名已关闭')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
years() {
|
years() {
|
||||||
const currentYear = new Date().getFullYear()
|
const currentYear = new Date().getFullYear()
|
||||||
const startYear = currentYear - 40 // 假设从当前年份往前 20 年
|
const startYear = currentYear - 40 // 假设从当前年份往前 20 年
|
||||||
|
|||||||
@ -432,7 +432,8 @@
|
|||||||
<el-tab-pane label="团队信息" name="edit-team" v-if="teamForm" label-position="left">
|
<el-tab-pane label="团队信息" name="edit-team" v-if="teamForm" label-position="left">
|
||||||
<el-form :model="teamForm" ref="form" label-position="left" label-width="100px"
|
<el-form :model="teamForm" ref="form" label-position="left" label-width="100px"
|
||||||
:rules="teamFormRules">
|
:rules="teamFormRules">
|
||||||
<h3>修改团队信息</h3><span style="color:red;" v-if="!studentForm.isUpdateTeam">报名时间已超过七天 无法修改</span>
|
<h3>修改团队信息</h3><span style="color:red;"
|
||||||
|
v-if="!studentForm.isUpdateTeam">报名时间已超过七天 无法修改</span>
|
||||||
<el-form-item label="团队名称" prop="teamName">
|
<el-form-item label="团队名称" prop="teamName">
|
||||||
<el-input disabled v-model="teamForm.teamName" style="width: 300px;"></el-input>
|
<el-input disabled v-model="teamForm.teamName" style="width: 300px;"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -528,11 +529,53 @@
|
|||||||
<div class="anniu2" v-show="registerStatus == 1 && currentActive == 0 && studentForm.signUp" @click="toQuery">
|
<div class="anniu2" v-show="registerStatus == 1 && currentActive == 0 && studentForm.signUp" @click="toQuery">
|
||||||
<img src="../../assets/images/cha_kan_geng_duo.png" style="width: 140px;height: 58px">
|
<img src="../../assets/images/cha_kan_geng_duo.png" style="width: 140px;height: 58px">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="anniu2" style="bottom: 280px;"
|
||||||
|
v-show="registerStatus == 1 && currentActive == 0 && studentForm.signUp && hasRemarkOne"
|
||||||
|
@click="toRegisterTeam">
|
||||||
|
<img src="../../assets/images/teamReg.png" style="width:140px;height: 88px">
|
||||||
|
</div>
|
||||||
|
<div class="tabber-box1" v-if="currentActive == 8">
|
||||||
|
<register-team :initial-data="preliminaryForm" :regionOptions="dict.type.com_region" @submit="submitRegTeam"
|
||||||
|
:show-competition="preliminaryForm.racetrack == 1 ? true : false"></register-team>
|
||||||
|
</div>
|
||||||
|
<div class="tabber-box1" v-if="currentActive == 9">
|
||||||
|
<el-steps :active="teamActive" finish-status="success" align-center>
|
||||||
|
<el-step title="地区选拔赛报名"></el-step>
|
||||||
|
<el-step title="确认报名团队"></el-step>
|
||||||
|
<el-step title="地区选拔赛报名结果"></el-step>
|
||||||
|
<el-step title="比赛资料上传"></el-step>
|
||||||
|
</el-steps>
|
||||||
|
<div v-if="teamActive == 1">
|
||||||
|
<register-team :initial-data="preliminaryForm" :regionOptions="dict.type.com_region" @submit="submitRegTeam"
|
||||||
|
:show-competition="preliminaryForm.racetrack == 1 ? true : false"></register-team>
|
||||||
|
</div>
|
||||||
|
<div class="step-box" v-if="teamActive == 2">
|
||||||
|
<div class="step-box-title" style="font-size: 20px;margin-top: 8%">
|
||||||
|
地区选拔赛报名提交成功
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="step-box" v-if="teamActive == 3">
|
||||||
|
<div class="step-box-title" style="font-size: 18px;margin-top: 8%;color: red">(地区选拔赛前无需上传资料)
|
||||||
|
</div>
|
||||||
|
<file-upload style="margin-top: 5%" :fileSize="200" :fileType="['zip', 'rar', '7z']"
|
||||||
|
v-model="preliminaryForm.hitRegInfo.dsFile"
|
||||||
|
></file-upload>
|
||||||
|
<div>
|
||||||
|
<el-button style="margin-top: 8%" type="primary" @click="fileSubmit('team')">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom_img" ref="bottomImg">
|
<div class="bottom_img" ref="bottomImg">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="showSelectRacetrack"
|
||||||
|
width="30%">
|
||||||
|
<select-common title="选择赛道" content="请选择赛道报名" @selected="selectRacetrack"
|
||||||
|
:tenants="racetrackList"></select-common>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
<footers style="position: relative"></footers>
|
<footers style="position: relative"></footers>
|
||||||
@ -547,6 +590,8 @@ import {getPageData, getCategoryByParentId, getbaseInfo} from '@/api/officialWeb
|
|||||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||||
import PageUtil from '@/views/officialWebsite/Components/page'
|
import PageUtil from '@/views/officialWebsite/Components/page'
|
||||||
|
import SelectCommon from "@/components/select/select.vue";
|
||||||
|
import RegisterTeam from "@/components/RegisterTeam/registerTeam.vue";
|
||||||
import {
|
import {
|
||||||
editRegUser,
|
editRegUser,
|
||||||
register,
|
register,
|
||||||
@ -557,7 +602,7 @@ import {
|
|||||||
getTeamMate,
|
getTeamMate,
|
||||||
agreeTeam,
|
agreeTeam,
|
||||||
refuseTeam,
|
refuseTeam,
|
||||||
editRegInfo, editCompetitionStudentInfo, updateRegInfo, editTeam
|
editRegInfo, editCompetitionStudentInfo, updateRegInfo, editTeam, queryIfReg
|
||||||
} from '@/api/officialWebsite/registerStudent'
|
} from '@/api/officialWebsite/registerStudent'
|
||||||
import {getTab, getbanner} from '@/api/gw/home'
|
import {getTab, getbanner} from '@/api/gw/home'
|
||||||
import {getToken} from '@/utils/auth'
|
import {getToken} from '@/utils/auth'
|
||||||
@ -566,12 +611,14 @@ import log from "@/views/monitor/job/log.vue";
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
headers,
|
headers,
|
||||||
|
RegisterTeam,
|
||||||
footers,
|
footers,
|
||||||
|
SelectCommon,
|
||||||
Swiper,
|
Swiper,
|
||||||
SwiperSlide,
|
SwiperSlide,
|
||||||
'page-util': PageUtil
|
'page-util': PageUtil
|
||||||
},
|
},
|
||||||
dicts: ['sys_user_sex', 'school_name', 'com_region', 'com_racetrack','com_nationality'],
|
dicts: ['sys_user_sex', 'school_name', 'com_region', 'com_racetrack', 'com_nationality'],
|
||||||
name: 'HelloWorld',
|
name: 'HelloWorld',
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@ -583,6 +630,9 @@ export default {
|
|||||||
active: 0,//当前激活的tab
|
active: 0,//当前激活的tab
|
||||||
msg: '8',
|
msg: '8',
|
||||||
registerStatus: 0,
|
registerStatus: 0,
|
||||||
|
hasRemarkOne: false,
|
||||||
|
racetrackList: [],
|
||||||
|
showSelectRacetrack: false,
|
||||||
imgurl: process.env.VUE_APP_BASE_API,
|
imgurl: process.env.VUE_APP_BASE_API,
|
||||||
//修改学生信息
|
//修改学生信息
|
||||||
studentForm: {},
|
studentForm: {},
|
||||||
@ -791,7 +841,9 @@ export default {
|
|||||||
},
|
},
|
||||||
pageContext: '',
|
pageContext: '',
|
||||||
nav: [],
|
nav: [],
|
||||||
|
teamActive: 0,
|
||||||
currentActive: this.$route.query.childeIndex || 0,
|
currentActive: this.$route.query.childeIndex || 0,
|
||||||
|
registerTeam: false,
|
||||||
isMounted: false,
|
isMounted: false,
|
||||||
input4: '',
|
input4: '',
|
||||||
categoryId: '',
|
categoryId: '',
|
||||||
@ -844,6 +896,22 @@ export default {
|
|||||||
bottomImg.style.bottom = '-300px'
|
bottomImg.style.bottom = '-300px'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 提交团队赛信息
|
||||||
|
submitRegTeam(dataReg) {
|
||||||
|
this.preliminaryForm = dataReg
|
||||||
|
const data = JSON.parse(JSON.stringify(dataReg))
|
||||||
|
data.competition = this.arrayToString(data.competition)
|
||||||
|
console.log('个人选拔赛报名', data)
|
||||||
|
PreliminaryRegistration(data).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess('地区选拔赛报名提交成功')
|
||||||
|
this.fetchRegistrationInformation()
|
||||||
|
this.teamActive = 2
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError('报名失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
regChoose(data, status) {
|
regChoose(data, status) {
|
||||||
data.status = status
|
data.status = status
|
||||||
editRegUser(data).then(res => {
|
editRegUser(data).then(res => {
|
||||||
@ -851,7 +919,7 @@ export default {
|
|||||||
this.fetchRegistrationInformation()
|
this.fetchRegistrationInformation()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fileSubmit() {
|
fileSubmit(type) {
|
||||||
let data = {
|
let data = {
|
||||||
id: this.preliminaryForm.hitRegInfo.id,
|
id: this.preliminaryForm.hitRegInfo.id,
|
||||||
dsFile: this.preliminaryForm.hitRegInfo.dsFile,
|
dsFile: this.preliminaryForm.hitRegInfo.dsFile,
|
||||||
@ -859,6 +927,9 @@ export default {
|
|||||||
editTeam(data).then(res => {
|
editTeam(data).then(res => {
|
||||||
this.$modal.msgSuccess('成功')
|
this.$modal.msgSuccess('成功')
|
||||||
this.fetchRegistrationInformation()
|
this.fetchRegistrationInformation()
|
||||||
|
if (type == 'team') {
|
||||||
|
this.teamActive = 4
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//将数组转为字符串
|
//将数组转为字符串
|
||||||
@ -875,7 +946,36 @@ export default {
|
|||||||
this.fetchRegistrationInformation()
|
this.fetchRegistrationInformation()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 选择团队赛赛道
|
||||||
|
selectRacetrack(data) {
|
||||||
|
console.log('赛道', data)
|
||||||
|
this.preliminaryForm.racetrack = data
|
||||||
|
console.log('赛道', this.preliminaryForm.racetrack)
|
||||||
|
// 查询选择的赛道是否报过名
|
||||||
|
const params = {
|
||||||
|
racetrack: data
|
||||||
|
}
|
||||||
|
this.currentActive = 9
|
||||||
|
queryIfReg(params).then(res => {
|
||||||
|
if (res.data) {
|
||||||
|
console.log(res.data,666)
|
||||||
|
this.preliminaryForm.hitRegInfo = res.data
|
||||||
|
if (res.data.auditStatus == 1) {
|
||||||
|
this.teamActive = 3
|
||||||
|
}
|
||||||
|
if (res.data.auditStatus == 0 || res.data.auditStatus == 9) {
|
||||||
|
this.teamActive = 2
|
||||||
|
}
|
||||||
|
if (res.data.dsFile) {
|
||||||
|
this.teamActive = 4
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.teamActive = 1
|
||||||
|
}
|
||||||
|
console.log('此时的步骤',this.teamActive)
|
||||||
|
this.showSelectRacetrack = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//根据学号查询学生报名信息
|
//根据学号查询学生报名信息
|
||||||
fetchRegistrationInformation() {
|
fetchRegistrationInformation() {
|
||||||
@ -900,7 +1000,7 @@ export default {
|
|||||||
item.disabled = true
|
item.disabled = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else {
|
} else {
|
||||||
this.dict.type.com_racetrack.map(item => {
|
this.dict.type.com_racetrack.map(item => {
|
||||||
if (item.value == '3') {
|
if (item.value == '3') {
|
||||||
item.disabled = true
|
item.disabled = true
|
||||||
@ -988,6 +1088,11 @@ export default {
|
|||||||
initPageData() {
|
initPageData() {
|
||||||
getbaseInfo().then(res => {
|
getbaseInfo().then(res => {
|
||||||
this.registerStatus = res.data.registerStatus
|
this.registerStatus = res.data.registerStatus
|
||||||
|
// 获取赛道信息
|
||||||
|
const hasRemarkOne = res.data.dictDatas.some(item => item.remark == 1);
|
||||||
|
this.hasRemarkOne = hasRemarkOne
|
||||||
|
this.racetrackList = res.data.dictDatas
|
||||||
|
console.log('赛道信息', hasRemarkOne)
|
||||||
})
|
})
|
||||||
this.categoryId = this.$route.query.id
|
this.categoryId = this.$route.query.id
|
||||||
getCategoryByParentId(this.routeParam.categoryId).then(res => {
|
getCategoryByParentId(this.routeParam.categoryId).then(res => {
|
||||||
@ -1039,6 +1144,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
toRegisterTeam() {
|
||||||
|
this.showSelectRacetrack = true
|
||||||
|
},
|
||||||
toQuery() {
|
toQuery() {
|
||||||
if (!getToken()) {
|
if (!getToken()) {
|
||||||
this.$modal.msgWarning('报名请先登录系统!')
|
this.$modal.msgWarning('报名请先登录系统!')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user