From c179b21a7963d4242a38539b47aa2eba26bcb1c4 Mon Sep 17 00:00:00 2001 From: yangdj <18302547071@163> Date: Sun, 9 Apr 2023 21:16:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=88=96=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=8E=88=E6=9D=83=20=20=E5=8F=AA=E4=BC=A0=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../add.html | 79 +++++-------------- 1 file changed, 20 insertions(+), 59 deletions(-) diff --git a/web/src/main/resources/templates/jlw/universitiesCollegesJurisdictionExperimentalSystem/add.html b/web/src/main/resources/templates/jlw/universitiesCollegesJurisdictionExperimentalSystem/add.html index 923ce48d..eb50db17 100644 --- a/web/src/main/resources/templates/jlw/universitiesCollegesJurisdictionExperimentalSystem/add.html +++ b/web/src/main/resources/templates/jlw/universitiesCollegesJurisdictionExperimentalSystem/add.html @@ -301,12 +301,16 @@ xtList = [],//实验系统List kcList = [];//当前编辑系统下的课程List var onUniversitiesCollegesId = $("input[name='universitiesCollegesId']").val(); - loadxtInfo(); //加载系统数据 - loadkcInfo(); //加载课程数据 + layer.load(3); + setTimeout(function () { + loadxtInfo(); //加载系统数据 + loadkcInfo(); //加载课程数据 + },200); function loadxtInfo() { var ret = Common.getAjax("/jlw/universitiesCollegesJurisdictionExperimentalSystem/getAllByQuery.json", { universitiesCollegesId: $("select[name='universitiesCollegesId']").val() || onUniversitiesCollegesId });//获取实训系统 + layer.closeAll("loading"); xtList = ret.data; loaduje(xtList); // onxtId = xtList.length > 0?xtList[0].universitiesCollegesJurisdictionExperimentalSystemId:""; @@ -600,25 +604,19 @@ }); return; } - var t = true; + var t = true,experimentalSystemList = [], //系统授权list + curriculumResourcesList = []; //课程授权 $("input[name='xt_id']").each(function (i) { - if (!$(this).prop("checked")) { - xtList[i] = { - type: xtList[i].type, - typeId: xtList[i].typeId, - useType: 0, - universitiesCollegesId: $("select[name='universitiesCollegesId']").val() || onUniversitiesCollegesId - } - } else { - /*if (xtList[i].useType == 0 || $.isEmpty(xtList[i].useType)) { - layer.msg("请选择实验系统【" + xtList[i].applicationName + "】使用级别!", { + if ($(this).prop("checked")) { + if ($.isEmpty(xtList[i].useType)) { + layer.msg("请选择实验系统【" + xtList[i].applicationName + "】使用层次!", { offset: ['50%'], icon: 2, time: 1500 //2秒关闭(如果不配置,默认是3秒) }); t = false; return false; - }*/ + } if ($.isEmpty(xtList[i].useStartTime)) { layer.msg("请选择实验系统【" + xtList[i].applicationName + "】开始时间!", { offset: ['50%'], @@ -637,17 +635,7 @@ t = false; return false; } - /*if ($.isEmpty(xtList[i].subsystemBottomBar)) { - layer.msg("请填写实验系统【" + xtList[i].applicationName + "】子系统底栏名称!", { - offset: ['50%'], - icon: 2, - time: 1500 //2秒关闭(如果不配置,默认是3秒) - }, function () { - $("#subsystemBottomBar_xt_" + i).focus(); - }); - t = false; - return false; - }*/ + experimentalSystemList.push(xtList[i]); } }); @@ -655,24 +643,16 @@ return false; } $("input[name='kc_id']").each(function (i) { - if (!$(this).prop("checked")) { - kcList[i] = { - type: kcList[i].type, - typeId: kcList[i].typeId, - useType: 0, - courseInfoId: kcList[i].courseInfoId, - universitiesCollegesId: $("select[name='universitiesCollegesId']").val() || onUniversitiesCollegesId - } - } else { - /*if (kcList[i].useType == 0 || $.isEmpty(kcList[i].useType)) { - layer.msg("请选择课程系统【" + kcList[i].applicationName + "】使用级别!", { + if ($(this).prop("checked")) { + if ($.isEmpty(kcList[i].useType)) { + layer.msg("请选择课程系统【" + kcList[i].courseInfoName + "】使用层次!", { offset: ['50%'], icon: 2, time: 1500 //2秒关闭(如果不配置,默认是3秒) }); t = false; return false; - }*/ + } if ($.isEmpty(kcList[i].useStartTime)) { layer.msg("请选择课程系统【" + kcList[i].courseInfoName + "】开始时间!", { offset: ['50%'], @@ -691,26 +671,7 @@ t = false; return false; } - /*if ($.isEmpty(kcList[i].secondLevelName)) { - layer.msg("请设置课程系统【" + kcList[i].courseInfoName + "】二级课程名!", { - offset: ['50%'], - icon: 2, - time: 1500 //2秒关闭(如果不配置,默认是3秒) - }, function () { - $("#secondLevelName_kc_" + i).focus(); - }); - t = false; - return false; - } - if ($.isEmpty(kcList[i].secondLevelLogo)) { - layer.msg("请设置课程系统【" + kcList[i].courseInfoName + "】二级课程logo!", { - offset: ['50%'], - icon: 2, - time: 1500 //2秒关闭(如果不配置,默认是3秒) - }); - t = false; - return false; - }*/ + curriculumResourcesList.push(kcList[i]); } }); if (t == false) { @@ -719,8 +680,8 @@ layer.load(); var param = { universitiesCollegesId: universitiesCollegesId, - UniversitiesCollegesJurisdictionExperimentalSystemListJson: JSON.stringify(xtList), - UniversitiesCollegesJurisdictionCurriculumResourcesListJson: JSON.stringify(kcList) + UniversitiesCollegesJurisdictionExperimentalSystemListJson: JSON.stringify(experimentalSystemList), + UniversitiesCollegesJurisdictionCurriculumResourcesListJson: JSON.stringify(curriculumResourcesList) }; var ret; setTimeout(function () {