diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.js index 9ec70397f..f8aed1e5c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.js @@ -1,53 +1,69 @@ -(function () { - var multipleData = null; - var page = { - grid: null, - init: function ($page) { - page.grid = $page.find('#lr_ArrangeExamTerm_list').lrpagination({ - lclass: page.lclass, - rows: 10, // 每页行数 - getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调 - param.multipleData = multipleData; - page.loadData(param, callback, $page); - }, - renderData: function (_index, _item, _$item) {// 渲染数据模板 - return page.rowRender(_index, _item, _$item, $page); - }, - }); - }, - lclass: 'lr-list', - loadData: function (param, callback, $page) {// 列表加载后台数据 - var _postParam = { - pagination: { - rows: param.rows, - page: param.page - }, - queryJson: '{}' - }; - if (param.multipleData) { - _postParam.queryJson = JSON.stringify(multipleData); - } - learun.httpget(config.webapi + '/learun/ask/testlist', _postParam, (data) => { - $page.find('.lr-badge').text('0'); - if (data) { - $page.find('.lr-badge').text(data.records); - callback(data.rows, parseInt(data.records)); - } - else { - callback([], 2); - } - }); - }, - rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据 - _$item.addClass('lr-list-item lr-list-item-multi'); - _$item.append($('
考试日期:
').dataFormatter({ value: _item.ExamDate })); - _$item.append($('考试时间:
').dataFormatter({ value: _item.ExamTime })); - _$item.append($('课程编码:
').dataFormatter({ value: _item.LessonNo })); - _$item.append($('课程名称:
').dataFormatter({ value: _item.LessonName })); - _$item.append($('教室编码:
').dataFormatter({ value: _item.ClassRoomNo })); - _$item.append($('教室名称:
').dataFormatter({ value: _item.ClassRoomName })); - return ''; - }, - }; - return page; -})(); \ No newline at end of file +(function() { + var multipleData = null; + var page = { + grid: null, + init: function($page) { + page.grid = $page.find('#lr_ArrangeExamTerm_list').lrpagination({ + lclass: page.lclass, + rows: 10, // 每页行数 + getData: function(param, callback) { // 获取数据 param 分页参数,callback 异步回调 + param.multipleData = multipleData; + page.loadData(param, callback, $page); + }, + renderData: function(_index, _item, _$item) { // 渲染数据模板 + return page.rowRender(_index, _item, _$item, $page); + }, + }); + }, + lclass: 'lr-list', + loadData: function(param, callback, $page) { // 列表加载后台数据 + var _postParam = { + pagination: { + rows: param.rows, + page: param.page, + sidx: 'ExamDate', + sord: 'asc', + }, + queryJson: '{}' + }; + if (param.multipleData) { + _postParam.queryJson = JSON.stringify(multipleData); + } + + var baseUser = JSON.parse(localStorage.userinfo); + _postParam.queryJson = JSON.stringify({ EmpNo: baseUser.baseinfo.account }); + learun.httpget(config.webapi + '/learun/ask/testlist', _postParam, (data) => { + $page.find('.lr-badge').text('0'); + if (data) { + $page.find('.lr-badge').text(data.records); + callback(data.rows, parseInt(data.records)); + } else { + callback([], 2); + } + }); + }, + rowRender: function(_index, _item, _$item, $page) { // 渲染列表行数据 + _$item.addClass('lr-list-item lr-list-item-multi'); + _$item.append($('考试日期:
').dataFormatter({ + value: _item.ExamDate + })); + _$item.append($('考试时间:
').dataFormatter({ + value: _item.ExamTime + })); + _$item.append($('课程编码:
').dataFormatter({ + value: _item.LessonNo + })); + _$item.append($('课程名称:
').dataFormatter({ + value: _item.LessonName + })); + _$item.append($('教室编码:
').dataFormatter({ + value: _item.ClassRoomNo + })); + _$item.append($('教室名称:
').dataFormatter({ + value: _item.ClassRoomName + })); + return ''; + }, + }; + return page; +})();