From 64dfaafdcdf31746518f0b3d1472fa8451fa9eea Mon Sep 17 00:00:00 2001 From: ly19960718 <1622779752@qq.com> Date: Thu, 14 Oct 2021 10:55:29 +0800 Subject: [PATCH] 123123 --- .../importantevent/important-event-mapper.xml | 13 +-- .../mybatis/mapper/lrs/lrs-mapper.xml | 14 +-- .../templates/importantevent/list.html | 70 +++++++++++++- .../resources/templates/institution/list.html | 8 +- src/main/resources/templates/lrs/list.html | 92 ++++++++++++++++++- src/main/resources/templates/lrs/update.html | 8 ++ .../resources/templates/teamuser/list.html | 2 +- 7 files changed, 185 insertions(+), 22 deletions(-) diff --git a/src/main/resources/mybatis/mapper/importantevent/important-event-mapper.xml b/src/main/resources/mybatis/mapper/importantevent/important-event-mapper.xml index a395331..a8922ea 100644 --- a/src/main/resources/mybatis/mapper/importantevent/important-event-mapper.xml +++ b/src/main/resources/mybatis/mapper/importantevent/important-event-mapper.xml @@ -248,6 +248,8 @@ AND ( t1.event_name LIKE CONCAT('%', #{keywords}, '%') + OR + t1.event_site LIKE CONCAT('%', #{keywords}, '%') ) @@ -258,12 +260,11 @@ AND LEFT(t1.gmt_create, 10) #{endTime} - - AND - t1.important_event_id IN - - #{importantEventIds[${index}]} - + + AND t1.event_level_id = #{eventLevelId} + + + AND t1.event_type_id = #{eventTypeId} ORDER BY t1.gmt_create DESC diff --git a/src/main/resources/mybatis/mapper/lrs/lrs-mapper.xml b/src/main/resources/mybatis/mapper/lrs/lrs-mapper.xml index fe39020..4267e62 100644 --- a/src/main/resources/mybatis/mapper/lrs/lrs-mapper.xml +++ b/src/main/resources/mybatis/mapper/lrs/lrs-mapper.xml @@ -254,12 +254,14 @@ AND LEFT(t1.gmt_create, 10) #{endTime} - - AND - t1.lrs_id IN - - #{lrsIds[${index}]} - + + AND t1.lrs_area_level_id = #{lrsAreaLevelId} + + + AND t1.lrs_subject_level_id = #{lrsSubjectLevelId} + + + AND t1.lrs_policy_type_id = #{lrsPolicyTypeId} ORDER BY t1.gmt_create DESC diff --git a/src/main/resources/templates/importantevent/list.html b/src/main/resources/templates/importantevent/list.html index 2150fc4..c64d830 100644 --- a/src/main/resources/templates/importantevent/list.html +++ b/src/main/resources/templates/importantevent/list.html @@ -9,6 +9,12 @@ +
@@ -18,7 +24,7 @@
- +
@@ -26,6 +32,28 @@
+
+ +
+ + + + + @@ -57,12 +85,14 @@ base: 'assets/layuiadmin/' }).extend({ index: 'lib/index' - }).use(['index', 'table', 'laydate', 'common'], function() { + }).use(['index', 'table', 'laydate', 'common','form','laytpl'], function() { var $ = layui.$; var $win = $(window); var table = layui.table; var admin = layui.admin; var laydate = layui.laydate; + var form = layui.form; + var laytpl = layui.laytpl; var common = layui.common; var resizeTimeout = null; var tableUrl = 'api/importantevent/listpage'; @@ -169,7 +199,9 @@ where: { keywords: $('#keywords').val(), startTime: $('#startTime').val(), - endTime: $('#endTime').val() + endTime: $('#endTime').val(), + eventLevelId: $('#eventLevelId').val(), + eventTypeId: $('#eventTypeId').val() }, page: { curr: currentPage @@ -211,6 +243,38 @@ } }); } + + // 初始化事件分级ID选择 + function initEventLevelIdSelect() { + top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['77b5f275-342b-403b-a737-759357fcae55']), {}, null, function(code, data, args) { + laytpl(document.getElementById('eventLevelIdSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('eventLevelIdSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'eventLevelIdSelectTemplateBox'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + + // 初始化事件类型ID选择 + function initEventTypeIdSelect() { + top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['0cd4e948-db42-4745-9073-4e8232aa4b02']), {}, null, function(code, data, args) { + laytpl(document.getElementById('eventTypeIdSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('eventTypeIdSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'eventTypeIdSelectTemplateBox'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + + + // 初始化内容 + function initData() { + initEventLevelIdSelect(); + initEventTypeIdSelect(); + } + initData(); initTable(); initDate(); // 事件 - 页面变化 diff --git a/src/main/resources/templates/institution/list.html b/src/main/resources/templates/institution/list.html index 369678b..1f460c6 100644 --- a/src/main/resources/templates/institution/list.html +++ b/src/main/resources/templates/institution/list.html @@ -9,6 +9,11 @@ +
@@ -46,9 +51,6 @@ {{# } }} - - - diff --git a/src/main/resources/templates/lrs/list.html b/src/main/resources/templates/lrs/list.html index 1cf0317..73c7054 100644 --- a/src/main/resources/templates/lrs/list.html +++ b/src/main/resources/templates/lrs/list.html @@ -9,6 +9,12 @@ +
@@ -18,7 +24,7 @@
- +
@@ -26,6 +32,38 @@
+
+ + +
+ + +
+ + + @@ -57,12 +95,14 @@ base: 'assets/layuiadmin/' }).extend({ index: 'lib/index' - }).use(['index', 'table', 'laydate', 'common'], function() { + }).use(['index', 'table', 'laydate', 'common','form','laytpl'], function() { var $ = layui.$; var $win = $(window); var table = layui.table; var admin = layui.admin; var laydate = layui.laydate; + var form = layui.form; + var laytpl = layui.laytpl; var common = layui.common; var resizeTimeout = null; var tableUrl = 'api/lrs/listpage'; @@ -160,7 +200,10 @@ where: { keywords: $('#keywords').val(), startTime: $('#startTime').val(), - endTime: $('#endTime').val() + endTime: $('#endTime').val(), + lrsAreaLevelId:$('#lrsAreaLevelId').val(), + lrsSubjectLevelId:$('#lrsSubjectLevelId').val(), + lrsPolicyTypeId:$('#lrsPolicyTypeId').val() }, page: { curr: currentPage @@ -202,8 +245,51 @@ } }); } + // 初始化被实施地区层级ID下拉选择 + function initLrsAreaLevelIdSelect() { + top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['adfc5f04-67ce-4d91-a408-1473f75703eb']), {}, null, function(code, data, args) { + laytpl(document.getElementById('lrsAreaLevelIdSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('lrsAreaLevelIdSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'lrsAreaLevelIdSelectTemplateBox'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + + // 初始化实施主体等级ID下拉选择 + function initLrsSubjectLevelIdSelect() { + top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['adfc5f04-67ce-4d91-a408-1473f75703eb']), {}, null, function(code, data, args) { + laytpl(document.getElementById('lrsSubjectLevelIdSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('lrsSubjectLevelIdSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'lrsSubjectLevelIdSelectTemplateBox'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + + // 初始化政策种类ID下拉选择 + function initLrsPolicyTypeIdSelect() { + top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['25ad1e91-cc50-4615-a24d-a2387fa6de27']), {}, null, function(code, data, args) { + laytpl(document.getElementById('lrsPolicyTypeIdSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('lrsPolicyTypeIdSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'lrsPolicyTypeIdSelectTemplateBox'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + + function ininData(){ + initLrsAreaLevelIdSelect(); + initLrsSubjectLevelIdSelect(); + initLrsPolicyTypeIdSelect(); + } + initTable(); initDate(); + ininData(); // 事件 - 页面变化 $win.on('resize', function() { clearTimeout(resizeTimeout); diff --git a/src/main/resources/templates/lrs/update.html b/src/main/resources/templates/lrs/update.html index b07b6d0..55a838e 100644 --- a/src/main/resources/templates/lrs/update.html +++ b/src/main/resources/templates/lrs/update.html @@ -10,6 +10,14 @@ +
diff --git a/src/main/resources/templates/teamuser/list.html b/src/main/resources/templates/teamuser/list.html index 8a49ece..dde9543 100644 --- a/src/main/resources/templates/teamuser/list.html +++ b/src/main/resources/templates/teamuser/list.html @@ -298,7 +298,7 @@ title: false, closeBtn: 0, area: ['70%', '70%'], - shadeClose: true, + shadeClose: false, anim: 2, content: top.restAjax.path('route/teamuser/search', []), end: function(index) {