From 078dfec7b9a3dfe22a736e215cb5d06d0f5a0e34 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Fri, 1 Apr 2022 18:02:02 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E6=95=99?= =?UTF-8?q?=E5=8A=A1=EF=BC=9A=E5=A2=9E=E5=8A=A0=E7=8F=AD=E7=BA=A7=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E8=A1=A8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/TimeTableController.cs | 9 + .../TimeTable/ClassIndexInEducation.cshtml | 159 ++++++++++++++ .../Views/TimeTable/ClassIndexInEducation.js | 202 ++++++++++++++++++ 3 files changed, 370 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs index 2b26e1d62..93f48ee5d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs @@ -85,6 +85,15 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers return View(); } /// + /// 班级课程表【教务】 + /// + /// + [HttpGet] + public ActionResult ClassIndexInEducation() + { + return View(); + } + /// /// 课程表【教学调度】 /// /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.cshtml new file mode 100644 index 000000000..4a794077d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.cshtml @@ -0,0 +1,159 @@ +@{ + ViewBag.Title = "班级课程表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + + + +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ 查询 +
+ +
+
+
+ +
+
+
+
+
+
+
+
+
    +
  • 节次/星期
  • +
  • 星期一
  • +
  • 星期二
  • +
  • 星期三
  • +
  • 星期四
  • +
  • 星期五
  • +
  • 星期六
  • +
  • 星期日
  • +
+
+
+
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.js") + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.js new file mode 100644 index 000000000..472359edf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.js @@ -0,0 +1,202 @@ +var refreshGirdData; +var bootstrap = function ($, learun) { + var startTime; + var endTime; + var page = { + init: function () { + page.bind(); + page.bindSelect(); + }, + loadData: function (param) { + $.lrSetFormWithParam(top.$.rootUrl + '/PersonnelManagement/TimeTable/GetDataInEducation', param, + function (data) { + // 数据处理 + var html = ''; + var weekLists = data.weekList; + for (var i = 1; i < 11; i++) { + (function (arg) { + var args = arg - 1; + var datas = flogs(arg, weekLists, 'time'); + html += ' ' + arg + '节'; + if (datas) { + var lists = datas.list; + html += tdHandles(lists); + } else { + html += tdHandle(arg); + } + html += ''; + })(i); //调用时参数 + } + $('.personT').text(data.schoolName); + $('.perSemester').text(data.semester); + $('.perFestivalsBox table').html(html); + + function flogs(num, data, obj) { + var flog = false; + $.each(data, + function (i, n) { + if (n[obj] == num) { + flog = n; + return; + } + }) + return flog; + } + function flogs2(num, data, obj) { + var arr = new Array(); + $.each(data, + function (i, n) { + if (n[obj] == num) { + arr.push(n); + } + }) + return arr; + } + + //某节课空 + function tdHandle() { + var html = ''; + for (var j = 0; j < 7; j++) { + html += '
'; + } + return html; + } + + //某节课不空 + function tdHandles(lists) { + var html = ''; + for (var k = 1; k < 8; k++) { + (function (arg) { + var args = arg - 1; + var datas = flogs2(arg, lists, 'day'); + if (datas.length > 0) { + html += ''; + $.each(datas, function (i, item) { + if (i > 0) { + html += '
'; + } + html += '
课程:' + + item.curriculum + + '
' + + '
教师:' + + item.teacher + + '
' + + '
班级:' + + item.className + + '
' + + '
教室:' + + item.classRoom + + '
'; + }); + html += ''; + + } else { + html += '
'; + } + + })(k); + } + return html; + } + }); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#datesearch').lrdate({ + dfdata: [ + { + name: '上周', + begin: function () { return learun.getTime(7); }, + end: function () { + return learun.getTime(1); + } + }, + { + name: '本周', + begin: function () { return learun.getTime(0); }, + end: function () { + return learun.getTime(-6); + } + }, + { + name: '下周', + begin: function () { return learun.getTime(-7); }, + end: function () { + return learun.getTime(-13); + } + }], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: 'currentWeek', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + //查询 + $('#lr_search').on('click', function () { + var p = {}; + p.schoolId = $('#F_SchoolId').lrselectGet(); + p.ClassNo = $('#ClassNo').lrselectGet(); + page.search(p); + }); + }, + bindSelect: function () { + //校区 + $('#F_SchoolId').lrDataSourceSelect({ + code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { + if (!!item) { + // 班级 + $('#ClassNo').lrselectRefresh({ + placeholder: "请选择班级", + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', + param: { schoolId: item.f_companyid }, + value: 'value', + text: 'text' + }); + } else { + //班级 + $('#ClassNo').lrselectRefresh({ + placeholder: "请选择班级", + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', + param: { schoolId: "" }, + value: 'value', + text: 'text' + }); + } + } + }); + //班级 + $('#ClassNo').lrselect({ + placeholder: "请选择班级", + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', + value: 'value', + text: 'text' + }); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + page.loadData(param); + } + }; + page.init(); +};