From 1882c56e4771e74305a3b25360ed6e1b14705cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com> Date: Tue, 1 Aug 2023 22:15:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=AE=9E=E6=93=8D-=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=9B=B4=E6=8D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/jlw/handsOnSimulationTasks/add.js | 23 +++++++++---------- .../add.js | 23 +++++++++---------- .../jlw/teacherOpenCourseHandsOn/edit.html | 6 ++--- 3 files changed, 24 insertions(+), 28 deletions(-) diff --git a/web/src/main/resources/static/js/jlw/handsOnSimulationTasks/add.js b/web/src/main/resources/static/js/jlw/handsOnSimulationTasks/add.js index f8008aa4..49bfbf3f 100644 --- a/web/src/main/resources/static/js/jlw/handsOnSimulationTasks/add.js +++ b/web/src/main/resources/static/js/jlw/handsOnSimulationTasks/add.js @@ -670,13 +670,13 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT //PPT资源库button $("#pptClick").click(function (obj) { - updataResourcesOpenRe('','2,3'); + updataResourcesOpenRe('2,3'); var htm = "已选中:0"; $("#checkNumber").html(htm) }); /*资源库上传弹出框*/ - function updataResourcesOpenRe(resourcesInfoType,resourcesInfoTypePlural) { + function updataResourcesOpenRe(resourcesInfoTypePlural) { checkStatusData = []; layer.open({ type: 1, @@ -687,14 +687,14 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT area: ['820px', '600px'], content: $("#edit_dialog"), success: function (layero, index) { - loadResourcesInfo(resourcesInfoType,resourcesInfoTypePlural); + loadResourcesInfo(resourcesInfoTypePlural); $(".search").unbind(); - $(".search").click(function () {searchList(resourcesInfoType,resourcesInfoTypePlural);}); //搜索 + $(".search").click(function () {searchList(resourcesInfoTypePlural);}); //搜索 //table.reload('resourcesInfoTable');//刷新table }, yes: function (index) { var checkStatus = table.checkStatus("resourcesInfoTable"); //获取选中行状态 var dataNew = checkStatus.data, ids = Common.concatBatchId(dataNew, "resourcesInfoId"); //获取选中行数据 - if(resourcesInfoType == 1){ + if(resourcesInfoTypePlural == 1){ resourcesInfoShowInfo(checkStatusData) }else if(resourcesInfoTypePlural == '2,3'){ resourcesInfoShowPPTInfo(checkStatusData) @@ -709,7 +709,7 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT } //资源库表格 - function loadResourcesInfo(resourcesInfoType,resourcesInfoTypePlural) { + function loadResourcesInfo(resourcesInfoTypePlural) { $("#edit_dialog input[name='resourcesInfoName']").val(""); resourcesInfoTable = table.render({ elem: '#resourcesInfoTable', @@ -718,8 +718,8 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT method: 'post', even: true, //url: Common.ctxPath + '/jlw/resourcesInfo/list.json' // 数据接口 - url: Common.ctxPath + '/jlw/resourcesInfo/resourcesList.json' // 数据接口 - , where: getParamRe(resourcesInfoType,resourcesInfoTypePlural) + url: Common.ctxPath + '/jlw/resourcesInfo/getResourceSystemOAndUniversitiesList.json' // 数据接口 + , where: getParamRe(resourcesInfoTypePlural) , page: Lib.tablePage // 开启分页 , limit: 10, cols: [[ // 表头 @@ -899,9 +899,9 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT /*资源表格搜索*/ /*资源表格搜索*/ - function searchList(resourcesInfoType,resourcesInfoTypePlural) { + function searchList(resourcesInfoTypePlural) { resourcesInfoTable.reload({ - where: getParamRe(resourcesInfoType,resourcesInfoTypePlural), + where: getParamRe(resourcesInfoTypePlural), page: { curr: 1 } @@ -909,11 +909,10 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT } /*资源库搜索条件*/ - function getParamRe(resourcesInfoType,resourcesInfoTypePlural){ + function getParamRe(resourcesInfoTypePlural){ var param = { "courseInfoId_0": $("#edit_dialog select[name='courseInfoId_0']").val(), "resourcesInfoName": $("#edit_dialog input[name = 'resourcesInfoName']").val(), - "resourcesInfoType":resourcesInfoType, "resourcesInfoTypePlural":resourcesInfoTypePlural }; diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOnSimulationTasks/add.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOnSimulationTasks/add.js index fcee6757..4cbbe2f8 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOnSimulationTasks/add.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOnSimulationTasks/add.js @@ -657,13 +657,13 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas //PPT资源库button $("#pptClick").click(function (obj) { - updataResourcesOpenRe('','2,3'); + updataResourcesOpenRe('2,3'); var htm = "已选中:0"; $("#checkNumber").html(htm) }); /*资源库上传弹出框*/ - function updataResourcesOpenRe(resourcesInfoType,resourcesInfoTypePlural) { + function updataResourcesOpenRe(resourcesInfoTypePlural) { checkStatusData = []; layer.open({ type: 1, @@ -674,14 +674,14 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas area: ['820px', '600px'], content: $("#edit_dialog"), success: function (layero, index) { - loadResourcesInfo(resourcesInfoType,resourcesInfoTypePlural); + loadResourcesInfo(resourcesInfoTypePlural); $(".search").unbind(); - $(".search").click(function () {searchList(resourcesInfoType,resourcesInfoTypePlural);}); //搜索 + $(".search").click(function () {searchList(resourcesInfoTypePlural);}); //搜索 //table.reload('resourcesInfoTable');//刷新table }, yes: function (index) { var checkStatus = table.checkStatus("resourcesInfoTable"); //获取选中行状态 var dataNew = checkStatus.data, ids = Common.concatBatchId(dataNew, "resourcesInfoId"); //获取选中行数据 - if(resourcesInfoType == 1){ + if(resourcesInfoTypePlural == 1){ resourcesInfoShowInfo(checkStatusData) }else if(resourcesInfoTypePlural == '2,3'){ resourcesInfoShowPPTInfo(checkStatusData) @@ -696,7 +696,7 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas } //资源库表格 - function loadResourcesInfo(resourcesInfoType,resourcesInfoTypePlural) { + function loadResourcesInfo(resourcesInfoTypePlural) { $("#edit_dialog input[name='resourcesInfoName']").val(""); resourcesInfoTable = table.render({ elem: '#resourcesInfoTable', @@ -705,8 +705,8 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas method: 'post', even: true, //url: Common.ctxPath + '/jlw/resourcesInfo/list.json' // 数据接口 - url: Common.ctxPath + '/jlw/resourcesInfo/resourcesList.json' // 数据接口 - , where: getParamRe(resourcesInfoType,resourcesInfoTypePlural) + url: Common.ctxPath + '/jlw/resourcesInfo/getResourceSystemOAndUniversitiesList.json' // 数据接口 + , where: getParamRe(resourcesInfoTypePlural) , page: Lib.tablePage // 开启分页 , limit: 10, cols: [[ // 表头 @@ -886,9 +886,9 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas /*资源表格搜索*/ /*资源表格搜索*/ - function searchList(resourcesInfoType,resourcesInfoTypePlural) { + function searchList(resourcesInfoTypePlural) { resourcesInfoTable.reload({ - where: getParamRe(resourcesInfoType,resourcesInfoTypePlural), + where: getParamRe(resourcesInfoTypePlural), page: { curr: 1 } @@ -896,11 +896,10 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas } /*资源库搜索条件*/ - function getParamRe(resourcesInfoType,resourcesInfoTypePlural){ + function getParamRe(resourcesInfoTypePlural){ var param = { "courseInfoFullId": $("#edit_dialog select[name='courseInfoId_1']").val(), "resourcesInfoName": $("#edit_dialog input[name = 'resourcesInfoName']").val(), - "resourcesInfoType":resourcesInfoType, "resourcesInfoTypePlural":resourcesInfoTypePlural }; return param; diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/edit.html b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/edit.html index 53a3f774..23428fe6 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/edit.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseHandsOn/edit.html @@ -92,9 +92,7 @@
- +