From 67160a04ba44cc3caca556f866b1c4128875d325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com> Date: Sun, 16 Oct 2022 04:00:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=AE=9E=E6=93=8D=EF=BC=88?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=AE=9E=E8=AE=AD=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/js/jlw/handsOn/index.js | 2 +- .../jlw/resourcesApplicationCourse/index.js | 92 ++++++++++--------- .../index.js | 4 +- .../js/jlw/universitiesColleges/index.js | 1 + .../templates/jlw/handsOn/index.html | 5 +- .../jlw/resourcesApplicationCourse/add.html | 6 +- .../jlw/resourcesApplicationCourse/index.html | 12 +++ .../index.html | 19 ++-- .../jlw/universitiesColleges/add.html | 2 +- 9 files changed, 83 insertions(+), 60 deletions(-) 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 e8052707..f3aa1407 100644 --- a/web/src/main/resources/static/js/jlw/handsOn/index.js +++ b/web/src/main/resources/static/js/jlw/handsOn/index.js @@ -51,7 +51,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) { title: '归属章节', align: "center" }, { field: 'addTime', - title: '添加时间', + title: '导入时间', align: "center", }, { field: 'handsOnStatus', width: 80, diff --git a/web/src/main/resources/static/js/jlw/resourcesApplicationCourse/index.js b/web/src/main/resources/static/js/jlw/resourcesApplicationCourse/index.js index 1f0b4809..da755d6f 100644 --- a/web/src/main/resources/static/js/jlw/resourcesApplicationCourse/index.js +++ b/web/src/main/resources/static/js/jlw/resourcesApplicationCourse/index.js @@ -3,6 +3,14 @@ layui.define(['form', 'laydate', 'table'], function (exports) { var laydate = layui.laydate; var table = layui.table; var resourcesApplicationCourseTable = null; + + var selectList = "<select lay-filter='select_'><option value=''>请选择</option>", //绑定模块 + resourcesApplication = Common.getAjax("/jlw/resourcesApplication/getValues.json", {applicationOneLevelRelation: "实务课程类"}).data,//获取应用 + courseLabelData = Common.getAjax("/jlw/courseLabel/getValues.json", {courseLabelStatus: 1}).data; + /*$.each(resourcesApplication,function (key,value){ + selectList += '<option value="'+value.resourcesApplicationId+'">'+value.applicationName+'</option>'; + });*/ + selectList += "</select>"; var view = { init: function () { this.initTable(); @@ -36,23 +44,27 @@ layui.define(['form', 'laydate', 'table'], function (exports) { },*/ { field: 'courseInfoIdText', - align:"center", + align: "center", title: '课程名称', }, { - field: 'courseLabelType', + field: 'courseLabelId', title: '课程类别', - align:"center", + align: "center", templet: function (d) { - var html = "<div class='layui-input-inline'>\n" + - " <select name='courseLabelType' lay-filter='courseLabelType'>\n" + + var courseLabelType = ""; + $.each(courseLabelData, function (key, value) { + if(value.courseLabelId == d.courseLabelId){ + courseLabelType = value.courseLabelName; + } + }); + var html = "<select name='courseLabelType' lay-filter='courseLabelType' value='" + d.courseLabelType + "'>\n" + " <option value='' >请选择</option>\n" + - " <option value='实务课程类' ${courseInfo.courseLabelType =='实务课程类'?'selected':''}>实务课程类</option>\n" + - " <option value='考证课程类' ${courseInfo.courseLabelType =='考证课程类'?'selected':''}>考证课程类</option>\n" + - " <option value='理论课程类' ${courseInfo.courseLabelType =='理论课程类'?'selected':''}>理论课程类</option>\n" + - " </select>\n" + - " </div>\n"; + " <option value='实务课程类'"+(courseLabelType =='实务课程类'?'selected':'')+ ">"+"实务课程类</option>\n" + + " <option value='考证课程类' "+(courseLabelType =='考证课程类'?'selected':'')+ ">"+"考证课程类</option>\n" + + " <option value='理论课程类' "+(courseLabelType =='理论课程类'?'selected':'')+ ">"+"理论课程类</option>\n" + + " </select>"; return html; } }, @@ -60,41 +72,30 @@ layui.define(['form', 'laydate', 'table'], function (exports) { field: 'undefinedYD', title: '绑定模块', - align:"center", + align: "center", + /*templet: '#selectGxmc'*/ templet: function (d) { - var html = "<div class='layui-input-inline'>\n" + - " <select name='undefinedYD' lay-filter='undefinedYD'>\n" + - " <option value='' >请选择</option>\n" + - " <option value='金融大数据实训系统'>金融大数据实训系统</option>\n" + - " <option value='xxx'>xxx</option>\n" + - " <option value='ddd'>ddd</option>\n" + - " </select>\n" + - " </div>\n"; - return html; + return selectList; } }, { field: 'resourcesApplicationId', title: '绑定应用', - align:"center", + align: "center", templet: function (d) { - var html = "<div class='layui-input-inline'>\n" + - " <select name='resourcesApplicationId' lay-filter='resourcesApplicationId'>\n" + - " <option value='' >请选择</option>\n" + - " <option value='金融大数据实训系统'>金融大数据实训系统</option>\n" + - " <option value='xxx'>xxx</option>\n" + - " <option value='ddd'>ddd</option>\n" + - " </select>\n" + - " </div>\n"; - return html; + var htm = "<select lay-filter='select_yingYong_1'><option value=''>请选择</option>"; + $.each(resourcesApplication, function (key, value) { + htm += '<option value="' + value.resourcesApplicationId + '" ' + (value.resourcesApplicationId == d.resourcesApplicationId ? 'selected' : '') + '>' + value.applicationName + '</option>'; + }); + return htm; } }, { field: 'operation_', title: '操作', - align:"center", + align: "center", templet: function (d) { var htm = '<a class="layui-table-link" lay-event="binding">绑定</a>'; htm += '<a class="layui-table-link" lay-event="edit">编辑</a>'; @@ -114,7 +115,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) { } }); - table.on('edit(resourcesApplicationCourseTable)', function(obj){ //注:edit是固定事件名,test是table原始容器的属性 lay-filter="对应的值" + table.on('edit(resourcesApplicationCourseTable)', function (obj) { //注:edit是固定事件名,test是table原始容器的属性 lay-filter="对应的值" console.log(obj.value); //得到修改后的值 console.log(obj.field); //当前编辑的字段名 console.log(obj.data); //所在行的所有相关数据 @@ -152,9 +153,9 @@ layui.define(['form', 'laydate', 'table'], function (exports) { }, initTableTool: table.on('tool(resourcesApplicationCourseTable)', function (obj) { var data = obj.data; if (obj.event === 'edit') { - var url = "/jlw/resourcesApplicationCourse/add.do?resourcesApplicationCourseId="+data.resourcesApplicationCourseId; - Common.openDlg(url,""); - }else if(obj.event === "del"){ + var url = "/jlw/resourcesApplicationCourse/add.do?resourcesApplicationCourseId=" + data.resourcesApplicationCourseId; + Common.openDlg(url, ""); + } else if (obj.event === "del") { layer.confirm('是否确定删除该课程?', function (index) { //courseInfoStatus:状态(1启用 2禁用 3删除) var ret = Common.postAjax("/jlw/resourcesApplicationCourse/delete.json", {ids: data.resourcesApplicationCourseId}); layer.msg(ret.code == 0 ? "删除成功!" : ret.msg, { @@ -167,7 +168,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) { } }); }); - }else if(obj.event === "binding"){ + } else if (obj.event === "binding") { layer.confirm('是否确定绑定?', function (index) { var ret = Common.postAjax("/jlw/xxx/xx.json", {ids: data.resourcesApplicationCourseId}); layer.msg(ret.code == 0 ? "绑定成功!" : ret.msg, { @@ -184,12 +185,19 @@ layui.define(['form', 'laydate', 'table'], function (exports) { }) }; form.on('select(courseLabelType)', function (data) { - console.log("data->>>>>>>>>>>>>>>>", data); - var selectElem = $(data.elem); - var tdElem = selectElem.closest('td'); - var trElem = tdElem.closest('tr'); - var tableView = trElem.closest('.layui-table-view'); - table.cache[tableView.attr('lay-id')][trElem.data('index')][tdElem.data('field')] = data.value; + resourcesApplication = Common.getAjax("/jlw/resourcesApplication/getValues.json", {applicationOneLevelRelation: data.value}).data; //获取课程数据 + var this_ = $(this).parents("td").next().next().find("select"); + this_.empty(); + this_.append("<option value=''>请选择</option>"); + + $(this).parents("td").next().next().find("select").empty(); + $(this).parents("td").next().next().find("select").append("<option value=''>请选择</option>"); + if (!$.isEmpty(data.value)) { + $.each(resourcesApplication, function (key, v) { + this_.append("<option value='" + v.resourcesApplicationId + "'>" + v.applicationName + "</option>"); + }); + } + form.render(); }); form.on('select(resourcesApplicationId)', function (data) { console.log("data->>>>>>>>>>>>>>>>", data); diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js index da6ff2c6..bbcb12e3 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseStudentSigninLog/index.js @@ -24,8 +24,8 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { method : 'post', url : Common.ctxPath + '/jlw/teacherOpenCourseStudentSigninLog/list.json' // 数据接口 ,page : Lib.tablePage // 开启分页 - ,toolbar: '#toolbar_teacherOpenCourseStudentSigninLog' //自定义头部左侧工具栏 - ,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏 + /* ,toolbar: '#toolbar_teacherOpenCourseStudentSigninLog' //自定义头部左侧工具栏 + ,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/ ,limit : 10, cols : [ [ // 表头 { diff --git a/web/src/main/resources/static/js/jlw/universitiesColleges/index.js b/web/src/main/resources/static/js/jlw/universitiesColleges/index.js index d56e42c9..ff3b6a54 100644 --- a/web/src/main/resources/static/js/jlw/universitiesColleges/index.js +++ b/web/src/main/resources/static/js/jlw/universitiesColleges/index.js @@ -110,6 +110,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) { }, initTableTool: table.on('tool(universitiesCollegesTable)', function (obj) { var data = obj.data; if (obj.event === 'edit') { + console.log(data) var url = "/jlw/universitiesColleges/add.do?universitiesCollegesId=" + data.universitiesCollegesId; Common.openDlg(url, "院校信息/编辑院校"); } else if (obj.event === "del") { diff --git a/web/src/main/resources/templates/jlw/handsOn/index.html b/web/src/main/resources/templates/jlw/handsOn/index.html index eba1e00a..19a08174 100644 --- a/web/src/main/resources/templates/jlw/handsOn/index.html +++ b/web/src/main/resources/templates/jlw/handsOn/index.html @@ -36,9 +36,8 @@ <div class="layui-inline"> <label class="layui-form-label">状态:</label> <div class="layui-input-block"> - <layui:simpleDictSelect style='layui-input-inline' - type="up_status" - id="handsOnStatu" name="handsOnStatu"/> + + </div> </div> </layui:searchForm> diff --git a/web/src/main/resources/templates/jlw/resourcesApplicationCourse/add.html b/web/src/main/resources/templates/jlw/resourcesApplicationCourse/add.html index ab99f1f3..aec9fa52 100644 --- a/web/src/main/resources/templates/jlw/resourcesApplicationCourse/add.html +++ b/web/src/main/resources/templates/jlw/resourcesApplicationCourse/add.html @@ -34,7 +34,7 @@ <label class="layui-form-label"><span class="req">*</span>课程类别:</label> <div class="layui-input-inline"> <!-- '实务课程类','考证课程类','理论课程类';--> - <select lay-filter="select_courseLabelType"> + <select lay-filter="select_courseLabelType" > <option value="">请选择</option> <option value="实务课程类" ${resourcesApplicationCourse.courseLabelType=='实务课程类'?'selected':''}>实务课程类 </option> @@ -64,8 +64,8 @@ <div class="layui-form-item"> <label class="layui-form-label"><span class="req">*</span>绑定应用:</label> <div class="layui-input-inline"> - <layui:simpleDictSelect style='1' type="application_name" - id="resourcesApplicationId" value="" name="resourcesApplicationId"/> + <layui:simpleDictSelect style='1' type="resources_application.application_name.1=1" + id="resourcesApplicationId" value="${resourcesApplicationCourse.resourcesApplicationId}" name="resourcesApplicationId"/> </div> </div> </div> diff --git a/web/src/main/resources/templates/jlw/resourcesApplicationCourse/index.html b/web/src/main/resources/templates/jlw/resourcesApplicationCourse/index.html index 905e1004..5d6ce2e1 100644 --- a/web/src/main/resources/templates/jlw/resourcesApplicationCourse/index.html +++ b/web/src/main/resources/templates/jlw/resourcesApplicationCourse/index.html @@ -6,6 +6,11 @@ .layui-table a { margin-right: 10px; } + td .layui-form-select { + margin-top: -10px; + margin-left: -15px; + margin-right: -15px; + } </style> <layui:searchForm formId="searchForm" searchList="" condition="${search}"> <!-- <div class="layui-inline">--> @@ -16,6 +21,13 @@ <!-- </div>--> <!-- </div>--> </layui:searchForm> +<script type="text/html" id="selectGxmc" > + <div class='layui-input-inline'> + <layui:simpleDictSelect style='layui-input-inline' + type="resources_application.application_name.1=1" + id="handsOapplicationNameStatu" name="applicationName"/> + </div> +</script> <!--<div class="layui-btn-group"> <layui:accessButton function="resourcesApplicationCourse.add" action="add">新增</layui:accessButton> diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html b/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html index 6e6d3b4c..a9caa1aa 100644 --- a/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseStudentSigninLog/index.html @@ -1,26 +1,29 @@ <!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseStudentSigninLog/"}){ --> <layui:searchForm formId="searchForm" searchList="" condition="${search}"> </layui:searchForm> +<div class="layui-btn-group"> + <layui:accessButton function="teacherOpenCourseStudentSigninLog.add" action="add">添加</layui:accessButton> + <layui:accessButton function="teacherOpenCourseStudentSigninLog.edit" action="edit">修改</layui:accessButton> + <layui:accessButton function="teacherOpenCourseStudentSigninLog.del" action="del">删除</layui:accessButton> +</div> <table id="teacherOpenCourseStudentSigninLogTable" lay-filter="teacherOpenCourseStudentSigninLogTable"></table> <!--#} --> -<script type="text/html" id="toolbar_teacherOpenCourseStudentSigninLog"> +<!--<script type="text/html" id="toolbar_teacherOpenCourseStudentSigninLog"> <div class="layui-btn-container"> <div class="layui-btn-group" > - <!--# if(core.searchIsShow(search)) {--> + <!–# if(core.searchIsShow(search)) {–> <layui:accessButton function="teacherOpenCourseStudentSigninLog.query" id="searchFormSearch" action="search"><i class="layui-icon"></i>搜索</layui:accessButton> - <!--# }--> + <!–# }–> <layui:accessButton function="teacherOpenCourseStudentSigninLog.add" action="add">添加</layui:accessButton> <layui:accessButton function="teacherOpenCourseStudentSigninLog.edit" action="edit">修改</layui:accessButton> <layui:accessButton function="teacherOpenCourseStudentSigninLog.del" action="del">删除</layui:accessButton> - <!--# if(!isEmpty(search)) {--> + <!–# if(!isEmpty(search)) {–> <layui:accessButton function="teacherOpenCourseStudentSigninLog.query" action="refresh"><i class="layui-icon"></i>刷新</layui:accessButton> - <!--# }--> - <layui:accessButton function="teacherOpenCourseStudentSigninLog.exportDocument" action="exportDocument" class="layui-btn-warm"><span - class="iconfont"></span>导出</layui:accessButton> + <!–# }–> </div> </div> -</script> +</script>--> <script> layui.use(['index'], function(){ diff --git a/web/src/main/resources/templates/jlw/universitiesColleges/add.html b/web/src/main/resources/templates/jlw/universitiesColleges/add.html index 315f182b..2332742a 100644 --- a/web/src/main/resources/templates/jlw/universitiesColleges/add.html +++ b/web/src/main/resources/templates/jlw/universitiesColleges/add.html @@ -101,7 +101,7 @@ <div class="layui-inline"> <label class="layui-form-label"><span class="req">*</span>密码:</label> <div class="layui-input-inline"> - <input type="text" name="password" value="${universitiesColleges.password}" placeholder="不填写,默认初始密码" class="layui-input" > + <input type="text" name="password" value="${universitiesColleges.universitiesCollegesAuthCode}" placeholder="不填写,默认初始密码" class="layui-input" > </div> </div> </div>