文档存档-章节

beetlsql3-dev
姚丹ab
parent f676d84fcd
commit 9dd0cab093

@ -229,6 +229,20 @@ public class QuestionLogSummaryController extends BaseController {
return view;
}
/**
*@author
*@data 2023/01/11
*/
@GetMapping(MODEL + "/indexInfo.do")
@Function("questionLogSummary.query")
public ModelAndView indexInfo(Long teacherOpenCourseId) {
ModelAndView view = new ModelAndView("/jlw/questionLogSummary/indexInfo.html") ;
view.addObject("search", QuestionLogSummaryQuery.class.getName());
view.addObject("teacherOpenCourseId", teacherOpenCourseId);
return view;
}
/* 后台接口 */
@PostMapping(MODEL + "/list.json")

@ -197,7 +197,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) {
});
});
}else if (obj.event === 'details') {
var url = "/jlw/teacherOpenCourseStudentSigninLog/index.do?signinSettingId=" + data.teacherOpenCourseStudentSigninSettingId + "&tOCId=" + teacherOpenCourseId;
var url = "/jlw/questionLogSummary/indexInfo.do";
Common.openDlg(url,"/详情");
}
})

@ -0,0 +1,375 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseStudentSigninLog/"}){ -->
<div class="layui-row layui-col-space15 layui-form">
<div class="layui-col-md3">
<div class="layui-panel">
<div style="padding: 15px;">
<div class="layui-form" id="studentForm">
<div class="layui-inline">
<label class="layui-form-label">选择班级:</label>
<layui:simpleDictSelect style='layui-input-block' type="school_class.class_name.class_status=1"
id="classId" name="classId"/>
</div>
<div class="layui-inline" style="padding-top: 10px">
<input type="text" id="studentOrName" placeholder="请输入学号或姓名" name="studentOrName"
class="layui-input">
</div>
<div class="layui-inline" style="padding-top: 10px">
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="studentFormSearch"><i
class="layui-icon layui-icon-search"></i>搜索
</button>
</div>
</div>
<table id="studentTable" lay-filter="studentTable"></table>
</div>
</div>
</div>
<div class="layui-col-md9">
<div class="layui-inline">
<layui:searchForm formId="searchForm" searchList="" condition="${search}">
<div class="layui-inline">
<label class="layui-form-label">日期筛选</label>
<div class="layui-input-inline">
<select name="teacherOpenCourseStudentSigninSettingSessionTime" lay-verify="" id="opTime_view"> </select>
<!--<input type="text" name="" placeholder="teacherOpenCourseStudentSigninSettingSessionTime"
autocomplete="off" class="layui-input" id="test5">-->
</div>
</div>
<div class="layui-inline" style="display: none">
<label class="layui-form-label">签到配置id</label>
<div class="layui-input-inline">
<input type="text" name="teacherOpenCourseStudentSigninSettingId" autocomplete="off" class="layui-input"
value="${teacherOpenCourseStudentSigninSettingId}"/>
</div>
</div>
</layui:searchForm>
</div>
<div class="layui-inline layui-form-item" style="margin-top:-5px;">
<layui:accessButton function="teacherOpenCourseStudentSigninLog.query" action="exportDocument"><span
class="iconfont">&#xe8c7;</span>导出</layui:accessButton>
</div>
<div class="layui-inline" style="float: right">
<layui:accessButton function="teacherOpenCourseStudentSigninLog.query" class="layui-btn-primary"
action="addButton_cancel"><span class="iconfont">&#xe600;</span>返回</layui:accessButton>
</div>
<table class="teacherOpenCourseStudentSigninLogTable"
lay-filter="teacherOpenCourseStudentSigninLogTable"></table>
</div>
</div>
<input type="hidden" name="teacherOpenCourseId" autocomplete="off" class="layui-input" value="${teacherOpenCourseId}"/>
<!--#} -->
<script id="opTime_demo" type="text/html">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item}}">{{item}}</option>
{{# }); }}
</script>
<!--<script type="text/html" id="toolbar_teacherOpenCourseStudentSigninLog">
<div class="layui-btn-container">
<div class="layui-btn-group" >
&lt;!&ndash;# if(core.searchIsShow(search)) {&ndash;&gt;
<layui:accessButton function="teacherOpenCourseStudentSigninLog.query" id="searchFormSearch" action="search"><i class="layui-icon">&#xe615;</i>搜索</layui:accessButton>
&lt;!&ndash;# }&ndash;&gt;
<layui:accessButton function="teacherOpenCourseStudentSigninLog.add" action="add">添加</layui:accessButton>
<layui:accessButton function="teacherOpenCourseStudentSigninLog.edit" action="edit">修改</layui:accessButton>
<layui:accessButton function="teacherOpenCourseStudentSigninLog.del" action="del">删除</layui:accessButton>
&lt;!&ndash;# if(!isEmpty(search)) {&ndash;&gt;
<layui:accessButton function="teacherOpenCourseStudentSigninLog.query" action="refresh"><i class="layui-icon">&#xe669;</i>刷新</layui:accessButton>
&lt;!&ndash;# }&ndash;&gt;
</div>
</div>
</script>-->
<script>
layui.use(['index'], function(){
var index = layui.index;
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var laytpl = layui.laytpl;
var teacherOpenCourseStudentSigninLogTable = null;
var studentTable = null;
var teacherOpenCourseStudentSigninSettingId=$("input[name='teacherOpenCourseStudentSigninSettingId']").val();
var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val();
laydate.render({
elem: '#test5'
,type: 'datetime'
, trigger: 'click'
});
var data = [];
var ret = Common.postAjax("/jlw/teacherOpenCourseStudentSigninSetting/sessionDateList.json", {"teacherOpenCourseId": teacherOpenCourseId});
if(ret.code==0){
data = ret.data;
}
var getTpl = opTime_demo.innerHTML
,view = document.getElementById('opTime_view');
laytpl(getTpl).render(data, function(html){
view.innerHTML = html;
});
form.render();
var view ={
init:function(){
var that = this
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"), teacherOpenCourseStudentSigninLogTable);
Lib.doSearchForm($("#searchForm"), studentTable)
that.initToolBar();
}
},
initTable:function(){
var sx_ = localStorage.getItem("teacherOpenCourseStudentSigninLogTable_field_"+Common.userInfoId); //筛选值显示、隐藏缓存
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
teacherOpenCourseStudentSigninLogTable = table.render({
elem: '.teacherOpenCourseStudentSigninLogTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url : Common.ctxPath + '/jlw/teacherOpenCourseStudentSigninLog/list.json' // 数据接口
,where: {'teacherOpenCourseStudentSigninSettingId':teacherOpenCourseStudentSigninSettingId}
,page : Lib.tablePage // 开启分页
/* ,toolbar: '#toolbar_teacherOpenCourseStudentSigninLog' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
,limit : 10,
cols : [ [ // 表头
{
field: 'studentIdText', //数据字典类型为 student.student_name.student_status=1
title: '姓名',
align: "center",
hideField: false,
hide: $.isEmpty(sx_['studentIdText']) ? false : sx_['studentIdText'],
},
{
field: 'studentSn',
title: '学号',
align: "center",
hideField: false,
hide: $.isEmpty(sx_['teacherOpenCourseStudentSigninLogId']) ? false : sx_['teacherOpenCourseStudentSigninLogId'],
},
{
field: 'schoolClassIdText', //数据字典类型为 school_class.class_name.class_status=1
title: '班级',
align: "center",
hideField: false,
hide: $.isEmpty(sx_['schoolClassIdText']) ? false : sx_['schoolClassIdText'],
},
{
field: 'teacherOpenCourseStudentSigninLogTagText', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '状态',
align: "center",
hideField: false,
hide: $.isEmpty(sx_['teacherOpenCourseStudentSigninLogTagText']) ? false : sx_['teacherOpenCourseStudentSigninLogTagText'],
},
// {
// field: 'teacherOpenCourseIdText', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
// title: '缺勤',
// align: "center",
// hideField: false,
// hide: $.isEmpty(sx_['teacherOpenCourseIdText']) ? false : sx_['teacherOpenCourseIdText'],
// templet: function (d) {
// return 1;
// }
// },
{
field: 'teacherOpenCourseStudentSigninLogRemark', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '缺勤理由',
align: "center",
hideField: false,
hide: $.isEmpty(sx_['teacherOpenCourseIdText']) ? false : sx_['teacherOpenCourseIdText'],
},
{
field: 'teacherOpenCourseStudentSigninSettingSessionTime',
title: '签到日期',
align: "center",
hideField: false,
hide: $.isEmpty(sx_['teacherOpenCourseStudentSigninLogAddTime']) ? false : sx_['teacherOpenCourseStudentSigninLogAddTime'],
}
] ]
});
studentTable = table.render({
elem: '#studentTable',
height: Lib.getTableHeight(),
cellMinWidth: 100,
method: 'post',
even: true,
// skin:'nob',
where:getParam_s(),
size: "lg",
url: Common.ctxPath + '/api/teacherOpenCourseQuestionLog/studentScoreList.do' // 数据接口
, page: Lib.tablePage // 开启分页
, limit: 10,
cols: [[
{
field: 'studentSn',
title: '学号', align: "center",
templet:function (d) {
return $.isEmpty(d.studentInfo)?"":d.studentInfo.studentSn
}
},
{
field: 'studentIdText',
title: '姓名', align: "center"
}, {
field: 'studentScore',
title: '得分', align: "center"
}
]]
});
table.on('checkbox(teacherOpenCourseStudentSigninLogTable)', function(obj){
var teacherOpenCourseStudentSigninLog = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
});
//触发行单击事件
table.on('row(studentTable)', function(obj){
var param={
'teacherOpenCourseStudentSigninSettingId': teacherOpenCourseStudentSigninSettingId,
'teacherOpenCourseStudentSigninSettingSessionTime':$("select[name='teacherOpenCourseStudentSigninSettingSessionTime']").val(),
'studentId':obj.data.studentId
}
teacherOpenCourseStudentSigninLogTable.reload({
where: param,
page: {
curr: 1
}
});
});
},
initSearchForm:function(){
//Lib.initSearchForm( $("#searchForm"),teacherOpenCourseStudentSigninLogTable,form);
//Lib.initSearchForm( $("#studentForm"),studentTable,form);
var btn_s = $("#searchFormSearch");
btn_s.on('click', function () {
console.log($("select[name='teacherOpenCourseStudentSigninSettingSessionTime']").val())
var data = $("#searchForm").serializeJson();
teacherOpenCourseStudentSigninLogTable.reload({
where: data,
page: {
curr: 1
}
});
studentTable.reload({
where: getParam_s(),
page: {
curr: 1
}
});
});
var btn = $("#studentFormSearch");
btn.on('click', function () {
studentTable.reload({
where: getParam_s(),
page: {
curr: 1
}
});
});
},
initToolBar:function(){
toolbar = {
add: function () {
var url = "/jlw/teacherOpenCourseStudentSigninLog/add.do";
Common.openDlg(url,"学生签到记录管理>新增");
},
edit: function () {
var data = Common.getOneFromTable(table,"teacherOpenCourseStudentSigninLogTable");
if(data==null){
return ;
}
var url = "/jlw/teacherOpenCourseStudentSigninLog/add.do?teacherOpenCourseStudentSigninLogId="+data.teacherOpenCourseStudentSigninLogId;
Common.openDlg(url,"学生签到记录管理>"+data.teacherOpenCourseStudentSigninLogId+">编辑");
},
del: function () {
layui.use(['del'], function(){
var delView = layui.del
delView.delBatch();
});
},
search: function () {
Lib.doSearchForm($("#searchForm"), teacherOpenCourseStudentSigninLogTable, 1);
view.initToolBar()
},
refresh: function () {
searchForm.reset();
Lib.doSearchForm($("#searchForm"), teacherOpenCourseStudentSigninLogTable, 1);
view.initToolBar()
},
exportDocument: function () {
layui.use([ 'teacherOpenCourseStudentSigninLogApi' ], function() {
var teacherOpenCourseStudentSigninLogApi = layui.teacherOpenCourseStudentSigninLogApi
Common.openConfirm("确认要导出签到详情?", function() {
// teacherOpenCourseStudentSigninLogApi.exportExcel($("#searchForm"), function(fileId) {
// // Lib.download(fileId);
// })
$.downFile(Common.ctxPath + "/api/teacherOpenCourseStudentSigninLog/export.do?teacherOpenCourseId="+teacherOpenCourseId);
})
});
},
importDocument: function () {
var uploadUrl = Common.ctxPath+"/jlw/teacherOpenCourseStudentSigninLog/importTemplate.json";
//模板,
var templatePath= Common.ctxPath+"/jlw/teacherOpenCourseStudentSigninLog/downloadTemplate.json";
//公共的简单上传文件处理
var url = "/core/file/simpleUpload.do?uploadUrl="+uploadUrl+"&templatePath="+templatePath;
Common.openDlg(url, "TeacherOpenCourseStudentSigninLog管理>上传");
},
addButton_cancel:function () {
parent.Lib.tableRefresh();
Lib.closeFrame();
},
}
//触发事件
$('.ext-toolbar').on('click', function() {
var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : '';
});
}, initTableTool: table.on('tool(teacherOpenCourseStudentSigninLogTable)', function (obj) {
var data = obj.data;
if (obj.event === 'edit') {
var url = "/jlw/teacherOpenCourseStudentSigninLog/add.do?teacherOpenCourseStudentSigninLogId="+data.teacherOpenCourseStudentSigninLogId;
Common.openDlg(url,"学生签到记录管理>"+data.teacherOpenCourseStudentSigninLogId+">编辑");
}else if(obj.event === "del"){
layer.confirm('是否确定删除该信息?', function (index) {
var ret = Common.postAjax("/jlw/teacherOpenCourseStudentSigninLog/delete.json",{ids:data.teacherOpenCourseStudentSigninLogId});
layer.msg(ret.code == 0?"删除成功!":ret.msg, {
offset: ['50%'],
icon: ret.code == 0?1:2,
time: 1500 //2秒关闭如果不配置默认是3秒
},function (){
if(ret.code == 0){
Lib.tableRefresh();
}
});
});
}
})
};
function getParam_s(){
var param = {
"teacherOpenCourseStudentSigninSettingSessionTime":$("select[name='teacherOpenCourseStudentSigninSettingSessionTime']").val(),
"schoolClassIdPlural":$("#studentForm select[name='classId']").val(),
"studentSnOrName":$("#studentForm input[name='studentOrName']").val(),
'teacherOpenCourseId':teacherOpenCourseId
};
return param
}
});
</script>
Loading…
Cancel
Save