更新部分功能
This commit is contained in:
parent
23ba188b30
commit
6b18b0a2e6
@ -182,13 +182,10 @@ public class HitCompetitionStudentInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/importData")
|
@PostMapping("/importData")
|
||||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
public AjaxResult importData(MultipartFile file) throws Exception
|
||||||
{
|
{
|
||||||
ExcelUtil<HitCompetitionStudentInfo> util = new ExcelUtil<HitCompetitionStudentInfo>(HitCompetitionStudentInfo.class);
|
ExcelUtil<HitCompetitionStudentInfo> util = new ExcelUtil<HitCompetitionStudentInfo>(HitCompetitionStudentInfo.class);
|
||||||
List<HitCompetitionStudentInfo> hitList = util.importExcel(file.getInputStream());
|
List<HitCompetitionStudentInfo> hitList = util.importExcel(file.getInputStream());
|
||||||
logger.info("导入数据:"+hitList);
|
|
||||||
String operName = getUsername();
|
|
||||||
// String message = userService.importUser(hitList, updateSupport, operName);
|
|
||||||
String message = hitCompetitionStudentInfoService.importData(hitList);
|
String message = hitCompetitionStudentInfoService.importData(hitList);
|
||||||
return success(message);
|
return success(message);
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@ package com.ruoyi.cms.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.ruoyi.cms.domain.vo.HitRegInfoVo;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
@ -69,6 +69,7 @@ public class HitRegistrationStudentInfoController extends BaseController
|
|||||||
return success(hitRegistrationStudentInfoService.selectHitRegistrationStudentInfoById(id));
|
return success(hitRegistrationStudentInfoService.selectHitRegistrationStudentInfoById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增报名信息
|
* 新增报名信息
|
||||||
*/
|
*/
|
||||||
|
@ -64,6 +64,13 @@ public class HitRegistrationTeachInfoController extends BaseController
|
|||||||
return success(hitRegistrationTeachInfoService.selectHitRegistrationTeachInfoById(id));
|
return success(hitRegistrationTeachInfoService.selectHitRegistrationTeachInfoById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/byUserId/{id}")
|
||||||
|
public AjaxResult getInfoByUserId(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
logger.info("接收到的用户id{}", id);
|
||||||
|
return success(hitRegistrationTeachInfoService.selectHitRegistrationTeachInfoByUseryId(id));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增教师信息
|
* 新增教师信息
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.ruoyi.cms.domain.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.ruoyi.cms.domain.HitCompetitionStudentInfo;
|
||||||
|
import com.ruoyi.cms.domain.HitRegInfo;
|
||||||
|
import com.ruoyi.cms.domain.HitRegInfoUser;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名信息对象 hit_reg_info
|
||||||
|
*
|
||||||
|
* @author zcy
|
||||||
|
* @date 2024-08-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class HitRegInfoVo extends BaseEntity
|
||||||
|
{
|
||||||
|
private List<HitRegInfo> hitRegInfo;
|
||||||
|
private String isZdteacher;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -2,6 +2,7 @@ package com.ruoyi.cms.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.cms.domain.HitRegInfo;
|
import com.ruoyi.cms.domain.HitRegInfo;
|
||||||
|
import com.ruoyi.cms.domain.vo.HitRegInfoVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报名信息Service接口
|
* 报名信息Service接口
|
||||||
@ -26,6 +27,7 @@ public interface IHitRegInfoService
|
|||||||
* @return 报名信息集合
|
* @return 报名信息集合
|
||||||
*/
|
*/
|
||||||
public List<HitRegInfo> selectHitRegInfoList(HitRegInfo hitRegInfo);
|
public List<HitRegInfo> selectHitRegInfoList(HitRegInfo hitRegInfo);
|
||||||
|
// public HitRegInfoVo selectHitRegInfoListC(HitRegInfo hitRegInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增报名信息
|
* 新增报名信息
|
||||||
|
@ -19,6 +19,8 @@ public interface IHitRegistrationStudentInfoService
|
|||||||
*/
|
*/
|
||||||
public HitRegistrationStudentInfo selectHitRegistrationStudentInfoById(Long id);
|
public HitRegistrationStudentInfo selectHitRegistrationStudentInfoById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报名信息列表
|
* 查询报名信息列表
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.cms.service;
|
package com.ruoyi.cms.service;
|
||||||
|
|
||||||
|
import com.ruoyi.cms.domain.HitRegistrationStudentInfo;
|
||||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||||
import com.ruoyi.common.core.domain.model.RegisterBody;
|
import com.ruoyi.common.core.domain.model.RegisterBody;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@ -22,6 +23,13 @@ public interface IHitRegistrationTeachInfoService
|
|||||||
*/
|
*/
|
||||||
public HitRegistrationTeachInfo selectHitRegistrationTeachInfoById(Long id);
|
public HitRegistrationTeachInfo selectHitRegistrationTeachInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id获取教师信息
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public HitRegistrationTeachInfo selectHitRegistrationTeachInfoByUseryId(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询教师信息列表
|
* 查询教师信息列表
|
||||||
*
|
*
|
||||||
|
@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.ruoyi.cms.domain.*;
|
import com.ruoyi.cms.domain.*;
|
||||||
|
import com.ruoyi.cms.domain.vo.HitRegInfoVo;
|
||||||
import com.ruoyi.cms.mapper.*;
|
import com.ruoyi.cms.mapper.*;
|
||||||
import com.ruoyi.cms.service.ICmsContentService;
|
import com.ruoyi.cms.service.ICmsContentService;
|
||||||
import com.ruoyi.cms.service.IHitCompetitionStudentInfoService;
|
import com.ruoyi.cms.service.IHitCompetitionStudentInfoService;
|
||||||
@ -109,6 +110,44 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
|
|||||||
return hitRegInfos;
|
return hitRegInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HitRegInfoVo selectHitRegInfoListC(HitRegInfo hitRegInfo)
|
||||||
|
{
|
||||||
|
Long userId = SecurityUtils.getLoginUser().getUserId();
|
||||||
|
//判断当前登陆人是否是领队老师,如果是查询该老师学校下的战队
|
||||||
|
HitRegistrationTeachInfo teacherInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(userId);
|
||||||
|
if (teacherInfo != null && teacherInfo.getType().equals("1")) {
|
||||||
|
hitRegInfo.setSchoolName(teacherInfo.getSchoolName());
|
||||||
|
}
|
||||||
|
List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectHitRegInfoList(hitRegInfo);
|
||||||
|
for (HitRegInfo regInfo : hitRegInfos) {
|
||||||
|
HitRegInfoUser hitRegInfoUser =new HitRegInfoUser();
|
||||||
|
hitRegInfoUser.setRegId(regInfo.getId());
|
||||||
|
List<HitRegInfoUser> hitRegInfoUsers = regInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
|
||||||
|
for (HitRegInfoUser regInfoUser : hitRegInfoUsers) {
|
||||||
|
switch (regInfoUser.getType()) {
|
||||||
|
case "3": {
|
||||||
|
HitRegistrationTeachInfo hitRegistrationTeachInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(regInfoUser.getUserId());
|
||||||
|
regInfo.setLdTeacher(hitRegistrationTeachInfo);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "2": {
|
||||||
|
HitRegistrationTeachInfo hitRegistrationTeachInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(regInfoUser.getUserId());
|
||||||
|
regInfo.getZdTeacher().add(hitRegistrationTeachInfo);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1":
|
||||||
|
HitCompetitionStudentInfo studentInfo = hitCompetitionStudentInfoMapper.selectHitCompetitionStudentInfoByUserId(regInfoUser.getUserId());
|
||||||
|
regInfo.getStudentUserss().add(studentInfo);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HitRegInfoVo hitRegInfoVo = new HitRegInfoVo();
|
||||||
|
hitRegInfoVo.setHitRegInfo(hitRegInfos);
|
||||||
|
|
||||||
|
return hitRegInfoVo;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增报名信息
|
* 新增报名信息
|
||||||
*
|
*
|
||||||
|
@ -9,7 +9,9 @@ import com.ruoyi.cms.domain.HitRegInfoUser;
|
|||||||
import com.ruoyi.cms.mapper.HitRegInfoUserMapper;
|
import com.ruoyi.cms.mapper.HitRegInfoUserMapper;
|
||||||
import com.ruoyi.cms.service.IHitRegInfoService;
|
import com.ruoyi.cms.service.IHitRegInfoService;
|
||||||
import com.ruoyi.cms.service.IHitRegInfoUserService;
|
import com.ruoyi.cms.service.IHitRegInfoUserService;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
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 org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@ -28,6 +30,8 @@ public class HitRegInfoUserServiceImpl implements IHitRegInfoUserService
|
|||||||
private HitRegInfoUserMapper hitRegInfoUserMapper;
|
private HitRegInfoUserMapper hitRegInfoUserMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IHitRegInfoService hitRegInfoService;
|
private IHitRegInfoService hitRegInfoService;
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService sysUserService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报名相关人员信息
|
* 查询报名相关人员信息
|
||||||
@ -90,9 +94,21 @@ public class HitRegInfoUserServiceImpl implements IHitRegInfoUserService
|
|||||||
hitRegInfoUserMapper.updateHitRegInfoUser(hitRegInfoUser);
|
hitRegInfoUserMapper.updateHitRegInfoUser(hitRegInfoUser);
|
||||||
LambdaQueryWrapper<HitRegInfoUser> queryWrapper =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<HitRegInfoUser> queryWrapper =new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(HitRegInfoUser::getRegId,hitRegInfoUser.getRegId())
|
queryWrapper.eq(HitRegInfoUser::getRegId,hitRegInfoUser.getRegId())
|
||||||
.eq(HitRegInfoUser::getType,"1")
|
// .eq(HitRegInfoUser::getType,"1")
|
||||||
|
//需要指导老师也确认一下
|
||||||
|
.in(HitRegInfoUser::getType, "1","2")
|
||||||
.eq(HitRegInfoUser::getStatus,"0");
|
.eq(HitRegInfoUser::getStatus,"0");
|
||||||
List<HitRegInfoUser> hitRegInfoUsers = hitRegInfoUserMapper.selectList(queryWrapper);
|
List<HitRegInfoUser> hitRegInfoUsers = hitRegInfoUserMapper.selectList(queryWrapper);
|
||||||
|
//判断里面是否有指导老师,并且也是领队老师
|
||||||
|
for (HitRegInfoUser regInfoUser : hitRegInfoUsers) {
|
||||||
|
if (regInfoUser.getType().equals("2")){
|
||||||
|
SysUser sysUser = sysUserService.selectUserById(regInfoUser.getUserId());
|
||||||
|
if (sysUser.getUserType().equals("3")){
|
||||||
|
//将hitRegInfoUsers删除掉当前老师
|
||||||
|
hitRegInfoUsers.remove(regInfoUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (CollectionUtil.isEmpty(hitRegInfoUsers)){
|
if (CollectionUtil.isEmpty(hitRegInfoUsers)){
|
||||||
//代表全部通过
|
//代表全部通过
|
||||||
Long regId = hitRegInfoUser.getRegId();
|
Long regId = hitRegInfoUser.getRegId();
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.cms.service.impl;
|
package com.ruoyi.cms.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -32,6 +34,8 @@ public class HitRegistrationStudentInfoServiceImpl implements IHitRegistrationSt
|
|||||||
return hitRegistrationStudentInfoMapper.selectHitRegistrationStudentInfoById(id);
|
return hitRegistrationStudentInfoMapper.selectHitRegistrationStudentInfoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报名信息列表
|
* 查询报名信息列表
|
||||||
*
|
*
|
||||||
|
@ -5,6 +5,7 @@ import java.time.format.DateTimeFormatter;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.ruoyi.cms.domain.HitRegistrationStudentInfo;
|
||||||
import com.ruoyi.common.constant.CacheConstants;
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
@ -61,6 +62,18 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
|
|||||||
return hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoById(id);
|
return hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id获取教师信息
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public HitRegistrationTeachInfo selectHitRegistrationTeachInfoByUseryId(Long id) {
|
||||||
|
LambdaQueryWrapper<HitRegistrationTeachInfo> queryWrapper =new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(HitRegistrationTeachInfo::getUserId,id);
|
||||||
|
HitRegistrationTeachInfo hitRegistrationTeachInfo = hitRegistrationTeachInfoMapper.selectOne(queryWrapper);
|
||||||
|
return hitRegistrationTeachInfo;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 查询教师信息列表
|
* 查询教师信息列表
|
||||||
*
|
*
|
||||||
@ -166,7 +179,6 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
|
|||||||
if (captchaEnabled) {
|
if (captchaEnabled) {
|
||||||
validateCaptcha(username, user.getCode(), user.getUuid());
|
validateCaptcha(username, user.getCode(), user.getUuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean validPhoneNumber = isValidPhoneNumber(username);
|
boolean validPhoneNumber = isValidPhoneNumber(username);
|
||||||
if (!validPhoneNumber) {
|
if (!validPhoneNumber) {
|
||||||
msg = "手机号码格式不正确";
|
msg = "手机号码格式不正确";
|
||||||
|
@ -6,12 +6,12 @@ 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://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: obrhgd
|
||||||
# username: root
|
username: root
|
||||||
password: Obr7890&*()
|
# password: Obr7890&*()
|
||||||
# password: 123456
|
password: 123456
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
@ -74,8 +74,8 @@ spring:
|
|||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 9
|
database: 9
|
||||||
# 密码
|
# 密码
|
||||||
# password: 123456
|
password: 123456
|
||||||
password:
|
# password:
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
lettuce:
|
lettuce:
|
||||||
|
@ -12,10 +12,6 @@ spring:
|
|||||||
username: root
|
username: root
|
||||||
# password: Obr7890&*()
|
# password: Obr7890&*()
|
||||||
password: 123456
|
password: 123456
|
||||||
# master:
|
|
||||||
# url: jdbc:mysql://localhost:3306/ry-cms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
|
||||||
# username: root
|
|
||||||
# password: root
|
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
@ -75,6 +75,7 @@ spring:
|
|||||||
database: 9
|
database: 9
|
||||||
# 密码
|
# 密码
|
||||||
password: 123456
|
password: 123456
|
||||||
|
# password:
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
lettuce:
|
lettuce:
|
||||||
|
@ -42,3 +42,9 @@ export function delHitRegistrationTeachInfo(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getHitRegistrationTeachInfoByUserId(id) {
|
||||||
|
return request({
|
||||||
|
url: '/HitRegistrationTeachInfo/HitRegistrationTeachInfo/byUserId/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -167,7 +167,7 @@
|
|||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
title="确定当前操作?"
|
title="确定当前操作?"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
v-if="scope.row.auditStatus=='0'||scope.row.auditStatus=='1'"
|
v-if="techerType != '1' && scope.row.auditStatus=='0'||scope.row.auditStatus=='1'"
|
||||||
@confirm="auditData(scope.row,'2')"
|
@confirm="auditData(scope.row,'2')"
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
@ -176,6 +176,39 @@
|
|||||||
slot="reference"
|
slot="reference"
|
||||||
>拒绝</el-button>
|
>拒绝</el-button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</el-popconfirm>
|
||||||
|
|
||||||
|
<!-- 指导老师 -->
|
||||||
|
<el-popconfirm
|
||||||
|
title="确定当前操作?"
|
||||||
|
v-if="techerType == '1'"
|
||||||
|
@confirm="submitData(scope.row,'1')"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
slot="reference"
|
||||||
|
|
||||||
|
|
||||||
|
>通过</el-button>
|
||||||
|
|
||||||
|
</el-popconfirm>
|
||||||
|
<el-popconfirm
|
||||||
|
title="确定当前操作?"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
v-if="scope.row.auditStatus=='0'||scope.row.auditStatus=='1'"
|
||||||
|
@confirm="submitData(scope.row,'2')"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
slot="reference"
|
||||||
|
>拒绝</el-button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -203,6 +236,7 @@ import {
|
|||||||
getTeachInfoByIds
|
getTeachInfoByIds
|
||||||
} from "@/api/hit/registrationStudentInfo";
|
} from "@/api/hit/registrationStudentInfo";
|
||||||
import {selectBaseInfo, editStatus} from '@/api/cms/baseInfo'
|
import {selectBaseInfo, editStatus} from '@/api/cms/baseInfo'
|
||||||
|
import {getHitRegistrationTeachInfoByUserId} from '@/api/hit/teacherInfo'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "HitRegistrationStudentInfo",
|
name: "HitRegistrationStudentInfo",
|
||||||
@ -216,6 +250,8 @@ export default {
|
|||||||
guideTeachList:[],
|
guideTeachList:[],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
|
//当前用户id
|
||||||
|
userId:'',
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
@ -224,6 +260,8 @@ export default {
|
|||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
//当前登录老师的类型
|
||||||
|
techerType:0,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 报名信息表格数据
|
// 报名信息表格数据
|
||||||
@ -287,6 +325,12 @@ export default {
|
|||||||
this.registerStatus = res.data.registerStatus
|
this.registerStatus = res.data.registerStatus
|
||||||
})
|
})
|
||||||
this.yearList = this.years();
|
this.yearList = this.years();
|
||||||
|
// 获取当前登陆人的id
|
||||||
|
// this.userId = user.state.user.userId
|
||||||
|
console.log('当前登陆人id',this.$store);
|
||||||
|
this.getTeachInfoByIds(this.$store.state.user.id)
|
||||||
|
// const teacher = this.getTeachInfoByIds(this.userId)
|
||||||
|
// console.log('当前登陆人信息',teacher);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询报名信息列表 */
|
/** 查询报名信息列表 */
|
||||||
@ -294,11 +338,19 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
listHitRegistrationStudentInfo(this.queryParams).then(response => {
|
listHitRegistrationStudentInfo(this.queryParams).then(response => {
|
||||||
this.HitRegistrationStudentInfoList = response.rows;
|
this.HitRegistrationStudentInfoList = response.rows;
|
||||||
|
console.log("报名信息", this.HitRegistrationStudentInfoList);
|
||||||
|
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//查询当前老师的类型
|
||||||
|
getTeachInfoByIds(id){
|
||||||
|
getHitRegistrationTeachInfoByUserId(id).then(res => {
|
||||||
|
console.log('当前老师类型',res.data.type);
|
||||||
|
this.techerType = res.data.type
|
||||||
|
})
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -124,8 +124,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<el-form-item label="赛事" prop="competition">
|
<el-form-item label="赛事" prop="competition">
|
||||||
<el-checkbox-group v-model="preliminaryForm.competition" @change="onCompetition">
|
<el-checkbox-group v-model="preliminaryForm.competition">
|
||||||
<el-checkbox label="1">化验赛</el-checkbox>
|
<el-checkbox label="1">化验赛</el-checkbox>
|
||||||
<el-checkbox label="2">虚拟赛</el-checkbox>
|
<el-checkbox label="2">虚拟赛</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -181,7 +181,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-form-item v-if="!preliminaryForm.competition.includes('1')" label="盲样邮寄地址" prop="sampleAddress">
|
<el-form-item v-if="preliminaryForm.competition.includes('1')" label="盲样邮寄地址" prop="sampleAddress">
|
||||||
<el-input v-model="preliminaryForm.sampleAddress"></el-input>
|
<el-input v-model="preliminaryForm.sampleAddress"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="附件" prop="uploadFile">
|
<el-form-item label="附件" prop="uploadFile">
|
||||||
@ -472,9 +472,9 @@ export default {
|
|||||||
this.fetchRegistrationInformation()
|
this.fetchRegistrationInformation()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onCompetition(){
|
//将数组转为字符串
|
||||||
console.log("这是复选框点击事件", this.preliminaryForm.competition);
|
arrayToString(arr) {
|
||||||
// if(this.preliminaryForm.competition)
|
return arr.join(',');
|
||||||
},
|
},
|
||||||
//用户信息
|
//用户信息
|
||||||
loadUserInfo() {
|
loadUserInfo() {
|
||||||
@ -493,7 +493,7 @@ export default {
|
|||||||
getStudentInfoByStuId(this.signUpForm.studentId)
|
getStudentInfoByStuId(this.signUpForm.studentId)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.preliminaryForm = response.data;
|
this.preliminaryForm = response.data;
|
||||||
this.preliminaryForm.competition=["1"]
|
this.preliminaryForm.competition = ["1"]
|
||||||
|
|
||||||
this.updateSignUpForm(response.data);
|
this.updateSignUpForm(response.data);
|
||||||
|
|
||||||
@ -627,6 +627,8 @@ export default {
|
|||||||
},
|
},
|
||||||
//初赛报名
|
//初赛报名
|
||||||
preliminarySubmit() {
|
preliminarySubmit() {
|
||||||
|
this.preliminaryForm.competition = this.arrayToString(this.preliminaryForm.competition);
|
||||||
|
console.log("个人选拔赛报名",this.preliminaryForm);
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
PreliminaryRegistration(this.preliminaryForm).then(res => {
|
PreliminaryRegistration(this.preliminaryForm).then(res => {
|
||||||
|
Loading…
Reference in New Issue
Block a user