竞赛管理

beetlsql3-dev
xuliangtong 2 years ago
parent 0c9f0335f6
commit c7b689333e

@ -690,7 +690,7 @@ public class CompetitionService extends CoreBaseService<Competition>{
Long resourcesApplicationId = null;
UniversitiesCollegesJurisdictionExperimentalSystem uSystem = (UniversitiesCollegesJurisdictionExperimentalSystem)platformService.getOther();
if(((Integer)1).equals(uSystem.getType())){
if(uSystem != null && 1==uSystem.getType()){
resourcesApplicationId = uSystem.getTypeId();
}

@ -204,11 +204,11 @@ public class CompetitionController{
@Function("competition.add")
@ResponseBody
public JsonResult add(CompetitionQuery competitionQuery, @SCoreUser CoreUser coreUser){
Teacher teacher = new Teacher();
teacher.setUserId(coreUser.getId());
teacher = teacherService.getValues(teacher).get(0);
// Teacher teacher = new Teacher();
// teacher.setUserId(coreUser.getId());
// teacher = teacherService.getValues(teacher).get(0);
competitionQuery.setTeacherId(teacher.getTeacherId());
competitionQuery.setTeacherId(coreUser.getId());
competitionQuery.setUserId(coreUser.getId());
competitionQuery.setOrgId(coreUser.getOrgId());

@ -225,31 +225,14 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
$(".syb").hide();
$(".xyb").show();
$(".sbx").show();
}else if(sign == 1 || sign == 2 || sign == 3 || sign == 4){
}else if(sign == 1 || sign == 2 || sign == 3 || sign == 4 || sign == 5){
$(".syb").show();
$(".xyb").show();
$(".sbx").show();
if(sign == 2){
if(competitionType_ == 1){ //个人赛
$(".competitionType_1").show();
$(".competitionType_2").hide();
loadCompetitionUser(0);
}else if(competitionType_ == 2){ //团队赛
$(".competitionType_1").hide();
$(".competitionType_2").show();
loadCompetitionUser(2);
}
}else if(sign == 3){
loadDSRW();
}
}else if(sign == 5){
$(".syb").show();
$(".xyb").hide();
$(".sbx").show();
loadTeacherTable(1);
}else{
if(sign == 6 && $.isEmpty(editor2)){
if(sign == 5 && $.isEmpty(editor2)){
if(!$.isEmpty($("input[name='competitionId']").val())){
var ret = Common.getAjax("/jlw/competition/view.json",{competitionId:$("input[name='competitionId']").val(),part: 7});
if(ret.code == 0){
@ -260,10 +243,7 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
}
editor2 = Lib.editorMd("competitionAwardList");
}
if(sign == 7 && $.isEmpty(editor3)){
editor3 = Lib.editorMd("competitionNewsContent");
}
if(sign == 8 && $.isEmpty(editor4)){
if(sign == 4 && $.isEmpty(editor4)){
if(!$.isEmpty($("input[name='competitionId']").val())){
var ret = Common.getAjax("/jlw/competition/view.json",{competitionId:$("input[name='competitionId']").val(),part: 9});
if(ret.code == 0){
@ -274,6 +254,14 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
}
editor4 = Lib.editorMd("competitionCommonProblem");
}
}else if(sign == 6){
$(".syb").show();
$(".xyb").hide();
$(".sbx").show();
if($.isEmpty(editor3)) {
editor3 = Lib.editorMd("competitionNewsContent");
}
}else{
$(".sbx").hide();
}
if(sign == 2 || sign == 5){//上一步、保存、下一步的位置
@ -1692,7 +1680,7 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
var param = {
competitionId:($("input[name='competitionId']").val() || '')
}
if(i == 0){//大赛概况
if(i === 0){//大赛概况
var competitionName = $("input[name='competitionName']").val();
// if($.isEmpty(competitionName)){
// layer.msg("请填写大赛名称!", {
@ -1743,7 +1731,7 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
param.competitionFinalsLimit = competitionFinalsLimit;
param.competitionGeneralization = competitionGeneralization;
param.competitionGeneralizationOriginal = competitionGeneralizationOriginal;
}else if( i == 1){//竞赛时间
}else if( i === 1){//竞赛时间
var competitionEnrollStartTime = $("input[name='competitionEnrollStartTime']").val();
var competitionEnrollEndTime = $("input[name='competitionEnrollEndTime']").val();
var competitionContestStartTime = $("input[name='competitionContestStartTime']").val();
@ -1759,30 +1747,7 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
param.competitionTaskThreeStartTime = competitionTaskThreeStartTime;
param.competitionTaskThreeEndTime = competitionTaskThreeEndTime;
}else if( i == 2){//参赛学员
var competitionStudentsJson = new Array();
$.each(studentTempMap,function (k,v){
competitionStudentsJson.push(v);
});
var classIds = $("input[name='classIds']:checked").val();//是否允许自主报名 1是 2
if(classIds == 1){
if(treeList[1].getValue('value').length <= 0){
layer.msg("请选择可自主报名的班级!", {
offset: ['50%'],
icon: 2,
time: 1500 //2秒关闭如果不配置默认是3秒
});
return ;
}else {
param.classIds = treeList[1].getValue('value').join(",");//班级范围IDs(值为空时则不能自主报名)
param.excludedStudentIds = treeList[4].getValue('value').join(",");//班级范围IDs(值为空时则不能自主报名)
}
}else {
param.classIds = -1;
param.excludedStudentIds = - 1;
}
param.competitionStudentsJson = JSON.stringify(competitionStudentsJson);
}else if( i == 3){//大赛任务
}else if( i === 2){//大赛任务
param.ct1QuestionIds = $("input[name='ct1QuestionIds']").val();//大赛任务一选中的题目
param.ct2QuestionIds = $("input[name='ct2QuestionIds']").val(); //大赛任务二选中的题目
param.ct1SingleChoiceSource = $("input[name='dx_fz']").val();//大赛任务一 单选题分值
@ -1806,14 +1771,12 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
}
});
param.ct2QuestionSources = ct2QuestionSources; //大赛任务二选中的题目 步骤的分值
}else if( i == 4){//成绩权重
}else if( i === 3){//成绩权重
var competition_weight_1 = $("input[name='competition_weight_1']").val();//客观题
var competition_weight_2 = $("input[name='competition_weight_2']").val();//竞赛案例
var competition_weight_3 = $("input[name='competition_weight_3']").val();//汇报答辩
param.competitionWeight = competition_weight_1 + "," + competition_weight_2 + ","+competition_weight_3;//成绩权重
param.competitionDefenceScoreStandard = $("#editCDSFrame .layui-input-block ").html();//评分标准
}else if( i == 5){//大赛评委
param.competitionJudgeIds = tempTeacherIds;
}
submitInfo(param,t);
}

@ -81,13 +81,11 @@
<ul class="layui-tab-title">
<li lay-id="0" class="layui-this">大赛概况</li>
<li lay-id="1" >竞赛时间</li>
<li lay-id="2" >参赛学员</li>
<li lay-id="3" >大赛任务</li>
<li lay-id="4" >成绩权重</li>
<li lay-id="5" >大赛评委</li>
<li lay-id="6" class="hjmd" ${competition.competitionId==null?'style="display:none"':""}>获奖名单</li>
<li lay-id="7" class="dsdt" ${competition.competitionId==null?'style="display:none"':""}>大赛动态</li>
<li lay-id="8" class="cjwt" ${competition.competitionId==null?'style="display:none"':""}>常见问题</li>
<li lay-id="2" >大赛任务</li>
<li lay-id="3" >成绩权重</li>
<li lay-id="4" class="cjwt">常见问题</li>
<li lay-id="5" class="hjmd">获奖名单</li>
<li lay-id="6" class="dsdt">大赛动态</li>
</ul>
<div class="layui-tab-content">
<!--大赛概况-->
@ -213,75 +211,6 @@
</div>
</div>
</div>
<!--参赛学员-->
<div class="layui-tab-item csyh">
<div class="layui-row" style="width: 60%;min-width: 1000px;">
<div class="layui-form-item" style="background-color: #f9f9f9;padding: 5px 10px 5px 0;line-height: 36px;">
<div style="float: left;margin: 3px 20px 0 18px;width: 112px;text-align: right;">自主报名:</div>
<div style="float: left;width: 800px;height: 45px;">
<input type="radio" name="classIds" value="1" title="允许" lay-filter="zzbm">
<input type="radio" name="classIds" value="2" title="不允许" checked lay-filter="zzbm">
</div>
<div style="float: left;margin: 3px 20px 0 18px;display: none;width: 112px;text-align: right;line-height:65px;" class="demo1">允许报名班级:</div>
<div style="float: right;width: 840px;margin-bottom:5px;" class="demo1">
<div id="demo1" class="xm-select-demo"></div>
</div>
<div style="float: left;margin: 3px 20px 0 18px;display: none;width: 112px;text-align: right;line-height:65px;" class="demo4">不允许报名学生:</div>
<div style="float: right;width: 840px;" class="demo4">
<div id="demo4" class="xm-select-demo"></div>
</div>
</div>
</div>
<div style="width: 60%;min-width: 1000px;" class="competitionType_1">
<div class="layui-row" style="background-color: #f9f9f9;padding: 5px 20px;line-height: 36px;">
<button type="button" class="layui-btn bg_button layui-btn-sm see_competition_user">选择参赛人</button>
<a class="del_competition_user" style="color: #1E9FFF;cursor: pointer;margin-left:20px;">移除</a>
<a style="float: right;color: #73a2f8;" class="export_gr"><i style="font-size: 21px;" class="layui-icon">&#xe67d;</i>导出</a>
<button type="button" style="float: right;margin-right: 20px;margin-top: 4px;" class="layui-btn bg_button layui-btn-sm select_student">查询</button>
<input type="text" style="float: right;width: 200px;margin-right: 20px;" name="studentName" placeholder="姓名" autocomplete="off" class="layui-input">
</div>
<table id="studentTable" lay-filter="studentTable"></table>
</div>
<div id="student_no_dialog" style="display: none;padding: 10px 20px 0;">
<div class="layui-row" style="background-color: #f9f9f9;padding: 5px 20px;line-height: 36px;">
<div class="layui-inline" style="margin-bottom:0;width: 440px;">
<label class="layui-form-label" style="width: 40px;">班级</label>
<div class="layui-input-block" style="margin-left:70px;">
<div id="demo3" class="xm-select-demo"></div>
</div>
</div>
<button type="button" style="float: right;margin-top: 4px;" class="layui-btn bg_button layui-btn-sm select_student_no">查询</button>
<input type="text" style="float: right;width: 200px;margin-right: 20px;" name="studentName_no" placeholder="姓名" autocomplete="off" class="layui-input">
</div>
<table id="studentTable_no" lay-filter="studentTable_no"></table>
</div>
<div style="width: 60%;min-width: 1000px;" class="competitionType_2">
<div class="layui-row" style="background-color: #f9f9f9;padding: 5px 20px;line-height: 36px;">
<button type="button" class="layui-btn bg_button layui-btn-sm see_dz">选择队长</button>
<a class="del_td" style="color: #1E9FFF;cursor: pointer;margin-left:20px;">移除</a>
<a style="float: right;color: #73a2f8;" class="export_td"><i style="font-size: 21px;" class="layui-icon">&#xe67d;</i>导出</a>
<button type="button" style="float: right;margin-top: 4px;margin-right: 20px;" class="layui-btn bg_button layui-btn-sm select_student_td">查询</button>
<input type="text" style="float: right;width: 200px;margin-right: 20px;" name="studentName_td" placeholder="姓名/学号" autocomplete="off" class="layui-input">
</div>
<table id="studentTable_td" lay-filter="studentTable_td"></table>
</div>
<!--选队长-->
<div id="student_dz_no_dialog" style="display: none;padding: 10px 20px 0;">
<div class="layui-row" style="background-color: #f9f9f9;padding: 5px 20px;line-height: 36px;">
<div class="layui-inline" style="margin-bottom:0;width: 440px;">
<label class="layui-form-label" style="width: 40px;">班级</label>
<div class="layui-input-block" style="margin-left:70px;">
<div id="demo2" class="xm-select-demo"></div>
</div>
</div>
<button type="button" style="float: right;margin-top: 4px;" class="layui-btn bg_button layui-btn-sm search_dz">查询</button>
<input type="text" style="float: right;width: 200px;margin-right: 20px;" name="title" placeholder="姓名/学号" autocomplete="off" class="layui-input">
</div>
<table id="studentTable_no_dz" lay-filter="studentTable_no_dz"></table>
</div>
</div>
<!--大赛任务-->
<div class="layui-tab-item" id="dsrw_view">
@ -366,25 +295,29 @@
</div>
</div>
</div>
<!--大赛评委-->
<div class="layui-tab-item dspw">
<div style="width: 60%;min-width: 1000px;">
<div class="layui-row" style="background-color: #f9f9f9;padding: 5px 20px;line-height: 36px;">
<button type="button" class="layui-btn layui-btn-sm bg_button select_pw">添加评委</button>
<a class="del_pw" style="color: #1E9FFF;cursor: pointer;margin-left:20px;">移除</a>
<a style="float: right;color: #73a2f8;" class="export_pw"><i style="font-size: 21px;" class="layui-icon">&#xe67d;</i>导出</a>
<button type="button" style="float: right;margin-right: 20px;margin-top: 4px;" class="layui-btn bg_button layui-btn-sm search_t">查询</button>
<input type="text" style="float: right;width: 200px;margin-right: 20px;" name="teacherName" placeholder="教师姓名" autocomplete="off" class="layui-input">
<!-- 常见问题 competitionCommonProblem-->
<div class="layui-tab-item">
<div style="min-width: 1200px;">
<div class="layui-row">
<div class="layui-inline" style="width: 96%;">
<label class="layui-form-label">常见问题:</label>
<div class="layui-input-block">
<div id="competitionCommonProblem">
<!-- competitionCommonProblem-->
<textarea
style="display:none;"></textarea>
</div>
</div>
</div>
</div>
<table id="teacherTable" lay-filter="teacherTable"></table>
</div>
<div id="teacher_no_dialog" style="display: none;padding: 10px 20px 0;">
<div class="layui-row" style="background-color: #f9f9f9;padding: 5px 20px;line-height: 36px;">
<input type="text" style="float: left;width: 200px;margin-right: 20px;" name="teacherName_no" placeholder="教师姓名" autocomplete="off" class="layui-input">
<button type="button" style="float: left;margin-right: 20px;margin-top: 4px;" class="layui-btn bg_button layui-btn-sm search_t_no">查询</button>
<div class="layui-row">
<div class="layui-inline" style="width: 96%;">
<label class="layui-form-label"></label>
<div class="layui-input-block">
<button type="button" class="layui-btn bg_button" id="addCommonProblem">保存</button>
</div>
</div>
</div>
<table id="teacherTable_no" lay-filter="teacherTable_no"></table>
</div>
</div>
<!--获奖名单 competitionAwardList-->
@ -485,31 +418,7 @@
</div>
</div>
</div>
<!-- 常见问题 competitionCommonProblem-->
<div class="layui-tab-item">
<div style="min-width: 1200px;">
<div class="layui-row">
<div class="layui-inline" style="width: 96%;">
<label class="layui-form-label">常见问题:</label>
<div class="layui-input-block">
<div id="competitionCommonProblem">
<!-- competitionCommonProblem-->
<textarea
style="display:none;"></textarea>
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-inline" style="width: 96%;">
<label class="layui-form-label"></label>
<div class="layui-input-block">
<button type="button" class="layui-btn bg_button" id="addCommonProblem">保存</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="layui-row sbx" style="margin-left: 190px;">
<button type="button" class="layui-btn layui-btn-primary syb" style="display: none;">上一步</button>

Loading…
Cancel
Save