文件存档 互动

beetlsql3-dev
姚丹ab 2 years ago
parent c005e4ccd2
commit eaf9fb651d

@ -258,6 +258,7 @@ public class TeacherOpenCourseChatLogController extends BaseController {
/**
*@author
*@data 2023/01/15
*
*
*/
@GetMapping(MODEL + "/indexInfoNor.do")
@ -269,6 +270,34 @@ public class TeacherOpenCourseChatLogController extends BaseController {
return view;
}
/**
*@author
*@data 2023/01/16
*
*/
@GetMapping(MODEL + "/indexInfoStu.do")
@Function("teacherOpenCourseChatLog.query")
public ModelAndView indexInfoStu(Long teacherOpenCourseId) {
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseChatLog/indexInfoStu.html");
view.addObject("search", TeacherOpenCourseChatLogQuery.class.getName());
view.addObject("teacherOpenCourseId", teacherOpenCourseId);
return view;
}
/**
*@author
*@data 2023/01/16
* _
*/
@GetMapping(MODEL + "/indexInfoSpe.do")
@Function("teacherOpenCourseChatLog.query")
public ModelAndView indexInfoSpe(Long teacherOpenCourseId) {
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseChatLog/indexInfoSpe.html");
view.addObject("search", TeacherOpenCourseChatLogQuery.class.getName());
view.addObject("teacherOpenCourseId", teacherOpenCourseId);
return view;
}
@GetMapping(MODEL + "/edit.do")
@Function("teacherOpenCourseChatLog.edit")
public ModelAndView edit(Long teacherOpenCourseChatLogId) {

@ -36,15 +36,15 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
@Query(name = "上级ID", display = false)
private Long teacherOpenCourseChatLogParentId;
@NotNull(message = "课程开课ID不能为空", groups ={ ValidateConfig.ADD.class, TEACHER_ADD.class, STUDENT_ADD.class })
@Query(name = "课程开课ID", display = true,type=Query.TYPE_DICT,dict="teacher_open_course.teacher_open_course_title.teacher_open_course_status=1")
@Query(name = "课程开课ID", display = false,type=Query.TYPE_DICT,dict="teacher_open_course.teacher_open_course_title.teacher_open_course_status=1")
private Long teacherOpenCourseId;
@Query(name = "班级ID集合", display = false)
private String schoolClassIds;
// @NotNull(message = "教师ID不能为空", groups ={ ValidateConfig.ADD.class, TEACHER_ADD.class })
@Query(name = "教师ID", display = true,type=Query.TYPE_DICT,dict="teacher.teacher_name.teacher_status=1")
@Query(name = "教师ID", display = false,type=Query.TYPE_DICT,dict="teacher.teacher_name.teacher_status=1")
private Long teacherId;
// @NotNull(message = "学生ID不能为空", groups ={ ValidateConfig.ADD.class, STUDENT_ADD.class })
@Query(name = "学生ID", display = true,type=Query.TYPE_DICT,dict="student.student_name.student_status=1")
@Query(name = "学生ID", display = false,type=Query.TYPE_DICT,dict="student.student_name.student_status=1")
private Long studentId;
@NotNull(message = "讨论内容不能为空", groups ={ ValidateConfig.ADD.class, TEACHER_ADD.class, STUDENT_ADD.class })
@Query(name = "讨论内容", display = false)
@ -58,7 +58,7 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
@Query(name = "附件上传(仅支持图片,多个逗号隔开)", display = false)
private String chatFiles;
@Query(name = "状态 1正常 2删除", display = true,type=Query.TYPE_DICT,dict="global_status")
@Query(name = "状态 1正常 2删除", display = false,type=Query.TYPE_DICT,dict="global_status")
private Integer teacherOpenCourseChatLogStatus;
@Query(name = "创建时间", display = false)
private Date teacherOpenCourseChatLogAddTime;

@ -177,7 +177,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
var url = "/jlw/questionLogSummary/index.do?teacherOpenCourseId=" + data.teacherOpenCourseId + "&questionSettingType=EXAM";
Common.openDlg(url,"《"+title+"》/ 考试存档");
}else if(obj.event === "hd"){
var url = "/jlw/teacherOpenCourseChatLog/index.do?teacherOpenCourseId="+data.teacherOpenCourseId;
var url = "/jlw/teacherOpenCourseChatLog/indexInfoSpe.do?teacherOpenCourseId="+data.teacherOpenCourseId;
Common.openDlg(url,"《"+title+"》/ 互动存档");
}
})

@ -1,11 +1,9 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/questionLogSummary/"}){ -->
<div class="layui-row" style="float: right;margin-bottom: 20px">
<layui:accessButton function="teacherOpenCourseStudentSigninSetting.query" action="exportDocument"><span
class="iconfont">&#xe8c7;</span>导出</layui:accessButton>
<layui:accessButton function="teacherOpenCourseStudentSigninSetting.query" class="layui-btn-primary"
action="addButton_cancel"><span class="iconfont">&#xe600;</span>返回</layui:accessButton>
<div class="layui-inline" style="float: right;">
<layui:accessButton function="teacherOpenCourseStudentSigninSetting.query" action="exportDocument"><span
class="iconfont">&#xe8c7;</span>导出</layui:accessButton>
</div>
</div>
<div class="layui-row">
<div style="float: left" id="view"></div>

@ -9,10 +9,10 @@
</h2>
</div>
<div class="layui-inline" style="float: right;">
<layui:accessButton function="teacherOpenCourseChatLog.query" class="layui-btn-primary"
action="addButton_cancel"><span class="iconfont">&#xe600;</span>返回</layui:accessButton>
<layui:accessButton function="teacherOpenCourseChatLog.query" action="export"><span
class="iconfont">&#xe8c7;</span>导出</layui:accessButton>
<layui:accessButton function="teacherOpenCourseChatLog.query" class="layui-btn-primary"
action="addButton_cancel"><span class="iconfont">&#xe600;</span>返回</layui:accessButton>
</div>
</div>

@ -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,154 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseHandsOn/"}){ -->
<!--使用日志页面-->
<style>
/* 分页确定按钮*/
.layui-laypage-btn{
color: white!important;
}
.xxmc{
white-space: nowrap;
text-overflow:ellipsis;
line-height: 37px;font-size: 16px;
padding-left: 10px;
width: auto !important;
min-width: 200px;
max-width: 300px;
overflow: hidden;
height: 37px;
}
.layui-form-item .layui-input-inline,.layui-form-item .layui-inline {
margin-right: 0px;
}
</style>
<div class="layui-inline">
<form id="searchForm" class="layui-form" style="background-color: #fdfdfd;padding: 10px 0;margin-bottom: 10px;">
<div class="layui-form-item" style="margin-bottom: 0;">
<div class="layui-inline">
<label class="layui-form-label">班级名称:</label>
<div class="layui-input-inline">
<layui:simpleDictSelect style='layui-input-inline' type="school_class.class_name.class_status=1"
id="classId" name="classId"/>
</div>
</div>
</div>
</form>
</div>
<div class="layui-btn-group" style="margin-bottom:16px;margin-left: 20px;">
<layui:accessButton function="teacher.query" id="searchFormSearch" action="search"><i class="layui-icon">&#xe615;</i>搜索
</layui:accessButton>
<layui:accessButton function="teacher.add" action="export"><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="teacherTable" lay-filter="teacherTable"></table>
<input type="hidden" name="teacherOpenCourseId" autocomplete="off" class="layui-input" value="${teacherOpenCourseId}"/>
<!--#} -->
<script>
layui.use(['form', 'laydate', 'table', 'laydate'], function () {
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var teacherTable = null;
var laydate = layui.laydate;
var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val();
teacherTable = table.render({
elem : '#teacherTable',
height : Lib.getTableHeight(),
cellMinWidth: 100,
even:true,
// skin:'nob',
method: 'post',
size:"lg",
url: Common.ctxPath + '/api/teacherOpenCourseChatLog/getPageList.do' // 数据接口
,where:getParam()
,page : Lib.tablePage // 开启分页
,limit : 10,
cols: [[
{type:'numbers',title:'序号'},
{
field: 'code', title: '提问时间', align: "center"
},
{
field: 'name', title: '提问学生', align: "center"
},
{
field: 'name', title: '提问方式', align: "center"
},
{
field: 'code', title: '用户编号', align: "center",
hide: "${isSignRole.get()!''}" != 2 ? false : true
},
{
field: 'universitiesCollegesName', title: '所属院校', align: "center",
hide: "${isSignRole.get()!''}" != 2 ? false : true
},
{
field: 'universitiesCollegesProvince', title: '所属省份', align: "center",
hide: "${isSignRole.get()!''}" != 2 ? false: true,
},
{
field: 'className', title: '所属班级', align: "center"
},
{
field: 'platform', title: '提问内容', align: "center",
},
{
field: 'loginTime', title: '学生回答', align: "center",
},
{
field: 'logoutTime', title: '登记得分', align: "center",
}
] ]
});
toolbar = {
addButton_cancel:function (){
parent.Lib.tableRefresh();
Lib.closeFrame();
},export:function () {
console.log("点击成功")
return;
layer.confirm('是否确定导出使用日志表吗?', function (index) {
$.downFile(Common.ctxPath + "/jlw/student/studentUseLogListExport.json");
layer.close(index);
});
},search:function () {
teacherTable.reload({
where: getParam(),
page: {
curr: 1
}
});
}
};
$('.ext-toolbar').on('click', function() {
var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : '';
});
function getParam(checkStatus) {
var codePlural = "";
var param = {};
if (!$.isEmpty(checkStatus)) {
codePlural = Common.concatBatchId(checkStatus.data, "code");
}
if ($.isEmpty(codePlural)) {
param = $("#searchForm").serializeJson();
param.teacherOpenCourseId = teacherOpenCourseId;
param.teacherId = '';
param.chatLogSendType = "specify_ask";
} else {
param.codePlural = codePlural;
}
return param;
}
});
</script>

@ -0,0 +1,235 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseHandsOn/"}){ -->
<div class="layui-row layui-col-space15 layui-form">
<div class="layui-inline">
<layui:searchForm formId="searchForm" searchList="" condition="${search}">
<div class="layui-inline">
<div class="layui-input-inline">
<input type="text" name="teakey" id="studentClientLinkType" autocomplete="off"
placeholder="学生问题检索" class="layui-input">
</div>
<div class="layui-input-inline">
<input type="text" name="chatContent" id="teacherClientLinkType" autocomplete="off"
placeholder="教师回答检索" class="layui-input">
</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>
<div class="layui-row">
<label class="layui-form-label" style="width: 56px;padding-left: 9px">关键词:</label>
<div class="layui-input-inline" id="view"></div>
</div>
<table id="teacherOpenCourseQuestionLogTable"
lay-filter="teacherOpenCourseQuestionLogTable"></table>
</div>
<input type="hidden" name="teacherOpenCourseId" autocomplete="off" class="layui-input" value="${teacherOpenCourseId}"/>
<script id="demo" type="text/html">
{{# layui.each(d, function(index, item){ }}
<div class="layui-form-mid layui-word-aux keyWords" style="color: #1e9fff!important;cursor: pointer;">{{item}}</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 dataKeywords = [];
var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val();
var ret = Common.postAjax('/api/teacherOpenCourseChatLog/getKeywordsList.do',{"teacherOpenCourseId":teacherOpenCourseId});///api/teacherOpenCourseChatLog/getKeywordsList.do
if (ret.code == 0) {
dataKeywords = ret.data;
if($.isEmpty(dataKeywords)){
var getTpl = demo.innerHTML
, view = document.getElementById('view');
laytpl(getTpl).render(
["课程", "专业", "大数据", "考试", null], function(html){
view.innerHTML = html;
});
}
}
$(".keyWords").click(function (obj) {
var param = getParam();
param.keywords = $(this).html();
teacherOpenCourseQuestionLogTable.reload({
where: param,
page: {
curr: 1
}
});
});
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_);}
teacherOpenCourseQuestionLogTable = table.render({
elem: '#teacherOpenCourseQuestionLogTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url: Common.ctxPath + '/api/teacherOpenCourseChatLog/getPageList.do' // 数据接口
,page : Lib.tablePage // 开启分页
,where:getParam()
,limit : 10,
cols : [ [ // 表头
{type:'numbers',title:'序号'},
{
field: 'studentName',
title: '姓名',
align: "center",
hideField: false,
templet:function (d) {
var htm ='<div class="layui-inline"><img src="${ctxPath}/plugins/head_img.jpg" class="layui-nav-img"></div><span>'+d.studentName+'</span></div>';
return htm;
}
},
{
field: 'chatContent',
title: '问题',
align: "center",
},
{
field: 'keywords',
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: 'teacherOpenCourseChatLogAddTime', //数据字典类型为 teacher_open_course.teacher_open_course_title.teacher_open_course_status=1
title: '提问时间',
align: "center",
},
{
field: 'operation_',
title: '操作',
align: "center",
templet: function (d) {
var htm = '<a class="layui-table-link" lay-event="look">查看回复</a>';
return htm;
}
}
] ]
});
table.on('checkbox(teacherOpenCourseQuestionLogTable)', function (obj) {
var teacherOpenCourseQuestionLog = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
});
},
initSearchForm:function(){
//Lib.initSearchForm( $("#searchForm"),teacherOpenCourseQuestionLogTable,form);
var btn = $("#searchFormSearch");
btn.on('click', function () {
var data = $("#searchForm").serializeJson();
data.teacherOpenCourseId =teacherOpenCourseId;
teacherOpenCourseQuestionLogTable.reload({
where: data,
page: {
curr: 1
}
});
});
},
initToolBar:function(){
toolbar = {
exportDocument: function () {
var url;
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(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();
}
});
});
}else if(obj.event === "look"){
layer.open({
title: '回复消息'
,content: data.questionScore
});
}
})
};
form.render();
view.init();
function getParam(checkStatus) {
param = $("#searchForm").serializeJson();
param.teacherOpenCourseId = teacherOpenCourseId;
param.chatLogSendType = "student_ask";
return param;
}
});
</script>

@ -1,11 +1,9 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseHandsOn/"}){ -->
<div class="layui-row" style="float: right;margin-bottom: 20px">
<layui:accessButton function="teacherOpenCourseStudentSigninSetting.query" action="exportDocument"><span
class="iconfont">&#xe8c7;</span>导出</layui:accessButton>
<layui:accessButton function="teacherOpenCourseStudentSigninSetting.query" class="layui-btn-primary"
action="addButton_cancel"><span class="iconfont">&#xe600;</span>返回</layui:accessButton>
<div class="layui-inline" style="float: right;">
<layui:accessButton function="teacherOpenCourseStudentSigninSetting.query" action="exportDocument"><span
class="iconfont">&#xe8c7;</span>导出</layui:accessButton>
</div>
</div>
<div class="layui-row">
<div style="float: left" id="view"></div>

Loading…
Cancel
Save