文件存档 课程实操

beetlsql3-dev
姚丹ab 2 years ago
parent 6c5a68b280
commit 05c2fdca27

@ -1,6 +1,5 @@
package com.ibeetl.jlw.web;
import cn.hutool.core.collection.ListUtil;
import cn.jlw.Interceptor.SCoreUser;
import cn.jlw.util.ToolUtils;
import cn.jlw.validate.ValidateConfig;
@ -10,14 +9,11 @@ import com.ibeetl.admin.core.entity.CoreUser;
import com.ibeetl.admin.core.file.FileService;
import com.ibeetl.admin.core.util.TimeTool;
import com.ibeetl.admin.core.web.JsonResult;
import com.ibeetl.jlw.entity.TaskTypeParam;
import com.ibeetl.jlw.entity.TeacherOpenCourseHandsOn;
import com.ibeetl.jlw.entity.TeacherOpenCourseHandsOnList;
import com.ibeetl.jlw.entity.vo.StudentHandsOnVO;
import com.ibeetl.jlw.enums.ResourcesQuestionSnapshotFromTypeEnum;
import com.ibeetl.jlw.service.TeacherOpenCourseHandsOnService;
import com.ibeetl.jlw.web.query.GetHandsOnListParam;
import com.ibeetl.jlw.web.query.QuestionLogSummaryQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseHandsOnQuery;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
@ -29,7 +25,10 @@ import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
@ -110,6 +109,7 @@ public class TeacherOpenCourseHandsOnController{
/**
*@author
*@data 2023/01/14
* /
*/
@GetMapping(MODEL + "/indexInfoV.do")
@Function("teacherOpenCourseHandsOn.query")
@ -121,6 +121,67 @@ public class TeacherOpenCourseHandsOnController{
return view;
}
/**
* @author
* @data 2023/01/15
* PPT/
*/
@GetMapping(MODEL + "/indexInfoP.do")
@Function("teacherOpenCourseHandsOn.query")
public ModelAndView indexInfoP(Long teacherOpenCourseId, Long handsOnId) {
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseHandsOn/indexInfoP.html");
view.addObject("search", TeacherOpenCourseHandsOnQuery.class.getName());
view.addObject("teacherOpenCourseId", teacherOpenCourseId);
view.addObject("handsOnId", handsOnId);
return view;
}
/**
* @author
* @data 2023/01/15
* /
*/
@GetMapping(MODEL + "/indexInfoT.do")
@Function("teacherOpenCourseHandsOn.query")
public ModelAndView indexInfoT(Long teacherOpenCourseId, Long handsOnId) {
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseHandsOn/indexInfoT.html");
view.addObject("search", TeacherOpenCourseHandsOnQuery.class.getName());
view.addObject("teacherOpenCourseId", teacherOpenCourseId);
view.addObject("handsOnId", handsOnId);
return view;
}
/**
* @author
* @data 2023/01/15
* /
*/
@GetMapping(MODEL + "/indexInfoS.do")
@Function("teacherOpenCourseHandsOn.query")
public ModelAndView indexInfoS(Long teacherOpenCourseId, Long handsOnId) {
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseHandsOn/indexInfoS.html");
view.addObject("search", TeacherOpenCourseHandsOnQuery.class.getName());
view.addObject("teacherOpenCourseId", teacherOpenCourseId);
view.addObject("handsOnId", handsOnId);
return view;
}
/**
* @author
* @data 2023/01/15
* /
*/
@GetMapping(MODEL + "/indexInfoR.do")
@Function("teacherOpenCourseHandsOn.query")
public ModelAndView indexInfoR(Long teacherOpenCourseId, Long handsOnId) {
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseHandsOn/indexInfoR.html");
view.addObject("search", TeacherOpenCourseHandsOnQuery.class.getName());
view.addObject("teacherOpenCourseId", teacherOpenCourseId);
view.addObject("handsOnId", handsOnId);
return view;
}
@GetMapping(MODEL + "/edit.do")
@Function("teacherOpenCourseHandsOn.edit")
public ModelAndView edit(Long handsOnId) {

@ -168,14 +168,14 @@ layui.define([ 'form', 'laydate', 'table','laytpl' ], function(exports) {
view.initToolBar()
},
addButton_cancel:function () {
parent.Lib.tableRefresh();
Lib.closeFrame();
},exportDocument:function () { console.log("h")
/*layer.confirm('', function (index) {
$.downFile(Common.ctxPath + "/jlw/teacherOpenCourseStudentSigninSetting/exportSummary.json?teacherOpenCourseId=" + teacherOpenCourseId,'签到汇总表');
},exportDocument:function () {
layer.confirm('是否确定导出课程实训存档表吗?', function (index) {
var url = '/jlw/teacherOpenCourseHandsOn/getHandsOnList/export.json?teacherOpenCourseId='+teacherOpenCourseId;
$.downFile(Common.ctxPath + url ,'课程实训存档表');
layer.close(index);
});*/
});
},
}
//触发事件
@ -203,16 +203,20 @@ layui.define([ 'form', 'laydate', 'table','laytpl' ], function(exports) {
});
});
}else if(obj.event === "videoAvgScore"){
var url = "/jlw/teacherOpenCourseHandsOn/indexInfoV.do?handsOnId=" + data.teacherOpenCourseStudentSigninSettingId + "&teacherOpenCourseId=" + teacherOpenCourseId;
Common.openDlg(url,"/详情");
//teacherOpenCourseId handsOnId
//搜索条件studentOrName
var url = "/jlw/teacherOpenCourseHandsOn/indexInfoV.do?handsOnId=" + data.handsOnId + "&teacherOpenCourseId=" + teacherOpenCourseId;
Common.openDlg(url,"观看视频平均得分/详情");
}else if(obj.event === "pptAvgScore"){
var url = "/jlw/teacherOpenCourseHandsOn/indexInfoP.do?handsOnId=" + data.handsOnId + "&teacherOpenCourseId=" + teacherOpenCourseId;
Common.openDlg(url,"观看PPT平均得分/详情");
}else if(obj.event === "theoryAvgScore"){
var url = "/jlw/teacherOpenCourseHandsOn/indexInfoT.do?handsOnId=" + data.handsOnId + "&teacherOpenCourseId=" + teacherOpenCourseId;
Common.openDlg(url,"理论测评平均得分/详情");
}else if(obj.event === "stepAvgScore"){
var url = "/jlw/teacherOpenCourseHandsOn/indexInfoS.do?handsOnId=" + data.handsOnId + "&teacherOpenCourseId=" + teacherOpenCourseId;
Common.openDlg(url,"实训操作步骤平均得分/详情");
}else if(obj.event === "reportAvgScore"){
var url = "/jlw/teacherOpenCourseHandsOn/indexInfoR.do?handsOnId=" + data.handsOnId + "&teacherOpenCourseId=" + teacherOpenCourseId;
Common.openDlg(url,"报告撰写平均得分/详情");
}
})
}

@ -40,9 +40,9 @@
<!–# }–>
</div>
</div>
</script>
<script>-->
</script>-->
<script>
layui.use(['index'], function(){
var index = layui.index;
index.init();

@ -1,454 +0,0 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/questionLogSummary/"}){ -->
<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">
<!--#if(questionSettingType=='CHAPTER_EXERCISE'){-->
<label class="layui-form-label">章节名称</label>
<!--#}else if(questionSettingType=='EXAM'){-->
<label class="layui-form-label">考试名称</label>
<!--#}else if(questionSettingType=='HOMEWORK_FILE'){-->
<label class="layui-form-label" style="width: 85px">附件作业名称</label>
<!--#}else if(questionSettingType=='HOMEWORK_QUESTION'){-->
<label class="layui-form-label" style="width: 85px">题库作业名称</label>
<!--#}-->
<div class="layui-input-inline" id="view"></div>
</div>
</layui:searchForm>
</div>
<div class="layui-inline layui-form-item" style="margin-top:-5px;">
<layui:accessButton function="teacherOpenCourseQuestionLog.query" action="exportDocument"><span
class="iconfont">&#xe8c7;</span>导出</layui:accessButton>
</div>
<div class="layui-inline" style="float: right">
<layui:accessButton function="teacherOpenCourseQuestionLog.query" class="layui-btn-primary"
action="addButton_cancel"><span class="iconfont">&#xe600;</span>返回</layui:accessButton>
</div>
<table id="teacherOpenCourseQuestionLogTable"
lay-filter="teacherOpenCourseQuestionLogTable"></table>
</div>
</div>
<input type="hidden" name="teacherOpenCourseId" autocomplete="off" class="layui-input" value="${teacherOpenCourseId}"/>
<input type="hidden" name="questionSettingType" autocomplete="off" class="layui-input" value="${questionSettingType}"/>
<input type="hidden" name="questionSettingId" autocomplete="off" class="layui-input" value="${questionSettingId}"/>
<!--#} -->
<script id="demo" type="text/html">
<select name="teacherOpenCourseQuestionSettingId" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.teacherOpenCourseQuestionSettingId}}">{{item.teacherOpenCourseQuestionSettingName}}
</option>
{{# }); }}
</select>
</script>
<script id="CHAPTER_EXERCISE_demo" type="text/html">
<label class="layui-form-label">章节名称</label>
<div class="layui-input-block">
<!--<select name="courseInfoId" lay-verify="" ></select>-->
<select name="courseInfoId" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.courseInfoId}}">{{item.courseInfoName}}</option>
{{# }); }}
</select>
</div>
</script>
<script id="EXAM_demo" type="text/html">
<label class="layui-form-label">考试名称</label>
<div class="layui-input-inline">
<select name="questionSettingName" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.questionSettingName}}">{{item.questionSettingName}}</option>
{{# }); }}
</select>
</div>
</script>
<script id="HOMEWORK_FILE_demo" type="text/html">
<label class="layui-form-label" style="width: 85px">附件作业名称</label>
<div class="layui-input-inline">
<select name="teacherOpenCourseStudentSigninSettingSessionTime" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.questionSettingName}}">{{item.questionSettingName}}</option>
{{# }); }}
</select>
</div>
</script>
<script id="HOMEWORK_QUESTION_demo" type="text/html">
<label class="layui-form-label" style="width: 85px">题库作业名称</label>
<div class="layui-input-inline">
<select name="teacherOpenCourseStudentSigninSettingSessionTime" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.questionSettingName}}">{{item.questionSettingName}}</option>
{{# }); }}
</select>
</div>
</script>
<script>
layui.use(['form','laydate','table','laytpl'], function(){
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var laytpl = layui.laytpl;
var teacherOpenCourseQuestionLogTable = null;
var studentTable = null;
var questionSettingId = $("input[name='questionSettingId']").val();
var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val();
var questionSettingType = $("input[name='questionSettingType']").val();
laydate.render({
elem: '#test5'
,type: 'datetime'
, trigger: 'click'
});
var data = [];
var url = "/api/teacherOpenCourseQuestionSetting/getList.do?teacherOpenCourseId=" + teacherOpenCourseId + "&teacherOpenCourseQuestionSettingType=" + questionSettingType;
var ret = Common.getAjax(url);
if (ret.code == 0) {
data = ret.data;
}
var getTpl = demo.innerHTML
, view = document.getElementById('view');
laytpl(getTpl).render(data, function(html){
view.innerHTML = html;
});
var view ={
init:function(){
var that = this;
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"), teacherOpenCourseQuestionLogTable);
Lib.doSearchForm($("#searchForm"), studentTable);
that.initToolBar();
}
},
initTable:function(){
var sx_ = localStorage.getItem("teacherOpenCourseQuestionLogTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
var url = '/api/teacherOpenCourseQuestionLog/list.do?questionLogAddType=FINALLY_SUBMIT';
if(questionSettingType == 'HOMEWORK_FILE'){
url = '/jlw/teacherOpenCourseQuestionLog/homeworkFileLogPageList.json';
}
teacherOpenCourseQuestionLogTable = table.render({
elem: '#teacherOpenCourseQuestionLogTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url: Common.ctxPath + url // 数据接口
,page : Lib.tablePage // 开启分页
/* ,toolbar: '#toolbar_teacherOpenCourseQuestionLog' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
,where:{'teacherOpenCourseQuestionSettingId':questionSettingId}
,limit : 10,
cols : [ [ // 表头
{
field: 'studentSn',
title: '学号',
align: "center",
hideField: false,
},
{
field: 'studentName', //数据字典类型为 student.student_name.student_status=1
title: '姓名',
align: "center",
hideField: false,
},
{
field: 'questionScore', //数据字典类型为 school_class.class_name.class_status=1
title: '题干',
align: "center",
hideField: false,
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
},
{
field: 'questionType',
title: '题型',
align: "center",
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
templet:function (d) {//1单选 2多选 3判断 4填空 5分析
var htm = d.questionType===1?"单选":d.questionType===2?"多选":d.questionType===3?"判断":d.questionType===4?"填空":d.questionType===5?"分析":""
return htm;
}
},
{
field: 'teacherOpenCourseQuestionLogAnswer', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '我的选项',
align: "center",
hideField: false,
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
},
{
field: 'questionAnswer', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '正确答案',
align: "center",
hideField: false,
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
},
{
field: 'status',
title: '状态',
align: "center",
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
templet: function (d) {
var htm = d.questionAnswer == d.teacherOpenCourseQuestionLogAnswer ? "正确" : "错误";
return htm;
}
},
{
field: 'questionName',
title: '报告名称',
align: "center",
hide: questionSettingType == "HOMEWORK_FILE" ? false : true,
},{
field: 'status',
title: '报告下载',
align: "center",
hide: questionSettingType == "HOMEWORK_FILE" ? false : true,
templet:function (d) {
var htm = '<a class="layui-table-link" lay-event="download">下载</a>'
}
},{
field: 'teacherOpenCourseQuestionLogReply',
title: '教师评语',
align: "center",
hide: questionSettingType == "HOMEWORK_FILE" ? false : true,
},
{
field: 'questionScore',
title: questionSettingType != "HOMEWORK_FILE" ?'得分':'报告得分',
align: "center",
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
templet: function (d) {
var htm = d.questionAnswer == d.teacherOpenCourseQuestionLogAnswer ? d.questionScore : "0";
return htm;
}
}
] ]
});
studentTable = table.render({
elem: '#studentTable',
height: Lib.getTableHeight(),
cellMinWidth: 80,
method: 'post',
even: true,
// skin:'nob',
where:getParam_s(),
size: "sm",
url: Common.ctxPath + '/api/teacherOpenCourseQuestionLog/studentScoreList.do' // 数据接口
, page: Lib.tablePage // 开启分页
, limit: 10,
cols: [[
{
field: 'studentSn',
title: '学号', align: "center",
},
{
field: 'studentName',
title: '姓名', align: "center"
}, {
field: 'sumStudentScore',
title: '得分', align: "center"
}
]]
});
table.on('checkbox(teacherOpenCourseQuestionLogTable)', function (obj) {
var teacherOpenCourseQuestionLog = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
});
//触发行单击事件
table.on('row(studentTable)', function(obj){
var settingId = $("select[name='teacherOpenCourseQuestionSettingId']").val();
var param={
'studentId':obj.data.studentId,
'teacherOpenCourseQuestionSettingId':$.isEmpty(settingId)?questionSettingId:settingId,
};
if(questionSettingType == 'HOMEWORK_FILE'){
url = 'jlw/teacherOpenCourseQuestionLog/homeworkFileLogPageList.json';
param = {"questionSettingIdPlural":questionSettingId};
}
teacherOpenCourseQuestionLogTable.reload({
where: param,
page: {
curr: 1
}
});
});
},
initSearchForm:function(){
//Lib.initSearchForm( $("#searchForm"),teacherOpenCourseQuestionLogTable,form);
//Lib.initSearchForm( $("#studentForm"),studentTable,form);
var btn_s = $("#searchFormSearch");
btn_s.on('click', function () {
var data = $("#searchForm").serializeJson();
data.teacherOpenCourseQuestionSettingId =$.isEmpty(data.teacherOpenCourseQuestionSettingId)?questionSettingId:data.teacherOpenCourseQuestionSettingId
teacherOpenCourseQuestionLogTable.reload({
where: data,
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/teacherOpenCourseQuestionLog/add.do";
Common.openDlg(url,"学生签到记录管理>新增");
},
edit: function () {
var data = Common.getOneFromTable(table,"teacherOpenCourseQuestionLogTable");
if(data==null){
return ;
}
var url = "/jlw/teacherOpenCourseQuestionLog/add.do?teacherOpenCourseQuestionLogId="+data.teacherOpenCourseQuestionLogId;
Common.openDlg(url,"学生签到记录管理>"+data.teacherOpenCourseQuestionLogId+">编辑");
},
del: function () {
layui.use(['del'], function(){
var delView = layui.del
delView.delBatch();
});
},
search: function () {
Lib.doSearchForm($("#searchForm"), teacherOpenCourseQuestionLogTable, 1);
view.initToolBar()
},
refresh: function () {
searchForm.reset();
Lib.doSearchForm($("#searchForm"), teacherOpenCourseQuestionLogTable, 1);
view.initToolBar()
},
importDocument: function () {
var uploadUrl = Common.ctxPath+"/jlw/teacherOpenCourseQuestionLog/importTemplate.json";
//模板,
var templatePath= Common.ctxPath+"/jlw/teacherOpenCourseQuestionLog/downloadTemplate.json";
//公共的简单上传文件处理
var url = "/core/file/simpleUpload.do?uploadUrl="+uploadUrl+"&templatePath="+templatePath;
Common.openDlg(url, "teacherOpenCourseQuestionLog管理>上传");
},*/
exportDocument: function () {
var url,title;
var settingId = $("select[name='teacherOpenCourseQuestionSettingId']").val();
settingId = $.isEmpty(settingId)?questionSettingId:settingId;
if(questionSettingType == "CHAPTER_EXERCISE"){///jlw/questionLogSummary/homeworkFileAnalysisExport.json
title = '章节详情表';
url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId;
}else if(questionSettingType == "EXAM"){
title = '考试详情表';
url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId;
}else if(questionSettingType == "HOMEWORK_FILE"){
title = '附件作业详情表';
url = '/jlw/questionLogSummary/homeworkFileAnalysisExport.json?teacherOpenCourseId'+ teacherOpenCourseId + '&questionSettingType=' + questionSettingType;
}else if(questionSettingType == "HOMEWORK_QUESTION"){
title ="题库作业详情表";
url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId;
}
Common.openConfirm("确认要导出"+title+"?", function (index) {
$.downFile(Common.ctxPath + url);
layer.close(index);
})
},
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(teacherOpenCourseQuestionLogTable)', function (obj) {
var data = obj.data;
if (obj.event === 'edit') {
//var url = "/jlw/teacherOpenCourseQuestionLog/add.do?teacherOpenCourseQuestionLogId="+data.teacherOpenCourseQuestionLogId;
Common.openDlg(url, "学生签到记录管理>" + data.teacherOpenCourseQuestionLogId + ">编辑");
}else if(obj.event === "del"){
layer.confirm('是否确定删除该信息?', function (index) {
// var ret = Common.postAjax("/jlw/teacherOpenCourseQuestionLog/delete.json",{ids:data.teacherOpenCourseQuestionLogId});
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 = {
"schoolClassIdPlural":$("#studentForm select[name='classId']").val(),
"studentSnOrName":$("#studentForm input[name='studentOrName']").val(),
'teacherOpenCourseId': teacherOpenCourseId
};
return param
}
form.render();
view.init();
});
</script>

@ -0,0 +1,299 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseHandsOn/"}){ -->
<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" id="view"></div>
</div>
</layui:searchForm>
</div>
<div class="layui-inline layui-form-item" style="margin-top:-5px;">
<layui:accessButton function="teacherOpenCourseQuestionLog.query" action="exportDocument"><span
class="iconfont">&#xe8c7;</span>导出</layui:accessButton>
</div>
<div class="layui-inline" style="float: right">
<layui:accessButton function="teacherOpenCourseQuestionLog.query" class="layui-btn-primary"
action="addButton_cancel"><span class="iconfont">&#xe600;</span>返回</layui:accessButton>
</div>
<table id="studentHandsOnTaskPptTable"
lay-filter="studentHandsOnTaskPptTable"></table>
</div>
</div>
<input type="hidden" name="teacherOpenCourseId" autocomplete="off" class="layui-input" value="${teacherOpenCourseId}"/>
<input type="hidden" name="handsOnId" autocomplete="off" class="layui-input" value="${handsOnId}"/>
<!--#} -->
<script id="demo" type="text/html">
<select name="handsOnId" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.handsOnId}}">{{item.handsOnName}}
</option>
{{# }); }}
</select>
</script>
<script>
layui.use(['form','laydate','table','laytpl'], function(){
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var laytpl = layui.laytpl;
var studentHandsOnTaskPptTable = null;
var studentTable = null;
var handsOnId = $("input[name='handsOnId']").val();
var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val();
var data = [];
var url = "/jlw/teacherOpenCourseHandsOn/getHandsOnList.do?teacherOpenCourseId=" + teacherOpenCourseId;
var ret = Common.getAjax(url);
if (ret.code == 0) {
data = ret.data;
}
var getTpl = demo.innerHTML
, view = document.getElementById('view');
laytpl(getTpl).render(data, function(html){
view.innerHTML = html;
});
var view ={
init:function(){
var that = this;
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"), studentHandsOnTaskPptTable);
Lib.doSearchForm($("#searchForm"), studentTable);
that.initToolBar();
}
},
initTable:function(){
var sx_ = localStorage.getItem("studentHandsOnTaskPptTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
studentHandsOnTaskPptTable = table.render({
elem: '#studentHandsOnTaskPptTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url: Common.ctxPath + '/api/studentHandsOnTaskPpt/getPageList.do' // 数据接口
,page : Lib.tablePage // 开启分页
/* ,toolbar: '#toolbar_teacherOpenCourseQuestionLog' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
,where:{'teacherOpenCourseId':teacherOpenCourseId, 'handsOnId':handsOnId}
,limit : 10,
cols : [ [ // 表头
{
field: 'studentSn',
title: '学号',
align: "center",
hideField: false,
},
{
field: 'studentName', //数据字典类型为 student.student_name.student_status=1
title: '姓名',
align: "center",
hideField: false,
},
{
field: 'pptFile', //数据字典类型为 school_class.class_name.class_status=1
title: '项目名称',
align: "center",
},
{
field: 'pptFiles.fileName',
title: 'PPT名称',
align: "center"
},
{
field: 'pptScore', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '观看得分',
align: "center"
}
] ]
});
studentTable = table.render({
elem: '#studentTable',
height: Lib.getTableHeight(),
cellMinWidth: 80,
method: 'get',
even: true,
// skin:'nob',
where:getParam_s(),
size: "sm",
url: Common.ctxPath + '/api/teacherOpenCourseHandsOnSimulationTasks/getStudentScore.do' // 数据接口
,parseData: function(res){ //res 即为原始返回的数据
return {
"code": 0, //解析接口状态
"msg": '', //解析提示文本
"count": res.totalRow, //解析数据长度
"data": res.list //解析数据列表
};
}
, page: Lib.tablePage // 开启分页
, limit: 10,
cols: [[
{
field: 'studentSn',
title: '学号', align: "center",
},
{
field: 'studentName',
title: '姓名', align: "center"
}, {
field: 'sumStudentScore',
title: '得分', align: "center",
templet:function (d) {
return '0'
}
}
]]
});
table.on('checkbox(studentHandsOnTaskPptTable)', function (obj) {
var teacherOpenCourseQuestionLog = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
});
//触发行单击事件
table.on('row(studentTable)', function(obj){
var handsOnIdNew = $("select[name='handsOnId']").val();
var param={
'studentId':obj.data.studentId,
'teacherOpenCourseId':teacherOpenCourseId,
'handsOnId':$.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew
};
studentHandsOnTaskPptTable.reload({
where: param,
page: {
curr: 1
}
});
});
},
initSearchForm:function(){
//Lib.initSearchForm( $("#searchForm"),studentHandsOnTaskPptTable,form);
//Lib.initSearchForm( $("#studentForm"),studentTable,form);
var btn_s = $("#searchFormSearch");
btn_s.on('click', function () {
var data = $("#searchForm").serializeJson();
var handsOnIdNew = $("select[name='handsOnId']").val();
data.handsOnId = $.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew;
data.teacherOpenCourseId=teacherOpenCourseId;
studentHandsOnTaskPptTable.reload({
where: data,
page: {
curr: 1
}
});
});
var btn = $("#studentFormSearch");
btn.on('click', function () {
studentTable.reload({
where: getParam_s(),
page: {
curr: 1
}
});
});
},
initToolBar:function(){
toolbar = {
exportDocument: function () {
var handsOnIdNew = $("select[name='handsOnId']").val();
handsOnIdNew = $.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew;
var url = '/jlw/studentHandsOnTaskPpt/excel/export.do?teacherOpenCourseId='+teacherOpenCourseId+'&handsOnId='+handsOnIdNew;
Common.openConfirm("确认要导出课程实操存档详情?", function (index) {
$.downFile(Common.ctxPath + url,'课程实操存档详情');
layer.close(index);
})
},
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(studentHandsOnTaskPptTable)', function (obj) {
var data = obj.data;
if (obj.event === 'edit') {
//var url = "/jlw/teacherOpenCourseQuestionLog/add.do?teacherOpenCourseQuestionLogId="+data.teacherOpenCourseQuestionLogId;
Common.openDlg(url, "学生签到记录管理>" + data.teacherOpenCourseQuestionLogId + ">编辑");
}else if(obj.event === "del"){
layer.confirm('是否确定删除该信息?', function (index) {
// var ret = Common.postAjax("/jlw/teacherOpenCourseQuestionLog/delete.json",{ids:data.teacherOpenCourseQuestionLogId});
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 = {
"classId":$("#studentForm select[name='classId']").val(),
"studentName":$("#studentForm input[name='studentOrName']").val(),
'teacherOpenCourseId': teacherOpenCourseId
};
return param
}
form.render();
view.init();
});
</script>

@ -0,0 +1,310 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseHandsOn/"}){ -->
<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" id="view"></div>
</div>
</layui:searchForm>
</div>
<div class="layui-inline layui-form-item" style="margin-top:-5px;">
<layui:accessButton function="teacherOpenCourseQuestionLog.query" action="exportDocument"><span
class="iconfont">&#xe8c7;</span>导出</layui:accessButton>
</div>
<div class="layui-inline" style="float: right">
<layui:accessButton function="teacherOpenCourseQuestionLog.query" class="layui-btn-primary"
action="addButton_cancel"><span class="iconfont">&#xe600;</span>返回</layui:accessButton>
</div>
<table id="studentHandsOnTaskVideoTable"
lay-filter="studentHandsOnTaskVideoTable"></table>
</div>
</div>
<input type="hidden" name="teacherOpenCourseId" autocomplete="off" class="layui-input" value="${teacherOpenCourseId}"/>
<input type="hidden" name="handsOnId" autocomplete="off" class="layui-input" value="${handsOnId}"/>
<!--#} -->
<script id="demo" type="text/html">
<select name="handsOnId" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.handsOnId}}">{{item.handsOnName}}
</option>
{{# }); }}
</select>
</script>
<script>
layui.use(['form','laydate','table','laytpl'], function(){
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var laytpl = layui.laytpl;
var studentHandsOnTaskVideoTable = null;
var studentTable = null;
var handsOnId = $("input[name='handsOnId']").val();
var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val();
var data = [];
var url = "/jlw/teacherOpenCourseHandsOn/getHandsOnList.do?teacherOpenCourseId=" + teacherOpenCourseId;
var ret = Common.getAjax(url);
if (ret.code == 0) {
data = ret.data;
}
var getTpl = demo.innerHTML
, view = document.getElementById('view');
laytpl(getTpl).render(data, function(html){
view.innerHTML = html;
});
var view ={
init:function(){
var that = this;
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"), studentHandsOnTaskVideoTable);
Lib.doSearchForm($("#searchForm"), studentTable);
that.initToolBar();
}
},
initTable:function(){
var sx_ = localStorage.getItem("studentHandsOnTaskVideoTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
studentHandsOnTaskVideoTable = table.render({
elem: '#studentHandsOnTaskVideoTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url: Common.ctxPath + '/api/studentHandsOnTaskReport/getPageList.do' // 数据接口
,page : Lib.tablePage // 开启分页
/* ,toolbar: '#toolbar_teacherOpenCourseQuestionLog' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
,where:{'teacherOpenCourseId':teacherOpenCourseId, 'handsOnId':handsOnId}
,limit : 10,
cols : [ [ // 表头
{
field: 'studentSn',
title: '学号',
align: "center",
hideField: false,
},
{
field: 'studentName', //数据字典类型为 student.student_name.student_status=1
title: '姓名',
align: "center",
hideField: false,
},
{
field: 'questionScore', //数据字典类型为 school_class.class_name.class_status=1
title: '报告名称',
align: "center",
},
{
field: 'reportFile',
title: '下载',
align: "center",
templet:function (d) {
var htm = '<a class="layui-table-link" lay-event="download">下载</a>';
}
},
{
field: 'reportComment', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '教师评语',
align: "center"
},{
field: 'reportScore', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '报告得分',
align: "center"
}
] ]
});
studentTable = table.render({
elem: '#studentTable',
height: Lib.getTableHeight(),
cellMinWidth: 80,
method: 'get',
even: true,
// skin:'nob',
where:getParam_s(),
size: "sm",
url: Common.ctxPath + '/api/teacherOpenCourseHandsOnSimulationTasks/getStudentScore.do' // 数据接口
,parseData: function(res){ //res 即为原始返回的数据
return {
"code": 0, //解析接口状态
"msg": '', //解析提示文本
"count": res.totalRow, //解析数据长度
"data": res.list //解析数据列表
};
}
, page: Lib.tablePage // 开启分页
, limit: 10,
cols: [[
{
field: 'studentSn',
title: '学号', align: "center",
},
{
field: 'studentName',
title: '姓名', align: "center"
}, {
field: 'sumStudentScore',
title: '得分', align: "center",
templet:function (d) {
return '0'
}
}
]]
});
table.on('checkbox(studentHandsOnTaskVideoTable)', function (obj) {
var teacherOpenCourseQuestionLog = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
});
//触发行单击事件
table.on('row(studentTable)', function(obj){
var handsOnIdNew = $("select[name='handsOnId']").val();
var param={
'studentId':obj.data.studentId,
'teacherOpenCourseId':teacherOpenCourseId,
'handsOnId':$.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew
};
studentHandsOnTaskVideoTable.reload({
where: param,
page: {
curr: 1
}
});
});
},
initSearchForm:function(){
//Lib.initSearchForm( $("#searchForm"),studentHandsOnTaskVideoTable,form);
//Lib.initSearchForm( $("#studentForm"),studentTable,form);
var btn_s = $("#searchFormSearch");
btn_s.on('click', function () {
var data = $("#searchForm").serializeJson();
var handsOnIdNew = $("select[name='handsOnId']").val();
data.handsOnId = $.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew;
data.teacherOpenCourseId=teacherOpenCourseId;
studentHandsOnTaskVideoTable.reload({
where: data,
page: {
curr: 1
}
});
});
var btn = $("#studentFormSearch");
btn.on('click', function () {
studentTable.reload({
where: getParam_s(),
page: {
curr: 1
}
});
});
},
initToolBar:function(){
toolbar = {
exportDocument: function () {
var handsOnIdNew = $("select[name='handsOnId']").val();
handsOnIdNew = $.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew;
var url = '/jlw/studentHandsOnTaskReport/excel/export.do?teacherOpenCourseId='+teacherOpenCourseId+'&handsOnId='+handsOnIdNew;
Common.openConfirm("确认要导出课程实操存档详情?", function (index) {
$.downFile(Common.ctxPath + url,'课程实操存档详情');
layer.close(index);
})
},
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(studentHandsOnTaskVideoTable)', function (obj) {
var data = obj.data;
if (obj.event === 'edit') {
//var url = "/jlw/teacherOpenCourseQuestionLog/add.do?teacherOpenCourseQuestionLogId="+data.teacherOpenCourseQuestionLogId;
Common.openDlg(url, "学生签到记录管理>" + data.teacherOpenCourseQuestionLogId + ">编辑");
}else if(obj.event === "del"){
layer.confirm('是否确定删除该信息?', function (index) {
// var ret = Common.postAjax("/jlw/teacherOpenCourseQuestionLog/delete.json",{ids:data.teacherOpenCourseQuestionLogId});
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();
}
});
});
}else if(obj.event === 'download'){
layer.confirm('是否确定删除该信息?', function (index) {
Lib.downloadFile2(data.reportFile,"报告表")
});
}
})
};
function getParam_s(){
var param = {
"classId":$("#studentForm select[name='classId']").val(),
"studentName":$("#studentForm input[name='studentOrName']").val(),
'teacherOpenCourseId': teacherOpenCourseId
};
return param
}
form.render();
view.init();
});
</script>

@ -0,0 +1,312 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseHandsOn/"}){ -->
<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" id="view"></div>
</div>
</layui:searchForm>
</div>
<div class="layui-inline layui-form-item" style="margin-top:-5px;">
<layui:accessButton function="teacherOpenCourseQuestionLog.query" action="exportDocument"><span
class="iconfont">&#xe8c7;</span>导出</layui:accessButton>
</div>
<div class="layui-inline" style="float: right">
<layui:accessButton function="teacherOpenCourseQuestionLog.query" class="layui-btn-primary"
action="addButton_cancel"><span class="iconfont">&#xe600;</span>返回</layui:accessButton>
</div>
<table id="studentHandsOnTaskVideoTable"
lay-filter="studentHandsOnTaskVideoTable"></table>
</div>
</div>
<input type="hidden" name="teacherOpenCourseId" autocomplete="off" class="layui-input" value="${teacherOpenCourseId}"/>
<input type="hidden" name="handsOnId" autocomplete="off" class="layui-input" value="${handsOnId}"/>
<!--#} -->
<script id="demo" type="text/html">
<select name="handsOnId" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.handsOnId}}">{{item.handsOnName}}
</option>
{{# }); }}
</select>
</script>
<script>
layui.use(['form','laydate','table','laytpl'], function(){
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var laytpl = layui.laytpl;
var studentHandsOnTaskVideoTable = null;
var studentTable = null;
var handsOnId = $("input[name='handsOnId']").val();
var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val();
var data = [];
var url = "/jlw/teacherOpenCourseHandsOn/getHandsOnList.do?teacherOpenCourseId=" + teacherOpenCourseId;
var ret = Common.getAjax(url);
if (ret.code == 0) {
data = ret.data;
}
var getTpl = demo.innerHTML
, view = document.getElementById('view');
laytpl(getTpl).render(data, function(html){
view.innerHTML = html;
});
var view ={
init:function(){
var that = this;
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"), studentHandsOnTaskVideoTable);
Lib.doSearchForm($("#searchForm"), studentTable);
that.initToolBar();
}
},
initTable:function(){
var sx_ = localStorage.getItem("studentHandsOnTaskVideoTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
studentHandsOnTaskVideoTable = table.render({
elem: '#studentHandsOnTaskVideoTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url: Common.ctxPath + '/api/studentHandsOnTaskStep/getPageList.do' // 数据接口
,page : Lib.tablePage // 开启分页
/* ,toolbar: '#toolbar_teacherOpenCourseQuestionLog' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
,where:{'teacherOpenCourseId':teacherOpenCourseId, 'handsOnId':handsOnId}
,limit : 10,
cols : [ [ // 表头
{
field: 'studentSn',
title: '学号',
align: "center",
hideField: false,
},
{
field: 'studentName', //数据字典类型为 student.student_name.student_status=1
title: '姓名',
align: "center",
hideField: false,
},
{
field: 'stemstems.question', //数据字典类型为 school_class.class_name.class_status=1
title: '考核内容',
align: "center",
},
{
field: 'stemstems.studentAnswer',
title: '我的答案',
align: "center"
},{
field: 'stemstems.rightAnswer',
title: '正确答案',
align: "center"
},
{
field: 'studentHandsOnTaskStepId', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '状态',
align: "center",
templet: function (d) {
var htm = d.stemstems.studentAnswer == d.stemstems.rightAnswer ? "正确" : "错误";
return htm;
}
},
{
field: 'theoryScore', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '得分',
align: "center"
}
] ]
});
studentTable = table.render({
elem: '#studentTable',
height: Lib.getTableHeight(),
cellMinWidth: 80,
method: 'get',
even: true,
// skin:'nob',
where:getParam_s(),
size: "sm",
url: Common.ctxPath + '/api/teacherOpenCourseHandsOnSimulationTasks/getStudentScore.do' // 数据接口
,parseData: function(res){ //res 即为原始返回的数据
return {
"code": 0, //解析接口状态
"msg": '', //解析提示文本
"count": res.totalRow, //解析数据长度
"data": res.list //解析数据列表
};
}
, page: Lib.tablePage // 开启分页
, limit: 10,
cols: [[
{
field: 'studentSn',
title: '学号', align: "center",
},
{
field: 'studentName',
title: '姓名', align: "center"
}, {
field: 'sumStudentScore',
title: '得分', align: "center",
templet:function (d) {
return '0'
}
}
]]
});
table.on('checkbox(studentHandsOnTaskVideoTable)', function (obj) {
var teacherOpenCourseQuestionLog = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
});
//触发行单击事件
table.on('row(studentTable)', function(obj){
var handsOnIdNew = $("select[name='handsOnId']").val();
var param={
'studentId':obj.data.studentId,
'teacherOpenCourseId':teacherOpenCourseId,
'handsOnId':$.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew
};
studentHandsOnTaskVideoTable.reload({
where: param,
page: {
curr: 1
}
});
});
},
initSearchForm:function(){
//Lib.initSearchForm( $("#searchForm"),studentHandsOnTaskVideoTable,form);
//Lib.initSearchForm( $("#studentForm"),studentTable,form);
var btn_s = $("#searchFormSearch");
btn_s.on('click', function () {
var data = $("#searchForm").serializeJson();
var handsOnIdNew = $("select[name='handsOnId']").val();
data.handsOnId = $.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew;
data.teacherOpenCourseId=teacherOpenCourseId;
studentHandsOnTaskVideoTable.reload({
where: data,
page: {
curr: 1
}
});
});
var btn = $("#studentFormSearch");
btn.on('click', function () {
studentTable.reload({
where: getParam_s(),
page: {
curr: 1
}
});
});
},
initToolBar:function(){
toolbar = {
exportDocument: function () {
var handsOnIdNew = $("select[name='handsOnId']").val();
handsOnIdNew = $.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew;
var url = '/jlw/studentHandsOnTaskStep/excel/export.do?teacherOpenCourseId='+teacherOpenCourseId+'&handsOnId='+handsOnIdNew;
Common.openConfirm("确认要导出课程实操存档详情?", function (index) {
$.downFile(Common.ctxPath + url,'课程实操存档详情');
layer.close(index);
})
},
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(studentHandsOnTaskVideoTable)', function (obj) {
var data = obj.data;
if (obj.event === 'edit') {
//var url = "/jlw/teacherOpenCourseQuestionLog/add.do?teacherOpenCourseQuestionLogId="+data.teacherOpenCourseQuestionLogId;
Common.openDlg(url, "学生签到记录管理>" + data.teacherOpenCourseQuestionLogId + ">编辑");
}else if(obj.event === "del"){
layer.confirm('是否确定删除该信息?', function (index) {
// var ret = Common.postAjax("/jlw/teacherOpenCourseQuestionLog/delete.json",{ids:data.teacherOpenCourseQuestionLogId});
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 = {
"classId":$("#studentForm select[name='classId']").val(),
"studentName":$("#studentForm input[name='studentOrName']").val(),
'teacherOpenCourseId': teacherOpenCourseId
};
return param
}
form.render();
view.init();
});
</script>

@ -0,0 +1,326 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseHandsOn/"}){ -->
<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" id="view"></div>
</div>
</layui:searchForm>
</div>
<div class="layui-inline layui-form-item" style="margin-top:-5px;">
<layui:accessButton function="teacherOpenCourseQuestionLog.query" action="exportDocument"><span
class="iconfont">&#xe8c7;</span>导出</layui:accessButton>
</div>
<div class="layui-inline" style="float: right">
<layui:accessButton function="teacherOpenCourseQuestionLog.query" class="layui-btn-primary"
action="addButton_cancel"><span class="iconfont">&#xe600;</span>返回</layui:accessButton>
</div>
<table id="studentHandsOnTaskTheoryTable"
lay-filter="studentHandsOnTaskTheoryTable"></table>
</div>
</div>
<input type="hidden" name="teacherOpenCourseId" autocomplete="off" class="layui-input" value="${teacherOpenCourseId}"/>
<input type="hidden" name="handsOnId" autocomplete="off" class="layui-input" value="${handsOnId}"/>
<!--#} -->
<script id="demo" type="text/html">
<select name="handsOnId" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.handsOnId}}">{{item.handsOnName}}
</option>
{{# }); }}
</select>
</script>
<script>
layui.use(['form','laydate','table','laytpl'], function(){
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var laytpl = layui.laytpl;
var studentHandsOnTaskTheoryTable = null;
var studentTable = null;
var handsOnId = $("input[name='handsOnId']").val();
var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val();
var data = [];
var url = "/jlw/teacherOpenCourseHandsOn/getHandsOnList.do?teacherOpenCourseId=" + teacherOpenCourseId;
var ret = Common.getAjax(url);
if (ret.code == 0) {
data = ret.data;
}
var getTpl = demo.innerHTML
, view = document.getElementById('view');
laytpl(getTpl).render(data, function(html){
view.innerHTML = html;
});
var view ={
init:function(){
var that = this;
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"), studentHandsOnTaskTheoryTable);
Lib.doSearchForm($("#searchForm"), studentTable);
that.initToolBar();
}
},
initTable:function(){
var sx_ = localStorage.getItem("studentHandsOnTaskTheoryTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
studentHandsOnTaskTheoryTable = table.render({
elem: '#studentHandsOnTaskTheoryTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url: Common.ctxPath + '/api/studentHandsOnTaskTheory/getPageList.do' // 数据接口
,page : Lib.tablePage // 开启分页
/* ,toolbar: '#toolbar_teacherOpenCourseQuestionLog' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
,where:{'teacherOpenCourseId':teacherOpenCourseId, 'handsOnId':handsOnId}
,limit : 10,
cols : [ [ // 表头
{
field: 'studentSn',
title: '学号',
align: "center",
hideField: false,
},
{
field: 'studentName', //数据字典类型为 student.student_name.student_status=1
title: '姓名',
align: "center",
hideField: false,
},
{
field: 'stem', //数据字典类型为 school_class.class_name.class_status=1
title: '题干',
align: "center",
},
{
field: 'questionType',
title: '题型',
align: "center",
templet:function (d) {//1单选 2多选 3判断 4填空 5分析
var htm = d.questionType===1?"单选":d.questionType===2?"多选":d.questionType===3?"判断":d.questionType===4?"填空":d.questionType===5?"分析":""
return htm;
}
},
{
field: 'myOptions', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '我的选项',
align: "center",
},
{
field: 'rightKey', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '正确答案',
align: "center",
},
{
field: 'theoryStatus',
title: '状态',
align: "center",
templet: function (d) {
var htm = d.myOptions == d.rightKey ? "正确" : "错误";
return htm;
}
},
{
field: 'theoryScore',
title: '得分',
align: "center",
templet: function (d) {
var htm = d.myOptions == d.rightKey ? d.questionScore : "0";
return htm;
}
}
] ]
});
studentTable = table.render({
elem: '#studentTable',
height: Lib.getTableHeight(),
cellMinWidth: 80,
method: 'get',
even: true,
// skin:'nob',
where:getParam_s(),
size: "sm",
url: Common.ctxPath + '/api/teacherOpenCourseHandsOnSimulationTasks/getStudentScore.do' // 数据接口
,parseData: function(res){ //res 即为原始返回的数据
return {
"code": 0, //解析接口状态
"msg": '', //解析提示文本
"count": res.totalRow, //解析数据长度
"data": res.list //解析数据列表
};
}
, page: Lib.tablePage // 开启分页
, limit: 10,
cols: [[
{
field: 'studentSn',
title: '学号', align: "center",
},
{
field: 'studentName',
title: '姓名', align: "center"
}, {
field: 'sumStudentScore',
title: '得分', align: "center",
templet:function (d) {
return '0'
}
}
]]
});
table.on('checkbox(studentHandsOnTaskTheoryTable)', function (obj) {
var teacherOpenCourseQuestionLog = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
});
//触发行单击事件
table.on('row(studentTable)', function(obj){
var handsOnIdNew = $("select[name='handsOnId']").val();
var param={
'studentId':obj.data.studentId,
'teacherOpenCourseId':teacherOpenCourseId,
'handsOnId':$.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew
};
studentHandsOnTaskTheoryTable.reload({
where: param,
page: {
curr: 1
}
});
});
},
initSearchForm:function(){
//Lib.initSearchForm( $("#searchForm"),studentHandsOnTaskTheoryTable,form);
//Lib.initSearchForm( $("#studentForm"),studentTable,form);
var btn_s = $("#searchFormSearch");
btn_s.on('click', function () {
var data = $("#searchForm").serializeJson();
var handsOnIdNew = $("select[name='handsOnId']").val();
data.handsOnId = $.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew;
data.teacherOpenCourseId=teacherOpenCourseId;
studentHandsOnTaskTheoryTable.reload({
where: data,
page: {
curr: 1
}
});
});
var btn = $("#studentFormSearch");
btn.on('click', function () {
studentTable.reload({
where: getParam_s(),
page: {
curr: 1
}
});
});
},
initToolBar:function(){
toolbar = {
exportDocument: function () {
var handsOnIdNew = $("select[name='handsOnId']").val();
handsOnIdNew = $.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew;
var url = '/jlw/studentHandsOnTaskTheory/excel/export.do?teacherOpenCourseId='+teacherOpenCourseId+'&handsOnId='+handsOnIdNew;
Common.openConfirm("确认要导出课程实操存档详情?", function (index) {
$.downFile(Common.ctxPath + url,'课程实操存档详情');
layer.close(index);
})
},
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(studentHandsOnTaskTheoryTable)', function (obj) {
var data = obj.data;
if (obj.event === 'edit') {
//var url = "/jlw/teacherOpenCourseQuestionLog/add.do?teacherOpenCourseQuestionLogId="+data.teacherOpenCourseQuestionLogId;
Common.openDlg(url, "学生签到记录管理>" + data.teacherOpenCourseQuestionLogId + ">编辑");
}else if(obj.event === "del"){
layer.confirm('是否确定删除该信息?', function (index) {
// var ret = Common.postAjax("/jlw/teacherOpenCourseQuestionLog/delete.json",{ids:data.teacherOpenCourseQuestionLogId});
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 = {
"classId":$("#studentForm select[name='classId']").val(),
"studentName":$("#studentForm input[name='studentOrName']").val(),
'teacherOpenCourseId': teacherOpenCourseId
};
return param
}
form.render();
view.init();
});
</script>

@ -27,15 +27,7 @@
<div class="layui-inline">
<layui:searchForm formId="searchForm" searchList="" condition="${search}">
<div class="layui-inline">
<!--#if(questionSettingType=='CHAPTER_EXERCISE'){-->
<label class="layui-form-label">章节名称</label>
<!--#}else if(questionSettingType=='EXAM'){-->
<label class="layui-form-label">考试名称</label>
<!--#}else if(questionSettingType=='HOMEWORK_FILE'){-->
<label class="layui-form-label" style="width: 85px">附件作业名称</label>
<!--#}else if(questionSettingType=='HOMEWORK_QUESTION'){-->
<label class="layui-form-label" style="width: 85px">题库作业名称</label>
<!--#}-->
<label class="layui-form-label">项目名称</label>
<div class="layui-input-inline" id="view"></div>
</div>
</layui:searchForm>
@ -49,89 +41,41 @@
action="addButton_cancel"><span class="iconfont">&#xe600;</span>返回</layui:accessButton>
</div>
<table id="teacherOpenCourseQuestionLogTable"
lay-filter="teacherOpenCourseQuestionLogTable"></table>
<table id="studentHandsOnTaskVideoTable"
lay-filter="studentHandsOnTaskVideoTable"></table>
</div>
</div>
<input type="hidden" name="teacherOpenCourseId" autocomplete="off" class="layui-input" value="${teacherOpenCourseId}"/>
<input type="hidden" name="questionSettingType" autocomplete="off" class="layui-input" value="${questionSettingType}"/>
<input type="hidden" name="questionSettingId" autocomplete="off" class="layui-input" value="${questionSettingId}"/>
<input type="hidden" name="handsOnId" autocomplete="off" class="layui-input" value="${handsOnId}"/>
<!--#} -->
<script id="demo" type="text/html">
<select name="teacherOpenCourseQuestionSettingId" lay-verify="">
<select name="handsOnId" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.teacherOpenCourseQuestionSettingId}}">{{item.teacherOpenCourseQuestionSettingName}}
<option value="{{item.handsOnId}}">{{item.handsOnName}}
</option>
{{# }); }}
</select>
</script>
<script id="CHAPTER_EXERCISE_demo" type="text/html">
<label class="layui-form-label">章节名称</label>
<div class="layui-input-block">
<!--<select name="courseInfoId" lay-verify="" ></select>-->
<select name="courseInfoId" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.courseInfoId}}">{{item.courseInfoName}}</option>
{{# }); }}
</select>
</div>
</script>
<script id="EXAM_demo" type="text/html">
<label class="layui-form-label">考试名称</label>
<div class="layui-input-inline">
<select name="questionSettingName" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.questionSettingName}}">{{item.questionSettingName}}</option>
{{# }); }}
</select>
</div>
</script>
<script id="HOMEWORK_FILE_demo" type="text/html">
<label class="layui-form-label" style="width: 85px">附件作业名称</label>
<div class="layui-input-inline">
<select name="teacherOpenCourseStudentSigninSettingSessionTime" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.questionSettingName}}">{{item.questionSettingName}}</option>
{{# }); }}
</select>
</div>
</script>
<script id="HOMEWORK_QUESTION_demo" type="text/html">
<label class="layui-form-label" style="width: 85px">题库作业名称</label>
<div class="layui-input-inline">
<select name="teacherOpenCourseStudentSigninSettingSessionTime" lay-verify="">
<option value="">请选择</option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.questionSettingName}}">{{item.questionSettingName}}</option>
{{# }); }}
</select>
</div>
</script>
<script>
layui.use(['form','laydate','table','laytpl'], function(){
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var laytpl = layui.laytpl;
var teacherOpenCourseQuestionLogTable = null;
var studentHandsOnTaskVideoTable = null;
var studentTable = null;
var questionSettingId = $("input[name='questionSettingId']").val();
var handsOnId = $("input[name='handsOnId']").val();
var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val();
var questionSettingType = $("input[name='questionSettingType']").val();
laydate.render({
elem: '#test5'
,type: 'datetime'
, trigger: 'click'
});
var data = [];
var url = "/api/teacherOpenCourseQuestionSetting/getList.do?teacherOpenCourseId=" + teacherOpenCourseId + "&teacherOpenCourseQuestionSettingType=" + questionSettingType;
var url = "/jlw/teacherOpenCourseHandsOn/getHandsOnList.do?teacherOpenCourseId=" + teacherOpenCourseId;
var ret = Common.getAjax(url);
if (ret.code == 0) {
data = ret.data;
@ -150,28 +94,25 @@
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"), teacherOpenCourseQuestionLogTable);
Lib.doSearchForm($("#searchForm"), studentHandsOnTaskVideoTable);
Lib.doSearchForm($("#searchForm"), studentTable);
that.initToolBar();
}
},
initTable:function(){
var sx_ = localStorage.getItem("teacherOpenCourseQuestionLogTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存
var sx_ = localStorage.getItem("studentHandsOnTaskVideoTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
var url = '/api/teacherOpenCourseQuestionLog/list.do?questionLogAddType=FINALLY_SUBMIT';
if(questionSettingType == 'HOMEWORK_FILE'){
url = '/jlw/teacherOpenCourseQuestionLog/homeworkFileLogPageList.json';
}
teacherOpenCourseQuestionLogTable = table.render({
elem: '#teacherOpenCourseQuestionLogTable',
studentHandsOnTaskVideoTable = table.render({
elem: '#studentHandsOnTaskVideoTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url: Common.ctxPath + url // 数据接口
url: Common.ctxPath + '/api/studentHandsOnTaskVideo/getPageList.do' // 数据接口
,page : Lib.tablePage // 开启分页
/* ,toolbar: '#toolbar_teacherOpenCourseQuestionLog' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
,where:{'teacherOpenCourseQuestionSettingId':questionSettingId}
,where:{'teacherOpenCourseId':teacherOpenCourseId, 'handsOnId':handsOnId}
,limit : 10,
cols : [ [ // 表头
{
@ -188,73 +129,18 @@
},
{
field: 'questionScore', //数据字典类型为 school_class.class_name.class_status=1
title: '题干',
align: "center",
hideField: false,
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
},
{
field: 'questionType',
title: '题型',
align: "center",
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
templet:function (d) {//1单选 2多选 3判断 4填空 5分析
var htm = d.questionType===1?"单选":d.questionType===2?"多选":d.questionType===3?"判断":d.questionType===4?"填空":d.questionType===5?"分析":""
return htm;
}
},
{
field: 'teacherOpenCourseQuestionLogAnswer', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '我的选项',
align: "center",
hideField: false,
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
},
{
field: 'questionAnswer', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '正确答案',
title: '项目名称',
align: "center",
hideField: false,
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
},
{
field: 'status',
title: '状态',
align: "center",
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
templet: function (d) {
var htm = d.questionAnswer == d.teacherOpenCourseQuestionLogAnswer ? "正确" : "错误";
return htm;
}
},
{
field: 'questionName',
title: '报告名称',
align: "center",
hide: questionSettingType == "HOMEWORK_FILE" ? false : true,
},{
field: 'status',
title: '报告下载',
align: "center",
hide: questionSettingType == "HOMEWORK_FILE" ? false : true,
templet:function (d) {
var htm = '<a class="layui-table-link" lay-event="download">下载</a>'
}
},{
field: 'teacherOpenCourseQuestionLogReply',
title: '教师评语',
align: "center",
hide: questionSettingType == "HOMEWORK_FILE" ? false : true,
field: 'videoFile.fileName',
title: '视频名称',
align: "center"
},
{
field: 'questionScore',
title: questionSettingType != "HOMEWORK_FILE" ?'得分':'报告得分',
align: "center",
hide: questionSettingType != "HOMEWORK_FILE" ? false : true,
templet: function (d) {
var htm = d.questionAnswer == d.teacherOpenCourseQuestionLogAnswer ? d.questionScore : "0";
return htm;
}
field: 'videoScore', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '观看得分',
align: "center"
}
] ]
});
@ -263,12 +149,20 @@
elem: '#studentTable',
height: Lib.getTableHeight(),
cellMinWidth: 80,
method: 'post',
method: 'get',
even: true,
// skin:'nob',
where:getParam_s(),
size: "sm",
url: Common.ctxPath + '/api/teacherOpenCourseQuestionLog/studentScoreList.do' // 数据接口
url: Common.ctxPath + '/api/teacherOpenCourseHandsOnSimulationTasks/getStudentScore.do' // 数据接口
,parseData: function(res){ //res 即为原始返回的数据
return {
"code": 0, //解析接口状态
"msg": '', //解析提示文本
"count": res.totalRow, //解析数据长度
"data": res.list //解析数据列表
};
}
, page: Lib.tablePage // 开启分页
, limit: 10,
cols: [[
@ -281,12 +175,15 @@
title: '姓名', align: "center"
}, {
field: 'sumStudentScore',
title: '得分', align: "center"
title: '得分', align: "center",
templet:function (d) {
return '0'
}
}
]]
});
table.on('checkbox(teacherOpenCourseQuestionLogTable)', function (obj) {
table.on('checkbox(studentHandsOnTaskVideoTable)', function (obj) {
var teacherOpenCourseQuestionLog = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
@ -296,17 +193,14 @@
});
//触发行单击事件
table.on('row(studentTable)', function(obj){
var settingId = $("select[name='teacherOpenCourseQuestionSettingId']").val();
var handsOnIdNew = $("select[name='handsOnId']").val();
var param={
'studentId':obj.data.studentId,
'teacherOpenCourseQuestionSettingId':$.isEmpty(settingId)?questionSettingId:settingId,
'teacherOpenCourseId':teacherOpenCourseId,
'handsOnId':$.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew
};
if(questionSettingType == 'HOMEWORK_FILE'){
url = 'jlw/teacherOpenCourseQuestionLog/homeworkFileLogPageList.json';
param = {"questionSettingIdPlural":questionSettingId};
}
teacherOpenCourseQuestionLogTable.reload({
studentHandsOnTaskVideoTable.reload({
where: param,
page: {
curr: 1
@ -316,15 +210,16 @@
},
initSearchForm:function(){
//Lib.initSearchForm( $("#searchForm"),teacherOpenCourseQuestionLogTable,form);
//Lib.initSearchForm( $("#searchForm"),studentHandsOnTaskVideoTable,form);
//Lib.initSearchForm( $("#studentForm"),studentTable,form);
var btn_s = $("#searchFormSearch");
btn_s.on('click', function () {
var data = $("#searchForm").serializeJson();
data.teacherOpenCourseQuestionSettingId =$.isEmpty(data.teacherOpenCourseQuestionSettingId)?questionSettingId:data.teacherOpenCourseQuestionSettingId
teacherOpenCourseQuestionLogTable.reload({
var handsOnIdNew = $("select[name='handsOnId']").val();
data.handsOnId = $.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew;
data.teacherOpenCourseId=teacherOpenCourseId;
studentHandsOnTaskVideoTable.reload({
where: data,
page: {
curr: 1
@ -345,63 +240,13 @@
initToolBar:function(){
toolbar = {
/*add: function () {
var url = "/jlw/teacherOpenCourseQuestionLog/add.do";
Common.openDlg(url,"学生签到记录管理>新增");
},
edit: function () {
var data = Common.getOneFromTable(table,"teacherOpenCourseQuestionLogTable");
if(data==null){
return ;
}
var url = "/jlw/teacherOpenCourseQuestionLog/add.do?teacherOpenCourseQuestionLogId="+data.teacherOpenCourseQuestionLogId;
Common.openDlg(url,"学生签到记录管理>"+data.teacherOpenCourseQuestionLogId+">编辑");
},
del: function () {
layui.use(['del'], function(){
var delView = layui.del
delView.delBatch();
});
},
search: function () {
Lib.doSearchForm($("#searchForm"), teacherOpenCourseQuestionLogTable, 1);
view.initToolBar()
},
refresh: function () {
searchForm.reset();
Lib.doSearchForm($("#searchForm"), teacherOpenCourseQuestionLogTable, 1);
view.initToolBar()
},
importDocument: function () {
var uploadUrl = Common.ctxPath+"/jlw/teacherOpenCourseQuestionLog/importTemplate.json";
//模板,
var templatePath= Common.ctxPath+"/jlw/teacherOpenCourseQuestionLog/downloadTemplate.json";
//公共的简单上传文件处理
var url = "/core/file/simpleUpload.do?uploadUrl="+uploadUrl+"&templatePath="+templatePath;
Common.openDlg(url, "teacherOpenCourseQuestionLog管理>上传");
},*/
exportDocument: function () {
var url,title;
var settingId = $("select[name='teacherOpenCourseQuestionSettingId']").val();
settingId = $.isEmpty(settingId)?questionSettingId:settingId;
if(questionSettingType == "CHAPTER_EXERCISE"){///jlw/questionLogSummary/homeworkFileAnalysisExport.json
title = '章节详情表';
url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId;
}else if(questionSettingType == "EXAM"){
title = '考试详情表';
url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId;
}else if(questionSettingType == "HOMEWORK_FILE"){
title = '附件作业详情表';
url = '/jlw/questionLogSummary/homeworkFileAnalysisExport.json?teacherOpenCourseId'+ teacherOpenCourseId + '&questionSettingType=' + questionSettingType;
}else if(questionSettingType == "HOMEWORK_QUESTION"){
title ="题库作业详情表";
url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId;
}
var handsOnIdNew = $("select[name='handsOnId']").val();
handsOnIdNew = $.isEmpty(handsOnIdNew)?handsOnId:handsOnIdNew;
var url = '/jlw/studentHandsOnTaskVideo/excel/export.do?teacherOpenCourseId='+teacherOpenCourseId+'&handsOnId='+handsOnIdNew;
Common.openConfirm("确认要导出"+title+"?", function (index) {
$.downFile(Common.ctxPath + url);
Common.openConfirm("确认要导出课程实操存档详情?", function (index) {
$.downFile(Common.ctxPath + url,'课程实操存档详情');
layer.close(index);
})
},
@ -416,7 +261,7 @@
toolbar[type] ? toolbar[type].call(this) : '';
});
}, initTableTool: table.on('tool(teacherOpenCourseQuestionLogTable)', function (obj) {
}, initTableTool: table.on('tool(studentHandsOnTaskVideoTable)', function (obj) {
var data = obj.data;
if (obj.event === 'edit') {
//var url = "/jlw/teacherOpenCourseQuestionLog/add.do?teacherOpenCourseQuestionLogId="+data.teacherOpenCourseQuestionLogId;
@ -439,8 +284,8 @@
};
function getParam_s(){
var param = {
"schoolClassIdPlural":$("#studentForm select[name='classId']").val(),
"studentSnOrName":$("#studentForm input[name='studentOrName']").val(),
"classId":$("#studentForm select[name='classId']").val(),
"studentName":$("#studentForm input[name='studentOrName']").val(),
'teacherOpenCourseId': teacherOpenCourseId
};

Loading…
Cancel
Save