diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs
index 50437f39d..0877ea46a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs
@@ -32,6 +32,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
private WeChatConfigIBLL weChatConfigIbll = new WeChatConfigBLL();
private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL();
private SchoolCalendarIBLL schoolCalendarIbll = new SchoolCalendarBLL();
+ private StuInfoBasicIBLL stuInfoBasicIbll = new StuInfoBasicBLL();
#region 视图功能
@@ -81,6 +82,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}
+ [HttpGet]
+ public ActionResult IndexLessonTermStu()
+ {
+ var LogInfo = LoginUserInfo.Get();
+ var StuInfo = stuInfoBasicIbll.GetAllList().Where(x => x.StuNo == LogInfo.account);
+ if (StuInfo != null)
+ {
+ ViewBag.ClassNo = StuInfo.FirstOrDefault().ClassNo;
+ }
+ return View();
+ }
+
#endregion
#region 获取数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.cshtml
new file mode 100644
index 000000000..b716be16b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.cshtml
@@ -0,0 +1,168 @@
+@{
+ ViewBag.Title = "课程表";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js")
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js
new file mode 100644
index 000000000..a42b5cf7c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js
@@ -0,0 +1,218 @@
+var refreshGirdData;
+var bootstrap = function ($, learun) {
+ var classNo = ClassNo;
+ var curWeek;
+ var weekList;
+ var page = {
+ init: function () {
+ page.bind();
+ //page.bindSelect();
+ },
+ loadData: function (param) {
+ $.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetDataInEducation', param,
+ function (data) {
+ //console.log('res', 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');
+ //console.log('datas', datas);
+ 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 < 10; j++) {
+ html += ' | ';
+ }
+ return html;
+ }
+
+ //某节课不空
+ function tdHandles(lists) {
+ var html = '';
+ for (var k = 1; k < 11; 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.classRoom +
+ ' ';
+ //html += '课程:' +
+ // item.curriculum +
+ // ' ' +
+ // '教师:' +
+ // item.teacher +
+ // ' ' +
+ // '班级:' +
+ // item.className +
+ // ' ' +
+ // '教室:' +
+ // item.classRoom +
+ // ' ';
+ });
+ html += ' | ';
+
+ } else {
+ html += ' | ';
+ }
+
+ })(k);
+ }
+ return html;
+ }
+ });
+ },
+ bind: function () {
+ //获取周次
+ learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetWeekTime', function (res) {
+ if (res.code == 200) {
+ weekList = res.data.weekList;
+ $('#WeekTimes').lrRadioCheckbox({
+ type: 'radio',
+ data: res.data.weekList,
+ value: 'value',
+ text: 'text'
+ });
+ curWeek = res.data.curWeek;
+ if (!$('#WeekTimes').find('input[value="' + res.data.curWeek + '"]').is(":checked")) {
+ $('#WeekTimes').find('input[value="' + res.data.curWeek + '"]').trigger('click');
+ }
+ //周次
+ $('#WeekTimeSelect').lrselect({
+ placeholder: "请选择周次",
+ maxHeight: 300,
+ allowSearch: true,
+ type: 'multiple',
+ //data: res.data.weekList,
+ value: 'value',
+ text: 'text'
+ });
+ $('#WeekTimeSelect').lrselectRefresh({
+ data: res.data.weekList
+ }
+ );
+ }
+
+ });
+ //切换周次
+ $('#WeekTimes').change(function () {
+ curWeek = $('#WeekTimes input[name="WeekTimes"]:checked ').val();
+ page.search();
+ });
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ //查询
+ $('#lr_search').on('click', function () {
+ var p = {};
+ p.schoolId = $('#F_SchoolId').lrselectGet();
+ p.ClassNo = $('#ClassNo').lrselectGet();
+ p.EmpNo = $('#EmpNo').lrselectGet();
+ page.search(p);
+ });
+
+ //打印课程表
+ $('#perBtn').on('click',
+ function () {
+ AddPrintContent();
+ });
+ var LODOP, P_ID = "", TaskID1, TaskID2, t, waiting = false, c = 0, loop = 0; //声明为全局变量
+
+ function AddPrintContent() {
+ var myHtml = myHtml = $('.personalBox').html();
+ var strBodyStyle = "";
+ var strFormHtml = strBodyStyle + "" + myHtml + "";
+
+ LODOP = getLodop();
+ LODOP.PRINT_INIT("个人授课表");
+ LODOP.SET_PRINT_PAGESIZE(2, 0, 0, "A4");
+
+ LODOP.SET_PRINT_MODE("PRINT_DUPLEX", 2);
+ LODOP.SET_PRINT_MODE("PRINT_DEFAULTSOURCE", 7);
+
+ LODOP.ADD_PRINT_HTM(10, 10, '284mm', '185mm', strFormHtml);
+ //打印预览
+ LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1); //横向时的正向显示
+ var TaskID1 = LODOP.PREVIEW();
+ // 直接打印
+ // var TaskID1=LODOP.PRINT();
+
+ }
+ },
+ search: function (param) {
+ param = param || {};
+ //当前第几周
+ param.curWeek = curWeek;
+ //班级
+ console.log("ClassNo:", classNo)
+ param.classNo = ClassNo;//'202010';//
+ page.loadData(param);
+
+ $('#WeekTimeSelect').lrselectRefresh({
+ data: weekList
+ });
+ $('#LessonInfo').lrselectSet('');
+ $('#EmpInfo').lrselectSet('');
+ $('#ClassroomInfo').lrselectSet('');
+ $('#WeekTimeSelect').lrselectSet('');
+ $('#WeekSelect').lrselectSet('');
+ $('#NodeSelect').lrselectSet('');
+ }
+ };
+ refreshGirdData = function () {
+ page.search();
+ };
+ page.init();
+};
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index 3bf9c206c..f33d9fcee 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -994,6 +994,7 @@
+
@@ -1114,6 +1115,7 @@
+