From 350a49395c5d7a7dc0bc382bec9c2f4aa90036fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com> Date: Tue, 15 Nov 2022 19:36:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E8=AF=BE=E5=88=97=E8=A1=A8=E2=80=94?= =?UTF-8?q?=E2=80=94=E5=90=AF=E7=94=A8=EF=BC=8C=E7=A6=81=E7=94=A8=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/js/jlw/teacherOpenCourse/index.js | 14 ++++---------- .../js/jlw/teacherOpenCourseScheduleSession/add.js | 10 +++++++--- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourse/index.js b/web/src/main/resources/static/js/jlw/teacherOpenCourse/index.js index a3eda7b7..601eef9f 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourse/index.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourse/index.js @@ -151,7 +151,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) { Lib.doSearchForm($("#searchForm"), teacherOpenCourseTable, 1); view.initToolBar() }, - } + }; //触发事件 $('.ext-toolbar').on('click', function () { var type = $(this).data('type'); @@ -165,15 +165,9 @@ layui.define(['form', 'laydate', 'table'], function (exports) { Common.openDlg(url, "开课管理>" + data.teacherOpenCourseTitle + ">编辑"); } else if (obj.event === "del") { layer.confirm('是否确定删除该信息?', function (index) { - var ret = Common.postAjax("/jlw/teacherOpenCourse/delete.json", {ids: data.teacherOpenCourseId}); - 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(); - } + layui.use(['del'], function () { + var delView = layui.del + delView.delBatch(); }); }); } else if (obj.event == "toPaike") { diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseScheduleSession/add.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseScheduleSession/add.js index 37ca2f24..7f604ea0 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseScheduleSession/add.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseScheduleSession/add.js @@ -22,9 +22,13 @@ layui.define(['form', 'laydate', 'table', 'xmSelect', 'teacherOpenCourseSchedule var xmSeValue = $("#demo1").data('value'); var xmSeInitValue = []; if(!$.isEmpty(xmSeValue)){ - xmSeValue.split(',').forEach(function (value) { - xmSeInitValue.push(parseInt(value)) - }); + if(xmSeValue.toString().indexOf(",")>=0){ + xmSeValue.split(',').forEach(function (value) { + xmSeInitValue.push(parseInt(value)) + }); + }else { + xmSeInitValue.push(xmSeValue) + } } /*班级下拉多选*/ var demo1 = xmSelect.render({