From c81e061ba5c1ff41cb6ff37716d5c14e0eec2ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com> Date: Wed, 17 May 2023 22:00:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/js/jlw/courseInfo/index.js | 16 +++++++++--- .../static/js/jlw/resourcesInfo/index.js | 7 +++-- .../static/js/jlw/teacherOpenCourse/index.js | 26 ++++++++++++++++++- .../templates/jlw/courseInfo/index.html | 11 +++++++- .../jlw/resourcesApplication/add.html | 4 +-- 5 files changed, 54 insertions(+), 10 deletions(-) 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 48d249f8..6a47a545 100644 --- a/web/src/main/resources/static/js/jlw/courseInfo/index.js +++ b/web/src/main/resources/static/js/jlw/courseInfo/index.js @@ -44,6 +44,15 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { field : 'addTime', title : '创建时间',align:"center" }, + { + field : 'userId',title : '课程来源',align:"center", templet: function (d) { + if(d.userId == null || d.userId == 1) { + return '系统授权' + } else { + return '院校添加' + } + } + }, { field : 'courseInfoStatus',title : '状态',align:"center", templet: function (d) { if(d.courseInfoStatus == 1){ @@ -56,11 +65,10 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { } }, { - field : 'userId',width:300,title : '操作',align:"center", templet: function (d) { - - var htm = '课程配置'; + field : 'operation_',width:300,title : '操作',align:"center", templet: function (d) { + var htm = '课程配置'; htm += ''+(d.courseInfoStatus == 1?"禁用":"启用")+''; - htm += '编辑'; + htm += '编辑'; htm += '删除'; return htm; } 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 a6ef7a49..f007d141 100644 --- a/web/src/main/resources/static/js/jlw/resourcesInfo/index.js +++ b/web/src/main/resources/static/js/jlw/resourcesInfo/index.js @@ -11,9 +11,12 @@ layui.define(['form', 'laydate', 'table'], function (exports) { courseLabelTypes: "应用课程类,考证课程类,理论课程类", rankLimit: 3 }).data,//获取课程数据 - htmY = '', htmL = '', htmK = '', + htmY = '', + htmL = '', + htmK = '', + htmO = '', currentAuthCourseInfoDetails = Common.getAjax("/jlw/universitiesCollegesJurisdictionCurriculumResources/getAuthDetailsByCacheUser.json").data; -// 应用课程类 + // 应用课程类 var applicationCourseList = currentAuthCourseInfoDetails.applicationCourseList || []; // 理论课程类 var theoryCourseList = currentAuthCourseInfoDetails.theoryCourseList || []; diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourse/index.js b/web/src/main/resources/static/js/jlw/teacherOpenCourse/index.js index 95445f9b..9db00dce 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourse/index.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourse/index.js @@ -77,6 +77,12 @@ layui.define(['form', 'laydate', 'table'], function (exports) { align: "center", hideField: false, hide: $.isEmpty(sx_['teacherOpenCourseMergeTeacherAuthCode']) ? false : sx_['teacherOpenCourseMergeTeacherAuthCode'], + templet: function (d) { + var html = ''; + return html; + } }, { field: 'createTime', @@ -106,7 +112,15 @@ layui.define(['form', 'laydate', 'table'], function (exports) { return htm; } } - ]] + ]],done: function (res, curr, count) { + $(".clipboard").mouseenter(function(e){ + layer.tips('点击复制', this);//tips显示 + }); + + $(".clipboard").mouseleave(function(){ + layer.closeAll('tips'); //关闭所有的tips层 + }); + } }); table.on('checkbox(teacherOpenCourseTable)', function (obj) { @@ -208,6 +222,16 @@ layui.define(['form', 'laydate', 'table'], function (exports) { } }); }); + }else if (obj.event === "clipboard"){ + /* 表格工具条点击事件 */ + var oInput = document.createElement('input'); + oInput.value = data.teacherOpenCourseMergeTeacherAuthCode; + document.body.appendChild(oInput); + oInput.select(); // 选择对象 + document.execCommand("Copy"); // 执行浏览器复制命令 + oInput.className = 'oInput';//设置class名 + document.getElementsByClassName("oInput")[0].remove();//移除这个input + layer.msg('复制成功!', {icon: 1, time: 3000}); } }) } diff --git a/web/src/main/resources/templates/jlw/courseInfo/index.html b/web/src/main/resources/templates/jlw/courseInfo/index.html index 3ed42879..6aaa5d46 100644 --- a/web/src/main/resources/templates/jlw/courseInfo/index.html +++ b/web/src/main/resources/templates/jlw/courseInfo/index.html @@ -24,7 +24,16 @@ type="course_label.course_label_name.course_label_status=1,${user.get().isAdmin - +
+ +
+ +
+
diff --git a/web/src/main/resources/templates/jlw/resourcesApplication/add.html b/web/src/main/resources/templates/jlw/resourcesApplication/add.html index f6783df3..eaf1a8f8 100644 --- a/web/src/main/resources/templates/jlw/resourcesApplication/add.html +++ b/web/src/main/resources/templates/jlw/resourcesApplication/add.html @@ -143,7 +143,7 @@
- +
@@ -154,7 +154,7 @@
- +