|
@@ -12,7 +12,6 @@ |
|
|
<meta http-equiv="cache-control" content="no-cache" /> |
|
|
<meta http-equiv="cache-control" content="no-cache" /> |
|
|
<meta http-equiv="expires" content="0" /> |
|
|
<meta http-equiv="expires" content="0" /> |
|
|
<style> |
|
|
<style> |
|
|
|
|
|
|
|
|
h4 { |
|
|
h4 { |
|
|
font-size: 23px; |
|
|
font-size: 23px; |
|
|
font-weight: 400; |
|
|
font-weight: 400; |
|
@@ -45,16 +44,17 @@ |
|
|
border: 1px solid #222; |
|
|
border: 1px solid #222; |
|
|
border-top: none; |
|
|
border-top: none; |
|
|
border-bottom: none; |
|
|
border-bottom: none; |
|
|
border-collapse:collapse; |
|
|
|
|
|
border-spacing:0px; |
|
|
|
|
|
|
|
|
border-collapse: collapse; |
|
|
|
|
|
border-spacing: 0px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
td { |
|
|
td { |
|
|
width: 15%; |
|
|
|
|
|
|
|
|
width: 14%; |
|
|
height: 44px; |
|
|
height: 44px; |
|
|
border: 1px solid #222; |
|
|
border: 1px solid #222; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.pageBreak { |
|
|
.pageBreak { |
|
|
page-break-after: always; |
|
|
page-break-after: always; |
|
|
} |
|
|
} |
|
@@ -69,10 +69,6 @@ |
|
|
cursor: pointer; |
|
|
cursor: pointer; |
|
|
border-radius: 4px; |
|
|
border-radius: 4px; |
|
|
} |
|
|
} |
|
|
.tableBox { |
|
|
|
|
|
width: 90%; |
|
|
|
|
|
margin: 30px auto; |
|
|
|
|
|
} |
|
|
|
|
|
</style> |
|
|
</style> |
|
|
</head> |
|
|
</head> |
|
|
|
|
|
|
|
@@ -156,185 +152,185 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="btn">打印</div> |
|
|
<div class="btn">打印</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<script src="~/Content/jquery/plugin/fullcalendar/js/jquery-1.7.2.min.js"></script> |
|
|
|
|
|
<script src="~/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js"></script> |
|
|
<script> |
|
|
<script> |
|
|
$('.btn').click(function () { |
|
|
|
|
|
window.print() |
|
|
|
|
|
}) |
|
|
|
|
|
</script> |
|
|
|
|
|
<script> |
|
|
|
|
|
//绑定字典或源的值 |
|
|
|
|
|
function GetDataSourceStr(code, value, text, valueStr, box) { |
|
|
|
|
|
$(box).html(""); |
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
url: "/OnlineRegistrate/GetDataSourceMap?code=" + code, |
|
|
|
|
|
async: false, |
|
|
|
|
|
success: function (msg) { |
|
|
|
|
|
var msgObject = $.parseJSON(msg); |
|
|
|
|
|
if (msgObject.code == 200) { |
|
|
|
|
|
$.each(msgObject.data, function (i, item) { |
|
|
|
|
|
if (item[value] == valueStr) { |
|
|
|
|
|
$(box).html(item[text]); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
layer.msg(msgObject.info); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
}; |
|
|
|
|
|
function GetDataItemStr(code, valueStr, box) { |
|
|
|
|
|
$(box).html(""); |
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
url: "/OnlineRegistrate/GetDataItemMap?code=" + code, |
|
|
|
|
|
async: false, |
|
|
|
|
|
success: function (msg) { |
|
|
|
|
|
var msgObject = $.parseJSON(msg); |
|
|
|
|
|
if (msgObject.code == 200) { |
|
|
|
|
|
$.each(msgObject.data, function (i, item) { |
|
|
|
|
|
if (item["F_ItemValue"] == valueStr) { |
|
|
|
|
|
$(box).html(item["F_ItemName"]); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
layer.msg(msgObject.info); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
}; |
|
|
|
|
|
GetDataItemStr("usersexbit", "@Model.GenderNo.ToString().ToLower()", "#GenderNo"); |
|
|
|
|
|
GetDataItemStr("National", "@Model.NationalityNo", "#NationalityNo"); |
|
|
|
|
|
GetDataItemStr("PolityStatus", "@Model.PartyFaceNo", "#PartyFaceNo"); |
|
|
|
|
|
GetDataItemStr("StudyModality", "@Model.StudyModality", "#StudyModality"); |
|
|
|
|
|
GetDataSourceStr("CdMajorInfo", "majorno", "majorname", "@Model.MajorNo", "#MajorNo"); |
|
|
|
|
|
GetDataSourceStr("bjsj", "classno", "classname", "@Model.ClassNo", "#ClassNo"); |
|
|
|
|
|
$(window).load(function () { |
|
|
|
|
|
var listData1 = "@Model.StuScoreClassOneList.ToJson()"; |
|
|
|
|
|
var listData = JSON.parse(listData1.replace(/"/g, "\"")); |
|
|
|
|
|
// 有六个学期 |
|
|
|
|
|
var tableHtml = "" |
|
|
|
|
|
for (var j = 0; j < listData.length; j++) { |
|
|
|
|
|
|
|
|
$('.btn').click(function () { |
|
|
|
|
|
window.print(); |
|
|
|
|
|
}); |
|
|
|
|
|
//绑定字典或源的值 |
|
|
|
|
|
function GetDataSourceStr(code, value, text, valueStr, box) { |
|
|
|
|
|
$(box).html(""); |
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
url: "/OnlineRegistrate/GetDataSourceMap?code=" + code, |
|
|
|
|
|
async: false, |
|
|
|
|
|
success: function (msg) { |
|
|
|
|
|
var msgObject = $.parseJSON(msg); |
|
|
|
|
|
if (msgObject.code == 200) { |
|
|
|
|
|
$.each(msgObject.data, function (i, item) { |
|
|
|
|
|
if (item[value] == valueStr) { |
|
|
|
|
|
$(box).html(item[text]); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
layer.msg(msgObject.info); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
}; |
|
|
|
|
|
function GetDataItemStr(code, valueStr, box) { |
|
|
|
|
|
$(box).html(""); |
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
url: "/OnlineRegistrate/GetDataItemMap?code=" + code, |
|
|
|
|
|
async: false, |
|
|
|
|
|
success: function (msg) { |
|
|
|
|
|
var msgObject = $.parseJSON(msg); |
|
|
|
|
|
if (msgObject.code == 200) { |
|
|
|
|
|
$.each(msgObject.data, function (i, item) { |
|
|
|
|
|
if (item["F_ItemValue"] == valueStr) { |
|
|
|
|
|
$(box).html(item["F_ItemName"]); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
layer.msg(msgObject.info); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
}; |
|
|
|
|
|
GetDataItemStr("usersexbit", "@Model.GenderNo.ToString().ToLower()", "#GenderNo"); |
|
|
|
|
|
GetDataItemStr("National", "@Model.NationalityNo", "#NationalityNo"); |
|
|
|
|
|
GetDataItemStr("PolityStatus", "@Model.PartyFaceNo", "#PartyFaceNo"); |
|
|
|
|
|
GetDataItemStr("StudyModality", "@Model.StudyModality", "#StudyModality"); |
|
|
|
|
|
GetDataSourceStr("CdMajorInfo", "majorno", "majorname", "@Model.MajorNo", "#MajorNo"); |
|
|
|
|
|
GetDataSourceStr("bjsj", "classno", "classname", "@Model.ClassNo", "#ClassNo"); |
|
|
|
|
|
$(window).load(function () { |
|
|
|
|
|
var listData1 = "@Model.StuScoreClassOneList.ToJson()"; |
|
|
|
|
|
var listData = JSON.parse(listData1.replace(/"/g, "\"")); |
|
|
|
|
|
// 有六个学期 |
|
|
|
|
|
var tableHtml = "" |
|
|
|
|
|
for (var j = 0; j < listData.length; j++) { |
|
|
|
|
|
|
|
|
tableHtml += "<table cellpadding='0' cellspacing='0' id='table" + j + "'>" |
|
|
|
|
|
var trNum = Math.ceil(listData[j].StuScoreList.length / 3) |
|
|
|
|
|
// 代表当前有几行 不确定是否每行都是满的 |
|
|
|
|
|
var str = "" |
|
|
|
|
|
// 循环其行tr |
|
|
|
|
|
for (var i = 0; i < trNum; i++) { |
|
|
|
|
|
var std = "" |
|
|
|
|
|
str += "<tr>" |
|
|
|
|
|
// 开始循环6列 三门成绩 |
|
|
|
|
|
// 循环3次td每次两个 |
|
|
|
|
|
for (var k = 0; k < 2; k++) { |
|
|
|
|
|
if(k==0){ |
|
|
|
|
|
// 如果是第一列 |
|
|
|
|
|
if(i==0){ |
|
|
|
|
|
// 如果是第一行的第一列 |
|
|
|
|
|
std += `<td rowspan='5'>第${j + 1}学期</td>` |
|
|
|
|
|
}else{ |
|
|
|
|
|
// 如果是不是第一行的第一列 则什么都不加 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
tableHtml += "<table cellpadding='0' cellspacing='0' id='table" + j + "'>" |
|
|
|
|
|
var trNum = Math.ceil(listData[j].StuScoreList.length / 3) |
|
|
|
|
|
// 代表当前有几行 不确定是否每行都是满的 |
|
|
|
|
|
var str = "" |
|
|
|
|
|
// 循环其行tr |
|
|
|
|
|
for (var i = 0; i < trNum; i++) { |
|
|
|
|
|
var std = "" |
|
|
|
|
|
str += "<tr>" |
|
|
|
|
|
// 开始循环6列 三门成绩 |
|
|
|
|
|
// 循环3次td每次两个 |
|
|
|
|
|
for (var k = 0; k < 2; k++) { |
|
|
|
|
|
if(k==0){ |
|
|
|
|
|
// 如果是第一列 |
|
|
|
|
|
if(i==0){ |
|
|
|
|
|
// 如果是第一行的第一列 |
|
|
|
|
|
std += `<td rowspan='5'>第${j + 1}学期</td>` |
|
|
}else{ |
|
|
}else{ |
|
|
// 如果不是第一列 |
|
|
|
|
|
// i是第几行 i*3-1 (i-1)*3 |
|
|
|
|
|
var startNum = (i)*3 |
|
|
|
|
|
var endNum = (i+1)*3-1 |
|
|
|
|
|
// 控制单元格从第几个开始,到底几个结束 |
|
|
|
|
|
for(var tdsNum = startNum;tdsNum<=endNum;tdsNum++){ |
|
|
|
|
|
// console.log(tdsNum,'222',listData[j].StuScoreList[3]['text']) |
|
|
|
|
|
// 有取到数据 |
|
|
|
|
|
if(listData[j].StuScoreList[tdsNum]){ |
|
|
|
|
|
std += `<td>${listData[j].StuScoreList[tdsNum]['LessonName']}</td><td>${listData[j].StuScoreList[tdsNum]['Score']}</td>` |
|
|
|
|
|
}else{ |
|
|
|
|
|
// 无数据 |
|
|
|
|
|
std +=`<td></td><td></td>` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 如果是不是第一行的第一列 则什么都不加 |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
// 如果不是第一列 |
|
|
|
|
|
// i是第几行 i*3-1 (i-1)*3 |
|
|
|
|
|
var startNum = (i)*3 |
|
|
|
|
|
var endNum = (i+1)*3-1 |
|
|
|
|
|
// 控制单元格从第几个开始,到底几个结束 |
|
|
|
|
|
for(var tdsNum = startNum;tdsNum<=endNum;tdsNum++){ |
|
|
|
|
|
// console.log(tdsNum,'222',listData[j].StuScoreList[3]['text']) |
|
|
|
|
|
// 有取到数据 |
|
|
|
|
|
if(listData[j].StuScoreList[tdsNum]){ |
|
|
|
|
|
std += `<td>${listData[j].StuScoreList[tdsNum]['LessonName']}</td><td>${listData[j].StuScoreList[tdsNum]['Score']}</td>` |
|
|
|
|
|
}else{ |
|
|
|
|
|
// 无数据 |
|
|
|
|
|
std +=`<td></td><td></td>` |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
str += std + "</tr>" |
|
|
|
|
|
} |
|
|
} |
|
|
tableHtml += str + "</table>" |
|
|
|
|
|
|
|
|
str += std + "</tr>" |
|
|
} |
|
|
} |
|
|
setTimeout(() => { |
|
|
|
|
|
$(".tablehtml").html(tableHtml) |
|
|
|
|
|
},100) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tableHtml += str + "</table>" |
|
|
|
|
|
} |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
$(".tablehtml").html(tableHtml) |
|
|
|
|
|
},100) |
|
|
|
|
|
|
|
|
var yiH = $("#table0").height() |
|
|
|
|
|
var erH = $("#table1").height() |
|
|
|
|
|
var sanH = $("#table2").height() |
|
|
|
|
|
var siH = $("#table3").height() |
|
|
|
|
|
var wuH = $("#table4").height() |
|
|
|
|
|
var liuH = $("#table5").height() |
|
|
|
|
|
var siNumH = erH + sanH + siH |
|
|
|
|
|
// erDom.classList.add("pageBreak") |
|
|
|
|
|
$("#table1").addClass("pageBreak") |
|
|
|
|
|
// removeClass() |
|
|
|
|
|
if (yiH > 300) { |
|
|
|
|
|
|
|
|
|
|
|
$("#table0").addClass("pageBreak") |
|
|
|
|
|
$("#table5").addClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var yiH = $("#table0").height() |
|
|
|
|
|
var erH = $("#table1").height() |
|
|
|
|
|
var sanH = $("#table2").height() |
|
|
|
|
|
var siH = $("#table3").height() |
|
|
|
|
|
var wuH = $("#table4").height() |
|
|
|
|
|
var liuH = $("#table5").height() |
|
|
|
|
|
var siNumH = erH + sanH + siH |
|
|
|
|
|
// erDom.classList.add("pageBreak") |
|
|
|
|
|
$("#table1").addClass("pageBreak") |
|
|
|
|
|
// removeClass() |
|
|
|
|
|
if (yiH > 300) { |
|
|
|
|
|
|
|
|
if (erH > 300) { |
|
|
|
|
|
$("#table0").addClass("pageBreak") |
|
|
|
|
|
$("#table1").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$("#table0").addClass("pageBreak") |
|
|
|
|
|
$("#table5").addClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (sanH > 300) { |
|
|
|
|
|
$("#table1").removeClass("pageBreak") |
|
|
|
|
|
$("#table2").addClass("pageBreak") |
|
|
|
|
|
$("#table3").removeClass("pageBreak") |
|
|
|
|
|
$("#table4").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
if (siH > 400) { |
|
|
|
|
|
$("#table3").addClass("pageBreak") |
|
|
|
|
|
$("#table5").removeClass("pageBreak") |
|
|
|
|
|
$("#table4").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
if (wuH > 400) { |
|
|
|
|
|
$("#table4").addClass("pageBreak") |
|
|
|
|
|
liuDom.removeClass("pageBreak") |
|
|
|
|
|
|
|
|
if (erH > 300) { |
|
|
|
|
|
$("#table0").addClass("pageBreak") |
|
|
|
|
|
$("#table1").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if (liuH > 400) { |
|
|
|
|
|
$("#table4").addClass("pageBreak") |
|
|
|
|
|
|
|
|
if (sanH > 300) { |
|
|
|
|
|
$("#table1").removeClass("pageBreak") |
|
|
|
|
|
$("#table2").addClass("pageBreak") |
|
|
|
|
|
$("#table3").removeClass("pageBreak") |
|
|
|
|
|
$("#table4").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
if (siH > 400) { |
|
|
|
|
|
$("#table3").addClass("pageBreak") |
|
|
|
|
|
$("#table5").removeClass("pageBreak") |
|
|
|
|
|
$("#table4").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
if (wuH > 400) { |
|
|
|
|
|
$("#table4").addClass("pageBreak") |
|
|
|
|
|
liuDom.removeClass("pageBreak") |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if ((yiH + erH) > 200) { |
|
|
|
|
|
$("#table1").addClass("pageBreak") |
|
|
|
|
|
$("#table2").removeClass("pageBreak") |
|
|
|
|
|
$("#table3").removeClass("pageBreak") |
|
|
|
|
|
$("#table4").removeClass("pageBreak") |
|
|
|
|
|
$("#table5").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
if ((erH + sanH) > 600) { |
|
|
|
|
|
$("#table2").addClass("pageBreak") |
|
|
|
|
|
$("#table3").removeClass("pageBreak") |
|
|
|
|
|
$("#table4").removeClass("pageBreak") |
|
|
|
|
|
$("#table5").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
if ((sanH + siH) > 700) { |
|
|
|
|
|
// siDom.classList.add("pageBreak") |
|
|
|
|
|
$("#table4").removeClass("pageBreak") |
|
|
|
|
|
$("#table5").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if (liuH > 400) { |
|
|
|
|
|
$("#table4").addClass("pageBreak") |
|
|
|
|
|
|
|
|
if ((siH + wuH) > 700) { |
|
|
|
|
|
$("#table4").addClass("pageBreak") |
|
|
|
|
|
$("#table5").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if ((yiH + erH) > 200) { |
|
|
|
|
|
$("#table1").addClass("pageBreak") |
|
|
|
|
|
$("#table2").removeClass("pageBreak") |
|
|
|
|
|
$("#table3").removeClass("pageBreak") |
|
|
|
|
|
$("#table4").removeClass("pageBreak") |
|
|
|
|
|
$("#table5").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
if ((erH + sanH) > 600) { |
|
|
|
|
|
$("#table2").addClass("pageBreak") |
|
|
|
|
|
$("#table3").removeClass("pageBreak") |
|
|
|
|
|
$("#table4").removeClass("pageBreak") |
|
|
|
|
|
$("#table5").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
if ((sanH + siH) > 700) { |
|
|
|
|
|
// siDom.classList.add("pageBreak") |
|
|
|
|
|
$("#table4").removeClass("pageBreak") |
|
|
|
|
|
$("#table5").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if ((erH + sanH + siH) > 700) { |
|
|
|
|
|
$("#table2").addClass("pageBreak") |
|
|
|
|
|
$("#table3").removeClass("pageBreak") |
|
|
|
|
|
$("#table4").classList.add("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
if ((siH + wuH) > 700) { |
|
|
|
|
|
$("#table4").addClass("pageBreak") |
|
|
|
|
|
$("#table5").removeClass("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ((erH + sanH + siH) > 700) { |
|
|
|
|
|
$("#table2").addClass("pageBreak") |
|
|
|
|
|
$("#table3").removeClass("pageBreak") |
|
|
|
|
|
$("#table4").classList.add("pageBreak") |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|
</body> |
|
|
</body> |
|
|
|
|
|
|
|
|