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

beetlsql3-dev
wgf
commit 21d4b2f7f6

@ -86,7 +86,7 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT
,choose: function(obj){
$("#mp4Info").append('<div class="progressCss_mp4">\n' +
'<span type="text" class="nameV" style="width: 300px"></span>\n' +
'<span class="mv_m" style="float: left;"></span>\n' +
'<span class="mv_m" style="float: right;"></span>\n' +
'<span class="fileUrl" style="display: none;"></span>\n' +
'<div class="layui-progress " lay-showPercent="yes" lay-filter="progressBar" style="margin-top: 15px; width:300px">\n' +
'<div class="layui-progress-bar layui-bg-blue" lay-percent="100%"></div>\n' +
@ -131,14 +131,14 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT
elem: '#upload-normalPPT'
,url: Common.ctxPath +'/jlw/file/update.do'
,accept:'file'
,exts:'ppt|pps|pptx|ppsx|pot|ppa'
,exts:'ppt|pps|pptx|ppsx|pot|ppa|pdf'
, progress: function(value) {
element.progress('progressBarPPT',value + '%');
}
,choose: function(obj){
$("#pptInfo").append('<div class="progressCss_ppt">\n' +
'<span type="text" class="nameV" style="width: 300px"></span>\n' +
'<span class="mv_m" style="float: left;"></span>\n' +
'<span class="mv_m" style="float: right;"></span>\n' +
'<span class="fileUrl" style="display: none;"></span>\n' +
'<div class="layui-progress " lay-showPercent="yes" lay-filter="progressBarPPT" style="margin-top: 15px; width:300px">\n' +
'<div class="layui-progress-bar layui-bg-blue" lay-percent="100%"></div>\n' +
@ -191,9 +191,9 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT
choose: function(obj){
$("#fileInfo").append('<div class="progressCss_file">\n' +
'<span type="text" class="nameV" style="width: 300px"></span>\n' +
'<span class="mv_m" style="float: left;"></span>\n' +
'<span class="mv_m" style="float: right;"></span>\n' +
'<span class="fileUrl" style="display: none;"></span>\n' +
'<div class="layui-progress " lay-showPercent="yes" lay-filter="progressBarFile" style="margin-top: 15px; width:300px">\n' +
'<div class="layui-progress " lay-showPercent="yes" lay-filter="progressBarFile" style="margin-top: 13%; width:300px">\n' +
'<div class="layui-progress-bar layui-bg-blue" lay-percent="100%"></div>\n' +
'</div>\n' +
'<span class="closeInfo">X</span>\n' +

@ -192,6 +192,12 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
});
});
} else if (obj.event == "toPaike") {
var teacherOpenCourseScheduleSessionTagTable = Common.postAjax('/jlw/teacherOpenCourseScheduleSessionTag/list.json').data;//开课节次数据表格
var teacherOpenCourseScheduleSessionClassTable = Common.postAjax('/jlw/teacherOpenCourseScheduleSessionClass/list.json').data;
if(teacherOpenCourseScheduleSessionTagTable.length <=0 || teacherOpenCourseScheduleSessionClassTable.length<=0){
Common.info("课次未设置 / 排课教室未设置,请先点击 <span style='color:red'>' 初始化排课条件设置 '</span>进行设置");
return;
}
var url = "/jlw/teacherOpenCourseScheduleSession/add.do?teacherOpenCourseId=" + data.teacherOpenCourseId;
Common.openDlg(url, "排课列表>" + data.teacherOpenCourseTitle + ">编辑");
} else if (obj.event == "enable") {

@ -21,6 +21,10 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
var selectResourcesQuestion = [];
var tableData4 = [];
var resourcesQuestionIds = ""; //选中题目id
var resourcesInfoTable = [];//资源库的table
var resourcesInfoShowTable = []//选中视频资源后展示的table
var resourcesInfoShowPPTTable = [];//选中PPT资源后展示的table
var checkStatusData = [];//资源选中data
var teacherOpenCourseId = $("input[name=teacherOpenCourseId]").val();
var typeInfo = $("#taskTypeInfo input[name='taskType']:checked").val(); //当前操作的类型
@ -74,7 +78,7 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
'<span type="text" class="nameV" style="width: 300px"></span>\n' +
'<span class="mv_m" style="float: right;"></span>\n' +
'<span class="fileUrl" style="display: none;"></span>\n' +
'<div class="layui-progress " lay-showPercent="yes" lay-filter="progressBar" style="margin-top: 15px; width:300px">\n' +
'<div class="layui-progress " lay-showPercent="yes" lay-filter="progressBar" style="margin-top: 13%; width:300px">\n' +
'<div class="layui-progress-bar layui-bg-blue" lay-percent="100%"></div>\n' +
'</div>\n' +
'<span class="closeInfo">X</span>\n' +
@ -116,7 +120,7 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
elem: '#upload-normalPPT'
,url: Common.ctxPath +'/jlw/file/update.do'
,accept:'file'
,exts:'ppt|pps|pptx|ppsx|pot|ppa'
,exts:'ppt|pps|pptx|ppsx|pot|ppa|pdf'
, progress: function(value) {
element.progress('progressBarPPT',value + '%');
}
@ -125,11 +129,12 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
'<span type="text" class="nameV" style="width: 300px"></span>\n' +
'<span class="mv_m" style="float: right;"></span>\n' +
'<span class="fileUrl" style="display: none;"></span>\n' +
'<div class="layui-progress " lay-showPercent="yes" lay-filter="progressBarPPT" style="margin-top: 15px; width:300px">\n' +
'<div class="layui-progress-bar layui-bg-blue" lay-percent="0%"></div>\n' +
'<div class="layui-progress " lay-showPercent="yes" lay-filter="progressBarPPT" style="margin-top: 13%; width:300px">\n' +
'<div class="layui-progress-bar layui-bg-blue" lay-percent="100%"></div>\n' +
'</div>\n' +
'<span class="closeInfo">X</span>\n' +
'</div>');
element.init();//进度条更新
},
before: function(obj) {
obj.preview(function(index, file, result) {
@ -177,11 +182,12 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
'<span type="text" class="nameV" style="width: 300px"></span>\n' +
'<span class="mv_m" style="float: right;"></span>\n' +
'<span class="fileUrl" style="display: none;"></span>\n' +
'<div class="layui-progress " lay-showPercent="yes" lay-filter="progressBarFile" style="margin-top: 15px; width:300px">\n' +
'<div class="layui-progress-bar layui-bg-blue" lay-percent="0%"></div>\n' +
'<div class="layui-progress " lay-showPercent="yes" lay-filter="progressBarFile" style="margin-top: 13%; width:300px">\n' +
'<div class="layui-progress-bar layui-bg-blue" lay-percent="100%"></div>\n' +
'</div>\n' +
'<span class="closeInfo">X</span>\n' +
'</div>');
element.init();//进度条更新
},
before: function(obj) {
obj.preview(function(index, file, result) {
@ -537,6 +543,8 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
editor.setToolbarAutoFixed(false);
}
}
resourcesInfoShowTable.reload({data:[]});
resourcesInfoShowPPTTable.reload({data:[]});
// $("input[name='taskTitle']").val("");
// $("input[name='taskScore']").val("");
// $("input[name='taskOrder']").val("");
@ -602,5 +610,222 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
getScoreInfo();
});
}
//视频资源库button
$("#videoClick").click(function (obj) {
updataResourcesOpenRe(1);
});
//PPT资源库button
$("#pptClick").click(function (obj) {
updataResourcesOpenRe(2);
});
/*资源库上传弹出框*/
function updataResourcesOpenRe(resourcesInfoType) {
checkStatusData = [];
layer.open({
type: 1,
title: "资源库上传",
shadeClose: true,
btn: ['保存', '关闭'],
btnAlign: 'c',
area: ['820px', '600px'],
content: $("#edit_dialog"),
success: function (layero, index) {
loadResourcesInfo(resourcesInfoType);
$(".search").unbind();
$(".search").click(function () {searchList(resourcesInfoType);}); //搜索
table.reload('resourcesInfoTable');//刷新table
}, yes: function (index) {
var checkStatus = table.checkStatus("resourcesInfoTable"); //获取选中行状态
var dataNew = checkStatus.data, ids = Common.concatBatchId(dataNew, "resourcesInfoId"); //获取选中行数据
if(resourcesInfoType == 1){
resourcesInfoShowInfo(dataNew)
}else if(resourcesInfoType == 2){
resourcesInfoShowPPTInfo(dataNew)
}
form.render()
layer.close(index);
}, btn2: function (index, layero) {
layer.close(index);
}
});
}
//资源库表格
function loadResourcesInfo(resourcesInfoType) {
$("#edit_dialog input[name='resourcesInfoName']").val("");
resourcesInfoTable = table.render({
elem: '#resourcesInfoTable',
height: Lib.getTableHeight(),
cellMinWidth: 100,
method: 'post',
even: true,
//url: Common.ctxPath + '/jlw/resourcesInfo/list.json' // 数据接口
url: Common.ctxPath + '/jlw/resourcesInfo/resourcesList.json' // 数据接口
, where: getParamRe(resourcesInfoType)
, page: Lib.tablePage // 开启分页
, limit: 10,
cols: [[ // 表头
{
type: 'checkbox'
},
{
field: 'resourcesInfoName', title: '资源名称', align: "center", style: "text-align: left;"
},
{
field: 'courseInfoParentParentName', title: '归属课程', align: "center", width: 150
},
{
field: 'resourcesInfoType', width: 150, title: '资源类型', align: "center", templet: function (d) {//(1视频 2PPT 3PDF)
var text = d.resourcesInfoType == 1 ? "视频" : d.resourcesInfoType == 2 ? "PPT" : d.resourcesInfoType == 3 ? "PDF" : d.resourcesInfoType == 4 ? "链接" : d.resourcesInfoType == 5 ? "图文" : '-';
return '<span class="textType">' + text + '</span>';
}
},
{
field: 'userId',
title: '操作',
width: 80,
align: "center",
templet: function (d) {
var htm = '<button type="button" class="layui-btn layui-btn-xs bg_button" lay-event="previewPage">查看</button></a>';
return htm;
}
}
]]
});
table.on('tool(resourcesInfoTable)', function (obj) {
var data = obj.data;
if (obj.event === 'previewPage') { //预览
Lib.downloadFile(data);
}
});
table.on('checkbox(resourcesInfoTable)', function(obj){
checkStatusData = table.checkStatus("resourcesInfoTable").data;
var htm = "已选中:";
var resourcesInfoTable = obj.data;
if(obj.checked){
htm += checkStatusData.length;
//按钮逻辑Lib.buttonEnable()
}else{
htm += checkStatusData.length;
}
$("#checkNumber").html(htm)
})
}
function resourcesInfoShowInfo(data) {
resourcesInfoShowTable = table.render({
elem: '#resourcesInfoShowTable',
height: Lib.getTableHeight(),
cellMinWidth: 100,
method: 'post',
even: true,
data:data,
cols: [[ // 表头
{
field: 'resourcesInfoName', title: '资源名称', align: "center", style: "text-align: left;"
},
{
field: 'courseInfoParentParentName', title: '归属课程', align: "center", width: 150
},
{
field: 'resourcesInfoType', width: 150, title: '资源类型', align: "center", templet: function (d) {//(1视频 2PPT 3PDF)
var text = d.resourcesInfoType == 1 ? "视频" : d.resourcesInfoType == 2 ? "PPT" : d.resourcesInfoType == 3 ? "PDF" : d.resourcesInfoType == 4 ? "链接" : d.resourcesInfoType == 5 ? "图文" : '-';
return '<span class="textType">' + text + '</span>';
}
},
{
field: 'userId',
title: '操作',
width: 160,
align: "center",
templet: function (d) {
var htm = '<button type="button" class="layui-btn layui-btn-xs bg_button" lay-event="previewPage">查看</button></a>';
htm += '<button type="button" class="layui-btn layui-btn-xs bg_button" lay-event="del">删除</button></a>';
return htm;
}
}
]]
});
table.on('tool(resourcesInfoShowTable)', function (obj) {
var data = obj.data;
if (obj.event === 'previewPage') { //预览
Lib.downloadFile(data);
}else if(obj.event === 'del'){
checkStatusData.splice(data, 1); // 删除
resourcesInfoShowTable.reload({data:checkStatusData});
}
});
};function resourcesInfoShowPPTInfo(data) {
resourcesInfoShowPPTTable = table.render({
elem: '#resourcesInfoShowPPTTable',
height: Lib.getTableHeight(),
cellMinWidth: 100,
method: 'post',
even: true,
data:data,
cols: [[ // 表头
{
field: 'resourcesInfoName', title: '资源名称', align: "center", style: "text-align: left;"
},
{
field: 'courseInfoParentParentName', title: '归属课程', align: "center", width: 150
},
{
field: 'resourcesInfoType', width: 150, title: '资源类型', align: "center", templet: function (d) {//(1视频 2PPT 3PDF)
var text = d.resourcesInfoType == 1 ? "视频" : d.resourcesInfoType == 2 ? "PPT" : d.resourcesInfoType == 3 ? "PDF" : d.resourcesInfoType == 4 ? "链接" : d.resourcesInfoType == 5 ? "图文" : '-';
return '<span class="textType">' + text + '</span>';
}
},
{
field: 'userId',
title: '操作',
width: 160,
align: "center",
templet: function (d) {
var htm = '<button type="button" class="layui-btn layui-btn-xs bg_button" lay-event="previewPage">查看</button></a>';
htm += '<button type="button" class="layui-btn layui-btn-xs bg_button" lay-event="del">删除</button></a>';
return htm;
}
}
]]
});
table.on('tool(resourcesInfoShowPPTTable)', function (obj) {
var data = obj.data;
if (obj.event === 'previewPage') { //预览
Lib.downloadFile(data);
}else if(obj.event === 'del'){
checkStatusData.splice(data, 1); // 删除
resourcesInfoShowPPTTable.reload({data:checkStatusData});
}
});
}
/*资源表格搜索*/
/*资源表格搜索*/
function searchList(resourcesInfoType) {
resourcesInfoTable.reload({
where: getParamRe(resourcesInfoType),
page: {
curr: 1
}
});
}
/*资源库搜索条件*/
function getParamRe(resourcesInfoType){
var param = {
"courseInfoFullId": $("#edit_dialog select[name='courseInfoId_1']").val(),
"resourcesInfoName": $("#edit_dialog input[name = 'resourcesInfoName']").val(),
"resourcesInfoType":resourcesInfoType
};
return param;
}
exports('add',view);
});

@ -166,6 +166,12 @@ layui.define(['form', 'laydate', 'table', 'laytpl'], function (exports) {
initToolBar: function () {
toolbar = {
add: function () {
var teacherOpenCourseScheduleSessionTagTable = Common.postAjax('/jlw/teacherOpenCourseScheduleSessionTag/list.json').data;//开课节次数据表格
var teacherOpenCourseScheduleSessionClassTable = Common.postAjax('/jlw/teacherOpenCourseScheduleSessionClass/list.json').data;
if(teacherOpenCourseScheduleSessionTagTable.length <=0 || teacherOpenCourseScheduleSessionClassTable.length<=0){
Common.info("课次未设置 / 排课教室未设置,请先点击 <span style='color:red'>' 初始化排课条件设置 '</span>进行设置");
return;
}
var url = "/jlw/teacherOpenCourseScheduleSession/add.do";
Common.openDlg(url, "排课管理>新增排课");
},

@ -117,7 +117,10 @@
<div class="layui-form-label">添加视频</div>
<div class="layui-input-block">
<div class="layui-upload">
<button type="button" style="margin-bottom: 10px;" class="layui-btn layui-btn-primary layui-font-blue" id="test-upload-normal"><i class="layui-icon"></i>点击添加</button>
<div class="layui-btn-container">
<button type="button" style="margin-bottom: 10px;" class="layui-btn layui-btn-primary layui-font-blue" id="test-upload-normal"><i class="layui-icon"></i>点击添加</button>
<button type="button" id="videoClick" style="margin-bottom: 10px;" class="layui-btn layui-btn-normal">视频资源库</button>
</div>
<div id="mp4Info">
<!--#if(teacherOpenCourseHandsOnSimulationTasks.tasksFileList != null){-->
<!--#for(item in teacherOpenCourseHandsOnSimulationTasks.tasksFileList){ -->
@ -139,6 +142,9 @@
</div>
</div>
</div>
<div class="layui-row" style="width: 50%;">
<table id="resourcesInfoShowTable" lay-filter="resourcesInfoShowTable"></table>
</div>
</div>
</div>
<!--PPT-->
@ -195,7 +201,10 @@
<div class="layui-form-label">添加文档</div>
<div class="layui-input-block">
<div class="layui-upload">
<button type="button" style="margin-bottom: 10px;" class="layui-btn layui-btn-primary layui-font-blue" id="upload-normalPPT"><i class="layui-icon"></i>点击添加</button>
<div class="layui-btn-container">
<button type="button" style="margin-bottom: 10px;" class="layui-btn layui-btn-primary layui-font-blue" id="upload-normalPPT"><i class="layui-icon"></i>点击添加</button>
<button type="button" id="pptClick" style="margin-bottom: 10px;" class="layui-btn layui-btn-normal">ppt资源库</button>
</div>
<div id="pptInfo">
<!--#if(teacherOpenCourseHandsOnSimulationTasks.tasksFileList != null){-->
<!--#for(item in teacherOpenCourseHandsOnSimulationTasks.tasksFileList){ -->
@ -218,6 +227,9 @@
</div>
</div>
</div>
<div class="layui-row" style="width: 50%;">
<table id="resourcesInfoShowPPTTable" lay-filter="resourcesInfoShowPPTTable"></table>
</div>
</div>
</div>
</div>
@ -644,6 +656,7 @@
type="button" id="addButton" lay-submit="" lay-filter="form">确定</button>
</div>
<!--<layui:submitButtons id="addButton" buttonType="" showExamine="2" />-->
<!--题目弹窗开始-->
<div id="resourcesQuestionTable_demo" style="display: none;padding: 20px 50px;min-height: 400px">
<div class="layui-inline">
<input type="text" name="generalQuestionSettingName" class="layui-input" placeholder="请输入题干名称">
@ -674,6 +687,33 @@
<table id="resourcesQuestionTable" lay-filter="resourcesQuestionTable"></table>
<span>已选题目:<span id="countQ"></span></span>
</div>
<!--题目弹窗结束-->
<!--资源库上传-->
<div id="edit_dialog" class="layui-form" style="display: none;padding: 20px 20px 0;overflow: auto;">
<div class="layui-inline">
<label class="layui-form-label" style="width: 80px">资源名称:</label>
<div class="layui-input-block" style="margin-left: 110px;">
<input type="text" id="resourcesInfoName" name="resourcesInfoName" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 80px">归属课程:</label>
<div class="layui-input-block" style="margin-left: -80px;">
<layui:simpleDictSelect style='layui-input-block'
type="course_info.course_info_name.course_info_status!=3,course_info_type=1,find_in_set(course_label_id,(select group_concat(course_label_id) from course_label where course_label_status = 1))"
id="courseInfoIds" name="courseInfoId_1"
layFilter="select_courseInfoIds"/>
</div>
</div>
<div class="layui-inline" style="left: 30px;">
<button type="button" class="layui-btn bg_button search"><i class="layui-icon">&#xe615;</i></button>
</div>
<table id="resourcesInfoTable" lay-filter="resourcesInfoTable"></table>
<div id="checkNumber"></div>
</div>
<!--资源上传结束-->
</form>
<!--#} -->
<script>

Loading…
Cancel
Save