|
|
|
@ -39,7 +39,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
currentAuthCourseInfoDetails.forEach(function(e,i){
|
|
|
|
|
if(e.sourceType == 2){
|
|
|
|
|
if(e.sourceType == 2 && isAdmin){
|
|
|
|
|
if(e.courseLabelType == '考证课程类'){
|
|
|
|
|
textualResearchCourseList.push(e);
|
|
|
|
|
}else if(e.courseLabelType == '理论课程类'){
|
|
|
|
@ -47,7 +47,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
}else if(e.courseLabelType == '应用课程类'){
|
|
|
|
|
applicationCourseList.push(e);
|
|
|
|
|
}
|
|
|
|
|
}else if(e.sourceType == 1){
|
|
|
|
|
}else if(e.sourceType == 1&&!isAdmin){
|
|
|
|
|
openCourseList.push(e)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -69,10 +69,10 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isAdmin){
|
|
|
|
|
selectList += htmY + '</optgroup>' + htmK + '</optgroup>' + htmL + '</optgroup>' + htmO + '</optgroup>' + "</select>";
|
|
|
|
|
selectList += htmY + '</optgroup>' + htmK + '</optgroup>' + htmL + '</optgroup>' + "</select>";
|
|
|
|
|
//console.log($("#isUser").val())
|
|
|
|
|
}else {
|
|
|
|
|
selectList+= htmL + '</optgroup>' + htmO + '</optgroup>' + "</select>";
|
|
|
|
|
selectList+= htmO + '</optgroup>' + "</select>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*$.each(courseLabelTypes, function (key, value) {
|
|
|
|
@ -114,67 +114,88 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
field: 'courseInfoParentParentName',
|
|
|
|
|
title: '归属课程',
|
|
|
|
|
templet: function (d) {
|
|
|
|
|
return selectList; //一级
|
|
|
|
|
if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){
|
|
|
|
|
return selectList; //一级
|
|
|
|
|
}else {
|
|
|
|
|
return d.courseInfoParentParentName||"";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
},{
|
|
|
|
|
field: 'courseInfoParentName',
|
|
|
|
|
title: '归属章节',
|
|
|
|
|
align: "center",
|
|
|
|
|
templet: function (d) {
|
|
|
|
|
var htm = "<select lay-filter='select_courseInfoIds_1'><option value=''>请选择</option>";
|
|
|
|
|
if (!$.isEmpty(d.courseInfoParentId)) {
|
|
|
|
|
if ($.isEmpty(selectMap[d.courseInfoParentParentId])) {
|
|
|
|
|
var h = htm;
|
|
|
|
|
var courseInfoChildtList = childCourseList(d.courseInfoParentParentId,2,d.sourceType);
|
|
|
|
|
if (!$.isEmpty(courseInfoChildtList)) {
|
|
|
|
|
courseInfoMap[d.courseInfoParentParentId] = courseInfoChildtList;
|
|
|
|
|
$.each(courseInfoChildtList, function (key, v) {
|
|
|
|
|
h += "<option value='" + v.courseInfoId + "'>" + v.courseInfoName + "</option>";
|
|
|
|
|
});
|
|
|
|
|
if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){
|
|
|
|
|
var htm = "<select lay-filter='select_courseInfoIds_1'><option value=''>请选择</option>";
|
|
|
|
|
if (!$.isEmpty(d.courseInfoParentId)&&!$.isEmpty(d.courseInfoParentParentId)) {
|
|
|
|
|
if ($.isEmpty(selectMap[d.courseInfoParentParentId])) {
|
|
|
|
|
var h = htm;
|
|
|
|
|
var courseInfoChildtList = childCourseList(d.courseInfoParentParentId,2,d.sourceType);
|
|
|
|
|
if (!$.isEmpty(courseInfoChildtList)) {
|
|
|
|
|
courseInfoMap[d.courseInfoParentParentId] = courseInfoChildtList;
|
|
|
|
|
$.each(courseInfoChildtList, function (key, v) {
|
|
|
|
|
h += "<option value='" + v.courseInfoId + "'>" + v.courseInfoName + "</option>";
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
selectMap[d.courseInfoParentParentId] = h + "</select>";
|
|
|
|
|
return h;
|
|
|
|
|
} else {
|
|
|
|
|
return selectMap[d.courseInfoParentParentId];
|
|
|
|
|
}
|
|
|
|
|
selectMap[d.courseInfoParentParentId] = h + "</select>";
|
|
|
|
|
return h;
|
|
|
|
|
} else {
|
|
|
|
|
return selectMap[d.courseInfoParentParentId];
|
|
|
|
|
return htm + "</select>"; //二级
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return htm + "</select>"; //二级
|
|
|
|
|
}else{
|
|
|
|
|
var value = '';
|
|
|
|
|
if(!$.isEmpty(d.courseInfoParentParentId)){
|
|
|
|
|
value = d.courseInfoParentName||"";
|
|
|
|
|
}
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'courseInfoName', title: '归属小节', align: "center", width: 200, templet: function (d) {
|
|
|
|
|
var htm = "<select lay-filter='select_courseInfoIds_2'><option value=''>请选择</option>";
|
|
|
|
|
if (!$.isEmpty(d.courseInfoId)) {
|
|
|
|
|
if ($.isEmpty(selectMap[d.courseInfoParentId])) {
|
|
|
|
|
var h = htm;
|
|
|
|
|
var courseInfoChildtChildList = childCourseList(d.courseInfoParentId,3,d.sourceType);
|
|
|
|
|
if (!$.isEmpty(courseInfoChildtChildList)) {
|
|
|
|
|
zjMap[d.courseInfoParentId] = courseInfoChildtChildList;
|
|
|
|
|
$.each(courseInfoChildtChildList, function (key, v) {
|
|
|
|
|
h += "<option value='" + v.courseInfoId + "'>" + v.courseInfoName + "</option>";
|
|
|
|
|
});
|
|
|
|
|
if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){
|
|
|
|
|
var htm = "<select lay-filter='select_courseInfoIds_2'><option value=''>请选择</option>";
|
|
|
|
|
if (!$.isEmpty(d.courseInfoId)&&!$.isEmpty(d.courseInfoParentParentId)) {
|
|
|
|
|
if ($.isEmpty(selectMap[d.courseInfoParentId])) {
|
|
|
|
|
var h = htm;
|
|
|
|
|
var courseInfoChildtChildList = childCourseList(d.courseInfoParentId,3,d.sourceType);
|
|
|
|
|
if (!$.isEmpty(courseInfoChildtChildList)) {
|
|
|
|
|
zjMap[d.courseInfoParentId] = courseInfoChildtChildList;
|
|
|
|
|
$.each(courseInfoChildtChildList, function (key, v) {
|
|
|
|
|
h += "<option value='" + v.courseInfoId + "'>" + v.courseInfoName + "</option>";
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
selectMap[d.courseInfoParentId] = h + "</select>";
|
|
|
|
|
return h;
|
|
|
|
|
} else {
|
|
|
|
|
return selectMap[d.courseInfoParentId];
|
|
|
|
|
}
|
|
|
|
|
selectMap[d.courseInfoParentId] = h + "</select>";
|
|
|
|
|
return h;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
return selectMap[d.courseInfoParentId];
|
|
|
|
|
return htm + "</select>"; //三级
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
return htm + "</select>"; //三级
|
|
|
|
|
}else{
|
|
|
|
|
var value = '';
|
|
|
|
|
if(!$.isEmpty(d.courseInfoParentParentId)){
|
|
|
|
|
value = d.courseInfoName||"";
|
|
|
|
|
}
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'addTypeText', title: '来源', align: "center"
|
|
|
|
|
field: 'addTypeText', title: '来源', align: "center",hide:isAdmin?false:true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'sourceType', title: '来源', align: "center",hide:isAdmin?true:false,
|
|
|
|
|
templet:function (d) {
|
|
|
|
|
var htm = d.sourceType == 1?"院校添加":"系统内置";
|
|
|
|
|
return htm;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/*{
|
|
|
|
|
field: 'orgIdText', title: '上传院校', align: "center"
|
|
|
|
|
},*/
|
|
|
|
|
{
|
|
|
|
|
field: 'resourcesInfoType', 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 ? "图文" : '-';
|
|
|
|
@ -183,16 +204,20 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'userId', title: '操作', align: "center", field: 'right', templet: function (d) {
|
|
|
|
|
var htm = '<a class="layui-table-link" lay-event="edit">编辑</a>';
|
|
|
|
|
var htm='<div style="text-align:left">';
|
|
|
|
|
if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){
|
|
|
|
|
htm += '<a class="layui-table-link" lay-event="edit">编辑</a>';
|
|
|
|
|
}
|
|
|
|
|
// htm += '<a class="layui-table-link" lay-event="previewPage" >' + (d.resourcesInfoType == 3 ? '下载' : '预览') + '</a>';
|
|
|
|
|
if(d.resourcesInfoType == 4){
|
|
|
|
|
htm += '<a class="layui-table-link" href="'+d.resourcesInfoContent+'" target="_blank" >预览</a>';
|
|
|
|
|
}else {
|
|
|
|
|
htm += '<a class="layui-table-link" lay-event="previewPage" >预览</a>';
|
|
|
|
|
}
|
|
|
|
|
if(d.sourceType == 1 || isAdmin){
|
|
|
|
|
if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){
|
|
|
|
|
htm += '<a class="layui-table-link" lay-event="del">删除</a>';
|
|
|
|
|
}
|
|
|
|
|
htm += '</div>'
|
|
|
|
|
return htm;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|