diff --git a/web/src/main/resources/static/js/jlw/courseInfo/add.js b/web/src/main/resources/static/js/jlw/courseInfo/add.js
index 3f359964..ca862a2a 100644
--- a/web/src/main/resources/static/js/jlw/courseInfo/add.js
+++ b/web/src/main/resources/static/js/jlw/courseInfo/add.js
@@ -42,6 +42,14 @@ layui.define([ 'form', 'laydate', 'table','courseInfoApi',"layedit"], function(e
// }else {
// layer.msg(ret.msg);
// }
+ layedit.set({ //富文本上传图片
+ uploadImage: {
+ url: Common.ctxPath + "/jlw/file/update.do",
+ imgUrl:Common.ctxPath,
+ type: 'post' //默认post
+ }
+ });
+
var courseInfoContent_ = layedit.build('courseInfoContent',{height:100}); //题干
var view = {
init:function(){
diff --git a/web/src/main/resources/static/js/jlw/handsOn/add.js b/web/src/main/resources/static/js/jlw/handsOn/add.js
index 8ad3eacc..646f65b3 100644
--- a/web/src/main/resources/static/js/jlw/handsOn/add.js
+++ b/web/src/main/resources/static/js/jlw/handsOn/add.js
@@ -14,6 +14,13 @@ layui.define(['form', 'laydate', 'table','laytpl','upload','layedit', 'handsOnAp
}
});
+ var courseInfoParentId = $("select[name='courseInfoId']").val();//课程ID
+ var sourceType = $("select[name='courseInfoId']").find('option:selected').attr("status");
+ var childValue = $("#courseChildNode").val();
+ //反显章节下拉框(key,courseInfoParentId,courseInfoType,sourceType,resourcesQuestionIdsIsNotNull)
+ Lib.getCourseInfo($("select[name='courseChildNode']"),courseInfoParentId,2,sourceType,'',childValue);
+ form.render();
+
window.loadList = function (){//重新加载实训任务列表
getListInfo();
}
diff --git a/web/src/main/resources/static/js/jlw/handsOn/index.js b/web/src/main/resources/static/js/jlw/handsOn/index.js
index 724f25f0..215c4d1b 100644
--- a/web/src/main/resources/static/js/jlw/handsOn/index.js
+++ b/web/src/main/resources/static/js/jlw/handsOn/index.js
@@ -54,18 +54,18 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
{
field: 'systemCourseChildNodeText',
title: '归属章节', align: "center"
- },
- {
- field: 'orgIdText',
- title: '归属院校', align: "center"
}, {
field: 'addTime',
title: '导入时间',
align: "center",
+ }, {
+ field: 'orgIdText',
+ title: '案例来源', align: "center",hide:isAdmin?false:true
}, {
field: 'dataType',
title: '案例来源',
align: "center",
+ hide:isAdmin?true:false,
templet: function (d) {
return d.dataType == 'FACULTY_ADD' ? '院校添加' : (d.dataType == 'ADMIN_ADD' ? '系统内置': '')
}
@@ -80,18 +80,18 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
field: 'operation_',
title: '操作',
align: "center",
- fixed: 'right',
width: 260,
templet: function (d) {
var css = isAdmin? "" : "display: none;";
- var htm = '上架';
+ var htm = '
';
return htm;
}
}
@@ -154,6 +154,9 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
var data = obj.data;
if (obj.event === 'edit') {
var url = "/jlw/handsOn/add.do?handsOnId=" + data.handsOnId;
+ if(data.dataType == 'FACULTY_ADD'){
+ url = "/jlw/teacherOpenCourseHandsOn/edit.do?resourcesInfoId=" + data.handsOnId;
+ }
Common.openDlg(url, "实操管理>" + data.handsOnName + ">编辑");
} else if (obj.event === "result") {
var url = "/jlw/handsOnAchievement/index2.do?handsOnId=" + data.handsOnId;
@@ -203,7 +206,11 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
};
//选择归属课程 并且根据选择的课程查询章节 resourcesQuestionIdsIsNotNull:查询题目不为空的章节
form.on('select(select_courseInfoIds)', function (obj) {
- Lib.getCourseInfo($("select[name='courseChildNode']"), obj.value, 1);
+ //Lib.getCourseInfo($("select[name='courseChildNode']"), obj.value, 1);
+
+ let sourceType = $("select[name='courseInfoId']").find('option:selected').attr("status");
+ let courseInfoType = 2;//courseInfoType(2 章节,3 节)
+ Lib.getCourseInfo($("select[name='courseChildNode']"), obj.value,courseInfoType,sourceType, 1);
});
/*//选择归属课程 并且根据选择的课程查询章节
diff --git a/web/src/main/resources/static/js/jlw/resourcesInfo/add.js b/web/src/main/resources/static/js/jlw/resourcesInfo/add.js
index 85e3a214..34833e57 100644
--- a/web/src/main/resources/static/js/jlw/resourcesInfo/add.js
+++ b/web/src/main/resources/static/js/jlw/resourcesInfo/add.js
@@ -7,24 +7,25 @@ layui.define([ 'form', 'laydate', 'table','element','upload','resourcesInfoApi',
var layedit = layui.layedit;
var laytpl = layui.laytpl ;
- var courseInfoContent_ = layedit.build('resourcesInfoContent',{height: 400});
- var courseId = $("select[name='courseInfoId_0']").val();//课程ID
- var chapterId = $("select[name='courseInfoId_1']").val();//章ID
- var courseInfoId = $("select[name='courseInfoId_2']").val();//节ID
- var sourceType = $("select[name='courseInfoId_0']").find('option:selected').attr("status");
- var childValue = $("#courseInfoId_1").val();
- var childChildValue = $("#courseInfoId_2").val();
-
layedit.set({ //富文本上传图片
uploadImage: {
url: Common.ctxPath + "/jlw/file/update.do",
- imgUrl:Common.ctxPath
+ imgUrl:Common.ctxPath,
+ type: 'post' //默认post
}
});
+ var courseId = $("select[name='courseInfoId_0']").val();//课程ID
+ var sourceType = $("select[name='courseInfoId_0']").find('option:selected').attr("status");
+ var childValue = $("#courseInfoId_1").val();
+ var childChildValue = $("#courseInfoId_2").val();
+
Lib.getCourseInfo($("select[name='courseInfoId_1']"),courseId,2,sourceType,'',childValue);//key,courseInfoParentId,courseInfoType,sourceType,resourcesQuestionIdsIsNotNull
Lib.getCourseInfo($("select[name='courseInfoId_2']"),childValue,3,sourceType,'',childChildValue);//key,courseInfoParentId,courseInfoType,sourceType,resourcesQuestionIdsIsNotNull
+ var courseInfoContent_ = layedit.build('resourcesInfoContent',{height: 400});
+ form.render();
+
var view = {
init:function(){
Lib.initGenrealForm($("#addForm"),form);
@@ -33,6 +34,9 @@ layui.define([ 'form', 'laydate', 'table','element','upload','resourcesInfoApi',
initSubmit:function(){
$("#addButton").click(function(){
form.on('submit(form)', function(){
+ var courseId = $("select[name='courseInfoId_0']").val();//课程ID
+ var chapterId = $("select[name='courseInfoId_1']").val();//章ID
+ var courseInfoId = $("select[name='courseInfoId_2']").val();//节ID
var resourcesInfoId = $("input[name='resourcesInfoId']").val();
var resourcesInfoType = $("select[name='resourcesInfoType']").val(); // 资源类型(详细见数据字典,resources_info_type)
var sourceType = 2;
diff --git a/web/src/main/resources/static/js/jlw/resourcesInfo/index.js b/web/src/main/resources/static/js/jlw/resourcesInfo/index.js
index 56b9f247..561f1d6d 100644
--- a/web/src/main/resources/static/js/jlw/resourcesInfo/index.js
+++ b/web/src/main/resources/static/js/jlw/resourcesInfo/index.js
@@ -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 + '' + htmK + '' + htmL + '' + htmO + '' + "";
+ selectList += htmY + '' + htmK + '' + htmL + '' + "";
//console.log($("#isUser").val())
}else {
- selectList+= htmL + '' + htmO + '' + "";
+ selectList+= htmO + '' + "";
}
/*$.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 = "";
- return h;
} else {
- return selectMap[d.courseInfoParentParentId];
+ return htm + ""; //二级
}
- } else {
- return htm + ""; //二级
+ }else{
+ var value = '';
+ if(!$.isEmpty(d.courseInfoParentParentId)){
+ value = d.courseInfoParentName||"";
+ }
+ return value;
}
-
}
},
{
field: 'courseInfoName', title: '归属小节', align: "center", width: 200, templet: function (d) {
- var htm = "";
- 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 += "";
- });
+ if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){
+ var htm = "";
+ 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 += "";
+ });
+ }
+ selectMap[d.courseInfoParentId] = h + "";
+ return h;
+ } else {
+ return selectMap[d.courseInfoParentId];
}
- selectMap[d.courseInfoParentId] = h + "";
- return h;
+
} else {
- return selectMap[d.courseInfoParentId];
+ return htm + ""; //三级
}
-
- } else {
- return htm + ""; //三级
+ }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 = '编辑';
+ var htm='';
+ if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){
+ htm += '
编辑';
+ }
// htm += '
' + (d.resourcesInfoType == 3 ? '下载' : '预览') + '';
if(d.resourcesInfoType == 4){
htm += '
预览';
}else {
htm += '
预览';
}
- if(d.sourceType == 1 || isAdmin){
+ if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){
htm += '
删除';
}
+ htm += '
'
return htm;
}
}
diff --git a/web/src/main/resources/templates/common/courseInfoSelect.html b/web/src/main/resources/templates/common/courseInfoSelect.html
index 88acf147..7f8f78a9 100644
--- a/web/src/main/resources/templates/common/courseInfoSelect.html
+++ b/web/src/main/resources/templates/common/courseInfoSelect.html
@@ -7,7 +7,7 @@
id 标签的ID值;
isShowGroupName 显示分组名称(默认:true);
defaultValue 默认值;
- filterName 过滤的分类名称,多个逗号隔开;只支持【应用课程类】、【理论课程类】、【考证课程类】,showGroupName为false也会过滤数据。
+ filterName 过滤的分类名称,多个逗号隔开;只支持【应用课程类】、【理论课程类】、【考证课程类】,【开课类】,showGroupName为false也会过滤数据。
isShowOpentCourse 显示开课课程
*/
@@ -62,7 +62,7 @@ var newId = !isEmpty(id) ? id : ('select_id_' + (name!'0') + '_' + @cn.hutool.c
*
*/
- // jq选择器
+ // jq选择器
var ele = $('#${newId}');
// 过滤label
var filterNames = '${filterName!""}';
@@ -131,7 +131,7 @@ var newId = !isEmpty(id) ? id : ('select_id_' + (name!'0') + '_' + @cn.hutool.c
}
if (isShowGroupNameHandler()) ele.append('');
}
- if (filterNames.indexOf('开课课程类') >= 0 || filterNames === "") {
+ if (filterNames.indexOf('开课类') >= 0 || filterNames === "") {
if (isShowGroupNameHandler()) ele.append('