更新部分功能
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.common.core.controller.BaseController;
|
||||
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.enums.BusinessType;
|
||||
import com.ruoyi.common.exception.job.TaskException;
|
||||
@ -15,6 +16,7 @@ import com.ruoyi.quartz.domain.SysJob;
|
||||
import org.quartz.SchedulerException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
@ -167,4 +169,27 @@ public class HitCompetitionStudentInfoController extends BaseController {
|
||||
// hitTask.scheduleTask();
|
||||
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.List;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -65,10 +66,14 @@ public class HitCompetitionStudentInfo implements Serializable {
|
||||
@ApiModelProperty(value = "所属赛区")
|
||||
private String division;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String competition;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String divisionLabel;
|
||||
|
||||
@Excel(name = "手机号")
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String phoneNumber;
|
||||
|
||||
@ -78,6 +83,7 @@ public class HitCompetitionStudentInfo implements Serializable {
|
||||
@ApiModelProperty(value = "学生证")
|
||||
private String studentIdCard;
|
||||
|
||||
@Excel(name = "个人选拔赛分数")
|
||||
@ApiModelProperty(value = "个人选拔赛分数")
|
||||
private BigDecimal trialsScore;
|
||||
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
@ -39,8 +40,12 @@ public class HitRegInfo extends BaseEntity
|
||||
@Excel(name = "所属赛区")
|
||||
private String division;
|
||||
|
||||
/** 赛事 */
|
||||
@ApiModelProperty(value = "赛事")
|
||||
private String competition;
|
||||
|
||||
/** 团队名称(个人赛不需求,可以为空) */
|
||||
@Excel(name = "团队名称", readConverterExp = "个=人赛不需求,可以为空")
|
||||
@Excel(name = "团队名称", readConverterExp = "个人赛不需求,可以为空")
|
||||
private String teamName;
|
||||
|
||||
/** 盲样联系人 */
|
||||
|
@ -21,6 +21,9 @@ public class Preliminary {
|
||||
/** 赛区 */
|
||||
private String division;
|
||||
|
||||
/** 赛事 */
|
||||
private String competition;
|
||||
|
||||
/** 学校名称 */
|
||||
private String schoolName;
|
||||
|
||||
|
@ -85,4 +85,11 @@ public interface IHitCompetitionStudentInfoService extends IService<HitCompetiti
|
||||
* @return
|
||||
*/
|
||||
TeamsVo selectTeamMateInfoByStuId();
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
* @param hitList
|
||||
* @return
|
||||
*/
|
||||
String importData(List<HitCompetitionStudentInfo> hitList);
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.ruoyi.cms.service.impl;
|
||||
|
||||
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.ruoyi.cms.domain.*;
|
||||
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.entity.SysUser;
|
||||
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.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
@ -24,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -166,6 +170,13 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
||||
queryWrapper.eq(HitCompetitionStudentInfo::getUserId, user.getUserId());
|
||||
queryWrapper.likeRight(HitCompetitionStudentInfo::getCreateTime, year);
|
||||
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) ) {
|
||||
return new HitCompetitionStudentInfo();
|
||||
}
|
||||
@ -182,6 +193,8 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
||||
queryWrapper2.eq(HitRegistrationTeachInfo::getSchoolName,hitCompetitionStudentInfo.getSchoolName())
|
||||
.likeRight(HitRegistrationTeachInfo::getCreateTime, year).eq(HitRegistrationTeachInfo::getType,0).eq(HitRegistrationTeachInfo::getStatus,1);
|
||||
List<HitRegistrationTeachInfo> hitRegistrationTeachInfos = hitRegistrationTeachInfoMapper.selectList(queryWrapper2);
|
||||
//领队老师也可以是指导老师
|
||||
hitRegistrationTeachInfos.add(hitRegistrationTeachInfo);
|
||||
hitCompetitionStudentInfo.setZdTeacherList(hitRegistrationTeachInfos);
|
||||
|
||||
LambdaQueryWrapper<HitCompetitionStudentInfo> queryWrapper3 =new LambdaQueryWrapper<>();
|
||||
@ -296,6 +309,38 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
||||
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
|
||||
|
@ -75,6 +75,12 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
|
||||
@Override
|
||||
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);
|
||||
for (HitRegInfo regInfo : hitRegInfos) {
|
||||
HitRegInfoUser hitRegInfoUser =new HitRegInfoUser();
|
||||
|
@ -84,6 +84,7 @@ public class HitTeamsServiceImpl extends ServiceImpl<HitTeamsMapper, HitTeams> i
|
||||
hitRegInfo.setUploadFile(preliminary.getUploadFile());
|
||||
hitRegInfo.setAuditStatus("9");
|
||||
hitRegInfo.setCreateTime(new Date());
|
||||
hitRegInfo.setCompetition(preliminary.getCompetition());
|
||||
int insert = hitRegInfoMapper.insert(hitRegInfo);
|
||||
//插入人员信息
|
||||
HitRegInfoUser hitRegInfoUser1 =new HitRegInfoUser();
|
||||
|
@ -6,16 +6,12 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
# url: jdbc:mysql://61.156.90.46:3360/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true
|
||||
url: jdbc:mysql://localhost:3306/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true
|
||||
# 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
|
||||
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
|
||||
username: obrhgd
|
||||
# username: root
|
||||
# password: root
|
||||
password: Obr7890&*()
|
||||
# password: 123456
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
@ -74,7 +74,8 @@ spring:
|
||||
# 数据库索引
|
||||
database: 9
|
||||
# 密码
|
||||
password: 123456
|
||||
# password: 123456
|
||||
password:
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
|
@ -4,8 +4,8 @@ VUE_APP_TITLE = 虚拟仿真实验教学中心
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
# 若依管理系统/开发环境
|
||||
# VUE_APP_BASE_API = 'http://192.168.31.25:8080'
|
||||
VUE_APP_BASE_API = 'http://localhost:8080/hgdWebsite'
|
||||
VUE_APP_BASE_API = 'http://192.168.31.25:8080'
|
||||
# VUE_APP_BASE_API = 'http://localhost:8080/hgdWebsite'
|
||||
# VUE_APP_BASE_API = '/dev-api'
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
@ -16,8 +16,8 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
||||
const service = axios.create({
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
// 超时
|
||||
timeout: 10000
|
||||
// 超时 30s
|
||||
timeout: 30000
|
||||
})
|
||||
|
||||
// request拦截器
|
||||
|
@ -15,13 +15,22 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- <template> -->
|
||||
时间<el-date-picker v-model="selectedTime" type="datetime" placeholder="选择时间" @change="onTimeSelect"></el-date-picker>
|
||||
<!-- </template> -->
|
||||
<!-- 时间<el-date-picker v-model="selectedTime" type="datetime" placeholder="选择时间" @change="onTimeSelect"></el-date-picker> -->
|
||||
|
||||
<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-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
|
||||
@click="handleDelete">删除</el-button>
|
||||
@ -133,12 +142,43 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listInfo, getInfo, delInfo, addInfo, updateInfo, updateTime } from "@/api/hit/stuInfo";
|
||||
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
name: "Info",
|
||||
data() {
|
||||
@ -212,7 +252,21 @@ export default {
|
||||
updateTime: [
|
||||
{ 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() {
|
||||
@ -228,6 +282,28 @@ export default {
|
||||
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() {
|
||||
this.open = false;
|
||||
@ -352,16 +428,20 @@ export default {
|
||||
this.sendTimeToBackend(this.selectedTime);
|
||||
}
|
||||
},
|
||||
// 向后端发送选定的时间
|
||||
sendTimeToBackend(time) {
|
||||
updateTime(time)
|
||||
.then(response => {
|
||||
this.$message.success('定时任务设置成功');
|
||||
})
|
||||
.catch(error => {
|
||||
this.$message.error('请求失败,请检查网络');
|
||||
});
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
}
|
||||
// 向后端发送选定的时间
|
||||
// sendTimeToBackend(time) {
|
||||
// updateTime(time)
|
||||
// .then(response => {
|
||||
// this.$message.success('定时任务设置成功');
|
||||
// })
|
||||
// .catch(error => {
|
||||
// this.$message.error('请求失败,请检查网络');
|
||||
// });
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -35,28 +35,25 @@
|
||||
<div class="step-box" v-if="active == 0">
|
||||
<div class="step-box-title">
|
||||
<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-form-item>
|
||||
<el-form-item label="姓名" prop="stuName">
|
||||
<el-input v-model="signUpForm.stuName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="stuName">
|
||||
<el-select v-model="signUpForm.sex" filterable allow-create default-first-option
|
||||
placeholder="请选择性别">
|
||||
<el-option key="男" label="男"
|
||||
value="男">
|
||||
<el-select v-model="signUpForm.sex" filterable allow-create default-first-option placeholder="请选择性别">
|
||||
<el-option key="男" label="男" value="男">
|
||||
</el-option>
|
||||
<el-option key="女" label="女"
|
||||
value="女">
|
||||
<el-option key="女" label="女" value="女">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属赛区" prop="division">
|
||||
<el-select v-model="signUpForm.division" filterable allow-create default-first-option
|
||||
placeholder="请选择学校名称">
|
||||
placeholder="请选择学校名称">
|
||||
<el-option v-for="item in dict.type.com_region" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -84,7 +81,7 @@
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input v-model="signUpForm.email"></el-input>
|
||||
</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>
|
||||
</el-form-item>
|
||||
|
||||
@ -94,21 +91,26 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<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 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">
|
||||
个人选拔赛成绩未出,请耐心等待
|
||||
<br>
|
||||
成绩仅供参考,最终选择由指导老师和领队老师做决定
|
||||
</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 }}
|
||||
</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">
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
@ -121,42 +123,54 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<el-form-item label="领队老师" prop="ldTeacherInfo.teacherName">
|
||||
<el-input v-model="preliminaryForm.ldTeacherInfo.teacherName"></el-input>
|
||||
</el-form-item>
|
||||
<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">
|
||||
<el-form-item label="领队老师" prop="ldTeacherInfo.teacherName">
|
||||
<el-input v-model="preliminaryForm.ldTeacherInfo.teacherName"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="团队名称" prop="teamName">
|
||||
<el-input v-model="preliminaryForm.teamName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="团队名称" prop="teamName">
|
||||
<el-input v-model="preliminaryForm.teamName"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<el-form-item label="队员1" prop="teammateOne">
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="队员2" prop="teammateTwo">
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="d-s">
|
||||
<el-form-item label="指导老师1" prop="teacherOne">
|
||||
<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>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="指导老师2" prop="teacherTwo">
|
||||
<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>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="指导老师1" prop="teacherOne">
|
||||
<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>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="指导老师2" prop="teacherTwo">
|
||||
<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>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<el-form-item label="盲样联系人" prop="sampleConcat">
|
||||
@ -167,7 +181,7 @@
|
||||
</el-form-item>
|
||||
</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-form-item>
|
||||
<el-form-item label="附件" prop="uploadFile">
|
||||
@ -183,74 +197,54 @@
|
||||
<div class="step-box" v-if="active == 2">
|
||||
|
||||
<el-descriptions class="margin-top" title="团队信息" border>
|
||||
<el-descriptions-item label="赛区">{{preliminaryForm.divisionLabel}}</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.zdTeacherStr}}</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.sampleAddress}}</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.ldTeacherInfo.teacherName }}</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.sampleNumber }}</el-descriptions-item>
|
||||
<el-descriptions-item label="样品邮寄地址">{{ preliminaryForm.hitRegInfo.sampleAddress }}</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
<el-table
|
||||
:data="preliminaryForm.hitRegInfo.studentUser"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="userName"
|
||||
align="center"
|
||||
label="姓名"
|
||||
>
|
||||
<el-table :data="preliminaryForm.hitRegInfo.studentUser" border style="width: 100%">
|
||||
<el-table-column prop="userName" align="center" label="姓名">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
align="center"
|
||||
label="状态"
|
||||
>
|
||||
<el-table-column prop="status" align="center" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status==0">待确认</span>
|
||||
<span v-if="scope.row.status==1">同意</span>
|
||||
<span v-if="scope.row.status==2">拒绝</span>
|
||||
<span v-if="scope.row.status == 0">待确认</span>
|
||||
<span v-if="scope.row.status == 1">同意</span>
|
||||
<span v-if="scope.row.status == 2">拒绝</span>
|
||||
</template>
|
||||
</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">
|
||||
<div v-if="scope.row.isOwn =='1'">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-check"
|
||||
@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 v-if="scope.row.isOwn == '1'">
|
||||
<el-button size="mini" type="text" icon="el-icon-check"
|
||||
@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>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="step-box" v-if="active == 3">
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="step-box" v-if="active == 3">
|
||||
<div class="step-box-title" style="font-size: 20px;margin-top: 8%">地区选拔赛报名提交成功,请通过大赛通知获取通过信息</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<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">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- main -->
|
||||
<div v-show="currentActive == 0 || currentActive == 1 || currentActive == 5" v-html="pageContext"></div>
|
||||
@ -318,7 +312,7 @@ export default {
|
||||
SwiperSlide,
|
||||
"page-util": PageUtil
|
||||
},
|
||||
dicts: ["sys_user_sex", "school_name","com_region"],
|
||||
dicts: ["sys_user_sex", "school_name", "com_region"],
|
||||
name: 'HelloWorld',
|
||||
|
||||
data() {
|
||||
@ -352,14 +346,15 @@ export default {
|
||||
leaderTeacher: "",
|
||||
teacherOne: "",
|
||||
teacherTwo: "",
|
||||
competition: [],
|
||||
},
|
||||
//队员
|
||||
teammateInfo: {
|
||||
teamId: "",
|
||||
teamName: "",
|
||||
teamMateId: "",
|
||||
isAgreeWith: "",
|
||||
},
|
||||
//队员
|
||||
teammateInfo: {
|
||||
teamId: "",
|
||||
teamName: "",
|
||||
teamMateId: "",
|
||||
isAgreeWith:"",
|
||||
},
|
||||
|
||||
teammateList: [], // 临时用于渲染的队友列表
|
||||
teacherList: [], // 临时用于渲染的导师列表
|
||||
@ -383,51 +378,54 @@ export default {
|
||||
{ required: true, message: "专业名称不能为空", trigger: "blur" }
|
||||
],
|
||||
studentIdCard: [
|
||||
{ required: true, message: "学生证、卡不能为空", trigger: "blur" }
|
||||
{ required: true, message: "学生证/学生卡不能为空", trigger: "blur" }
|
||||
],
|
||||
phoneNumber: [
|
||||
{ required: true, message: "手机号不能为空", trigger: "blur" }
|
||||
],
|
||||
email: [
|
||||
{ required: true, message: "邮箱不能为空", trigger: "blur" }
|
||||
],
|
||||
competition: [
|
||||
{ required: true, message: "赛事不能为空", trigger: "blur" }
|
||||
]
|
||||
|
||||
},
|
||||
preliminaryFormRules:{
|
||||
divisionLabel : [
|
||||
preliminaryFormRules: {
|
||||
divisionLabel: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
schoolName : [
|
||||
schoolName: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
'ldTeacherInfo.teacherName' : [
|
||||
'ldTeacherInfo.teacherName': [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
teamName : [
|
||||
teamName: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
teammateOne : [
|
||||
teammateOne: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
teammateTwo : [
|
||||
teammateTwo: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
teacherOne : [
|
||||
teacherOne: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
teacherTwo : [
|
||||
teacherTwo: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
sampleConcat : [
|
||||
sampleConcat: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
sampleNumber : [
|
||||
sampleNumber: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
sampleAddress : [
|
||||
sampleAddress: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
uploadFile : [
|
||||
uploadFile: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
@ -460,23 +458,27 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
regChoose(data,status){
|
||||
regChoose(data, status) {
|
||||
data.status = status
|
||||
console.log(data)
|
||||
editRegUser(data).then(res=>{
|
||||
this.$modal.msgSuccess("成功")
|
||||
this.fetchRegistrationInformation()
|
||||
})
|
||||
},
|
||||
fileSubmit(){
|
||||
editRegInfo(this.preliminaryForm.hitRegInfo).then(res=>{
|
||||
editRegUser(data).then(res => {
|
||||
this.$modal.msgSuccess("成功")
|
||||
this.fetchRegistrationInformation()
|
||||
})
|
||||
},
|
||||
fileSubmit() {
|
||||
editRegInfo(this.preliminaryForm.hitRegInfo).then(res => {
|
||||
this.$modal.msgSuccess("成功")
|
||||
this.fetchRegistrationInformation()
|
||||
})
|
||||
},
|
||||
onCompetition(){
|
||||
console.log("这是复选框点击事件", this.preliminaryForm.competition);
|
||||
// if(this.preliminaryForm.competition)
|
||||
},
|
||||
//用户信息
|
||||
loadUserInfo() {
|
||||
if(getToken()){
|
||||
if (getToken()) {
|
||||
getHomeUserInfo().then(response => {
|
||||
this.signUpForm.studentId = response.data.userName;
|
||||
this.preliminaryForm = response.data;
|
||||
@ -491,7 +493,9 @@ export default {
|
||||
getStudentInfoByStuId(this.signUpForm.studentId)
|
||||
.then(response => {
|
||||
this.preliminaryForm = response.data;
|
||||
this.updateSignUpForm(response.data);
|
||||
this.preliminaryForm.competition=["1"]
|
||||
|
||||
this.updateSignUpForm(response.data);
|
||||
|
||||
console.log('报名信息:', this.signUpForm);
|
||||
})
|
||||
@ -501,10 +505,10 @@ export default {
|
||||
this.preliminaryForm.division = data.division;
|
||||
this.preliminaryForm.divisionLabel = data.divisionLabel;
|
||||
this.preliminaryForm.ldTeacherInfo = data.ldTeacherInfo;
|
||||
if(data.ldTeacherInfo){
|
||||
if (data.ldTeacherInfo) {
|
||||
this.preliminaryForm.leaderTeacher = data.ldTeacherInfo.userId;
|
||||
}else{
|
||||
this.preliminaryForm.ldTeacherInfo ={}
|
||||
} else {
|
||||
this.preliminaryForm.ldTeacherInfo = {}
|
||||
}
|
||||
|
||||
this.preliminaryForm.schoolName = data.schoolName;
|
||||
@ -512,25 +516,25 @@ export default {
|
||||
this.preliminaryForm.tdStudentList = data.tdStudentList;
|
||||
this.preliminaryForm.zdTeacherStr = data.zdTeacherStr;
|
||||
this.active = 1;
|
||||
if (data.zdStatus=='0'){
|
||||
if (data.zdStatus == '0') {
|
||||
this.active = 3;
|
||||
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
||||
}
|
||||
else if (data.zdStatus=='1'){
|
||||
else if (data.zdStatus == '1') {
|
||||
this.active = 4;
|
||||
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
||||
if (data.hitRegInfo.dsFile){
|
||||
if (data.hitRegInfo.dsFile) {
|
||||
this.active = 5;
|
||||
}
|
||||
} else if (data.zdStatus=='9'){
|
||||
} else if (data.zdStatus == '9') {
|
||||
this.active = 2;
|
||||
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
||||
}else if(data.id== null){
|
||||
} else if (data.id == null) {
|
||||
this.active = 0;
|
||||
}else{
|
||||
} else {
|
||||
this.signUpForm = data;
|
||||
}
|
||||
console.log(data,433, this.preliminaryForm)
|
||||
console.log(data, 433, this.preliminaryForm)
|
||||
|
||||
|
||||
},
|
||||
@ -590,10 +594,10 @@ export default {
|
||||
}
|
||||
},
|
||||
toRegister() {
|
||||
if(!getToken()){
|
||||
if (!getToken()) {
|
||||
this.$modal.msgWarning("报名请先登录系统!")
|
||||
|
||||
}else{
|
||||
} else {
|
||||
if (this.registerStatus === '1') this.currentActive = 6;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user