diff --git a/src/main/java/cn/com/tenlion/systembase/controller/route/linecase/LineCaseRouteController.java b/src/main/java/cn/com/tenlion/systembase/controller/route/linecase/LineCaseRouteController.java index 4cfa0f2..56b0b02 100644 --- a/src/main/java/cn/com/tenlion/systembase/controller/route/linecase/LineCaseRouteController.java +++ b/src/main/java/cn/com/tenlion/systembase/controller/route/linecase/LineCaseRouteController.java @@ -33,4 +33,9 @@ public class LineCaseRouteController extends DefaultBaseController { return new ModelAndView("linecase/list"); } + @GetMapping("list-view") + public ModelAndView listView() { + return new ModelAndView("linecase/list-view"); + } + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systembase/controller/route/schoolkey/SchoolKeyRouteController.java b/src/main/java/cn/com/tenlion/systembase/controller/route/schoolkey/SchoolKeyRouteController.java index 10a9461..6f3d646 100644 --- a/src/main/java/cn/com/tenlion/systembase/controller/route/schoolkey/SchoolKeyRouteController.java +++ b/src/main/java/cn/com/tenlion/systembase/controller/route/schoolkey/SchoolKeyRouteController.java @@ -33,4 +33,9 @@ public class SchoolKeyRouteController extends DefaultBaseController { return new ModelAndView("schoolkey/list"); } + @GetMapping("list-view") + public ModelAndView listView() { + return new ModelAndView("schoolkey/list-view"); + } + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systembase/controller/route/stuteasafe/StuTeaSafeRouteController.java b/src/main/java/cn/com/tenlion/systembase/controller/route/stuteasafe/StuTeaSafeRouteController.java index c307f13..0e5a084 100644 --- a/src/main/java/cn/com/tenlion/systembase/controller/route/stuteasafe/StuTeaSafeRouteController.java +++ b/src/main/java/cn/com/tenlion/systembase/controller/route/stuteasafe/StuTeaSafeRouteController.java @@ -33,4 +33,9 @@ public class StuTeaSafeRouteController extends DefaultBaseController { return new ModelAndView("stuteasafe/list"); } + @GetMapping("list-view") + public ModelAndView listView() { + return new ModelAndView("stuteasafe/list-view"); + } + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/dtos/linecase/LineCaseDTO.java b/src/main/java/cn/com/tenlion/systembase/pojo/dtos/linecase/LineCaseDTO.java index aa45a04..e515442 100644 --- a/src/main/java/cn/com/tenlion/systembase/pojo/dtos/linecase/LineCaseDTO.java +++ b/src/main/java/cn/com/tenlion/systembase/pojo/dtos/linecase/LineCaseDTO.java @@ -58,6 +58,8 @@ public class LineCaseDTO { private String locationCode; @ApiModelProperty(name = "grid", value = "所属网格") private String grid; + @ApiModelProperty(name = "lineId", value = "护航弧线ID") + private String lineId; public String getLineCaseId() { return lineCaseId == null ? "" : lineCaseId.trim(); @@ -234,4 +236,12 @@ public class LineCaseDTO { public void setGrid(String grid) { this.grid = grid; } + + public String getLineId() { + return lineId; + } + + public void setLineId(String lineId) { + this.lineId = lineId; + } } diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/vos/linecase/LineCaseVO.java b/src/main/java/cn/com/tenlion/systembase/pojo/vos/linecase/LineCaseVO.java index 78a516d..0c13caf 100644 --- a/src/main/java/cn/com/tenlion/systembase/pojo/vos/linecase/LineCaseVO.java +++ b/src/main/java/cn/com/tenlion/systembase/pojo/vos/linecase/LineCaseVO.java @@ -63,6 +63,8 @@ public class LineCaseVO { private String locationCode; @ApiModelProperty(name = "grid", value = "所属网格") private String grid; + @ApiModelProperty(name = "lineId", value = "护航弧线ID") + private String lineId; public String getCaseCode() { return caseCode == null ? "" : caseCode.trim(); @@ -231,4 +233,12 @@ public class LineCaseVO { public void setGrid(String grid) { this.grid = grid; } + + public String getLineId() { + return lineId; + } + + public void setLineId(String lineId) { + this.lineId = lineId; + } } diff --git a/src/main/resources/mybatis/mapper/linecase/line-case-mapper.xml b/src/main/resources/mybatis/mapper/linecase/line-case-mapper.xml index 4a2ad95..edb5759 100644 --- a/src/main/resources/mybatis/mapper/linecase/line-case-mapper.xml +++ b/src/main/resources/mybatis/mapper/linecase/line-case-mapper.xml @@ -4,6 +4,7 @@ + @@ -75,6 +76,7 @@ INSERT INTO data_line_case( line_case_id, + line_id, case_code, case_name, happen_time, @@ -103,6 +105,7 @@ is_delete ) VALUES( #{lineCaseId}, + #{lineId}, #{caseCode}, #{caseName}, #{happenTime}, @@ -163,6 +166,9 @@ UPDATE data_line_case SET + + line_id = #{lineId}, + case_code = #{caseCode}, @@ -236,6 +242,7 @@ SELECT + t1.line_id, t1.line_case_id, t1.case_code, t1.case_name, @@ -362,6 +370,11 @@ data_line_case t1 WHERE t1.is_delete = 0 + + AND ( + t1.line_id = #{lineId} + ) + AND ( t1.case_name LIKE CONCAT('%', #{keywords}, '%') diff --git a/src/main/resources/templates/line/list.html b/src/main/resources/templates/line/list.html index a398db7..ed0157b 100644 --- a/src/main/resources/templates/line/list.html +++ b/src/main/resources/templates/line/list.html @@ -229,6 +229,12 @@ } return rowData; } + }, + {field: 'lineCase', fixed: 'right', width: 150, title: '涉及线路案(事)件', align:'center', + templet: function(row) { + var rowData = '案件列表'; + return rowData; + } } ] ], @@ -357,6 +363,30 @@ } } }); + + // 巡查记录 + function lineCase(data) { + top.dialog.open({ + url: top.restAjax.path('route/linecase/list-view?lineId={lineId}', [data.lineId]), + title: "案(事)件列表", + width: '80%', + height: '80%', + onClose: function() { + reloadTable(); + } + }); + } + + //监听行单击事件 + table.on('tool(dataTable)', function(obj){ + var data = obj.data; + console.log(data) + // 周边重点人员 + if('lineCase' == obj.event) { + lineCase(data); + } + }); + }); diff --git a/src/main/resources/templates/linecase/list-view.html b/src/main/resources/templates/linecase/list-view.html new file mode 100644 index 0000000..7bef239 --- /dev/null +++ b/src/main/resources/templates/linecase/list-view.html @@ -0,0 +1,304 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/linecase/save.html b/src/main/resources/templates/linecase/save.html index 582264b..90a1e8f 100644 --- a/src/main/resources/templates/linecase/save.html +++ b/src/main/resources/templates/linecase/save.html @@ -22,6 +22,18 @@
+
+ +
+ +
@@ -175,6 +187,19 @@ var wangEditorObj = {}; var viewerObj = {}; + // 初始化学校 + function initLineSelect() { + top.restAjax.get(top.restAjax.path('api/line/list', []), {}, null, function(code, data, args) { + laytpl(document.getElementById('lineIdSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('lineIdSelectTemplateBox').innerHTML = html; + }); + console.log(data) + form.render('select', 'lineIdSelectTemplateBox'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + // 选择所在地 $(document).on('click', '#location', function() { top.dialog.open({ @@ -354,6 +379,7 @@ initCaseSituationRichText(); initCaseSolveRichText(); initGridSelect(); + initLineSelect(); } initData(); diff --git a/src/main/resources/templates/linecase/update.html b/src/main/resources/templates/linecase/update.html index fa6c1c2..3641698 100644 --- a/src/main/resources/templates/linecase/update.html +++ b/src/main/resources/templates/linecase/update.html @@ -22,6 +22,18 @@
+
+ +
+ +
@@ -148,7 +160,7 @@
@@ -172,11 +184,28 @@ var laytpl = layui.laytpl; var laydate = layui.laydate; var lineCaseId = top.restAjax.params(window.location.href).lineCaseId; + var isView = top.restAjax.params(window.location.href).isView; var wangEditor = window.wangEditor; var wangEditorObj = {}; var viewerObj = {}; + // 初始化组织名称 + function initLineSelect(selectValue) { + top.restAjax.get(top.restAjax.path('api/line/list', []), {}, null, function(code, data, args) { + laytpl(document.getElementById('lineIdSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('lineIdSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'lineIdSelectTemplateBox'); + + var selectObj = {}; + selectObj['lineId'] = selectValue; + form.val('dataForm', selectObj); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + // 选择所在地 $(document).on('click', '#location', function() { top.dialog.open({ @@ -377,6 +406,10 @@ initCaseSituationRichText(data['caseSituation']); initCaseSolveRichText(data['caseSolve']); initGridSelect(data['locationCode'], data['grid']); + initLineSelect(data['lineId']); + if('view' == isView) { + $('#submitBtn').hide(); + } }, function(code, data) { top.dialog.msg(data.msg); }, function() { diff --git a/src/main/resources/templates/school/list.html b/src/main/resources/templates/school/list.html index fc345e8..71a3f5b 100644 --- a/src/main/resources/templates/school/list.html +++ b/src/main/resources/templates/school/list.html @@ -250,13 +250,13 @@ }, {field: 'schoolKey', fixed: 'right', width: 150, title: '周边重点人员', align:'center', templet: function(row) { - var rowData = '添加重点人员'; + var rowData = '重点人员列表'; return rowData; } }, {field: 'stuteasafe', fixed: 'right', width: 150, title: '涉及师生安全案件', align:'center', templet: function(row) { - var rowData = '添加案件'; + var rowData = '案件列表'; return rowData; } } @@ -278,8 +278,8 @@ // 巡查记录 function schoolKey(data) { top.dialog.open({ - url: top.restAjax.path('route/schoolkey/list?schoolId={schoolId}', [data.schoolId]), - title: "巡查记录列表", + url: top.restAjax.path('route/schoolkey/list-view?schoolId={schoolId}', [data.schoolId]), + title: "重点人员列表", width: '80%', height: '80%', onClose: function() { @@ -291,8 +291,8 @@ // 巡查记录 function stuteasafe(data) { top.dialog.open({ - url: top.restAjax.path('route/stuteasafe/list?schoolId={schoolId}', [data.schoolId]), - title: "巡查记录列表", + url: top.restAjax.path('route/stuteasafe/list-view?schoolId={schoolId}', [data.schoolId]), + title: "案(事)件列表", width: '80%', height: '80%', onClose: function() { diff --git a/src/main/resources/templates/schoolkey/list-view.html b/src/main/resources/templates/schoolkey/list-view.html new file mode 100644 index 0000000..1b61da0 --- /dev/null +++ b/src/main/resources/templates/schoolkey/list-view.html @@ -0,0 +1,187 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/schoolkey/save.html b/src/main/resources/templates/schoolkey/save.html index 4285a3d..bdaed2b 100644 --- a/src/main/resources/templates/schoolkey/save.html +++ b/src/main/resources/templates/schoolkey/save.html @@ -87,6 +87,18 @@
+
+ +
+ +
@@ -159,7 +171,19 @@ var wangEditor = window.wangEditor; var wangEditorObj = {}; var viewerObj = {}; - var schoolId = top.restAjax.params(window.location.href).schoolId; + + // 初始化学校 + function initSchoolSelect() { + top.restAjax.get(top.restAjax.path('api/school/list', []), {}, null, function(code, data, args) { + laytpl(document.getElementById('schoolIdSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('schoolIdSelectTemplateBox').innerHTML = html; + }); + console.log(data) + form.render('select', 'schoolIdSelectTemplateBox'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } // 选择所在地 $(document).on('click', '#location', function() { @@ -289,6 +313,7 @@ function initData() { initDegreeOfHarmSelect(); initGridSelect(); + initSchoolSelect(); } initData(); @@ -302,7 +327,6 @@ top.dialog.confirm(top.dataMessage.commit, function(index) { top.dialog.close(index); var loadLayerIndex; - formData.field['schoolId'] = schoolId; top.restAjax.post(top.restAjax.path('api/schoolkey/save', []), formData.field, null, function(code, data) { var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, { time: 0, diff --git a/src/main/resources/templates/schoolkey/update.html b/src/main/resources/templates/schoolkey/update.html index 0b97f69..57b8bad 100644 --- a/src/main/resources/templates/schoolkey/update.html +++ b/src/main/resources/templates/schoolkey/update.html @@ -87,6 +87,18 @@
+
+ +
+ +
@@ -133,7 +145,7 @@
@@ -162,6 +174,22 @@ var wangEditorObj = {}; var viewerObj = {}; + // 初始化组织名称 + function initSchoolSelect(selectValue) { + top.restAjax.get(top.restAjax.path('api/school/list', []), {}, null, function(code, data, args) { + laytpl(document.getElementById('schoolIdSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('schoolIdSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'schoolIdSelectTemplateBox'); + + var selectObj = {}; + selectObj['schoolId'] = selectValue; + form.val('dataForm', selectObj); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + // 选择所在地 $(document).on('click', '#location', function() { top.dialog.open({ @@ -307,6 +335,10 @@ initDegreeOfHarmSelect(data['degreeOfHarm'] + ',' + data['degreeOfHarmCode']); queryBasePopulationInfo(data['cardNum']); initGridSelect(data['locationCode'], data['grid']); + initSchoolSelect(data['schoolId']); + if('view' == isView) { + $('#submitBtn').hide(); + } }, function(code, data) { top.dialog.msg(data.msg); }, function() { diff --git a/src/main/resources/templates/stuteasafe/list-view.html b/src/main/resources/templates/stuteasafe/list-view.html new file mode 100644 index 0000000..18871a5 --- /dev/null +++ b/src/main/resources/templates/stuteasafe/list-view.html @@ -0,0 +1,322 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/stuteasafe/list.html b/src/main/resources/templates/stuteasafe/list.html index ac5ebb3..f8ea855 100644 --- a/src/main/resources/templates/stuteasafe/list.html +++ b/src/main/resources/templates/stuteasafe/list.html @@ -65,15 +65,14 @@ var laydate = layui.laydate; var common = layui.common; var resizeTimeout = null; - var tableUrl = 'api/stuteasafe/listpage?schoolId={schoolId}'; - var schoolId = top.restAjax.params(window.location.href).schoolId; + var tableUrl = 'api/stuteasafe/listpage'; // 初始化表格 function initTable() { table.render({ elem: '#dataTable', id: 'dataTable', - url: top.restAjax.path(tableUrl, [schoolId]), + url: top.restAjax.path(tableUrl, []), width: admin.screen() > 1 ? '100%' : '', height: $win.height() - 90, limit: 20, @@ -265,7 +264,7 @@ // 重载表格 function reloadTable(currentPage) { table.reload('dataTable', { - url: top.restAjax.path(tableUrl, [schoolId]), + url: top.restAjax.path(tableUrl, []), where: { keywords: $('#keywords').val(), startTime: $('#startTime').val(), @@ -337,7 +336,7 @@ area: ['100%', '100%'], shadeClose: true, anim: 2, - content: top.restAjax.path('route/stuteasafe/save?schoolId={schoolId}', [schoolId]), + content: top.restAjax.path('route/stuteasafe/save', []), end: function() { reloadTable(); } diff --git a/src/main/resources/templates/stuteasafe/save.html b/src/main/resources/templates/stuteasafe/save.html index 1022020..1894da6 100644 --- a/src/main/resources/templates/stuteasafe/save.html +++ b/src/main/resources/templates/stuteasafe/save.html @@ -22,6 +22,18 @@
+
+ +
+ +
@@ -174,7 +186,19 @@ var wangEditor = window.wangEditor; var wangEditorObj = {}; var viewerObj = {}; - var schoolId = top.restAjax.params(window.location.href).schoolId; + + // 初始化学校 + function initSchoolSelect() { + top.restAjax.get(top.restAjax.path('api/school/list', []), {}, null, function(code, data, args) { + laytpl(document.getElementById('schoolIdSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('schoolIdSelectTemplateBox').innerHTML = html; + }); + console.log(data) + form.render('select', 'schoolIdSelectTemplateBox'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } // 初始化备注富文本 function initCaseSituationRichText() { @@ -354,6 +378,7 @@ initCaseSituationRichText(); initCaseSolveRichText(); initGridSelect(); + initSchoolSelect(); } initData(); @@ -378,7 +403,6 @@ top.dialog.confirm(top.dataMessage.commit, function(index) { top.dialog.close(index); var loadLayerIndex; - formData.field['schoolId'] = schoolId; top.restAjax.post(top.restAjax.path('api/stuteasafe/save', []), formData.field, null, function(code, data) { var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, { time: 0, diff --git a/src/main/resources/templates/stuteasafe/update.html b/src/main/resources/templates/stuteasafe/update.html index 4d0d762..576fb25 100644 --- a/src/main/resources/templates/stuteasafe/update.html +++ b/src/main/resources/templates/stuteasafe/update.html @@ -22,6 +22,18 @@
+
+ +
+ +
@@ -148,7 +160,7 @@
@@ -172,11 +184,28 @@ var laytpl = layui.laytpl; var laydate = layui.laydate; var stuTeaSafeId = top.restAjax.params(window.location.href).stuTeaSafeId; + var isView = top.restAjax.params(window.location.href).isView; var wangEditor = window.wangEditor; var wangEditorObj = {}; var viewerObj = {}; + // 初始化组织名称 + function initSchoolSelect(selectValue) { + top.restAjax.get(top.restAjax.path('api/school/list', []), {}, null, function(code, data, args) { + laytpl(document.getElementById('schoolIdSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('schoolIdSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'schoolIdSelectTemplateBox'); + + var selectObj = {}; + selectObj['schoolId'] = selectValue; + form.val('dataForm', selectObj); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + // 初始化备注富文本 function initCaseSituationRichText(value) { var editor = new wangEditor('#caseSituation'); @@ -377,6 +406,10 @@ initCaseSituationRichText(data['caseSituation']); initCaseSolveRichText(data['caseSolve']); initGridSelect(data['happenLocationCode'], data['grid']); + initSchoolSelect(data['schoolId']); + if('view' == isView) { + $('#submitBtn').hide(); + } }, function(code, data) { top.dialog.msg(data.msg); }, function() {