From 8f6a19588dbfc5ff3da73ea72f04f4c4d1993b92 Mon Sep 17 00:00:00 2001 From: yxq Date: Wed, 14 Aug 2024 17:50:07 +0800 Subject: [PATCH] =?UTF-8?q?web=E5=85=A8=E5=91=98=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/TimeTable/IndexInEducation.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.js index bc11f6488..016893e08 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.js @@ -12,9 +12,17 @@ var bootstrap = function ($, learun) { function (data) { // 数据处理 var html = ''; - var allList = data.weekList[0].list; + var allList = data.weekList?data.weekList[0].list:[]; var weekLists = []; - $.each(allList) + for (var i = 1; i < 11; i++) { + (function (arg) { + let obj = { + time: i, + list: allList.filter(e => e.lessonTime == i), + } + weekLists.push(obj) + })(i); //调用时参数 + } for (var i = 1; i < 11; i++) { (function (arg) { var args = arg - 1;