更新
This commit is contained in:
parent
87c5b4df60
commit
b9da200501
@ -98,6 +98,9 @@ public class HitCompetitionStudentInfo implements Serializable {
|
|||||||
@ApiModelProperty(value = "是否被选为参加初赛人员 (0: 否, 1: 是)")
|
@ApiModelProperty(value = "是否被选为参加初赛人员 (0: 否, 1: 是)")
|
||||||
private Boolean isPreliminary;
|
private Boolean isPreliminary;
|
||||||
|
|
||||||
|
@Excel(name = "国籍",dictType = "com_nationality")
|
||||||
|
private String nationality;
|
||||||
|
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
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 java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -100,7 +101,10 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
|||||||
//当前教师的学校
|
//当前教师的学校
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
HitRegistrationTeachInfo hitRegistrationTeachInfo = hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoByUserIdNoYear(loginUser.getUserId());
|
HitRegistrationTeachInfo hitRegistrationTeachInfo = hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoByUserIdNoYear(loginUser.getUserId());
|
||||||
if (ObjectUtils.isNotEmpty(hitRegistrationTeachInfo) && hitRegistrationTeachInfo.getStatus().equals("1")) {
|
if (ObjectUtils.isNotEmpty(hitRegistrationTeachInfo)) {
|
||||||
|
if (!hitRegistrationTeachInfo.getStatus().equals("1")) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
hitCompetitionStudentInfo.setSchoolName(hitRegistrationTeachInfo.getSchoolName());
|
hitCompetitionStudentInfo.setSchoolName(hitRegistrationTeachInfo.getSchoolName());
|
||||||
}
|
}
|
||||||
PageUtils.startPage();
|
PageUtils.startPage();
|
||||||
@ -294,6 +298,12 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
|||||||
.and(it -> {
|
.and(it -> {
|
||||||
it.isNull(HitCompetitionStudentInfo::getHitRegId).or().eq(HitCompetitionStudentInfo::getHitRegId, "");
|
it.isNull(HitCompetitionStudentInfo::getHitRegId).or().eq(HitCompetitionStudentInfo::getHitRegId, "");
|
||||||
});
|
});
|
||||||
|
//判断当前学生是否是中国
|
||||||
|
if (hitCompetitionStudentInfo.getNationality().equals("中国")) {
|
||||||
|
queryWrapper3.eq(HitCompetitionStudentInfo::getNationality, "中国");
|
||||||
|
} else {
|
||||||
|
queryWrapper3.ne(HitCompetitionStudentInfo::getNationality, "中国");
|
||||||
|
}
|
||||||
List<HitCompetitionStudentInfo> studentInfos = this.list(queryWrapper3);
|
List<HitCompetitionStudentInfo> studentInfos = this.list(queryWrapper3);
|
||||||
hitCompetitionStudentInfo.setTdStudentList(studentInfos);
|
hitCompetitionStudentInfo.setTdStudentList(studentInfos);
|
||||||
//查询是否存在已组队团队
|
//查询是否存在已组队团队
|
||||||
|
@ -89,6 +89,7 @@
|
|||||||
<if test="studentIdCard != null">student_id_card,</if>
|
<if test="studentIdCard != null">student_id_card,</if>
|
||||||
<if test="trialsScore != null">trials_score,</if>
|
<if test="trialsScore != null">trials_score,</if>
|
||||||
<if test="isPreliminary != null">is_preliminary,</if>
|
<if test="isPreliminary != null">is_preliminary,</if>
|
||||||
|
<if test="nationality != null">nationality,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="sex != null">sex,</if>
|
<if test="sex != null">sex,</if>
|
||||||
<if test="delFlag != null">del_flag,</if>
|
<if test="delFlag != null">del_flag,</if>
|
||||||
@ -111,6 +112,7 @@
|
|||||||
<if test="studentIdCard != null">#{studentIdCard},</if>
|
<if test="studentIdCard != null">#{studentIdCard},</if>
|
||||||
<if test="trialsScore != null">#{trialsScore},</if>
|
<if test="trialsScore != null">#{trialsScore},</if>
|
||||||
<if test="isPreliminary != null">#{isPreliminary},</if>
|
<if test="isPreliminary != null">#{isPreliminary},</if>
|
||||||
|
<if test="nationality != null">#{nationality},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="sex != null">#{sex},</if>
|
<if test="sex != null">#{sex},</if>
|
||||||
<if test="delFlag != null">#{delFlag},</if>
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
@ -138,6 +140,7 @@
|
|||||||
<if test="studentIdCard != null">student_id_card = #{studentIdCard},</if>
|
<if test="studentIdCard != null">student_id_card = #{studentIdCard},</if>
|
||||||
<if test="trialsScore != null">trials_score = #{trialsScore},</if>
|
<if test="trialsScore != null">trials_score = #{trialsScore},</if>
|
||||||
<if test="isPreliminary != null">is_preliminary = #{isPreliminary},</if>
|
<if test="isPreliminary != null">is_preliminary = #{isPreliminary},</if>
|
||||||
|
<if test="nationality != null">nationality = #{nationality},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="sex != null">sex = #{sex},</if>
|
<if test="sex != null">sex = #{sex},</if>
|
||||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
@ -269,7 +269,7 @@ export default {
|
|||||||
importTemplate() {
|
importTemplate() {
|
||||||
let filename = '学校模板_'
|
let filename = '学校模板_'
|
||||||
const url = 'school/exportSchoolTemplate'
|
const url = 'school/exportSchoolTemplate'
|
||||||
filename = '学生成绩模板_'
|
filename = '学校导入模板_'
|
||||||
this.download(url, {}, filename + new Date().getTime() + '.xlsx')
|
this.download(url, {}, filename + new Date().getTime() + '.xlsx')
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
@ -87,6 +87,11 @@
|
|||||||
<el-table-column label="所属赛区" align="center" prop="division" />
|
<el-table-column label="所属赛区" align="center" prop="division" />
|
||||||
<el-table-column label="手机号" align="center" prop="phoneNumber" />
|
<el-table-column label="手机号" align="center" prop="phoneNumber" />
|
||||||
<el-table-column label="邮箱" align="center" prop="email" />
|
<el-table-column label="邮箱" align="center" prop="email" />
|
||||||
|
<el-table-column label="国籍" align="center" prop="nationality" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.com_nationality" :value="scope.row.nationality"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<!-- <el-table-column-->
|
<!-- <el-table-column-->
|
||||||
<!-- label="赛道"-->
|
<!-- label="赛道"-->
|
||||||
<!-- align="center"-->
|
<!-- align="center"-->
|
||||||
@ -167,6 +172,16 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
<!-- <el-input v-model="form.division" placeholder="请输入所属赛区" />-->
|
<!-- <el-input v-model="form.division" placeholder="请输入所属赛区" />-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="国籍" label-width="80px" prop="nationality">
|
||||||
|
<el-select v-model="form.nationality" filterable allow-create default-first-option
|
||||||
|
@change="changeNationality"
|
||||||
|
placeholder="请选择国籍"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in dict.type.com_nationality" :key="item.value" :label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<!-- <el-form-item label="手机号" prop="phoneNumber">-->
|
<!-- <el-form-item label="手机号" prop="phoneNumber">-->
|
||||||
<!-- <el-input v-model="form.phoneNumber" placeholder="请输入手机号" />-->
|
<!-- <el-input v-model="form.phoneNumber" placeholder="请输入手机号" />-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
@ -233,7 +248,7 @@ import {listInfo, getInfo, delInfo, addInfo, updateInfo, updateTime, byId, editI
|
|||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
export default {
|
export default {
|
||||||
name: "Info",
|
name: "Info",
|
||||||
dicts: ["sys_user_sex", "school_name", "com_region","com_racetrack"],
|
dicts: ["sys_user_sex", "school_name", "com_region","com_racetrack","com_nationality"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedTime: null, // 用户选择的个人赛截止时间
|
selectedTime: null, // 用户选择的个人赛截止时间
|
||||||
|
@ -59,6 +59,17 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="国籍" label-width="80px" prop="nationality">
|
||||||
|
<el-select v-model="signUpForm.nationality" filterable default-first-option
|
||||||
|
@change="changeNationality"
|
||||||
|
placeholder="请选择国籍"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in dict.type.com_nationality" :key="item.value" :label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="所属赛区" prop="division">
|
<el-form-item label="所属赛区" prop="division">
|
||||||
<!-- 把这段html摆放到正确的位置,就完成了tooltip提示 -->
|
<!-- 把这段html摆放到正确的位置,就完成了tooltip提示 -->
|
||||||
<span>
|
<span>
|
||||||
@ -114,19 +125,6 @@
|
|||||||
<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>
|
||||||
|
|
||||||
|
|
||||||
<!-- <el-form-item label="国籍" label-width="80px" prop="nationality">-->
|
|
||||||
<!-- <el-select v-model="signUpForm.nationality" filterable allow-create default-first-option-->
|
|
||||||
<!-- @change="changeNationality"-->
|
|
||||||
<!-- placeholder="请选择国籍"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-option v-for="item in dict.type.com_nationality" :key="item.value" :label="item.label"-->
|
|
||||||
<!-- :value="item.value"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-option>-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" style="z-index: 99999" @click="trialsSubmitForm">提交</el-button>
|
<el-button type="primary" style="z-index: 99999" @click="trialsSubmitForm">提交</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -173,6 +171,7 @@
|
|||||||
v-for="item in dict.type.com_racetrack"
|
v-for="item in dict.type.com_racetrack"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.value"
|
:label="item.value"
|
||||||
|
:disabled="item.disabled"
|
||||||
>
|
>
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
@ -385,6 +384,17 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="国籍" label-width="80px" prop="nationality">
|
||||||
|
<el-select v-model="studentForm.nationality" filterable default-first-option
|
||||||
|
@change="changeNationality"
|
||||||
|
placeholder="请选择国籍"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in dict.type.com_nationality" :key="item.value" :label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="所属赛区" prop="division">
|
<el-form-item label="所属赛区" prop="division">
|
||||||
<el-select v-model="studentForm.division" filterable allow-create default-first-option
|
<el-select v-model="studentForm.division" filterable allow-create default-first-option
|
||||||
placeholder="请选择所属赛区"
|
placeholder="请选择所属赛区"
|
||||||
@ -433,7 +443,7 @@
|
|||||||
<el-tab-pane label="团队信息" name="edit-team" v-if="teamForm" label-position="left">
|
<el-tab-pane label="团队信息" name="edit-team" v-if="teamForm" label-position="left">
|
||||||
<el-form :model="teamForm" ref="form" label-position="left" label-width="100px"
|
<el-form :model="teamForm" ref="form" label-position="left" label-width="100px"
|
||||||
:rules="teamFormRules">
|
:rules="teamFormRules">
|
||||||
<h3>修改团队信息</h3>
|
<h3>修改团队信息</h3><span style="color:red;" v-if="!studentForm.isUpdateTeam">报名时间已超过七天 无法修改</span>
|
||||||
<el-form-item label="团队名称" prop="teamName">
|
<el-form-item label="团队名称" prop="teamName">
|
||||||
<el-input disabled v-model="teamForm.teamName" style="width: 300px;"></el-input>
|
<el-input disabled v-model="teamForm.teamName" style="width: 300px;"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -464,6 +474,7 @@
|
|||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.value"
|
:label="item.value"
|
||||||
:checked="checked" @change="checked=!checked"
|
:checked="checked" @change="checked=!checked"
|
||||||
|
:disabled="item.disabled"
|
||||||
>
|
>
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
@ -571,7 +582,7 @@ export default {
|
|||||||
SwiperSlide,
|
SwiperSlide,
|
||||||
'page-util': PageUtil
|
'page-util': PageUtil
|
||||||
},
|
},
|
||||||
dicts: ['sys_user_sex', 'school_name', 'com_region', 'com_racetrack'],
|
dicts: ['sys_user_sex', 'school_name', 'com_region', 'com_racetrack','com_nationality'],
|
||||||
name: 'HelloWorld',
|
name: 'HelloWorld',
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@ -614,6 +625,7 @@ export default {
|
|||||||
trialsScore: '',
|
trialsScore: '',
|
||||||
isPreliminary: '',
|
isPreliminary: '',
|
||||||
racetrack: '',
|
racetrack: '',
|
||||||
|
nationality: '',
|
||||||
// racetrackArr: []
|
// racetrackArr: []
|
||||||
},
|
},
|
||||||
showCompetition: false,
|
showCompetition: false,
|
||||||
@ -672,7 +684,10 @@ export default {
|
|||||||
],
|
],
|
||||||
competition: [
|
competition: [
|
||||||
{required: true, message: '赛事不能为空', trigger: 'blur'}
|
{required: true, message: '赛事不能为空', trigger: 'blur'}
|
||||||
]
|
],
|
||||||
|
nationality: [
|
||||||
|
{required: true, message: '国籍不能为空', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
preliminaryFormRules: {
|
preliminaryFormRules: {
|
||||||
@ -803,9 +818,6 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
console.log('组件创建')
|
console.log('组件创建')
|
||||||
// 使用 JSON 穿透 Observer 查看原始值
|
// 使用 JSON 穿透 Observer 查看原始值
|
||||||
console.log('获取字典值', this.dict.type.com_racetrack)
|
|
||||||
console.log('字典原始数据:', JSON.parse(JSON.stringify(this.dict.type.com_racetrack)))
|
|
||||||
console.log('当前值原始数据:', JSON.parse(JSON.stringify(this.preliminaryForm.racetrackArr)))
|
|
||||||
// 页面加载完毕调用
|
// 页面加载完毕调用
|
||||||
this.initPageData()
|
this.initPageData()
|
||||||
// 在组件挂载后添加滚动监听
|
// 在组件挂载后添加滚动监听
|
||||||
@ -889,6 +901,23 @@ export default {
|
|||||||
}
|
}
|
||||||
console.log('报名后的数据', this.preliminaryForm)
|
console.log('报名后的数据', this.preliminaryForm)
|
||||||
this.preliminaryForm.competition = []
|
this.preliminaryForm.competition = []
|
||||||
|
// 如果nationality不是中国就禁用
|
||||||
|
if (this.preliminaryForm.nationality !== '中国') {
|
||||||
|
console.log('赛道', this.dict.type.com_racetrack)
|
||||||
|
this.dict.type.com_racetrack.map(item => {
|
||||||
|
if (item.value == '3') {
|
||||||
|
item.disabled = false
|
||||||
|
} else {
|
||||||
|
item.disabled = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
this.dict.type.com_racetrack.map(item => {
|
||||||
|
if (item.value == '3') {
|
||||||
|
item.disabled = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.updateSignUpForm(response.data)
|
this.updateSignUpForm(response.data)
|
||||||
|
Loading…
Reference in New Issue
Block a user