更新部分功能
This commit is contained in:
parent
b502559b6e
commit
23ba188b30
@ -5,6 +5,7 @@ import com.ruoyi.cms.domain.HitCompetitionStudentInfo;
|
|||||||
import com.ruoyi.cms.service.IHitCompetitionStudentInfoService;
|
import com.ruoyi.cms.service.IHitCompetitionStudentInfoService;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.exception.job.TaskException;
|
import com.ruoyi.common.exception.job.TaskException;
|
||||||
@ -15,6 +16,7 @@ import com.ruoyi.quartz.domain.SysJob;
|
|||||||
import org.quartz.SchedulerException;
|
import org.quartz.SchedulerException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -167,4 +169,27 @@ public class HitCompetitionStudentInfoController extends BaseController {
|
|||||||
// hitTask.scheduleTask();
|
// hitTask.scheduleTask();
|
||||||
return success(time);
|
return success(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入个人分数数据模板
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
@PostMapping("/importTemplate")
|
||||||
|
public void importTemplate(HttpServletResponse response)
|
||||||
|
{
|
||||||
|
ExcelUtil<HitCompetitionStudentInfo> util = new ExcelUtil<HitCompetitionStudentInfo>(HitCompetitionStudentInfo.class);
|
||||||
|
util.importTemplateExcel(response, "用户数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/importData")
|
||||||
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||||
|
{
|
||||||
|
ExcelUtil<HitCompetitionStudentInfo> util = new ExcelUtil<HitCompetitionStudentInfo>(HitCompetitionStudentInfo.class);
|
||||||
|
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);
|
||||||
|
return success(message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import java.io.Serializable;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -65,10 +66,14 @@ public class HitCompetitionStudentInfo implements Serializable {
|
|||||||
@ApiModelProperty(value = "所属赛区")
|
@ApiModelProperty(value = "所属赛区")
|
||||||
private String division;
|
private String division;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String competition;
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String divisionLabel;
|
private String divisionLabel;
|
||||||
|
|
||||||
|
@Excel(name = "手机号")
|
||||||
@ApiModelProperty(value = "手机号")
|
@ApiModelProperty(value = "手机号")
|
||||||
private String phoneNumber;
|
private String phoneNumber;
|
||||||
|
|
||||||
@ -78,6 +83,7 @@ public class HitCompetitionStudentInfo implements Serializable {
|
|||||||
@ApiModelProperty(value = "学生证")
|
@ApiModelProperty(value = "学生证")
|
||||||
private String studentIdCard;
|
private String studentIdCard;
|
||||||
|
|
||||||
|
@Excel(name = "个人选拔赛分数")
|
||||||
@ApiModelProperty(value = "个人选拔赛分数")
|
@ApiModelProperty(value = "个人选拔赛分数")
|
||||||
private BigDecimal trialsScore;
|
private BigDecimal trialsScore;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
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;
|
||||||
@ -39,8 +40,12 @@ public class HitRegInfo extends BaseEntity
|
|||||||
@Excel(name = "所属赛区")
|
@Excel(name = "所属赛区")
|
||||||
private String division;
|
private String division;
|
||||||
|
|
||||||
|
/** 赛事 */
|
||||||
|
@ApiModelProperty(value = "赛事")
|
||||||
|
private String competition;
|
||||||
|
|
||||||
/** 团队名称(个人赛不需求,可以为空) */
|
/** 团队名称(个人赛不需求,可以为空) */
|
||||||
@Excel(name = "团队名称", readConverterExp = "个=人赛不需求,可以为空")
|
@Excel(name = "团队名称", readConverterExp = "个人赛不需求,可以为空")
|
||||||
private String teamName;
|
private String teamName;
|
||||||
|
|
||||||
/** 盲样联系人 */
|
/** 盲样联系人 */
|
||||||
|
@ -21,6 +21,9 @@ public class Preliminary {
|
|||||||
/** 赛区 */
|
/** 赛区 */
|
||||||
private String division;
|
private String division;
|
||||||
|
|
||||||
|
/** 赛事 */
|
||||||
|
private String competition;
|
||||||
|
|
||||||
/** 学校名称 */
|
/** 学校名称 */
|
||||||
private String schoolName;
|
private String schoolName;
|
||||||
|
|
||||||
|
@ -85,4 +85,11 @@ public interface IHitCompetitionStudentInfoService extends IService<HitCompetiti
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
TeamsVo selectTeamMateInfoByStuId();
|
TeamsVo selectTeamMateInfoByStuId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
* @param hitList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String importData(List<HitCompetitionStudentInfo> hitList);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.cms.service.impl;
|
package com.ruoyi.cms.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.ruoyi.cms.domain.*;
|
import com.ruoyi.cms.domain.*;
|
||||||
import com.ruoyi.cms.domain.vo.TeamsVo;
|
import com.ruoyi.cms.domain.vo.TeamsVo;
|
||||||
@ -14,6 +16,7 @@ import com.ruoyi.cms.service.IHitRegInfoService;
|
|||||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
@ -24,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -166,6 +170,13 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
|||||||
queryWrapper.eq(HitCompetitionStudentInfo::getUserId, user.getUserId());
|
queryWrapper.eq(HitCompetitionStudentInfo::getUserId, user.getUserId());
|
||||||
queryWrapper.likeRight(HitCompetitionStudentInfo::getCreateTime, year);
|
queryWrapper.likeRight(HitCompetitionStudentInfo::getCreateTime, year);
|
||||||
HitCompetitionStudentInfo hitCompetitionStudentInfo = hitCompetitionStudentInfoMapper.selectOne(queryWrapper);
|
HitCompetitionStudentInfo hitCompetitionStudentInfo = hitCompetitionStudentInfoMapper.selectOne(queryWrapper);
|
||||||
|
// //通过团队id查询赛事
|
||||||
|
// LambdaQueryWrapper<HitTeams> query = new LambdaQueryWrapper<>();
|
||||||
|
// query.eq(HitTeams::getId, hitCompetitionStudentInfo.getHitRegId());
|
||||||
|
// HitTeams hitTeams = hitTeamsMapper.selectOne(query);
|
||||||
|
// if (ObjectUtils.isNotEmpty(hitTeams)) {
|
||||||
|
//// hitCompetitionStudentInfo.setCompetition(hitTeams.getCompetition());
|
||||||
|
// }
|
||||||
if (ObjectUtils.isEmpty(hitCompetitionStudentInfo) ) {
|
if (ObjectUtils.isEmpty(hitCompetitionStudentInfo) ) {
|
||||||
return new HitCompetitionStudentInfo();
|
return new HitCompetitionStudentInfo();
|
||||||
}
|
}
|
||||||
@ -182,6 +193,8 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
|||||||
queryWrapper2.eq(HitRegistrationTeachInfo::getSchoolName,hitCompetitionStudentInfo.getSchoolName())
|
queryWrapper2.eq(HitRegistrationTeachInfo::getSchoolName,hitCompetitionStudentInfo.getSchoolName())
|
||||||
.likeRight(HitRegistrationTeachInfo::getCreateTime, year).eq(HitRegistrationTeachInfo::getType,0).eq(HitRegistrationTeachInfo::getStatus,1);
|
.likeRight(HitRegistrationTeachInfo::getCreateTime, year).eq(HitRegistrationTeachInfo::getType,0).eq(HitRegistrationTeachInfo::getStatus,1);
|
||||||
List<HitRegistrationTeachInfo> hitRegistrationTeachInfos = hitRegistrationTeachInfoMapper.selectList(queryWrapper2);
|
List<HitRegistrationTeachInfo> hitRegistrationTeachInfos = hitRegistrationTeachInfoMapper.selectList(queryWrapper2);
|
||||||
|
//领队老师也可以是指导老师
|
||||||
|
hitRegistrationTeachInfos.add(hitRegistrationTeachInfo);
|
||||||
hitCompetitionStudentInfo.setZdTeacherList(hitRegistrationTeachInfos);
|
hitCompetitionStudentInfo.setZdTeacherList(hitRegistrationTeachInfos);
|
||||||
|
|
||||||
LambdaQueryWrapper<HitCompetitionStudentInfo> queryWrapper3 =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<HitCompetitionStudentInfo> queryWrapper3 =new LambdaQueryWrapper<>();
|
||||||
@ -296,6 +309,38 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
|||||||
return teamsVo;
|
return teamsVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*
|
||||||
|
* @param hitList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String importData(List<HitCompetitionStudentInfo> hitList) {
|
||||||
|
//获取当前时间
|
||||||
|
DateTime now = DateUtil.date();
|
||||||
|
Date date = new Date();
|
||||||
|
if (StringUtils.isNull(hitList) || hitList.size() == 0)
|
||||||
|
{
|
||||||
|
throw new ServiceException("导入学生分数信息不能为空!");
|
||||||
|
}
|
||||||
|
|
||||||
|
hitList.forEach(item -> {
|
||||||
|
//判断手机号与分数是否为空
|
||||||
|
if (!StringUtils.isNull(item.getPhoneNumber()) || !StringUtils.isNull(item.getTrialsScore()))
|
||||||
|
{
|
||||||
|
LambdaQueryWrapper<HitCompetitionStudentInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
// queryWrapper.likeRight(HitCompetitionStudentInfo::getYear, year);
|
||||||
|
queryWrapper.eq(HitCompetitionStudentInfo::getPhoneNumber, item.getPhoneNumber());
|
||||||
|
queryWrapper.between(HitCompetitionStudentInfo::getCreateTime, DateUtil.beginOfYear(now), DateUtil.endOfYear(now));
|
||||||
|
item.setUpdateTime(date);
|
||||||
|
hitCompetitionStudentInfoMapper.update(item, queryWrapper);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return "导入成功";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询团队信息
|
* 查询团队信息
|
||||||
* @param teamsVo
|
* @param teamsVo
|
||||||
|
@ -75,6 +75,12 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
|
|||||||
@Override
|
@Override
|
||||||
public List<HitRegInfo> selectHitRegInfoList(HitRegInfo hitRegInfo)
|
public List<HitRegInfo> selectHitRegInfoList(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);
|
List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectHitRegInfoList(hitRegInfo);
|
||||||
for (HitRegInfo regInfo : hitRegInfos) {
|
for (HitRegInfo regInfo : hitRegInfos) {
|
||||||
HitRegInfoUser hitRegInfoUser =new HitRegInfoUser();
|
HitRegInfoUser hitRegInfoUser =new HitRegInfoUser();
|
||||||
|
@ -84,6 +84,7 @@ public class HitTeamsServiceImpl extends ServiceImpl<HitTeamsMapper, HitTeams> i
|
|||||||
hitRegInfo.setUploadFile(preliminary.getUploadFile());
|
hitRegInfo.setUploadFile(preliminary.getUploadFile());
|
||||||
hitRegInfo.setAuditStatus("9");
|
hitRegInfo.setAuditStatus("9");
|
||||||
hitRegInfo.setCreateTime(new Date());
|
hitRegInfo.setCreateTime(new Date());
|
||||||
|
hitRegInfo.setCompetition(preliminary.getCompetition());
|
||||||
int insert = hitRegInfoMapper.insert(hitRegInfo);
|
int insert = hitRegInfoMapper.insert(hitRegInfo);
|
||||||
//插入人员信息
|
//插入人员信息
|
||||||
HitRegInfoUser hitRegInfoUser1 =new HitRegInfoUser();
|
HitRegInfoUser hitRegInfoUser1 =new HitRegInfoUser();
|
||||||
|
@ -6,16 +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
|
|
||||||
# password: Obr7890&*()
|
|
||||||
password: 123456
|
|
||||||
# master:
|
|
||||||
# url: jdbc:mysql://localhost:3306/ry-cms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
|
||||||
# username: root
|
# username: root
|
||||||
# password: root
|
password: Obr7890&*()
|
||||||
|
# password: 123456
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
@ -74,7 +74,8 @@ spring:
|
|||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 9
|
database: 9
|
||||||
# 密码
|
# 密码
|
||||||
password: 123456
|
# password: 123456
|
||||||
|
password:
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
lettuce:
|
lettuce:
|
||||||
|
@ -4,8 +4,8 @@ VUE_APP_TITLE = 虚拟仿真实验教学中心
|
|||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
# 若依管理系统/开发环境
|
# 若依管理系统/开发环境
|
||||||
# VUE_APP_BASE_API = 'http://192.168.31.25:8080'
|
VUE_APP_BASE_API = 'http://192.168.31.25:8080'
|
||||||
VUE_APP_BASE_API = 'http://localhost:8080/hgdWebsite'
|
# VUE_APP_BASE_API = 'http://localhost:8080/hgdWebsite'
|
||||||
# VUE_APP_BASE_API = '/dev-api'
|
# VUE_APP_BASE_API = '/dev-api'
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
@ -16,8 +16,8 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
|||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||||
baseURL: process.env.VUE_APP_BASE_API,
|
baseURL: process.env.VUE_APP_BASE_API,
|
||||||
// 超时
|
// 超时 30s
|
||||||
timeout: 10000
|
timeout: 30000
|
||||||
})
|
})
|
||||||
|
|
||||||
// request拦截器
|
// request拦截器
|
||||||
|
@ -15,13 +15,22 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!-- <template> -->
|
<!-- 时间<el-date-picker v-model="selectedTime" type="datetime" placeholder="选择时间" @change="onTimeSelect"></el-date-picker> -->
|
||||||
时间<el-date-picker v-model="selectedTime" type="datetime" placeholder="选择时间" @change="onTimeSelect"></el-date-picker>
|
|
||||||
<!-- </template> -->
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
|
|
||||||
|
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="info"
|
||||||
|
plain
|
||||||
|
icon="el-icon-upload2"
|
||||||
|
size="mini"
|
||||||
|
@click="handleImport"
|
||||||
|
v-hasPermi="['system:user:import']"
|
||||||
|
>导入</el-button>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
|
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
|
||||||
@click="handleDelete">删除</el-button>
|
@click="handleDelete">删除</el-button>
|
||||||
@ -133,12 +142,43 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 用户导入对话框 -->
|
||||||
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||||
|
<el-upload
|
||||||
|
ref="upload"
|
||||||
|
:limit="1"
|
||||||
|
accept=".xlsx, .xls"
|
||||||
|
:headers="upload.headers"
|
||||||
|
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||||
|
:disabled="upload.isUploading"
|
||||||
|
:on-progress="handleFileUploadProgress"
|
||||||
|
:on-success="handleFileSuccess"
|
||||||
|
:auto-upload="false"
|
||||||
|
drag
|
||||||
|
>
|
||||||
|
<i class="el-icon-upload"></i>
|
||||||
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
|
<div class="el-upload__tip text-center" slot="tip">
|
||||||
|
<div class="el-upload__tip" slot="tip">
|
||||||
|
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
|
||||||
|
</div>
|
||||||
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||||
|
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
|
<el-button @click="upload.open = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listInfo, getInfo, delInfo, addInfo, updateInfo, updateTime } from "@/api/hit/stuInfo";
|
import { listInfo, getInfo, delInfo, addInfo, updateInfo, updateTime } from "@/api/hit/stuInfo";
|
||||||
|
import { getToken } from "@/utils/auth";
|
||||||
export default {
|
export default {
|
||||||
name: "Info",
|
name: "Info",
|
||||||
data() {
|
data() {
|
||||||
@ -212,7 +252,21 @@ export default {
|
|||||||
updateTime: [
|
updateTime: [
|
||||||
{ required: true, message: "更新时间不能为空", trigger: "blur" }
|
{ required: true, message: "更新时间不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
|
upload: {
|
||||||
|
// 是否显示弹出层(用户导入)
|
||||||
|
open: false,
|
||||||
|
// 弹出层标题(用户导入)
|
||||||
|
title: "",
|
||||||
|
// 是否禁用上传
|
||||||
|
isUploading: false,
|
||||||
|
// 是否更新已经存在的用户数据
|
||||||
|
updateSupport: 0,
|
||||||
|
// 设置上传的请求头部
|
||||||
|
headers: { Authorization: "Bearer " + getToken() },
|
||||||
|
// 上传的地址
|
||||||
|
url: process.env.VUE_APP_BASE_API + "/system/hit_stu_info/importData"
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -228,6 +282,28 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 文件上传中处理
|
||||||
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
|
this.upload.isUploading = true;
|
||||||
|
},
|
||||||
|
/** 下载模板操作 */
|
||||||
|
importTemplate() {
|
||||||
|
this.download('system/hit_stu_info/importTemplate', {
|
||||||
|
}, `hit_stu_info_template_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
/** 导入按钮操作 */
|
||||||
|
handleImport() {
|
||||||
|
this.upload.title = "用户导入";
|
||||||
|
this.upload.open = true;
|
||||||
|
},
|
||||||
|
// 文件上传成功处理
|
||||||
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
this.upload.open = false;
|
||||||
|
this.upload.isUploading = false;
|
||||||
|
this.$refs.upload.clearFiles();
|
||||||
|
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -352,16 +428,20 @@ export default {
|
|||||||
this.sendTimeToBackend(this.selectedTime);
|
this.sendTimeToBackend(this.selectedTime);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 向后端发送选定的时间
|
// 提交上传文件
|
||||||
sendTimeToBackend(time) {
|
submitFileForm() {
|
||||||
updateTime(time)
|
this.$refs.upload.submit();
|
||||||
.then(response => {
|
|
||||||
this.$message.success('定时任务设置成功');
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
this.$message.error('请求失败,请检查网络');
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
// 向后端发送选定的时间
|
||||||
|
// sendTimeToBackend(time) {
|
||||||
|
// updateTime(time)
|
||||||
|
// .then(response => {
|
||||||
|
// this.$message.success('定时任务设置成功');
|
||||||
|
// })
|
||||||
|
// .catch(error => {
|
||||||
|
// this.$message.error('请求失败,请检查网络');
|
||||||
|
// });
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -35,20 +35,17 @@
|
|||||||
<div class="step-box" v-if="active == 0">
|
<div class="step-box" v-if="active == 0">
|
||||||
<div class="step-box-title">
|
<div class="step-box-title">
|
||||||
<el-form label-width="80px" :model="signUpForm" :rules="rules" ref="form">
|
<el-form label-width="80px" :model="signUpForm" :rules="rules" ref="form">
|
||||||
<el-form-item label="手机号" prop="studentId" >
|
<el-form-item label="手机号" prop="studentId">
|
||||||
<el-input v-model="signUpForm.studentId" disabled></el-input>
|
<el-input v-model="signUpForm.studentId" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="姓名" prop="stuName">
|
<el-form-item label="姓名" prop="stuName">
|
||||||
<el-input v-model="signUpForm.stuName"></el-input>
|
<el-input v-model="signUpForm.stuName"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="性别" prop="stuName">
|
<el-form-item label="性别" prop="stuName">
|
||||||
<el-select v-model="signUpForm.sex" filterable allow-create default-first-option
|
<el-select v-model="signUpForm.sex" filterable allow-create default-first-option placeholder="请选择性别">
|
||||||
placeholder="请选择性别">
|
<el-option key="男" label="男" value="男">
|
||||||
<el-option key="男" label="男"
|
|
||||||
value="男">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
<el-option key="女" label="女"
|
<el-option key="女" label="女" value="女">
|
||||||
value="女">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -84,7 +81,7 @@
|
|||||||
<el-form-item label="邮箱" prop="email">
|
<el-form-item label="邮箱" prop="email">
|
||||||
<el-input v-model="signUpForm.email"></el-input>
|
<el-input v-model="signUpForm.email"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="学生证、卡" prop="studentIdCard" label-width="95px">
|
<el-form-item label="学生证|学生卡" prop="studentIdCard" label-width="130px">
|
||||||
<image-upload :limit="1" v-model="signUpForm.studentIdCard"></image-upload>
|
<image-upload :limit="1" v-model="signUpForm.studentIdCard"></image-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -94,21 +91,26 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="step-box" v-if="active == 1" style="position: relative" >
|
<div class="step-box" v-if="active == 1" style="position: relative">
|
||||||
<!-- <div class="step-box-title" style="font-size: 20px;margin-top: 8%" v-if="signUpForm.trialsScore == null">个人选拔赛成绩未出,请耐心等待</div> -->
|
<div class="step-box-title" style="font-size: 20px;margin-top: 8%" v-if="signUpForm.trialsScore == null">
|
||||||
<div class="step-box-title" style="font-size: 20px;margin-top: 8%" v-if="signUpForm.trialsScore == null">成绩仅供参考,最终选择由指导老师和领队老师做决定</div>
|
个人选拔赛成绩未出,请耐心等待
|
||||||
<div class="step-box-title" style="font-size: 20px;margin-top: 8%" v-if="signUpForm.trialsScore != null && signUpForm.isPreliminary == false">
|
<br>
|
||||||
很遗憾,个人选拔赛未通过,您的个人成绩为 : {{ signUpForm.trialsScore }}</div>
|
成绩仅供参考,最终选择由指导老师和领队老师做决定
|
||||||
<div style="position: absolute;left: 15%; top: 30%" v-if="signUpForm.trialsScore" >
|
|
||||||
<div style="font-size: 24px">
|
|
||||||
地区选拔赛成绩:
|
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 24px;color:#ff0000;margin-top: 15px" >
|
<!-- <div class="step-box-title" style="font-size: 20px;margin-top: 8%" v-if="signUpForm.trialsScore == null">成绩仅供参考,最终选择由指导老师和领队老师做决定</div> -->
|
||||||
|
<div class="step-box-title" style="font-size: 20px;margin-top: 8%"
|
||||||
|
v-if="signUpForm.trialsScore != null && signUpForm.isPreliminary == false">
|
||||||
|
很遗憾,个人选拔赛未通过,您的个人成绩为 : {{ signUpForm.trialsScore }}</div>
|
||||||
|
<div style="position: absolute;left: 15%; top: 30%" v-if="signUpForm.trialsScore">
|
||||||
|
<div style="font-size: 24px">
|
||||||
|
个人选拔赛成绩:
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 24px;color:#ff0000;margin-top: 15px">
|
||||||
{{ signUpForm.trialsScore }}
|
{{ signUpForm.trialsScore }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 25px;width: 600px;margin-left: 30%" v-if=" signUpForm.isPreliminary == true">
|
<div style="margin-top: 25px;width: 600px;margin-left: 30%" v-if="signUpForm.isPreliminary == true">
|
||||||
|
|
||||||
<el-form ref="form" :rules="preliminaryFormRules" :model="preliminaryForm" label-width="150px">
|
<el-form ref="form" :rules="preliminaryFormRules" :model="preliminaryForm" label-width="150px">
|
||||||
<div class="d-s" style="justify-content: space-between">
|
<div class="d-s" style="justify-content: space-between">
|
||||||
@ -120,6 +122,14 @@
|
|||||||
<el-input v-model="preliminaryForm.schoolName"></el-input>
|
<el-input v-model="preliminaryForm.schoolName"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="d-s">
|
||||||
|
<el-form-item label="赛事" prop="competition">
|
||||||
|
<el-checkbox-group v-model="preliminaryForm.competition" @change="onCompetition">
|
||||||
|
<el-checkbox label="1">化验赛</el-checkbox>
|
||||||
|
<el-checkbox label="2">虚拟赛</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<el-form-item label="领队老师" prop="ldTeacherInfo.teacherName">
|
<el-form-item label="领队老师" prop="ldTeacherInfo.teacherName">
|
||||||
<el-input v-model="preliminaryForm.ldTeacherInfo.teacherName"></el-input>
|
<el-input v-model="preliminaryForm.ldTeacherInfo.teacherName"></el-input>
|
||||||
@ -132,13 +142,15 @@
|
|||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<el-form-item label="队员1" prop="teammateOne">
|
<el-form-item label="队员1" prop="teammateOne">
|
||||||
<el-select v-model="preliminaryForm.teammateOne" placeholder="第一个队友">
|
<el-select v-model="preliminaryForm.teammateOne" placeholder="第一个队友">
|
||||||
<el-option v-for="item in preliminaryForm.tdStudentList" :key="item.userId" :label="item.stuName" :value="item.userId">
|
<el-option v-for="item in preliminaryForm.tdStudentList" :key="item.userId" :label="item.stuName"
|
||||||
|
:value="item.userId">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="队员2" prop="teammateTwo">
|
<el-form-item label="队员2" prop="teammateTwo">
|
||||||
<el-select v-model="preliminaryForm.teammateTwo" placeholder="第二个队友">
|
<el-select v-model="preliminaryForm.teammateTwo" placeholder="第二个队友">
|
||||||
<el-option v-for="item in preliminaryForm.tdStudentList" :key="item.userId" :label="item.stuName" :value="item.userId">
|
<el-option v-for="item in preliminaryForm.tdStudentList" :key="item.userId" :label="item.stuName"
|
||||||
|
:value="item.userId">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -147,13 +159,15 @@
|
|||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<el-form-item label="指导老师1" prop="teacherOne">
|
<el-form-item label="指导老师1" prop="teacherOne">
|
||||||
<el-select v-model="preliminaryForm.teacherOne" placeholder="指导老师1">
|
<el-select v-model="preliminaryForm.teacherOne" placeholder="指导老师1">
|
||||||
<el-option v-for="item in preliminaryForm.zdTeacherList" :key="item.userId" :label="item.teacherName" :value="item.userId">
|
<el-option v-for="item in preliminaryForm.zdTeacherList" :key="item.userId"
|
||||||
|
:label="item.teacherName" :value="item.userId">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="指导老师2" prop="teacherTwo">
|
<el-form-item label="指导老师2" prop="teacherTwo">
|
||||||
<el-select v-model="preliminaryForm.teacherTwo" placeholder="指导老师2">
|
<el-select v-model="preliminaryForm.teacherTwo" placeholder="指导老师2">
|
||||||
<el-option v-for="item in preliminaryForm.zdTeacherList" :key="item.userId" :label="item.teacherName" :value="item.userId">
|
<el-option v-for="item in preliminaryForm.zdTeacherList" :key="item.userId"
|
||||||
|
:label="item.teacherName" :value="item.userId">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -167,7 +181,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-form-item 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">
|
||||||
@ -183,53 +197,32 @@
|
|||||||
<div class="step-box" v-if="active == 2">
|
<div class="step-box" v-if="active == 2">
|
||||||
|
|
||||||
<el-descriptions class="margin-top" title="团队信息" border>
|
<el-descriptions class="margin-top" title="团队信息" border>
|
||||||
<el-descriptions-item label="赛区">{{preliminaryForm.divisionLabel}}</el-descriptions-item>
|
<el-descriptions-item label="赛区">{{ preliminaryForm.divisionLabel }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="学校">{{preliminaryForm.hitRegInfo.schoolName}}</el-descriptions-item>
|
<el-descriptions-item label="学校">{{ preliminaryForm.hitRegInfo.schoolName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="领队老师">{{preliminaryForm.ldTeacherInfo.teacherName}}</el-descriptions-item>
|
<el-descriptions-item label="领队老师">{{ preliminaryForm.ldTeacherInfo.teacherName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="指导老师">{{preliminaryForm.zdTeacherStr}}</el-descriptions-item>
|
<el-descriptions-item label="指导老师">{{ preliminaryForm.zdTeacherStr }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="样品联系人">{{preliminaryForm.hitRegInfo.sampleConcat}}</el-descriptions-item>
|
<el-descriptions-item label="样品联系人">{{ preliminaryForm.hitRegInfo.sampleConcat }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="联系人手机号">{{preliminaryForm.hitRegInfo.sampleNumber}}</el-descriptions-item>
|
<el-descriptions-item label="联系人手机号">{{ preliminaryForm.hitRegInfo.sampleNumber }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="样品邮寄地址">{{preliminaryForm.hitRegInfo.sampleAddress}}</el-descriptions-item>
|
<el-descriptions-item label="样品邮寄地址">{{ preliminaryForm.hitRegInfo.sampleAddress }}</el-descriptions-item>
|
||||||
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-table
|
<el-table :data="preliminaryForm.hitRegInfo.studentUser" border style="width: 100%">
|
||||||
:data="preliminaryForm.hitRegInfo.studentUser"
|
<el-table-column prop="userName" align="center" label="姓名">
|
||||||
border
|
|
||||||
style="width: 100%">
|
|
||||||
<el-table-column
|
|
||||||
prop="userName"
|
|
||||||
align="center"
|
|
||||||
label="姓名"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="status" align="center" label="状态">
|
||||||
prop="status"
|
|
||||||
align="center"
|
|
||||||
label="状态"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.status==0">待确认</span>
|
<span v-if="scope.row.status == 0">待确认</span>
|
||||||
<span v-if="scope.row.status==1">同意</span>
|
<span v-if="scope.row.status == 1">同意</span>
|
||||||
<span v-if="scope.row.status==2">拒绝</span>
|
<span v-if="scope.row.status == 2">拒绝</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center"class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="scope.row.isOwn =='1'">
|
<div v-if="scope.row.isOwn == '1'">
|
||||||
<el-button
|
<el-button size="mini" type="text" icon="el-icon-check"
|
||||||
size="mini"
|
@click="regChoose(scope.row, 1)">同意</el-button>
|
||||||
type="text"
|
<el-button size="mini" type="text" icon="el-icon-close"
|
||||||
icon="el-icon-check"
|
@click="regChoose(scope.row, 2)">拒绝</el-button>
|
||||||
@click="regChoose(scope.row,1)"
|
|
||||||
|
|
||||||
>同意</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-close"
|
|
||||||
@click="regChoose(scope.row,2)"
|
|
||||||
|
|
||||||
>拒绝</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -245,8 +238,9 @@
|
|||||||
|
|
||||||
<div class="step-box" v-if="active == 4">
|
<div class="step-box" v-if="active == 4">
|
||||||
|
|
||||||
<file-upload style="margin-top: 5%" :fileSize="200" :fileType="['zip','rar','7z']" v-model="preliminaryForm.hitRegInfo.dsFile"></file-upload>
|
<file-upload style="margin-top: 5%" :fileSize="200" :fileType="['zip', 'rar', '7z']"
|
||||||
<div >
|
v-model="preliminaryForm.hitRegInfo.dsFile"></file-upload>
|
||||||
|
<div>
|
||||||
<el-button style="margin-top: 8%" type="primary" @click="fileSubmit">提交</el-button>
|
<el-button style="margin-top: 8%" type="primary" @click="fileSubmit">提交</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -318,7 +312,7 @@ export default {
|
|||||||
SwiperSlide,
|
SwiperSlide,
|
||||||
"page-util": PageUtil
|
"page-util": PageUtil
|
||||||
},
|
},
|
||||||
dicts: ["sys_user_sex", "school_name","com_region"],
|
dicts: ["sys_user_sex", "school_name", "com_region"],
|
||||||
name: 'HelloWorld',
|
name: 'HelloWorld',
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@ -352,13 +346,14 @@ export default {
|
|||||||
leaderTeacher: "",
|
leaderTeacher: "",
|
||||||
teacherOne: "",
|
teacherOne: "",
|
||||||
teacherTwo: "",
|
teacherTwo: "",
|
||||||
|
competition: [],
|
||||||
},
|
},
|
||||||
//队员
|
//队员
|
||||||
teammateInfo: {
|
teammateInfo: {
|
||||||
teamId: "",
|
teamId: "",
|
||||||
teamName: "",
|
teamName: "",
|
||||||
teamMateId: "",
|
teamMateId: "",
|
||||||
isAgreeWith:"",
|
isAgreeWith: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
teammateList: [], // 临时用于渲染的队友列表
|
teammateList: [], // 临时用于渲染的队友列表
|
||||||
@ -383,51 +378,54 @@ export default {
|
|||||||
{ required: true, message: "专业名称不能为空", trigger: "blur" }
|
{ required: true, message: "专业名称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
studentIdCard: [
|
studentIdCard: [
|
||||||
{ required: true, message: "学生证、卡不能为空", trigger: "blur" }
|
{ required: true, message: "学生证/学生卡不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
phoneNumber: [
|
phoneNumber: [
|
||||||
{ required: true, message: "手机号不能为空", trigger: "blur" }
|
{ required: true, message: "手机号不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
email: [
|
email: [
|
||||||
{ required: true, message: "邮箱不能为空", trigger: "blur" }
|
{ required: true, message: "邮箱不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
competition: [
|
||||||
|
{ required: true, message: "赛事不能为空", trigger: "blur" }
|
||||||
]
|
]
|
||||||
|
|
||||||
},
|
},
|
||||||
preliminaryFormRules:{
|
preliminaryFormRules: {
|
||||||
divisionLabel : [
|
divisionLabel: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
schoolName : [
|
schoolName: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
'ldTeacherInfo.teacherName' : [
|
'ldTeacherInfo.teacherName': [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
teamName : [
|
teamName: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
teammateOne : [
|
teammateOne: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
teammateTwo : [
|
teammateTwo: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
teacherOne : [
|
teacherOne: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
teacherTwo : [
|
teacherTwo: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
sampleConcat : [
|
sampleConcat: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
sampleNumber : [
|
sampleNumber: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
sampleAddress : [
|
sampleAddress: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
uploadFile : [
|
uploadFile: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -460,23 +458,27 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
regChoose(data,status){
|
regChoose(data, status) {
|
||||||
data.status = status
|
data.status = status
|
||||||
console.log(data)
|
console.log(data)
|
||||||
editRegUser(data).then(res=>{
|
editRegUser(data).then(res => {
|
||||||
this.$modal.msgSuccess("成功")
|
this.$modal.msgSuccess("成功")
|
||||||
this.fetchRegistrationInformation()
|
this.fetchRegistrationInformation()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fileSubmit(){
|
fileSubmit() {
|
||||||
editRegInfo(this.preliminaryForm.hitRegInfo).then(res=>{
|
editRegInfo(this.preliminaryForm.hitRegInfo).then(res => {
|
||||||
this.$modal.msgSuccess("成功")
|
this.$modal.msgSuccess("成功")
|
||||||
this.fetchRegistrationInformation()
|
this.fetchRegistrationInformation()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onCompetition(){
|
||||||
|
console.log("这是复选框点击事件", this.preliminaryForm.competition);
|
||||||
|
// if(this.preliminaryForm.competition)
|
||||||
|
},
|
||||||
//用户信息
|
//用户信息
|
||||||
loadUserInfo() {
|
loadUserInfo() {
|
||||||
if(getToken()){
|
if (getToken()) {
|
||||||
getHomeUserInfo().then(response => {
|
getHomeUserInfo().then(response => {
|
||||||
this.signUpForm.studentId = response.data.userName;
|
this.signUpForm.studentId = response.data.userName;
|
||||||
this.preliminaryForm = response.data;
|
this.preliminaryForm = response.data;
|
||||||
@ -491,6 +493,8 @@ 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.updateSignUpForm(response.data);
|
this.updateSignUpForm(response.data);
|
||||||
|
|
||||||
console.log('报名信息:', this.signUpForm);
|
console.log('报名信息:', this.signUpForm);
|
||||||
@ -501,10 +505,10 @@ export default {
|
|||||||
this.preliminaryForm.division = data.division;
|
this.preliminaryForm.division = data.division;
|
||||||
this.preliminaryForm.divisionLabel = data.divisionLabel;
|
this.preliminaryForm.divisionLabel = data.divisionLabel;
|
||||||
this.preliminaryForm.ldTeacherInfo = data.ldTeacherInfo;
|
this.preliminaryForm.ldTeacherInfo = data.ldTeacherInfo;
|
||||||
if(data.ldTeacherInfo){
|
if (data.ldTeacherInfo) {
|
||||||
this.preliminaryForm.leaderTeacher = data.ldTeacherInfo.userId;
|
this.preliminaryForm.leaderTeacher = data.ldTeacherInfo.userId;
|
||||||
}else{
|
} else {
|
||||||
this.preliminaryForm.ldTeacherInfo ={}
|
this.preliminaryForm.ldTeacherInfo = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.preliminaryForm.schoolName = data.schoolName;
|
this.preliminaryForm.schoolName = data.schoolName;
|
||||||
@ -512,25 +516,25 @@ export default {
|
|||||||
this.preliminaryForm.tdStudentList = data.tdStudentList;
|
this.preliminaryForm.tdStudentList = data.tdStudentList;
|
||||||
this.preliminaryForm.zdTeacherStr = data.zdTeacherStr;
|
this.preliminaryForm.zdTeacherStr = data.zdTeacherStr;
|
||||||
this.active = 1;
|
this.active = 1;
|
||||||
if (data.zdStatus=='0'){
|
if (data.zdStatus == '0') {
|
||||||
this.active = 3;
|
this.active = 3;
|
||||||
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
||||||
}
|
}
|
||||||
else if (data.zdStatus=='1'){
|
else if (data.zdStatus == '1') {
|
||||||
this.active = 4;
|
this.active = 4;
|
||||||
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
||||||
if (data.hitRegInfo.dsFile){
|
if (data.hitRegInfo.dsFile) {
|
||||||
this.active = 5;
|
this.active = 5;
|
||||||
}
|
}
|
||||||
} else if (data.zdStatus=='9'){
|
} else if (data.zdStatus == '9') {
|
||||||
this.active = 2;
|
this.active = 2;
|
||||||
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
||||||
}else if(data.id== null){
|
} else if (data.id == null) {
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
}else{
|
} else {
|
||||||
this.signUpForm = data;
|
this.signUpForm = data;
|
||||||
}
|
}
|
||||||
console.log(data,433, this.preliminaryForm)
|
console.log(data, 433, this.preliminaryForm)
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -590,10 +594,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
toRegister() {
|
toRegister() {
|
||||||
if(!getToken()){
|
if (!getToken()) {
|
||||||
this.$modal.msgWarning("报名请先登录系统!")
|
this.$modal.msgWarning("报名请先登录系统!")
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
if (this.registerStatus === '1') this.currentActive = 6;
|
if (this.registerStatus === '1') this.currentActive = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user