diff --git a/web/src/main/resources/static/js/jlw/courseInfo/index.js b/web/src/main/resources/static/js/jlw/courseInfo/index.js index 6a47a545..ab931b84 100644 --- a/web/src/main/resources/static/js/jlw/courseInfo/index.js +++ b/web/src/main/resources/static/js/jlw/courseInfo/index.js @@ -3,6 +3,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { var laydate = layui.laydate; var table = layui.table; var courseInfoTable = null; + var isAdmin = $("#isAdmin").val()=='true'?true:false; var view ={ init:function(){ this.initTable(); @@ -45,12 +46,10 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { title : '创建时间',align:"center" }, { - field : 'userId',title : '课程来源',align:"center", templet: function (d) { - if(d.userId == null || d.userId == 1) { - return '系统授权' - } else { - return '院校添加' - } + field : 'sourceType',title : '课程来源',align:"center", templet: function (d) { + let htm = ""; + htm = d.sourceType == 1?"院校添加":d.sourceType == 2?"系统内置":''; + return htm; } }, { @@ -69,7 +68,12 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { var htm = '课程配置'; htm += ''+(d.courseInfoStatus == 1?"禁用":"启用")+''; htm += '编辑'; - htm += '删除'; + htm += '删除';; + if(!$.isEmpty(d.sourceType)){ + if(!((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin))){ + htm = '查看'; + } + } return htm; } } 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 d46e6ae6..87857dc5 100644 --- a/web/src/main/resources/static/js/jlw/handsOn/index.js +++ b/web/src/main/resources/static/js/jlw/handsOn/index.js @@ -72,9 +72,13 @@ layui.define(['form', 'laydate', 'table'], function (exports) { }, { field: 'handsOnStatus', width: 80, title: '状态', align: "center", templet: function (d) { - return d.handsOnStatus === 1 - ? '已上架' - : '已下架' + var htm = ""; + if(d.dataType == 'ADMIN_ADD'){ + htm = d.handsOnStatus === 1 + ? '已上架' + : '已下架'; + } + return htm; } }, { field: 'operation_', @@ -83,8 +87,12 @@ layui.define(['form', 'laydate', 'table'], function (exports) { width: 260, templet: function (d) { var css = isAdmin? "" : "display: none;"; - var htm = '
上架'; - htm += '下架'; + var htm = ''; + if(d.dataType == 'ADMIN_ADD'){ + htm += '
上架' + + '下架'; + } + // htm += '编辑'; htm += ''+ ((d.dataType == 'FACULTY_ADD' && !isAdmin)||(d.dataType == 'ADMIN_ADD' && isAdmin)?'编辑':'查看')+''; if((d.dataType == 'FACULTY_ADD' && !isAdmin)||(d.dataType == 'ADMIN_ADD' && isAdmin)){ @@ -99,9 +107,11 @@ layui.define(['form', 'laydate', 'table'], function (exports) { }); table.on('checkbox(handsOnTable)', function (obj) { +/*课程实操上方的上架和下架做功能全选*/ var handsOn = obj.data; if (obj.checked) { //按钮逻辑Lib.buttonEnable() + console.log(handsOn) } else { } diff --git a/web/src/main/resources/static/js/jlw/resourcesQuestion/index.js b/web/src/main/resources/static/js/jlw/resourcesQuestion/index.js index 4cf22f4a..5bebf7bb 100644 --- a/web/src/main/resources/static/js/jlw/resourcesQuestion/index.js +++ b/web/src/main/resources/static/js/jlw/resourcesQuestion/index.js @@ -3,6 +3,8 @@ layui.define(['form', 'laydate', 'table'], function (exports) { var laydate = layui.laydate; var table = layui.table; var resourcesQuestionTable = null; + var isAdmin = $("#isAdmin").val() === "true"?true:false; + var view = { init: function () { this.initTable(); @@ -49,10 +51,10 @@ layui.define(['form', 'laydate', 'table'], function (exports) { field: 'addTypeText', title: '题库来源', align: "center" }, - { + /*{ field: 'orgIdText', title: '上传院校', align: "center" - }, + },*/ { field: 'questionStatus', width: 80, title: '状态', align: "center", templet: function (d) { @@ -63,15 +65,21 @@ layui.define(['form', 'laydate', 'table'], function (exports) { }, { field: 'userId', title: '操作', align: "center", width: 220, templet: function (d) { - var css = $("#isAdmin").val() === "true" ? "" : "display: none;"; - var cssN = $("#isAdmin").val() === "true" ? "display: none;" : ""; + var css = isAdmin ? "" : "display: none;"; + var cssN = isAdmin ? "display: none;" : ""; + let htm = '上架\n' + + '下架'; + + if((d.addType == 'FACULTY_ADD' && !isAdmin)||(d.addType == 'ADMIN_ADD' && isAdmin)){ + htm += '编辑\n' + - // TODO 上下架前端逻辑待开发 - return '上架\n' + - '下架\n' + - '编辑\n' + - '查看\n' + '删除'; + }else{ + htm += '查看'; + } + + // TODO 上下架前端逻辑待开发 + return htm; } } diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/edit.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/edit.js index 19ca6efb..68433805 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/edit.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/edit.js @@ -67,24 +67,24 @@ layui.define([ 'form', 'laydate', 'table','laytpl','upload','layedit','teacherOp $(".button_add").click(() => { handsOnId = $("#updateForm input[name='handsOnId']").val(); - if (!$.isEmpty(handsOnId)){ - var url = "/jlw/handsOnSimulationTasks/add.do?handsOnId="+handsOnId+'&courseInfoId='+teacherOpenCourseId; - Common.openDlg(url); - } -}); + if (!$.isEmpty(handsOnId)){ + var url = "/jlw/teacherOpenCourseHandsOnSimulationTasks/add.do?handsOnId="+handsOnId+'&courseInfoId='+teacherOpenCourseId; + Common.openDlg(url); + } + }); //实训任务编辑 $(".bj").click(edit_simu) function edit_simu(){ var taskId = $(this).attr("taskid"); - var url = "/jlw/handsOnSimulationTasks/add.do?taskId="+taskId + "&handsOnId="+handsOnId; + var url = "/jlw/teacherOpenCourseHandsOnSimulationTasks/add.do?taskId="+taskId + "&handsOnId="+handsOnId; Common.openDlg(url,""); } //实训任务删除 $(".sc").click(del_simu) function del_simu(){ var taskId = $(this).attr("taskid"); - var ret = Common.postAjax("/jlw/handsOnSimulationTasks/delete.json",{ids:taskId}) + var ret = Common.postAjax("/jlw/teacherOpenCourseHandsOnSimulationTasks/delete.json",{ids:taskId}) if (ret.code == 0) { $(this).parent().parent().remove() } @@ -94,7 +94,7 @@ layui.define([ 'form', 'laydate', 'table','laytpl','upload','layedit','teacherOp }); function getListInfo(){ //获取 - var ret = Common.postAjax("/api/handsOnSimulationTasks/getPageList.do",{handsOnId:$("#updateForm input[name='handsOnId']").val()}) + var ret = Common.postAjax("/api/teacherOpenCourseHandsOnSimulationTasks/getPageList.do",{handsOnId:$("#updateForm input[name='handsOnId']").val()}) if (ret.code == 0) { var getTpl = sc_demo.innerHTML ,view = document.getElementById('sc_view'); diff --git a/web/src/main/resources/static/js/jlw/universitiesCollegesJurisdictionCurriculumResources/index.js b/web/src/main/resources/static/js/jlw/universitiesCollegesJurisdictionCurriculumResources/index.js index 0a8d7b95..fa967d12 100644 --- a/web/src/main/resources/static/js/jlw/universitiesCollegesJurisdictionCurriculumResources/index.js +++ b/web/src/main/resources/static/js/jlw/universitiesCollegesJurisdictionCurriculumResources/index.js @@ -26,30 +26,36 @@ layui.define(['form', 'laydate', 'table'], function (exports) { cols: [[ // 表头 { type: 'checkbox', + align: "center", fixed: 'left', }, // { // field : 'universitiesCollegesName', + //align: "center", // title : '院校名称', // }, { field: 'courseInfoName', + align: "center", title: '课程名称', }, { field: 'courseLabelType', + align: "center", title: '课程类别', }, { field: 'courseLabelName', + align: "center", title: '课程标签', }, { field: 'type', + align: "center", title: '课程来源', templet: function (d) { if (d.type == 2) { - return '系统授权' + return '系统内置' } else { return '院校添加' } @@ -57,6 +63,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) { }, { field: 'useType', + align: "center", title: '使用级别', templet: function (d) { var typeMap = { @@ -70,6 +77,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) { }, { field: 'useStartTime', + align: "center", title: '开始时间', templet: function (d) { return d.useStartTime ? d.useStartTime : '-' @@ -77,6 +85,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) { }, { field: 'useEndTime', + align: "center", title: '结束时间', templet: function (d) { return d.useEndTime ? d.useEndTime : '-' @@ -84,6 +93,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) { }, { field: '_endStatus_', + align: "center", title: '到期状态', templet: function (d) { // 默认在用,会有一些课程,在清单中,但不属于授权的 @@ -100,6 +110,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) { }, { field: 'addTime', + align: "center", title: '添加时间', } ]] diff --git a/web/src/main/resources/templates/jlw/courseInfo/add.html b/web/src/main/resources/templates/jlw/courseInfo/add.html index f26cfd0a..2a426a20 100644 --- a/web/src/main/resources/templates/jlw/courseInfo/add.html +++ b/web/src/main/resources/templates/jlw/courseInfo/add.html @@ -1,8 +1,13 @@
-
+ +
diff --git a/web/src/main/resources/templates/jlw/courseInfo/index.html b/web/src/main/resources/templates/jlw/courseInfo/index.html index 6aaa5d46..41e7e3fb 100644 --- a/web/src/main/resources/templates/jlw/courseInfo/index.html +++ b/web/src/main/resources/templates/jlw/courseInfo/index.html @@ -27,10 +27,10 @@ type="course_label.course_label_name.course_label_status=1,${user.get().isAdmin
- + + +
@@ -44,6 +44,8 @@ type="course_label.course_label_name.course_label_status=1,${user.get().isAdmin
+ +