Merge remote-tracking branch 'origin/beetlsql3-dev' into beetlsql3-dev

# Conflicts:
#	web/src/main/resources/templates/jlw/competition/add.html
beetlsql3-dev
姚丹ab 2 years ago
commit dec0eed37b

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -27073,7 +27073,6 @@ create table resources_application_course
resources_application_course_id bigint unsigned not null auto_increment comment 'ID', resources_application_course_id bigint unsigned not null auto_increment comment 'ID',
resources_application_id bigint comment '应用管理ID', resources_application_id bigint comment '应用管理ID',
course_info_id bigint comment '课程配置ID', course_info_id bigint comment '课程配置ID',
course_label_id bigint comment '标签ID',
primary key (resources_application_course_id) primary key (resources_application_course_id)
) )
auto_increment = 1 auto_increment = 1
@ -27084,9 +27083,6 @@ COLLATE = utf8_general_ci;
alter table resources_application_course comment '应用管理 和 课程 关联'; alter table resources_application_course comment '应用管理 和 课程 关联';
INSERT INTO `tzcj`.`resources_application_course` (`resources_application_course_id`, `resources_application_id`, `course_info_id`, `course_label_id`) VALUES (2, 2, 3, 2);
-- ---------------------------- -- ----------------------------
-- Table structure for resources_competition -- Table structure for resources_competition
-- ---------------------------- -- ----------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 KiB

@ -30,11 +30,6 @@ public class ResourcesApplicationCourse extends BaseEntity{
private Long courseInfoId ; private Long courseInfoId ;
//标签ID
@Dict(type="course_label.course_label_name.course_label_status=1")
private Long courseLabelId ;
public ResourcesApplicationCourse(){ public ResourcesApplicationCourse(){
} }
@ -77,18 +72,5 @@ public class ResourcesApplicationCourse extends BaseEntity{
this.courseInfoId = courseInfoId; this.courseInfoId = courseInfoId;
} }
/**ID
*@return
*/
public Long getCourseLabelId(){
return courseLabelId;
}
/**ID
*@param courseLabelId
*/
public void setCourseLabelId(Long courseLabelId){
this.courseLabelId = courseLabelId;
}
} }

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

@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.constraints.NotNull;
import java.io.*; import java.io.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -96,7 +97,7 @@ public class CourseInfoService extends CoreBaseService<CourseInfo>{
insert(courseInfo); insert(courseInfo);
//删除以前的 //删除以前的
resourcesApplicationCourseDao.deleteResourcesApplicationCourseByIds(courseInfo.getCourseInfoId()+""); deleteByCourseInfoId(courseInfo.getCourseInfoId());
List<ResourcesApplicationCourse> resourcesApplicationCourseList = new ArrayList<>(); List<ResourcesApplicationCourse> resourcesApplicationCourseList = new ArrayList<>();
@ -117,6 +118,13 @@ public class CourseInfoService extends CoreBaseService<CourseInfo>{
} }
/**
*
*/
public void deleteByCourseInfoId(@NotNull(message = "课程ID不能为空") Long courseInfoId) {
resourcesApplicationCourseDao.createLambdaQuery().andEq(ResourcesApplicationCourse::getCourseInfoId, courseInfoId).delete();
}
public boolean edit(CourseInfoQuery courseInfoQuery){ public boolean edit(CourseInfoQuery courseInfoQuery){
@ -126,7 +134,7 @@ public class CourseInfoService extends CoreBaseService<CourseInfo>{
if(StringUtils.isNotBlank(courseInfoQuery.getResourcesApplicationIds())){ if(StringUtils.isNotBlank(courseInfoQuery.getResourcesApplicationIds())){
//删除以前的 //删除以前的
resourcesApplicationCourseDao.deleteResourcesApplicationCourseByIds(courseInfo.getCourseInfoId()+""); deleteByCourseInfoId(courseInfo.getCourseInfoId());
List<ResourcesApplicationCourse> resourcesApplicationCourseList = new ArrayList<>(); List<ResourcesApplicationCourse> resourcesApplicationCourseList = new ArrayList<>();
String resourcesApplicationIds[] = courseInfoQuery.getResourcesApplicationIds().split(","); String resourcesApplicationIds[] = courseInfoQuery.getResourcesApplicationIds().split(",");

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

@ -6,7 +6,9 @@ import com.ibeetl.admin.core.annotation.Function;
import com.ibeetl.admin.core.entity.CoreUser; import com.ibeetl.admin.core.entity.CoreUser;
import com.ibeetl.admin.core.file.FileService; import com.ibeetl.admin.core.file.FileService;
import com.ibeetl.admin.core.web.JsonResult; import com.ibeetl.admin.core.web.JsonResult;
import com.ibeetl.jlw.entity.CourseInfo;
import com.ibeetl.jlw.entity.ResourcesApplicationCourse; import com.ibeetl.jlw.entity.ResourcesApplicationCourse;
import com.ibeetl.jlw.service.CourseInfoService;
import com.ibeetl.jlw.service.ResourcesApplicationCourseService; import com.ibeetl.jlw.service.ResourcesApplicationCourseService;
import com.ibeetl.jlw.web.query.ResourcesApplicationCourseQuery; import com.ibeetl.jlw.web.query.ResourcesApplicationCourseQuery;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -39,6 +41,7 @@ public class ResourcesApplicationCourseController{
@Resource private ResourcesApplicationCourseService resourcesApplicationCourseService; @Resource private ResourcesApplicationCourseService resourcesApplicationCourseService;
@Resource private CourseInfoService courseInfoService;
@Resource FileService fileService; @Resource FileService fileService;
@ -97,15 +100,40 @@ public class ResourcesApplicationCourseController{
return view; return view;
} }
// @GetMapping(MODEL + "/add.do")
// @Function("resourcesApplicationCourse.add")
// public ModelAndView add(Long resourcesApplicationCourseId) {
// ModelAndView view = new ModelAndView("/jlw/resourcesApplicationCourse/add.html");
// if(null != resourcesApplicationCourseId){
// ResourcesApplicationCourse resourcesApplicationCourse = resourcesApplicationCourseService.queryById(resourcesApplicationCourseId);
// view.addObject("resourcesApplicationCourse", resourcesApplicationCourse);
// }else {
// view.addObject("resourcesApplicationCourse", new ResourcesApplicationCourse());
// }
// return view;
// }
@GetMapping(MODEL + "/add.do") @GetMapping(MODEL + "/add.do")
@Function("resourcesApplicationCourse.add") @Function("courseInfo.add")
public ModelAndView add(Long resourcesApplicationCourseId) { @ResponseBody
public ModelAndView add(Long courseInfoId) {
ModelAndView view = new ModelAndView("/jlw/resourcesApplicationCourse/add.html"); ModelAndView view = new ModelAndView("/jlw/resourcesApplicationCourse/add.html");
if(null != resourcesApplicationCourseId){ if(null != courseInfoId){
ResourcesApplicationCourse resourcesApplicationCourse = resourcesApplicationCourseService.queryById(resourcesApplicationCourseId); CourseInfo courseInfo = new CourseInfo();
view.addObject("resourcesApplicationCourse", resourcesApplicationCourse); courseInfo.setCourseInfoId(courseInfoId);
List<CourseInfo> courseInfoList = courseInfoService.getValues(courseInfo);
ResourcesApplicationCourse resourcesApplicationCourse = new ResourcesApplicationCourse();
resourcesApplicationCourse.setCourseInfoId(courseInfo.getCourseInfoId());
List<ResourcesApplicationCourse> resourcesApplicationCourseList = resourcesApplicationCourseService.getValues(resourcesApplicationCourse);
String resourcesApplicationIds = "";
for(int i=0;null != resourcesApplicationCourseList && i<resourcesApplicationCourseList.size();i++){
resourcesApplicationIds += resourcesApplicationCourseList.get(i).getResourcesApplicationId()+(i == resourcesApplicationCourseList.size() - 1?"":",");
}
courseInfoList.get(0).set("resourcesApplicationIds",resourcesApplicationIds);
view.addObject("courseInfo", courseInfoList.get(0));
}else { }else {
view.addObject("resourcesApplicationCourse", new ResourcesApplicationCourse()); view.addObject("courseInfo", new CourseInfo());
} }
return view; return view;
} }

@ -18,13 +18,10 @@ public class ResourcesApplicationCourseQuery extends PageParam {
private Long resourcesApplicationId; private Long resourcesApplicationId;
@Query(name = "课程配置ID", display = false,type=Query.TYPE_DICT,dict="course_info.course_info_name.course_info_status=1") @Query(name = "课程配置ID", display = false,type=Query.TYPE_DICT,dict="course_info.course_info_name.course_info_status=1")
private Long courseInfoId; private Long courseInfoId;
@Query(name = "标签ID", display = false,type=Query.TYPE_DICT,dict="course_label.course_label_name.course_label_status=1")
private Long courseLabelId;
private String resourcesApplicationCourseIdPlural; private String resourcesApplicationCourseIdPlural;
private String resourcesApplicationIdPlural; private String resourcesApplicationIdPlural;
private String courseInfoIdPlural; private String courseInfoIdPlural;
private String courseLabelIdPlural;
private String resourcesApplicationCourseJsonStr;//json格式 private String resourcesApplicationCourseJsonStr;//json格式
@ -48,19 +45,12 @@ public class ResourcesApplicationCourseQuery extends PageParam {
public void setCourseInfoId(Long courseInfoId ){ public void setCourseInfoId(Long courseInfoId ){
this.courseInfoId = courseInfoId; this.courseInfoId = courseInfoId;
} }
public Long getCourseLabelId(){
return courseLabelId;
}
public void setCourseLabelId(Long courseLabelId ){
this.courseLabelId = courseLabelId;
}
public ResourcesApplicationCourse pojo(){ public ResourcesApplicationCourse pojo(){
ResourcesApplicationCourse pojo = new ResourcesApplicationCourse(); ResourcesApplicationCourse pojo = new ResourcesApplicationCourse();
pojo.setResourcesApplicationCourseId(this.getResourcesApplicationCourseId()); pojo.setResourcesApplicationCourseId(this.getResourcesApplicationCourseId());
pojo.setResourcesApplicationId(this.getResourcesApplicationId()); pojo.setResourcesApplicationId(this.getResourcesApplicationId());
pojo.setCourseInfoId(this.getCourseInfoId()); pojo.setCourseInfoId(this.getCourseInfoId());
pojo.setCourseLabelId(this.getCourseLabelId());
return pojo; return pojo;
} }
@ -82,12 +72,6 @@ public class ResourcesApplicationCourseQuery extends PageParam {
public void setCourseInfoIdPlural(String courseInfoIdPlural){ public void setCourseInfoIdPlural(String courseInfoIdPlural){
this.courseInfoIdPlural = courseInfoIdPlural; this.courseInfoIdPlural = courseInfoIdPlural;
} }
public String getCourseLabelIdPlural(){
return courseLabelIdPlural;
}
public void setCourseLabelIdPlural(String courseLabelIdPlural){
this.courseLabelIdPlural = courseLabelIdPlural;
}
public String getResourcesApplicationCourseJsonStr(){ public String getResourcesApplicationCourseJsonStr(){
return resourcesApplicationCourseJsonStr; return resourcesApplicationCourseJsonStr;
} }

@ -28,12 +28,6 @@ queryByCondition
@if(!isEmpty(courseInfoIdPlural)){ @if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#) and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@} @}
@if(!isEmpty(courseLabelId)){
and t.course_label_id =#courseLabelId#
@}
@if(!isEmpty(courseLabelIdPlural)){
and find_in_set(t.course_label_id,#courseLabelIdPlural#)
@}
queryByConditionQuery queryByConditionQuery
@ -64,12 +58,6 @@ queryByConditionQuery
@if(!isEmpty(courseInfoIdPlural)){ @if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#) and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@} @}
@if(!isEmpty(courseLabelId)){
and t.course_label_id =#courseLabelId#
@}
@if(!isEmpty(courseLabelIdPlural)){
and find_in_set(t.course_label_id,#courseLabelIdPlural#)
@}
@ -110,13 +98,6 @@ updateGivenByIds
course_info_id = #courseInfoId# , course_info_id = #courseInfoId# ,
@} @}
@} @}
@if(contain("courseLabelId",_given)){
@if(isEmpty(courseLabelId)){
course_label_id = null ,
@}else{
course_label_id = #courseLabelId# ,
@}
@}
resources_application_course_id = resources_application_course_id resources_application_course_id = resources_application_course_id
where find_in_set(resources_application_course_id,#resourcesApplicationCourseIdPlural#) where find_in_set(resources_application_course_id,#resourcesApplicationCourseIdPlural#)
@ -139,9 +120,6 @@ getResourcesApplicationCourseValues
@if(!isEmpty(courseInfoId)){ @if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId# and t.course_info_id =#courseInfoId#
@} @}
@if(!isEmpty(courseLabelId)){
and t.course_label_id =#courseLabelId#
@}
getValuesByQuery getValuesByQuery
@ -170,12 +148,6 @@ getValuesByQuery
@if(!isEmpty(courseInfoIdPlural)){ @if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#) and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@} @}
@if(!isEmpty(courseLabelId)){
and t.course_label_id =#courseLabelId#
@}
@if(!isEmpty(courseLabelIdPlural)){
and find_in_set(t.course_label_id,#courseLabelIdPlural#)
@}
getValuesByQueryNotWithPermission getValuesByQueryNotWithPermission
@ -204,12 +176,6 @@ getValuesByQueryNotWithPermission
@if(!isEmpty(courseInfoIdPlural)){ @if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#) and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@} @}
@if(!isEmpty(courseLabelId)){
and t.course_label_id =#courseLabelId#
@}
@if(!isEmpty(courseLabelIdPlural)){
and find_in_set(t.course_label_id,#courseLabelIdPlural#)
@}

@ -225,31 +225,14 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
$(".syb").hide(); $(".syb").hide();
$(".xyb").show(); $(".xyb").show();
$(".sbx").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(); $(".syb").show();
$(".xyb").show(); $(".xyb").show();
$(".sbx").show(); $(".sbx").show();
if(sign == 2){ 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(); loadDSRW();
} }
}else if(sign == 5){ if(sign == 5 && $.isEmpty(editor2)){
$(".syb").show();
$(".xyb").hide();
$(".sbx").show();
loadTeacherTable(1);
}else{
if(sign == 6 && $.isEmpty(editor2)){
if(!$.isEmpty($("input[name='competitionId']").val())){ if(!$.isEmpty($("input[name='competitionId']").val())){
var ret = Common.getAjax("/jlw/competition/view.json",{competitionId:$("input[name='competitionId']").val(),part: 7}); var ret = Common.getAjax("/jlw/competition/view.json",{competitionId:$("input[name='competitionId']").val(),part: 7});
if(ret.code == 0){ if(ret.code == 0){
@ -260,10 +243,7 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
} }
editor2 = Lib.editorMd("competitionAwardList"); editor2 = Lib.editorMd("competitionAwardList");
} }
if(sign == 7 && $.isEmpty(editor3)){ if(sign == 4 && $.isEmpty(editor4)){
editor3 = Lib.editorMd("competitionNewsContent");
}
if(sign == 8 && $.isEmpty(editor4)){
if(!$.isEmpty($("input[name='competitionId']").val())){ if(!$.isEmpty($("input[name='competitionId']").val())){
var ret = Common.getAjax("/jlw/competition/view.json",{competitionId:$("input[name='competitionId']").val(),part: 9}); var ret = Common.getAjax("/jlw/competition/view.json",{competitionId:$("input[name='competitionId']").val(),part: 9});
if(ret.code == 0){ if(ret.code == 0){
@ -274,6 +254,14 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
} }
editor4 = Lib.editorMd("competitionCommonProblem"); editor4 = Lib.editorMd("competitionCommonProblem");
} }
}else if(sign == 6){
$(".syb").show();
$(".xyb").hide();
$(".sbx").show();
if($.isEmpty(editor3)) {
editor3 = Lib.editorMd("competitionNewsContent");
}
}else{
$(".sbx").hide(); $(".sbx").hide();
} }
if(sign == 2 || sign == 5){//上一步、保存、下一步的位置 if(sign == 2 || sign == 5){//上一步、保存、下一步的位置
@ -1692,7 +1680,7 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
var param = { var param = {
competitionId:($("input[name='competitionId']").val() || '') competitionId:($("input[name='competitionId']").val() || '')
} }
if(i == 0){//大赛概况 if(i === 0){//大赛概况
var competitionName = $("input[name='competitionName']").val(); var competitionName = $("input[name='competitionName']").val();
// if($.isEmpty(competitionName)){ // if($.isEmpty(competitionName)){
// layer.msg("请填写大赛名称!", { // layer.msg("请填写大赛名称!", {
@ -1743,7 +1731,7 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
param.competitionFinalsLimit = competitionFinalsLimit; param.competitionFinalsLimit = competitionFinalsLimit;
param.competitionGeneralization = competitionGeneralization; param.competitionGeneralization = competitionGeneralization;
param.competitionGeneralizationOriginal = competitionGeneralizationOriginal; param.competitionGeneralizationOriginal = competitionGeneralizationOriginal;
}else if( i == 1){//竞赛时间 }else if( i === 1){//竞赛时间
var competitionEnrollStartTime = $("input[name='competitionEnrollStartTime']").val(); var competitionEnrollStartTime = $("input[name='competitionEnrollStartTime']").val();
var competitionEnrollEndTime = $("input[name='competitionEnrollEndTime']").val(); var competitionEnrollEndTime = $("input[name='competitionEnrollEndTime']").val();
var competitionContestStartTime = $("input[name='competitionContestStartTime']").val(); var competitionContestStartTime = $("input[name='competitionContestStartTime']").val();
@ -1759,30 +1747,7 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
param.competitionTaskThreeStartTime = competitionTaskThreeStartTime; param.competitionTaskThreeStartTime = competitionTaskThreeStartTime;
param.competitionTaskThreeEndTime = competitionTaskThreeEndTime; param.competitionTaskThreeEndTime = competitionTaskThreeEndTime;
}else if( i == 2){//参赛学员 }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){//大赛任务
param.ct1QuestionIds = $("input[name='ct1QuestionIds']").val();//大赛任务一选中的题目 param.ct1QuestionIds = $("input[name='ct1QuestionIds']").val();//大赛任务一选中的题目
param.ct2QuestionIds = $("input[name='ct2QuestionIds']").val(); //大赛任务二选中的题目 param.ct2QuestionIds = $("input[name='ct2QuestionIds']").val(); //大赛任务二选中的题目
param.ct1SingleChoiceSource = $("input[name='dx_fz']").val();//大赛任务一 单选题分值 param.ct1SingleChoiceSource = $("input[name='dx_fz']").val();//大赛任务一 单选题分值
@ -1806,14 +1771,12 @@ layui.define([ 'form', 'laydate', 'table','element','upload','competitionApi','t
} }
}); });
param.ct2QuestionSources = ct2QuestionSources; //大赛任务二选中的题目 步骤的分值 param.ct2QuestionSources = ct2QuestionSources; //大赛任务二选中的题目 步骤的分值
}else if( i == 4){//成绩权重 }else if( i === 3){//成绩权重
var competition_weight_1 = $("input[name='competition_weight_1']").val();//客观题 var competition_weight_1 = $("input[name='competition_weight_1']").val();//客观题
var competition_weight_2 = $("input[name='competition_weight_2']").val();//竞赛案例 var competition_weight_2 = $("input[name='competition_weight_2']").val();//竞赛案例
var competition_weight_3 = $("input[name='competition_weight_3']").val();//汇报答辩 var competition_weight_3 = $("input[name='competition_weight_3']").val();//汇报答辩
param.competitionWeight = competition_weight_1 + "," + competition_weight_2 + ","+competition_weight_3;//成绩权重 param.competitionWeight = competition_weight_1 + "," + competition_weight_2 + ","+competition_weight_3;//成绩权重
param.competitionDefenceScoreStandard = $("#editCDSFrame .layui-input-block ").html();//评分标准 param.competitionDefenceScoreStandard = $("#editCDSFrame .layui-input-block ").html();//评分标准
}else if( i == 5){//大赛评委
param.competitionJudgeIds = tempTeacherIds;
} }
submitInfo(param,t); submitInfo(param,t);
} }

@ -3,14 +3,10 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
var laydate = layui.laydate; var laydate = layui.laydate;
var table = layui.table; var table = layui.table;
var resourcesApplicationCourseTable = null; var resourcesApplicationCourseTable = null;
var selectCourseLabelType = "";//选择课程类型值 // 查询去重的标签列表
var selectList = "<select lay-filter='select_'><option value=''>请选择</option>", //绑定模块 var selectList = Common.postAjax('/jlw/courseLabel/disLabelType.json').data;
resourcesApplication = Common.getAjax("/jlw/resourcesApplication/getValues.json", {applicationOneLevelRelation: "应用课程类"}).data,//获取应用 var courseLabelList = Common.getAjax('/jlw/courseLabel/getValues.json?courseLabelStatus=1').data;
courseLabelData = Common.getAjax("/jlw/courseLabel/getValues.json", {courseLabelStatus: 1}).data;
/*$.each(resourcesApplication,function (key,value){
selectList += '<option value="'+value.resourcesApplicationId+'">'+value.applicationName+'</option>';
});*/
selectList += "</select>";
var view = { var view = {
init: function () { init: function () {
this.initTable(); this.initTable();
@ -26,7 +22,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
height: Lib.getTableHeight(1), height: Lib.getTableHeight(1),
cellMinWidth: 100, cellMinWidth: 100,
method: 'post', method: 'post',
url: Common.ctxPath + '/jlw/resourcesApplicationCourse/list.json' // 数据接口 url: Common.ctxPath + '/jlw/courseInfo/courseInfoList.json' // 数据接口
, page: Lib.tablePage // 开启分页 , page: Lib.tablePage // 开启分页
, limit: 10, , limit: 10,
size: 'lg', size: 'lg',
@ -43,69 +39,74 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
width: 60 width: 60
},*/ },*/
{ {
field: 'courseInfoIdText', field: 'courseInfoName',
align: "center", align: "center",
title: '课程名称', title: '课程名称',
}, },
{ {
field: 'courseLabelType',
field: 'courseLabelId', title: '绑定模块',
title: '课程类别',
align: "center", align: "center",
templet: function (d) { templet: function (d) {
var html = '<select class="yyy" name="courseLabelType" lay-filter="courseLabelType"><option value="">请选择</option>'; var prefix = '<!-- \'应用课程类\',\'考证课程类\',\'理论课程类\';-->\n' +
var yykcl = '<optgroup label="应用课程类">'; '<select lay-filter="select_courseLabelType" name="courseLabelType">\n' +
var kzkcl = '<optgroup label="考证课程类">'; ' <option value="">请选择</option>';
var llkcl = '<optgroup label="理论课程类">'; var content = '';
$.each(courseLabelData, function (key, value) { var suffix = '</select>';
var selected = selected = value.courseLabelId == d.courseLabelId?"selected":"";
if (value.courseLabelType == '应用课程类') { $.each(selectList, function (key, value) {
yykcl += '<option value="' + value.courseLabelId + '" '+selected+'>' + value.courseLabelName + '</option>'; var selected = value == d.courseLabelType ? "selected" : "";
} else if (value.courseLabelType == '考证课程类') { content += '<option value="' + value + '" '+selected+'>' + value + '</option>';
kzkcl += '<option value="' + value.courseLabelId + '" '+selected+'>' + value.courseLabelName + '</option>';
} else if (value.courseLabelType == '理论课程类') {
llkcl += '<option value="' + value.courseLabelId + '" '+selected+'>' + value.courseLabelName + '</option>';
}
}); });
yykcl+= '</optgroup>';
kzkcl+= '</optgroup>'; return prefix + content + suffix;
llkcl+= '</optgroup>';
html +=yykcl+kzkcl+llkcl+'</select>';
return html;
} }
}, },
{ {
field: 'courseLabelId',
field: 'undefinedYD', title: '课程类别',
title: '绑定模块',
align: "center", align: "center",
/*templet: '#selectGxmc'*/
templet: function (d) { templet: function (d) {
return selectList;
var prefix = '<!-- \'应用课程类\',\'考证课程类\',\'理论课程类\';-->\n' +
'<select lay-filter="select_courseLabelId" name="courseLabelId">\n' +
' <option value="">请选择</option>';
var content = '';
var suffix = '</select>';
var labelList = [];
// 一级类型
for (var courseLabel of courseLabelList) {
if(courseLabel.courseLabelType == d.courseLabelType) {
labelList.push(courseLabel)
}
}
$.each(labelList, function (key, value) {
var selected = value.courseLabelId == d.courseLabelId ? "selected" : "";
content += '<option value="' + value.courseLabelId + '" '+selected+'>' + value.courseLabelName + '</option>';
});
return prefix + content + suffix;
} }
}, },
{ {
field: 'resourcesApplicationIds',
field: 'resourcesApplicationId',
title: '绑定应用', title: '绑定应用',
align: "center", align: "center",
templet: function (d) { templet: function (d) {
var htm = "<select lay-filter='select_yingYong_1'><option value=''>请选择</option>"; // html字符串转对象深拷贝操作相当于每行copy一个下拉框进行回显选中操作
$.each(resourcesApplication, function (key, value) { var copyHtml = $($('#selectGxmc').html())
htm += '<option value="' + value.resourcesApplicationId + '" ' + (value.resourcesApplicationId == d.resourcesApplicationId ? 'selected' : '') + '>' + value.applicationName + '</option>'; copyHtml.find("option[value="+d.resourcesApplicationIds+"]").attr("selected", true);
}); return copyHtml.html();
return htm;
} }
}, },
{ {
field: 'operation_', field: 'operation_',
title: '操作', title: '操作',
align: "center", align: "center",
templet: function (d) { templet: function (d) {
var htm = '<a class="layui-table-link" lay-event="binding">绑定</a>'; var htm = '<a class="layui-table-link" lay-event="binding">绑定</a>';
htm += '<a class="layui-table-link" lay-event="edit">编辑</a>'; htm += '<a class="layui-table-link" lay-event="edit">编辑</a>';
htm += '<a class="layui-table-link" lay-event="del">删除</a>';
return htm; return htm;
} }
} }
@ -132,6 +133,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
initSearchForm: function () { initSearchForm: function () {
Lib.initSearchForm($("#searchForm"), resourcesApplicationCourseTable, form); Lib.initSearchForm($("#searchForm"), resourcesApplicationCourseTable, form);
}, },
initToolBar: function () { initToolBar: function () {
toolbar = { toolbar = {
@ -161,7 +163,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
}, initTableTool: table.on('tool(resourcesApplicationCourseTable)', function (obj) { }, initTableTool: table.on('tool(resourcesApplicationCourseTable)', function (obj) {
var data = obj.data; var data = obj.data;
if (obj.event === 'edit') { if (obj.event === 'edit') {
var url = "/jlw/resourcesApplicationCourse/add.do?resourcesApplicationCourseId=" + data.resourcesApplicationCourseId; var url = "/jlw/resourcesApplicationCourse/add.do?courseInfoId=" + data.courseInfoId;
Common.openDlg(url, ""); Common.openDlg(url, "");
} else if (obj.event === "del") { } else if (obj.event === "del") {
layer.confirm('是否确定删除该课程?', function (index) { //courseInfoStatus:状态(1启用 2禁用 3删除) layer.confirm('是否确定删除该课程?', function (index) { //courseInfoStatus:状态(1启用 2禁用 3删除)
@ -179,7 +181,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
} else if (obj.event === "binding") { } else if (obj.event === "binding") {
layer.confirm('是否确定绑定?', function (index) { layer.confirm('是否确定绑定?', function (index) {
var param = obj.data; var param = obj.data;
var ret = Common.postAjax("/jlw/resourcesApplicationCourse/edit.json", param); var ret = Common.postAjax("/jlw/courseInfo/edit.json", param);
layer.msg(ret.code == 0 ? "绑定成功!" : ret.msg, { layer.msg(ret.code == 0 ? "绑定成功!" : ret.msg, {
offset: ['50%'], offset: ['50%'],
icon: ret.code == 0 ? 1 : 2, icon: ret.code == 0 ? 1 : 2,
@ -193,53 +195,26 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
} }
}) })
}; };
form.on('select(courseLabelType)', function (obj) {
selectCourseLabelType = obj.value;
resourcesApplication = Common.getAjax("/jlw/resourcesApplication/getValues.json", {applicationSecondLevelRelation: obj.value}).data; //获取课程数据
var this_ = $(this).parents("td").next().next().find("select");
this_.empty();
this_.append("<option value=''>请选择</option>");
$(this).parents("td").next().next().find("select").empty(); //绑定课程名称选择
$(this).parents("td").next().next().find("select").append("<option value=''>请选择</option>"); form.on('select(select_courseLabelType)', function (obj) {
if(!$.isEmpty(obj.value)){ if(!$.isEmpty(obj.value)){
$.each(resourcesApplication, function (key, v) { var ret = Common.getAjax("/jlw/courseLabel/getValues.json",{courseLabelType:obj.value,courseLabelStatus:1});
this_.append("<option value='" + v.resourcesApplicationId + "'>" + v.applicationName + "</option>"); if(ret.code == 0){
}); var htm = '<option value="">请选择</option>';
for (var i = 0;i< ret.data.length;i++){
htm += '<option value="'+ret.data[i].courseLabelId+'">'+ret.data[i].courseLabelName+'</option>';
} }
$(this).parents("td").siblings('td').eq(1).find('select').empty();
var courseLabelId = obj.value; $(this).parents("td").siblings('td').eq(1).find('select').append(htm);
var resourcesApplicationCourseId = table.cache['resourcesApplicationCourseTable'][$(this).parents("tr").attr("data-index")].resourcesApplicationCourseId; form.render();
if (!$.isEmpty(resourcesApplicationCourseId)) {
var param = {
resourcesApplicationCourseId: resourcesApplicationCourseId,
courseLabelId: courseLabelId,
};
var ret = Common.postAjax("/jlw/resourcesApplicationCourse/edit.json", param);
layer.msg(ret.code == 0 ? "绑定成功!" : ret.msg, {
offset: ['50%'],
icon: ret.code == 0 ? 1 : 2,
time: 1000 //2秒关闭如果不配置默认是3秒
});
} }
}else {
$(this).parents("td").siblings('td').eq(1).find('select').empty();
form.render(); form.render();
});
form.on('select(select_yingYong_1)', function (obj) {
var resourcesApplicationId = obj.value;
var resourcesApplicationCourseId = table.cache['resourcesApplicationCourseTable'][$(this).parents("tr").attr("data-index")].resourcesApplicationCourseId;
if (!$.isEmpty(resourcesApplicationCourseId)) {
var param = {
resourcesApplicationCourseId: resourcesApplicationCourseId,
resourcesApplicationId: resourcesApplicationId,
};
var ret = Common.postAjax("/jlw/resourcesApplicationCourse/edit.json", param);
layer.msg(ret.code == 0 ? "绑定成功!" : ret.msg, {
offset: ['50%'],
icon: ret.code == 0 ? 1 : 2,
time: 1000 //2秒关闭如果不配置默认是3秒
});
} }
}); });
form.on('select(select_)', function (obj) { form.on('select(select_)', function (obj) {
var id = obj.value; var id = obj.value;
return; return;

@ -0,0 +1,37 @@
layui.define([ 'form', 'laydate', 'table','resourcesApplicationCourseApi'], function(exports) {
var form = layui.form;
var resourcesApplicationCourseApi = layui.resourcesApplicationCourseApi;
var index = layui.index;
var view = {
init:function(){
Lib.initGenrealForm($("#addForm"),form);
this.initSubmit();
},
initSubmit:function(){
$("#addButton").click(function(){
form.on('submit(form)', function(){
var resourcesApplicationCourseId = $("#addForm input[name='resourcesApplicationCourseId']").val();
if(!$.isEmpty(resourcesApplicationCourseId)){
resourcesApplicationCourseApi.updateResourcesApplicationCourse($('#addForm'),function(){
parent.window.dataReload();
Common.info("更新成功");
Lib.closeFrame();
});
}else {
resourcesApplicationCourseApi.addResourcesApplicationCourse($('#addForm'),function(){
parent.window.dataReload();
Common.info("添加成功");
Lib.closeFrame();
});
}
});
});
$("#addButton-cancel").click(function(){
Lib.closeFrame();
});
}
}
exports('add',view);
});

@ -0,0 +1,23 @@
layui.define(['table', 'resourcesApplicationCourseApi'], function(exports) {
var resourcesApplicationCourseApi = layui.resourcesApplicationCourseApi;
var table=layui.table;
var view = {
init:function(){
},
delBatch:function(){
var data = Common.getMoreDataFromTable(table,"resourcesApplicationCourseTable");
if(data==null){
return ;
}
Common.openConfirm("确认要删除这些ResourcesApplicationCourse?",function(){
var ids =Common.concatBatchId(data,"resourcesApplicationCourseId");
resourcesApplicationCourseApi.del(ids,function(){
Common.info("删除成功");
dataReload();
})
})
}
}
exports('del',view);
});

@ -0,0 +1,28 @@
layui.define([ 'form', 'laydate', 'table','resourcesApplicationCourseApi'], function(exports) {
var form = layui.form;
var resourcesApplicationCourseApi = layui.resourcesApplicationCourseApi;
var index = layui.index;
var view = {
init:function(){
Lib.initGenrealForm($("#updateForm"),form);
this.initSubmit();
},
initSubmit:function(){
$("#updateButton").click(function(){
form.on('submit(form)', function(){
resourcesApplicationCourseApi.updateResourcesApplicationCourse($('#updateForm'),function(){
parent.window.dataReload();
Common.info("更新成功");
Lib.closeFrame();
});
});
});
$("#updateButton-cancel").click(function(){
Lib.closeFrame();
});
}
}
exports('edit',view);
});

@ -0,0 +1,263 @@
layui.define(['form', 'laydate', 'table'], function (exports) {
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var resourcesApplicationCourseTable = null;
var selectCourseLabelType = "";//选择课程类型值
var selectList = "<select lay-filter='select_'><option value=''>请选择</option>", //绑定模块
resourcesApplication = Common.getAjax("/jlw/resourcesApplication/getValues.json", {applicationOneLevelRelation: "应用课程类"}).data,//获取应用
courseLabelData = Common.getAjax("/jlw/courseLabel/getValues.json", {courseLabelStatus: 1}).data;
/*$.each(resourcesApplication,function (key,value){
selectList += '<option value="'+value.resourcesApplicationId+'">'+value.applicationName+'</option>';
});*/
selectList += "</select>";
var view = {
init: function () {
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function () {
Lib.doSearchForm($("#searchForm"), resourcesApplicationCourseTable)
}
},
initTable: function () {
resourcesApplicationCourseTable = table.render({
elem: '#resourcesApplicationCourseTable',
height: Lib.getTableHeight(1),
cellMinWidth: 100,
method: 'post',
url: Common.ctxPath + '/jlw/resourcesApplicationCourse/list.json' // 数据接口
, page: Lib.tablePage // 开启分页
, limit: 10,
size: 'lg',
cols: [[ // 表头
/*{
type : 'checkbox',
fixed:'left',
},*/
/* {
field: 'resourcesApplicationCourseId',
title: 'ID',
fixed: 'left',
width: 60
},*/
{
field: 'courseInfoIdText',
align: "center",
title: '课程名称',
},
{
field: 'courseLabelId',
title: '课程类别',
align: "center",
templet: function (d) {
var html = '<select class="yyy" name="courseLabelType" lay-filter="courseLabelType"><option value="">请选择</option>';
var yykcl = '<optgroup label="应用课程类">';
var kzkcl = '<optgroup label="考证课程类">';
var llkcl = '<optgroup label="理论课程类">';
$.each(courseLabelData, function (key, value) {
var selected = selected = value.courseLabelId == d.courseLabelId?"selected":"";
if (value.courseLabelType == '应用课程类') {
yykcl += '<option value="' + value.courseLabelId + '" '+selected+'>' + value.courseLabelName + '</option>';
} else if (value.courseLabelType == '考证课程类') {
kzkcl += '<option value="' + value.courseLabelId + '" '+selected+'>' + value.courseLabelName + '</option>';
} else if (value.courseLabelType == '理论课程类') {
llkcl += '<option value="' + value.courseLabelId + '" '+selected+'>' + value.courseLabelName + '</option>';
}
});
yykcl+= '</optgroup>';
kzkcl+= '</optgroup>';
llkcl+= '</optgroup>';
html +=yykcl+kzkcl+llkcl+'</select>';
return html;
}
},
{
field: 'undefinedYD',
title: '绑定模块',
align: "center",
/*templet: '#selectGxmc'*/
templet: function (d) {
return selectList;
}
},
{
field: 'resourcesApplicationId',
title: '绑定应用',
align: "center",
templet: function (d) {
var htm = "<select lay-filter='select_yingYong_1'><option value=''>请选择</option>";
$.each(resourcesApplication, function (key, value) {
htm += '<option value="' + value.resourcesApplicationId + '" ' + (value.resourcesApplicationId == d.resourcesApplicationId ? 'selected' : '') + '>' + value.applicationName + '</option>';
});
return htm;
}
},
{
field: 'operation_',
title: '操作',
align: "center",
templet: function (d) {
var htm = '<a class="layui-table-link" lay-event="binding">绑定</a>';
htm += '<a class="layui-table-link" lay-event="edit">编辑</a>';
htm += '<a class="layui-table-link" lay-event="del">删除</a>';
return htm;
}
}
]]
/* ,done: function (res, curr, count) {
}*/
});
table.on('checkbox(resourcesApplicationCourseTable)', function (obj) {
var resourcesApplicationCourse = obj.data;
if (obj.checked) {
//按钮逻辑Lib.buttonEnable()
} else {
}
});
table.on('edit(resourcesApplicationCourseTable)', function (obj) { //注edit是固定事件名test是table原始容器的属性 lay-filter="对应的值"
console.log(obj.value); //得到修改后的值
console.log(obj.field); //当前编辑的字段名
console.log(obj.data); //所在行的所有相关数据
});
},
initSearchForm: function () {
Lib.initSearchForm($("#searchForm"), resourcesApplicationCourseTable, form);
},
initToolBar: function () {
toolbar = {
add: function () { // 获取选中数据
var url = "/jlw/resourcesApplicationCourse/add.do";
Common.openDlg(url, "ResourcesApplicationCourse管理>新增");
},
edit: function () { // 获取选中数目
var data = Common.getOneFromTable(table, "resourcesApplicationCourseTable");
if (data == null) {
return;
}
var url = "/jlw/resourcesApplicationCourse/edit.do?resourcesApplicationCourseId=" + data.resourcesApplicationCourseId;
Common.openDlg(url, "ResourcesApplicationCourse管理>" + data.resourcesApplicationCourseId + ">编辑");
},
del: function () {
layui.use(['del'], function () {
var delView = layui.del
delView.delBatch();
});
}
};
$('.ext-toolbar').on('click', function () {
var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : '';
});
}, initTableTool: table.on('tool(resourcesApplicationCourseTable)', function (obj) {
var data = obj.data;
if (obj.event === 'edit') {
var url = "/jlw/resourcesApplicationCourse/add.do?resourcesApplicationCourseId=" + data.resourcesApplicationCourseId;
Common.openDlg(url, "");
} else if (obj.event === "del") {
layer.confirm('是否确定删除该课程?', function (index) { //courseInfoStatus:状态(1启用 2禁用 3删除)
var ret = Common.postAjax("/jlw/resourcesApplicationCourse/delete.json", {ids: data.resourcesApplicationCourseId});
layer.msg(ret.code == 0 ? "删除成功!" : ret.msg, {
offset: ['50%'],
icon: ret.code == 0 ? 1 : 2,
time: 1500 //2秒关闭如果不配置默认是3秒
}, function () {
if (ret.code == 0) {
Lib.tableRefresh();
}
});
});
} else if (obj.event === "binding") {
layer.confirm('是否确定绑定?', function (index) {
var param = obj.data;
var ret = Common.postAjax("/jlw/resourcesApplicationCourse/edit.json", param);
layer.msg(ret.code == 0 ? "绑定成功!" : ret.msg, {
offset: ['50%'],
icon: ret.code == 0 ? 1 : 2,
time: 1500 //2秒关闭如果不配置默认是3秒
}, function () {
if (ret.code == 0) {
Lib.tableRefresh();
}
});
});
}
})
};
form.on('select(courseLabelType)', function (obj) {
selectCourseLabelType = obj.value;
resourcesApplication = Common.getAjax("/jlw/resourcesApplication/getValues.json", {applicationSecondLevelRelation: obj.value}).data; //获取课程数据
var this_ = $(this).parents("td").next().next().find("select");
this_.empty();
this_.append("<option value=''>请选择</option>");
$(this).parents("td").next().next().find("select").empty();
$(this).parents("td").next().next().find("select").append("<option value=''>请选择</option>");
if (!$.isEmpty(obj.value)) {
$.each(resourcesApplication, function (key, v) {
this_.append("<option value='" + v.resourcesApplicationId + "'>" + v.applicationName + "</option>");
});
}
var courseLabelId = obj.value;
var resourcesApplicationCourseId = table.cache['resourcesApplicationCourseTable'][$(this).parents("tr").attr("data-index")].resourcesApplicationCourseId;
if (!$.isEmpty(resourcesApplicationCourseId)) {
var param = {
resourcesApplicationCourseId: resourcesApplicationCourseId,
courseLabelId: courseLabelId,
};
var ret = Common.postAjax("/jlw/resourcesApplicationCourse/edit.json", param);
layer.msg(ret.code == 0 ? "绑定成功!" : ret.msg, {
offset: ['50%'],
icon: ret.code == 0 ? 1 : 2,
time: 1000 //2秒关闭如果不配置默认是3秒
});
}
form.render();
});
form.on('select(select_yingYong_1)', function (obj) {
var resourcesApplicationId = obj.value;
var resourcesApplicationCourseId = table.cache['resourcesApplicationCourseTable'][$(this).parents("tr").attr("data-index")].resourcesApplicationCourseId;
if (!$.isEmpty(resourcesApplicationCourseId)) {
var param = {
resourcesApplicationCourseId: resourcesApplicationCourseId,
resourcesApplicationId: resourcesApplicationId,
};
var ret = Common.postAjax("/jlw/resourcesApplicationCourse/edit.json", param);
layer.msg(ret.code == 0 ? "绑定成功!" : ret.msg, {
offset: ['50%'],
icon: ret.code == 0 ? 1 : 2,
time: 1000 //2秒关闭如果不配置默认是3秒
});
}
});
form.on('select(select_)', function (obj) {
var id = obj.value;
return;
var resourcesApplicationCourseId = table.cache['resourcesApplicationCourseTable'][$(this).parents("tr").attr("data-index")].resourcesApplicationCourseId;
if (!$.isEmpty(resourcesApplicationCourseId)) {
var param = {
resourcesApplicationCourseId: resourcesApplicationCourseId,
id: id,
};
var ret = Common.postAjax("/jlw/resourcesApplicationCourse/edit.json", param);
layer.msg(ret.code == 0 ? "绑定成功!" : ret.msg, {
offset: ['50%'],
icon: ret.code == 0 ? 1 : 2,
time: 1000 //2秒关闭如果不配置默认是3秒
});
}
});
exports('index', view);
});

@ -0,0 +1,18 @@
/*访问后台的代码*/
layui.define([], function(exports) {
var api={
updateResourcesApplicationCourse:function(form,callback){
Lib.submitForm("/jlw/resourcesApplicationCourse/edit.json",form,{},callback)
},
addResourcesApplicationCourse:function(form,callback){
Lib.submitForm("/jlw/resourcesApplicationCourse/add.json",form,{},callback)
},
del:function(ids,callback){
Common.post("/jlw/resourcesApplicationCourse/delete.json",{"ids":ids},function(){
callback();
})
}
};
exports('resourcesApplicationCourseApi',api);
});

@ -223,75 +223,6 @@
</div> </div>
</div> </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"> <div class="layui-tab-item" id="dsrw_view">
@ -376,23 +307,28 @@
</div> </div>
</div> </div>
</div> </div>
<!--大赛评委--> <!-- 常见问题 competitionCommonProblem-->
<div class="layui-tab-item dspw"> <div class="layui-tab-item">
<div style="width: 60%;min-width: 1000px;"> <div style="min-width: 1200px;">
<div class="layui-row" style="background-color: #f9f9f9;padding: 5px 20px;line-height: 36px;"> <div class="layui-row">
<button type="button" class="layui-btn layui-btn-sm bg_button select_pw">添加评委</button> <div class="layui-inline" style="width: 96%;">
<a class="del_pw" style="color: #1E9FFF;cursor: pointer;margin-left:20px;">移除</a> <label class="layui-form-label">常见问题:</label>
<div class="layui-input-block">
<a style="float: right;color: #73a2f8;" class="export_pw"><i style="font-size: 21px;" class="layui-icon">&#xe67d;</i>导出</a> <div id="competitionCommonProblem">
<button type="button" style="float: right;margin-right: 20px;margin-top: 4px;" class="layui-btn bg_button layui-btn-sm search_t">查询</button> <!-- competitionCommonProblem-->
<input type="text" style="float: right;width: 200px;margin-right: 20px;" name="teacherName" placeholder="教师姓名" autocomplete="off" class="layui-input"> <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>
<table id="teacherTable" lay-filter="teacherTable"></table>
</div> </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> </div>
<table id="teacherTable_no" lay-filter="teacherTable_no"></table> <table id="teacherTable_no" lay-filter="teacherTable_no"></table>
</div> </div>
@ -495,31 +431,7 @@
</div> </div>
</div> </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>
<div class="layui-row sbx" style="margin-left: 190px;"> <div class="layui-row sbx" style="margin-left: 190px;">
<button type="button" class="layui-btn layui-btn-primary syb" style="display: none;">上一步</button> <button type="button" class="layui-btn layui-btn-primary syb" style="display: none;">上一步</button>

@ -1,119 +1,86 @@
<!--# layout("/common/layout.html",{"jsBase":"/js/jlw/resourcesApplicationCourse/"}){ --> <!--# layout("/common/layout.html",{"jsBase":"/js/jlw/courseInfo/"}){ -->
<link rel="stylesheet" type="text/css" href="${ctxPath}/css/plugin.css?v=${jsVer}" media="all"/> <link rel="stylesheet" type="text/css" href="${ctxPath}/css/plugin.css?v=${jsVer}" media="all"/>
<form class="layui-form" id="addForm"> <form class="layui-form" id="addForm">
<div style="margin-left: 80px;"> <div style="margin-left: 80px;">
<layui:submitButtons id="addButton" buttonType="" /> <layui:submitButtons id="addButton" buttonType="" />
</div> </div>
<!--<div class="layui-row"> <div class="layui-row" style="margin-left: 80px;">
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">应用管理ID</label> 课程管理/新增课程
<div class="layui-input-inline">
<input type="text" name="resourcesApplicationId" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">课程配置ID</label>
<div class="layui-input-inline">
<input type="text" name="courseInfoId" class="layui-input" >
</div> </div>
</div> </div>
</div> </div>
</div>-->
<div class="layui-row"> <div class="layui-row">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">课程名称</label> <div class="layui-inline">
<label class="layui-form-label"><span class="req">*</span>课程名称:</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" name="courseInfoName" id="courseInfoName" autocomplete="off" value="${resourcesApplicationCourse.courseInfoIdText!}" <input type="text" name="courseInfoName" disabled value="${courseInfo.courseInfoName}" placeholder="请输入课程名称" class="layui-input" >
class="layui-input"> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><span class="req">*</span>课程类别:</label> <div class="layui-inline">
<div class="layui-input-inline" id="view"> <label class="layui-form-label"><span class="req">*</span>课程模块:</label>
<div class="layui-input-inline">
<!-- '应用课程类','考证课程类','理论课程类';--> <!-- '应用课程类','考证课程类','理论课程类';-->
<script id="demo" type="text/html"> <select lay-filter="select_courseLabelType">
<select lay-filter="select_courseLabelType" name="courseLabelType">
<option value="">请选择</option> <option value="">请选择</option>
<optgroup label="应用课程类"> <option value="应用课程类" ${courseInfo.courseLabelType =='应用课程类'?'selected':''}>应用课程类</option>
{{# layui.each(d.yykcl, function(index, item){ }} <option value="考证课程类" ${courseInfo.courseLabelType =='考证课程类'?'selected':''}>考证课程类</option>
<option value="{{item.courseLabelId}}" {{item.courseLabelId == ${resourcesApplicationCourse.courseLabelId!}?'selected':''}}>{{item.courseLabelName}}</option> <option value="理论课程类" ${courseInfo.courseLabelType =='理论课程类'?'selected':''}>理论课程类</option>
{{# }); }}
</optgroup>
<optgroup label="考证课程类">
{{# layui.each(d.kzkcl, function(index, item){ }}
<option value="{{item.courseLabelId}}" {{item.courseLabelId == ${resourcesApplicationCourse.courseLabelId!}?'selected':''}}>{{item.courseLabelName}}</option>
{{# }); }}
</optgroup>
<optgroup label="理论课程类">
{{# layui.each(d.llkcl, function(index, item){ }}
<option value="{{item.courseLabelId}}" {{item.courseLabelId == ${resourcesApplicationCourse.courseLabelId!}?'selected':''}}>{{item.courseLabelName}}</option>
{{# }); }}
</optgroup>
</select> </select>
</script> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><span class="req">*</span>绑定模块:</label> <div class="layui-inline">
<label class="layui-form-label"><span class="req">*</span>课程类别:</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<select > <!--#if(courseInfo.courseLabelId != null){-->
<option value="">请选择</option> <layui:simpleDictSelect style='layui-input-inline' value="${courseInfo.courseLabelId}"
<!--${resourcesApplicationCourse.courseLabelType =='应用课程类'?'selected':''}--> type="course_label.course_label_name.course_label_type=${courseInfo.courseLabelType},course_label_status=1"
<option value="xxx">xxx</option> id="courseLabelId" name="courseLabelId"/>
<option value="ccc">ccc</option> <!--#}else{-->
<option value="ddc">ddd</option> <select name="courseLabelId"></select>
</select> <!--#}-->
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><span class="req">*</span>绑定应用:</label> <input name="resourcesApplicationIds" type="hidden" value="${courseInfo.resourcesApplicationIds}" />
<div class="layui-input-inline"> <label class="layui-form-label"><span class="req">*</span>关联应用:</label>
<layui:simpleDictSelect style='1' type="resources_application.application_name.1=1" <div class="layui-input-block" style="margin-left: 180px;">
id="resourcesApplicationId" value="${resourcesApplicationCourse.resourcesApplicationId}" name="resourcesApplicationId"/> <div id="transfer" class="demo-transfer"></div>
</div> </div>
</div> </div>
</div> </div>
<input type="hidden" name="resourcesApplicationCourseId" <input type="hidden" name="courseInfoId" value='${courseInfo.courseInfoId}' />
value=${resourcesApplicationCourse.resourcesApplicationCourseId}> <!--类型(1课程 2章 3节)-->
<input type="hidden" name="courseInfoType" value='1' />
</form> </form>
<!--#} --> <!--#} -->
<script> <script>
layui.use(['add','form','laytpl'], function () { layui.use(['add','upload'], function(){
var form = layui.form, var courseInfoAdd = layui.add;
laytpl = layui.laytpl; var upload = layui.upload;
var resourcesApplicationCourseAdd = layui.add; courseInfoAdd.init();
var ret = Common.getAjax("/jlw/courseLabel/getValues.json", {courseLabelStatus: 1}); //上传LOGO
var yykcl = []; upload.render({
var kzkcl = []; elem: '#test10'
var llkcl = []; , url: Common.ctxPath + "/jlw/file/update.do"
if (ret.code == 0) { , done: function (res) {//每成功一次调用
for (var i = 0; i < ret.data.length; i++) { $("#logo").hide();
if (ret.data[i].courseLabelType == '应用课程类') { layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src',Common.ctxPath + res.data.src);
yykcl.push(ret.data[i]); $("input[name='courseInfoThumbnail']").val(res.data.src);
} else if (ret.data[i].courseLabelType == '考证课程类') {
kzkcl.push(ret.data[i]);
} else if (ret.data[i].courseLabelType == '理论课程类') {
llkcl.push(ret.data[i]);
}
}
} }
var getTpl = demo.innerHTML
, view = document.getElementById('view');
laytpl(getTpl).render({yykcl: yykcl, kzkcl: kzkcl, llkcl: llkcl}, function (html) {
view.innerHTML = html;
/* $(".addLabel").click(addLabel);
$(".classEdit").click(classEdit);
$(".classDel").click(classDel);*/
form.render();
}); });
resourcesApplicationCourseAdd.init();
}); });
</script> </script>

@ -25,11 +25,9 @@
</div> </div>
</layui:searchForm> </layui:searchForm>
<script type="text/html" id="selectGxmc" > <script type="text/html" id="selectGxmc" >
<div class='layui-input-inline'>
<layui:simpleDictSelect style='layui-input-inline' <layui:simpleDictSelect style='layui-input-inline'
type="resources_application.application_name.1=1" type="resources_application.application_name.1=1"
id="handsOapplicationNameStatu" name="applicationName"/> id="resourcesApplicationIds" name="resourcesApplicationIds"/>
</div>
</script> </script>
<!--<div class="layui-btn-group"> <!--<div class="layui-btn-group">

@ -0,0 +1,119 @@
<!--# layout("/common/layout.html",{"jsBase":"/js/jlw/resourcesApplicationCourse/"}){ -->
<link rel="stylesheet" type="text/css" href="${ctxPath}/css/plugin.css?v=${jsVer}" media="all"/>
<form class="layui-form" id="addForm">
<div style="margin-left: 80px;">
<layui:submitButtons id="addButton" buttonType=""/>
</div>
<!--<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">应用管理ID</label>
<div class="layui-input-inline">
<input type="text" name="resourcesApplicationId" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">课程配置ID</label>
<div class="layui-input-inline">
<input type="text" name="courseInfoId" class="layui-input" >
</div>
</div>
</div>
</div>-->
<div class="layui-row">
<div class="layui-form-item">
<label class="layui-form-label">课程名称</label>
<div class="layui-input-inline">
<input type="text" name="courseInfoName" id="courseInfoName" autocomplete="off" value="${resourcesApplicationCourse.courseInfoIdText!}"
class="layui-input">
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<label class="layui-form-label"><span class="req">*</span>课程类别:</label>
<div class="layui-input-inline" id="view">
<!-- '应用课程类','考证课程类','理论课程类';-->
<script id="demo" type="text/html">
<select lay-filter="select_courseLabelType" name="courseLabelType">
<option value="">请选择</option>
<optgroup label="应用课程类">
{{# layui.each(d.yykcl, function(index, item){ }}
<option value="{{item.courseLabelId}}" {{item.courseLabelId == ${resourcesApplicationCourse.courseLabelId!}?'selected':''}}>{{item.courseLabelName}}</option>
{{# }); }}
</optgroup>
<optgroup label="考证课程类">
{{# layui.each(d.kzkcl, function(index, item){ }}
<option value="{{item.courseLabelId}}" {{item.courseLabelId == ${resourcesApplicationCourse.courseLabelId!}?'selected':''}}>{{item.courseLabelName}}</option>
{{# }); }}
</optgroup>
<optgroup label="理论课程类">
{{# layui.each(d.llkcl, function(index, item){ }}
<option value="{{item.courseLabelId}}" {{item.courseLabelId == ${resourcesApplicationCourse.courseLabelId!}?'selected':''}}>{{item.courseLabelName}}</option>
{{# }); }}
</optgroup>
</select>
</script>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<label class="layui-form-label"><span class="req">*</span>绑定模块:</label>
<div class="layui-input-inline">
<select >
<option value="">请选择</option>
<!--${resourcesApplicationCourse.courseLabelType =='应用课程类'?'selected':''}-->
<option value="xxx">xxx</option>
<option value="ccc">ccc</option>
<option value="ddc">ddd</option>
</select>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<label class="layui-form-label"><span class="req">*</span>绑定应用:</label>
<div class="layui-input-inline">
<layui:simpleDictSelect style='1' type="resources_application.application_name.1=1"
id="resourcesApplicationId" value="${resourcesApplicationCourse.resourcesApplicationId}" name="resourcesApplicationId"/>
</div>
</div>
</div>
<input type="hidden" name="resourcesApplicationCourseId"
value=${resourcesApplicationCourse.resourcesApplicationCourseId}>
</form>
<!--#} -->
<script>
layui.use(['add','form','laytpl'], function () {
var form = layui.form,
laytpl = layui.laytpl;
var resourcesApplicationCourseAdd = layui.add;
var ret = Common.getAjax("/jlw/courseLabel/getValues.json", {courseLabelStatus: 1});
var yykcl = [];
var kzkcl = [];
var llkcl = [];
if (ret.code == 0) {
for (var i = 0; i < ret.data.length; i++) {
if (ret.data[i].courseLabelType == '应用课程类') {
yykcl.push(ret.data[i]);
} else if (ret.data[i].courseLabelType == '考证课程类') {
kzkcl.push(ret.data[i]);
} else if (ret.data[i].courseLabelType == '理论课程类') {
llkcl.push(ret.data[i]);
}
}
}
var getTpl = demo.innerHTML
, view = document.getElementById('view');
laytpl(getTpl).render({yykcl: yykcl, kzkcl: kzkcl, llkcl: llkcl}, function (html) {
view.innerHTML = html;
/* $(".addLabel").click(addLabel);
$(".classEdit").click(classEdit);
$(".classDel").click(classDel);*/
form.render();
});
resourcesApplicationCourseAdd.init();
});
</script>

@ -0,0 +1,30 @@
<!--# layout("/common/layout.html",{"jsBase":"/js/jlw/resourcesApplicationCourse/"}){ -->
<form class="layui-form layui-form-pane" id="updateForm">
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">应用管理ID</label>
<div class="layui-input-inline">
<input type="text" id="resourcesApplicationId" name="resourcesApplicationId" value="${resourcesApplicationCourse.resourcesApplicationId}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">课程配置ID</label>
<div class="layui-input-inline">
<input type="text" id="courseInfoId" name="courseInfoId" value="${resourcesApplicationCourse.courseInfoId}" class="layui-input" >
</div>
</div>
</div>
</div>
<!-- 业务对象须有hidden字段保存delFlag和version字段-->
<input type="hidden" name="resourcesApplicationCourseId" value=${resourcesApplicationCourse.resourcesApplicationCourseId} />
<layui:submitButtons id="updateButton" buttonType="" />
</form>
<!--#} -->
<script>
layui.use(['edit'], function(){
var resourcesApplicationCourseEdit = layui.edit
resourcesApplicationCourseEdit.init();
});
</script>

@ -0,0 +1,51 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/resourcesApplicationCourse/"}){ -->
<style>
.layui-table-body, .layui-table-box, .layui-table-cell{
overflow:visible;
}
.layui-table a {
margin-right: 10px;
}
td .layui-form-select {
margin-top: -10px;
margin-left: -15px;
margin-right: -15px;
}
.layui-form-select dl {
text-align: left;
}
</style>
<layui:searchForm formId="searchForm" searchList="" condition="${search}">
<div class="layui-inline">
<label class="layui-form-label">课程名称</label>
<div class="layui-input-inline">
<input type="text" name="courseInfoName" id="courseInfoName" autocomplete="off" placeholder="请输入检索条件" class="layui-input"
style="width: 200px;float: left;margin-right: 10px;">
</div>
</div>
</layui:searchForm>
<script type="text/html" id="selectGxmc" >
<div class='layui-input-inline'>
<layui:simpleDictSelect style='layui-input-inline'
type="resources_application.application_name.1=1"
id="handsOapplicationNameStatu" name="applicationName"/>
</div>
</script>
<!--<div class="layui-btn-group">
<layui:accessButton function="resourcesApplicationCourse.add" action="add">新增</layui:accessButton>
<layui:accessButton function="resourcesApplicationCourse.edit" action="edit">编辑</layui:accessButton>
<layui:accessButton function="resourcesApplicationCourse.del" action="del">删除</layui:accessButton>
</div>-->
<table id="resourcesApplicationCourseTable" lay-filter="resourcesApplicationCourseTable"></table>
<!--#} -->
<script>
layui.use(['index'], function(){
var index = layui.index;
index.init();
});
</script>
Loading…
Cancel
Save