@@ -32,6 +32,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
private WeChatConfigIBLL weChatConfigIbll = new WeChatConfigBLL(); | private WeChatConfigIBLL weChatConfigIbll = new WeChatConfigBLL(); | ||||
private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL(); | private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL(); | ||||
private SchoolCalendarIBLL schoolCalendarIbll = new SchoolCalendarBLL(); | private SchoolCalendarIBLL schoolCalendarIbll = new SchoolCalendarBLL(); | ||||
private StuInfoBasicIBLL stuInfoBasicIbll = new StuInfoBasicBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
@@ -81,6 +82,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | 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 | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -0,0 +1,168 @@ | |||||
@{ | |||||
ViewBag.Title = "课程表"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<link href="~/Content/static/css/TimeTable.css" rel="stylesheet" /> | |||||
<script src="~/Content/static/js/LodopFuncs.js"></script> | |||||
<script> | |||||
var ClassNo = "@ViewBag.ClassNo"; | |||||
</script> | |||||
<style id="style1" media="print"> | |||||
* { | |||||
-webkit-box-sizing: border-box; | |||||
-moz-box-sizing: border-box; | |||||
box-sizing: border-box; | |||||
} | |||||
ul { | |||||
margin: 0px; | |||||
padding: 0px; | |||||
list-style: none; | |||||
} | |||||
li { | |||||
list-style: none; | |||||
} | |||||
table, tr, td { | |||||
cellspacing: 0px; | |||||
cellpadding: 0px; | |||||
padding: 0; | |||||
margin: 0; | |||||
} | |||||
body { | |||||
font-family: "Microsoft YaHei", "微软雅黑" !important; | |||||
padding: 10px; | |||||
color: #333; | |||||
font-size: 12px; | |||||
margin: 0; | |||||
} | |||||
.personalBox { | |||||
padding: 10px; | |||||
} | |||||
.personT { | |||||
font-size: 24px; | |||||
text-align: center; | |||||
margin-bottom: 15px | |||||
} | |||||
.perSemester { | |||||
text-align: center; | |||||
border: 1px solid #333; | |||||
line-height: 25px; | |||||
height: 30px; | |||||
} | |||||
.perWeek { | |||||
overflow: hidden; | |||||
line-height: 26px; | |||||
height: 30px; | |||||
text-align: center; | |||||
border-left: 1px solid #333; | |||||
border-right: 1px solid #333; | |||||
} | |||||
/*.perWeek li { | |||||
width: 12.5%; | |||||
float: left; | |||||
border-left: 1px solid #dfdfdf; | |||||
}*/ | |||||
.perFestivalsBox { | |||||
border-left: 1px solid #333; | |||||
border-right: 1px solid #333; | |||||
border-bottom: 1px solid #333; | |||||
text-align: center; | |||||
} | |||||
.perFestivalsBox td { | |||||
border-left: 1px solid #333; | |||||
border-top: 1px solid #333; | |||||
padding: 1px; | |||||
width: 9%; | |||||
font-size: 12px; | |||||
} | |||||
.perFestivalsBox table { | |||||
display: block; | |||||
width: 100%; | |||||
text-align: center; | |||||
} | |||||
.perFestivalsBox td div { | |||||
min-height: 16px; | |||||
line-height: 16px; | |||||
} | |||||
.perFestivalsBox td:first-child, .perWeek li:first-child { | |||||
border-left: 0; | |||||
} | |||||
</style> | |||||
<style> | |||||
.lr-select { | |||||
width: 150px; | |||||
} | |||||
.radio { | |||||
margin-bottom: 0px; | |||||
} | |||||
.radio input[type=radio] { | |||||
margin-top: 8px; | |||||
} | |||||
.WeekTimes label { | |||||
padding-right: 5px; | |||||
} | |||||
.perWeek1 li { | |||||
width: 9%; | |||||
float: left; | |||||
/*border-left: 1px solid #333;*/ | |||||
height: 100%; | |||||
} | |||||
.leftDiv { | |||||
width: 100%; | |||||
} | |||||
.perFestivalsBox td { | |||||
padding: 1px; | |||||
width: 9%; | |||||
} | |||||
.WeekTimes { | |||||
text-align: left; | |||||
border: 1px solid #dfdfdf; | |||||
line-height: 30px; | |||||
/*height: 30px;*/ | |||||
} | |||||
</style> | |||||
<div class="lr-layout"> | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
</div> | |||||
<div class="lr-layout-body" style="overflow: auto;"> | |||||
<div class="warpper"> | |||||
<div id="StuClassNo" hidden="true"></div> | |||||
<div class="personalBox"> | |||||
<div class="leftDiv"> | |||||
<div class="WeekTimes" id="WeekTimes">周次:</div> | |||||
<div class="perFestivalsBox"> | |||||
<table id="lessonTermTable" cellspacing="0" border="0" style="width: 100%"></table> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/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 = '<tr style="height: 30px;"><td>节次/星期</td><td>星期一</td><td>星期二</td><td>星期三</td><td>星期四</td><td>星期五</td><td>星期六</td><td>星期日</td><td>星期八</td><td>星期九</td><td>星期十</td></tr>'; | |||||
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 += ' <tr><td>' + arg + '节</td>'; | |||||
if (datas) { | |||||
var lists = datas.list; | |||||
html += tdHandles(lists); | |||||
} else { | |||||
html += tdHandle(arg); | |||||
} | |||||
html += '</tr>'; | |||||
})(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 += '<td class="active" id="" num="' + (j + 1) + '"><div></div><div></div><div></div><div></div></td>'; | |||||
} | |||||
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 += '<td class="active" id="' + datas[0].ALTId + '" num="' + k + '">'; | |||||
$.each(datas, function (i, item) { | |||||
if (i > 0) { | |||||
html += '<hr>'; | |||||
} | |||||
html += '<div>' + | |||||
item.curriculum + | |||||
'</div>' + | |||||
'<div>' + | |||||
item.teacher + | |||||
'</div>' + | |||||
'<div>' + | |||||
item.classRoom + | |||||
'</div>'; | |||||
//html += '<div>课程:' + | |||||
// item.curriculum + | |||||
// '</div>' + | |||||
// '<div>教师:' + | |||||
// item.teacher + | |||||
// '</div>' + | |||||
// '<div>班级:' + | |||||
// item.className + | |||||
// '</div>' + | |||||
// '<div>教室:' + | |||||
// item.classRoom + | |||||
// '</div>'; | |||||
}); | |||||
html += '</td>'; | |||||
} else { | |||||
html += '<td class="active" id="" num="' + k + '"><div></div><div></div><div></div><div></div></td>'; | |||||
} | |||||
})(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 = "<style>" + document.getElementById("style1").innerHTML + "</style>"; | |||||
var strFormHtml = strBodyStyle + "<body>" + myHtml + "</body>"; | |||||
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(); | |||||
}; |
@@ -994,6 +994,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTermOfElective\SyncByConditionForm.js" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTermOfElective\SyncByConditionForm.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\ClearByConditionForm.js" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\ClearByConditionForm.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\EmptyByConditionForm.js" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\EmptyByConditionForm.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\IndexLessonTermStu.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\IndexLessonTerm.js" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\IndexLessonTerm.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\SyncByConditionForm.js" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\SyncByConditionForm.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\AwardForm.js" /> | <Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\AwardForm.js" /> | ||||
@@ -1114,6 +1115,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlanTeach\TeachFormQZ.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\ClassPlanTeach\TeachFormQZ.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\MealCardRunTab\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\MealCardRunTab\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\MealCardRunTab\Index.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\MealCardRunTab\Index.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\IndexLessonTermStu.cshtml" /> | |||||
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | <None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | ||||