From 76a539d68a53e238b95ed6153a7fa7e68c737899 Mon Sep 17 00:00:00 2001 From: yxq Date: Tue, 18 Apr 2023 10:11:09 +0800 Subject: [PATCH] =?UTF-8?q?web=20=E6=96=B9=E5=90=91=E7=A1=AE=E8=AE=A4=20?= =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuInfoBasicController.cs | 8 ++ .../Exam_ArrangeExamTermNew/IndexItem.js | 1 - .../Views/StuInfoBasic/Direction.cshtml | 15 +- .../Views/StuInfoBasic/Direction.js | 44 +++++- .../Views/StuInfoBasic/DirectionPrint.cshtml | 27 ++++ .../Views/StuInfoBasic/DirectionPrint.js | 136 ++++++++++++++++++ .../css/StuInfoBasic/DirectionPrint.css | 99 +++++++++++++ .../css/StuTransferInfo/QueryScoreIndex.css | 26 ++++ .../Learun.Application.Web.csproj | 3 + .../Views/LR_Content/plugin/grid/jfgrid.js | 13 +- 10 files changed, 356 insertions(+), 16 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/DirectionPrint.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/DirectionPrint.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/StuInfoBasic/DirectionPrint.css diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs index 953cdd604..c4cba2f55 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs @@ -115,6 +115,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } /// + /// 打印方向表 + /// + /// + public ActionResult DirectionPrint() + { + return View(); + } + /// /// 打印 /// /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js index e6fd0df2f..b20cb0cac 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js @@ -130,7 +130,6 @@ var bootstrap = function ($, learun) { var AcademicYearNo = $('#AcademicYearNo').lrselectGet() || ''; var Semester = $('#Semester').lrselectGet() || ''; var LessonNo = $('#LessonNo').lrselectGet() || ''; - console.log({ AcademicYearNo, Semester, LessonNo }, AcademicYearNo != '' && Semester != '' && LessonNo != '') if (AcademicYearNo == '' && Semester == '' || LessonNo == '' ) { learun.alert.warning("请选择学年,学期以及课程"); return; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Direction.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Direction.cshtml index e6999fe5f..b09618f91 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Direction.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Direction.cshtml @@ -2,15 +2,16 @@ ViewBag.Title = "学生学籍"; Layout = "~/Views/Shared/_Index.cshtml"; } +
班级列表
-
+
-
+
学生列表信息
@@ -37,7 +38,7 @@
身份证号
- +
@@ -50,7 +51,13 @@
-
+
+ +
+
+
+
+ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Direction.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Direction.js index 62608dfba..efa3c9c11 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Direction.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Direction.js @@ -1,7 +1,7 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; - var Class; + var Class, ClassName; var page = { init: function () { page.initGird(); @@ -13,6 +13,7 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetTree', nodeClick: function (item) { Class = item.value; + ClassName = item.text; page.search({ ClassNo: item.value }); } }); @@ -27,7 +28,38 @@ var bootstrap = function ($, learun) { }); // 打印 $('#lr_print').on('click', function () { - $('#gridtable').jqprintTable(); + if (!Class) { + learun.alert.warning("请选择左侧班级!"); + return + } + let params = { + ClassName, + Class, + } + learun.layerForm({ + id: 'QueryBasicInfo', + title: '学生方向确认', + url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/DirectionPrint?' + $.param(params), + width: 1102, + height: 800, + btn: null + }); + //$('.printTitle').text((ClassName || '')+'学生方向确认') + //$('.printTitle').css('display', 'block'); + //$('#gridtable').css('zoom', '94%') + + //let p5Width = $('.jfgrid-head-cell[path=5]').css('width') + //$('.jfgrid-head-cell[path=5]').css('width', '480px') + //let p10Width = $('.jfgrid-head-cell[path=10]').css('width') + //$('.jfgrid-head-cell[path=10]').css('width', '82px') + ////$('#gridtable').jqprintTable(); + + //$('#printBox').jqprint(); + + //$('.jfgrid-head-cell[path=5]').css('width', p5Width) + //$('.jfgrid-head-cell[path=10]').css('width', p10Width) + //$('#gridtable').css('zoom', '100%') + //$('.printTitle').css('display', 'none'); }); }, // 初始化列表 @@ -37,12 +69,12 @@ var bootstrap = function ($, learun) { headData: [ { label: "姓名", name: "StuName", width: 100, align: "center" }, { - label: "性别", name: "GenderNo", width: 80, align: "center", + label: "性别", name: "GenderNo", width: 40, align: "center", formatter: function (cellvalue) { return cellvalue == true ? "男" : "女"; } }, - { label: "身份证号", name: "IdentityCardNo", width: 180, align: "center" }, + { label: "身份证号", name: "IdentityCardNo", width: 150, align: "center" }, { label: "民族", name: "NationalityNo", width: 100, align: "center", formatterAsync: function (callback, value, row, op, $cell) { @@ -57,7 +89,7 @@ var bootstrap = function ($, learun) { }, { label: "学籍号", name: "StuCode", width: 160, align: "center" , }, { - label: '选择方向', name: '选择方向', align: "center", statistics: true, + label: '选择方向', name: '选择方向', align: "center", statistics: true, width: 460, children: [ { label: "技能高考", name: "GK", width: 100, align: "center" }, { label: "高职单招", name: "DZ", width: 100, align: "center" }, @@ -101,7 +133,7 @@ var bootstrap = function ($, learun) { } param = param || {}; param.ClassNo = Class; - $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: request('page') || 1}); } }; refreshGirdData = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/DirectionPrint.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/DirectionPrint.cshtml new file mode 100644 index 000000000..4a2d8bcee --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/DirectionPrint.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "学生学籍"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+
+  打印 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoBasic/DirectionPrint.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/DirectionPrint.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/DirectionPrint.js new file mode 100644 index 000000000..e710aaca6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/DirectionPrint.js @@ -0,0 +1,136 @@ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var Class, ClassName; + var page = { + init: function () { + Class = request('Class') + $.ajax({ + url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetTree', + type: "get", + dataType: "json", + async: false, + cache: false, + success: function (res) { + if (res.code == 200) { + let obj = res.data.find(e => e.value == Class) + ClassName = obj ? obj.text : '' + $('.printTitle').text((ClassName || '') + '学生方向确认') + } + }, + }); + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); + $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 打印 + $('#lr_print').on('click', function () { + $('#printPage').jqprint(); + }); + }, + // 初始化列表 + initGird: function () { + let option = { + url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList', + headData: [ + { label: "姓名", name: "StuName", width: 100, align: "center" }, + { + label: "性别", name: "GenderNo", width: 40, align: "center", + formatter: function (cellvalue) { + return cellvalue == true ? "男" : "女"; + } + }, + { label: "身份证号", name: "IdentityCardNo", width: 150, align: "center" }, + { + label: "民族", name: "NationalityNo", width: 100, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'National', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "学籍号", name: "StuCode", width: 160, align: "center", }, + { + label: '选择方向', name: '选择方向', align: "center", statistics: true, width: 460, + children: [ + { label: "技能高考", name: "GK", width: 80, align: "center" }, + { label: "高职单招", name: "DZ", width: 80, align: "center" }, + { label: "3+2高职转段", name: "ZD", width: 100, align: "center" }, + { label: "就业", name: "JY", width: 70, align: "center" }, + { label: "签名", name: "QM", width: 80, align: "center" }, + ] + }, + + + ], + mainId: 'StuId', + isPage: true, + rows: 24, + isShowNum: true, + // 是否显示序号 + //isMultiselect: true, + //onSelectRow: function (rowdata) { + // if (rowdata.CheckMark == "1") { + // $("#check").hide(); + // $("#uncheck").show(); + // $("#lr_edit").hide(); + // $("#lr_delete").hide(); + // } else { + // $("#uncheck").hide(); + // $("#check").show(); + // $("#lr_edit").show(); + // $("#lr_delete").show(); + // } + //} + onRenderComplete: function (list) { + //if (!list.length) { + // $('.pageCard').hide() + //} + } + + } + $('#gridtable').lrAuthorizeJfGridLei(option); + $('#gridtable1').lrAuthorizeJfGridLei({ + ...option, onRenderComplete: function (list) { + if (!list.length) { $('.pageCard1').hide() } + } + }); + $('#gridtable2').lrAuthorizeJfGridLei({ + ...option, onRenderComplete: function (list) { + if (!list.length) { $('.pageCard2').hide() } + } + }); + $('#gridtable3').lrAuthorizeJfGridLei({ + ...option, onRenderComplete: function (list) { + if (!list.length) { $('.pageCard3').hide() } + } + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.ClassNo = Class; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 1 }); + $('#gridtable1').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 2 }); + $('#gridtable2').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 3 }); + $('#gridtable3').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 4 }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/StuInfoBasic/DirectionPrint.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/StuInfoBasic/DirectionPrint.css new file mode 100644 index 000000000..0d3e759b6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/StuInfoBasic/DirectionPrint.css @@ -0,0 +1,99 @@ +body { + overflow-y:auto +} + +.lr-layout-body { + overflow: auto; +} + +#printPage::-webkit-scrollbar { + display: none +} + +.jfgrid-footer { + display:none; +} + +.printTitle { + color: #333; + font-size: 20px; + text-align: center; + line-height: 54px; + height: 54px; + position:absolute; + top:0; + width:100%; +} + +.pageCard { + position: relative; + padding-top:54px; +} + +.jfgrid-layout { + border-top: 1px solid #ccc; + border-right: 1px solid #ccc; + border-left: 1px solid #ccc; + padding-bottom:0!important; +} + + +@media print { + body { + height: auto !important; + border: none !important; + padding-left: 20px !important; + padding-right: 20px !important; + zoom:98%; + } + + .no-print{ + display:none; + } + + .pageCard { + /*padding-top: 18px;*/ + padding-left: 10px; + padding-right: 10px; + box-sizing: border-box; + height: 100vh !important; + overflow:hidden; + } + /*.pagecard.firstpage{ + padding-top:0px; + }*/ + ::-webkit-scrollbar { + display: none + } + + .btn { + display: none; + } + + /*打印时框架样式处理*/ + .lr-layout.lr-layout-left-center { + padding-left: 0px !important; + } + + .lr-layout-center > .lr-layout-wrap { + padding-top: 0px !important; + } + + .lr-scroll-box { + position: unset !important; + } + + .jfgrid-footer { + display: none; + } + + .jfgrid_body_gridtable { + overflow: unset !important; + height: auto !important; + } + + .lr-layout-title { + border-top: 0 !important; + } + +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/StuTransferInfo/QueryScoreIndex.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/StuTransferInfo/QueryScoreIndex.css index 1e623fe4a..0db9c04c7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/StuTransferInfo/QueryScoreIndex.css +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/StuTransferInfo/QueryScoreIndex.css @@ -62,4 +62,30 @@ font-size: 14px; color: #333; } + + /*打印时框架样式处理*/ + .lr-layout.lr-layout-left-center { + padding-left: 0px!important; + } + .lr-layout-center>.lr-layout-wrap { + padding-top: 0px!important; + } + .lr-scroll-box { + position: unset!important; + } + .jfgrid-footer{ + display:none; + } + .jfgrid_body_gridtable { + overflow: unset !important; + height: auto !important; + } + + .lr-layout-title{ + border-top:0!important; + } + .lr-layout-body{ + height:2848px!important; + border:none!important; + } } 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 0bba9e1d5..d8a5adada 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 @@ -1222,6 +1222,7 @@ + @@ -1341,6 +1342,7 @@ + @@ -1909,6 +1911,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js index b734ee725..7c55922d5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js @@ -1374,7 +1374,7 @@ }); }, // 后台数据加载 - reload: function ($self, op) { + reload: function ($self, op, setData={}) { op.rowdatas = []; if (op.isPage) { learun.loading(true, '正在获取数据'); @@ -1403,6 +1403,8 @@ op.running.pageparam.page = 1; } + if(setData.page)op.running.pageparam.page = setData.page; + op.param['pagination'] = JSON.stringify(op.running.pageparam); learun.httpAsync('GET', op.url, op.param, function (data) { @@ -2181,7 +2183,8 @@ return $self; }; - $.fn.jfGridSet = function (name, data) { + $.fn.jfGridSet = function (name, data, setData) { + setData = setData || {} var $self = $(this); if (!$self[0]) { return null; @@ -2193,12 +2196,12 @@ switch (name) { case 'reload': // 重新加载一边数据 if (data == undefined || data == null) { - _jfgrid.reload($self, dfop); + _jfgrid.reload($self, dfop, setData); } else { data = data || dfop.param || {}; dfop.param = data.param || data; - _jfgrid.reload($self, dfop); + _jfgrid.reload($self, dfop, setData); } break; case 'reloadall'://重新加载所有数据 @@ -2206,7 +2209,7 @@ data = data || dfop.param || {}; dfop.param = data.param || data; dfop.running.pageparam.page = 1; - _jfgrid.reload($self, dfop); + _jfgrid.reload($self, dfop, setData); break; case 'refresh': break;