Merge remote-tracking branch 'origin/beetlsql3-dev' into beetlsql3-dev

beetlsql3-dev
yangdj 2 years ago
commit bc23310718

@ -99,9 +99,10 @@ public class TeacherOpenCourseHandsOnController{
@GetMapping(MODEL + "/index.do") @GetMapping(MODEL + "/index.do")
@Function("teacherOpenCourseHandsOn.query") @Function("teacherOpenCourseHandsOn.query")
public ModelAndView index() { public ModelAndView index(Long teacherOpenCourseId) {
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseHandsOn/index.html") ; ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseHandsOn/index.html") ;
view.addObject("search", TeacherOpenCourseHandsOnQuery.class.getName()); view.addObject("search", TeacherOpenCourseHandsOnQuery.class.getName());
view.addObject("teacherOpenCourseId", teacherOpenCourseId);
return view; return view;
} }

@ -1,16 +1,42 @@
layui.define([ 'form', 'laydate', 'table' ], function(exports) { layui.define([ 'form', 'laydate', 'table','laytpl' ], function(exports) {
var form = layui.form; var form = layui.form;
var laydate = layui.laydate; var laydate = layui.laydate;
var table = layui.table; var table = layui.table;
var laytpl = layui.laytpl;
var teacherOpenCourseHandsOnTable = null; var teacherOpenCourseHandsOnTable = null;
var teacherOpenCourseId = $("input[name='teacherOpenCourseId']").val();
var data={};
var ret = Common.getAjax("/jlw/teacherOpenCourseHandsOn/getHandsOnListCount.do?teacherOpenCourseId"+teacherOpenCourseId);
if(ret.code==0){
data = ret.data;
}else {
Common.info(ret.msg);
}
if ($.isEmpty(data)) {
data = {
videoAvgScore: '',
pptAvgScore: '',
theoryAvgScore: '',
stepAvgScore: '',
reportAvgScore: ''
};
}
var getTpl = demo.innerHTML
,view = document.getElementById('view');
laytpl(getTpl).render(data, function(html){
view.innerHTML = html;
});
var view ={ var view ={
init:function(){ init:function(){
var that = this var that = this;
this.initTable(); this.initTable();
this.initSearchForm(); this.initSearchForm();
this.initToolBar(); this.initToolBar();
window.dataReload = function(){ window.dataReload = function(){
Lib.doSearchForm($("#searchForm"),teacherOpenCourseHandsOnTable) Lib.doSearchForm($("#searchForm"),teacherOpenCourseHandsOnTable);
that.initToolBar(); that.initToolBar();
} }
}, },
@ -21,94 +47,76 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
elem : '#teacherOpenCourseHandsOnTable', elem : '#teacherOpenCourseHandsOnTable',
height : Lib.getTableHeight(1), height : Lib.getTableHeight(1),
cellMinWidth: 100, cellMinWidth: 100,
method : 'post', method : 'get',
url : Common.ctxPath + '/jlw/teacherOpenCourseHandsOn/list.json' // 数据接口 url : Common.ctxPath + '/jlw/teacherOpenCourseHandsOn/getHandsOnList.do' // 数据接口 /server
,where:{"teacherOpenCourseId":teacherOpenCourseId}
,page : Lib.tablePage // 开启分页 ,page : Lib.tablePage // 开启分页
,toolbar: '#toolbar_teacherOpenCourseHandsOn' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏
,limit : 10, ,limit : 10,
cols : [ [ // 表头 cols : [ [ // 表头
{ {
type : 'checkbox', type : 'numbers',
title:'序号'
}, },
{ {
field : 'handsOnId', field : 'handsOnName',
title : '实操主键', title : '项目名称',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['handsOnId'])?false:sx_['handsOnId'],
width : 60,
},
{
field : 'teacherOpenCourseId',
title : '开课ID',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['teacherOpenCourseId'])?false:sx_['teacherOpenCourseId'],
},
{
field : 'courseInfoId',
title : '归属课程',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['courseInfoId'])?false:sx_['courseInfoId'],
},
{
field : 'courseChildNode',
title : '归属章节',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['courseChildNode'])?false:sx_['courseChildNode'],
},
{
field : 'handsOnName',
title : '实操名称',
align:"center", align:"center",
hideField :false, hideField :false,
hide:$.isEmpty(sx_['handsOnName'])?false:sx_['handsOnName'], hide:$.isEmpty(sx_['handsOnName'])?false:sx_['handsOnName']
}, },
{ {
field : 'handsOnRecommend', field : 'videoAvgScore',
title : '实操介绍', title : '观看视频平均得分',
align:"center", align:"center",
hideField :false, hideField :false,
hide:$.isEmpty(sx_['handsOnRecommend'])?false:sx_['handsOnRecommend'], hide:$.isEmpty(sx_['videoAvgScore'])?false:sx_['videoAvgScore'],
templet:function (d) {
var htm = '<a class="layui-table-link" lay-event="videoAvgScore">'+d.videoAvgScore+'</a>';
return htm
}
}, },
{ {
field : 'addTime', field : 'pptAvgScore',
title : '添加时间', title : '观看PPT平均得分',
align:"center", align:"center",
hideField :false, hideField :false,
hide:$.isEmpty(sx_['addTime'])?false:sx_['addTime'], hide:$.isEmpty(sx_['pptAvgScore'])?false:sx_['pptAvgScore'],
templet:function (d) {
var htm = '<a class="layui-table-link" lay-event="pptAvgScore">'+d.pptAvgScore+'</a>';
return htm
}
}, },
{ {
field : 'orgId', field : 'theoryAvgScore',
title : '组织机构ID', title : '理论测评平均得分',
align:"center", align:"center",
hideField :false, hideField :false,
hide:$.isEmpty(sx_['orgId'])?false:sx_['orgId'], hide:$.isEmpty(sx_['theoryAvgScore'])?false:sx_['theoryAvgScore'],
templet:function (d) {
var htm = '<a class="layui-table-link" lay-event="theoryAvgScore">'+d.theoryAvgScore+'</a>';
return htm
}
}, },
{ {
field : 'userId', field : 'stepAvgScore',
title : '后台用户ID', title : '实训操作步骤平均得分',
align:"center", align:"center",
hideField :false, hideField :false,
hide:$.isEmpty(sx_['userId'])?false:sx_['userId'], hide:$.isEmpty(sx_['stepAvgScore'])?false:sx_['stepAvgScore'],
templet:function (d) {
var htm = '<a class="layui-table-link" lay-event="stepAvgScore">'+d.stepAvgScore+'</a>';
return htm
}
}, },
{ {
field : 'trainingData', field : 'reportAvgScore',
title : '数据集(多个地址,逗号隔开)', title : '报告撰写平均得分',
align:"center", align:"center",
hideField :false, hideField :false,
hide:$.isEmpty(sx_['trainingData'])?false:sx_['trainingData'], hide:$.isEmpty(sx_['reportAvgScore'])?false:sx_['reportAvgScore'],
} templet:function (d) {
,{ var htm = '<a class="layui-table-link" lay-event="reportAvgScore">'+d.reportAvgScore+'</a>';
field : 'operation_',title : '操作',align:"center", templet: function (d) { return htm
var htm = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</button>';
htm += '<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button>';
return htm;
} }
} }
@ -159,6 +167,16 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
Lib.doSearchForm($("#searchForm"), teacherOpenCourseHandsOnTable, 1); Lib.doSearchForm($("#searchForm"), teacherOpenCourseHandsOnTable, 1);
view.initToolBar() 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,'签到汇总表');
layer.close(index);
});*/
},
} }
//触发事件 //触发事件
$('.ext-toolbar').on('click', function() { $('.ext-toolbar').on('click', function() {
@ -184,6 +202,15 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
} }
}); });
}); });
}else if(obj.event === "videoAvgScore"){
//teacherOpenCourseId handsOnId
//搜索条件studentOrName
}else if(obj.event === "pptAvgScore"){
}else if(obj.event === "theoryAvgScore"){
}else if(obj.event === "stepAvgScore"){
}else if(obj.event === "reportAvgScore"){
} }
}) })
} }

@ -168,8 +168,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
var url = "/jlw/questionLogSummary/index.do?teacherOpenCourseId=" + data.teacherOpenCourseId + "&questionSettingType=CHAPTER_EXERCISE"; var url = "/jlw/questionLogSummary/index.do?teacherOpenCourseId=" + data.teacherOpenCourseId + "&questionSettingType=CHAPTER_EXERCISE";
Common.openDlg(url,"《"+title+"》/ 章节练习存档"); Common.openDlg(url,"《"+title+"》/ 章节练习存档");
}else if(obj.event === "kcsc"){ }else if(obj.event === "kcsc"){
var url = "/jlw/teacherOpenCourseHandsOn/index.do?teacherOpenCourseId="+data.teacherOpenCourseId;
var url = "/jlw/questionLogSummary/index.do?teacherOpenCourseId="+data.teacherOpenCourseId;
Common.openDlg(url,"《"+title+"》/ 课程实操存档"); Common.openDlg(url,"《"+title+"》/ 课程实操存档");
} else if (obj.event === "homework") { } else if (obj.event === "homework") {
var url = "/jlw/questionLogSummary/homeworkIndex.do?teacherOpenCourseId=" + data.teacherOpenCourseId; var url = "/jlw/questionLogSummary/homeworkIndex.do?teacherOpenCourseId=" + data.teacherOpenCourseId;

@ -1,25 +1,47 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseHandsOn/"}){ --> <!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseHandsOn/"}){ -->
<layui:searchForm formId="searchForm" searchList="" condition="${search}"> <div class="layui-row" style="float: right;margin-bottom: 20px">
</layui:searchForm> <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>
</div>
<script type="text/html" id="demo">
<h2 style="float: left">课程实操汇总:【
观看视频平均得分:{{!$.isEmpty(d)?d.videoAvgScore:" "}};
观看ppt平均得分{{!$.isEmpty(d)?d.pptAvgScore:""}};
理论测评平均得分:{{!$.isEmpty(d)?d.theoryAvgScore:""}};
实训操作步骤平均得分:{{!$.isEmpty(d)?d.stepAvgScore:""}}
报告撰写平均得分:{{!$.isEmpty(d)?d.reportAvgScore:""}}
</h2>
</script>
<table id="teacherOpenCourseHandsOnTable" lay-filter="teacherOpenCourseHandsOnTable"></table> <table id="teacherOpenCourseHandsOnTable" lay-filter="teacherOpenCourseHandsOnTable"></table>
<input type="hidden" name="teacherOpenCourseId" value="${teacherOpenCourseId}" />
<!--#} --> <!--#} -->
<!--
<script type="text/html" id="toolbar_teacherOpenCourseHandsOn"> <script type="text/html" id="toolbar_teacherOpenCourseHandsOn">
<div class="layui-btn-container"> <div class="layui-btn-container">
<div class="layui-btn-group" > <div class="layui-btn-group" >
<!--# if(core.searchIsShow(search)) {--> &lt;!&ndash;# if(core.searchIsShow(search)) {&ndash;&gt;
<layui:accessButton function="teacherOpenCourseHandsOn.query" id="searchFormSearch" action="search"><i class="layui-icon">&#xe615;</i>搜索</layui:accessButton> <layui:accessButton function="teacherOpenCourseHandsOn.query" id="searchFormSearch" action="search"><i class="layui-icon">&#xe615;</i>搜索</layui:accessButton>
<!--# }--> &lt;!&ndash;# }&ndash;&gt;
<layui:accessButton function="teacherOpenCourseHandsOn.add" action="add">添加</layui:accessButton> <layui:accessButton function="teacherOpenCourseHandsOn.add" action="add">添加</layui:accessButton>
<layui:accessButton function="teacherOpenCourseHandsOn.edit" action="edit">修改</layui:accessButton> <layui:accessButton function="teacherOpenCourseHandsOn.edit" action="edit">修改</layui:accessButton>
<layui:accessButton function="teacherOpenCourseHandsOn.del" action="del">删除</layui:accessButton> <layui:accessButton function="teacherOpenCourseHandsOn.del" action="del">删除</layui:accessButton>
<!--# if(!isEmpty(search)) {--> &lt;!&ndash;# if(!isEmpty(search)) {&ndash;&gt;
<layui:accessButton function="teacherOpenCourseHandsOn.query" action="refresh"><i class="layui-icon">&#xe669;</i>刷新</layui:accessButton> <layui:accessButton function="teacherOpenCourseHandsOn.query" action="refresh"><i class="layui-icon">&#xe669;</i>刷新</layui:accessButton>
<!--# }--> &lt;!&ndash;# }&ndash;&gt;
</div> </div>
</div> </div>
</script> </script>
<script> <script>-->
layui.use(['index'], function(){ layui.use(['index'], function(){
var index = layui.index; var index = layui.index;

Loading…
Cancel
Save