Administrator 2 年 前
コミット
f78247bd8e

ファイルの差分が大きいため隠しています
+ 430 - 395
.idea/workspace.xml


+ 1 - 1
leiSP-admin/src/main/resources/templates/index.html

@@ -295,7 +295,7 @@
 
         /* 用户管理-重置密码 */
         function resetPwd() {
-            var url = ctx + 'system/user/profile/resetPwd';
+            var url =  'system/user/profile/resetPwd';
             $.modal.open("重置密码", url, '770', '380');
         }
         /* 切换主题 */

+ 14 - 9
mybusiness/src/main/java/com/business/slfh/manager/othersmanager/service/impl/TUEventOthersServiceImpl.java

@@ -20,12 +20,12 @@ import javax.annotation.Resource;
 
 /**
  * 【请填写功能名称】Service业务层处理
- * 
+ *
  * @author lei
  * @date 2020-11-25
  */
 @Service
-public class TUEventOthersServiceImpl implements ITUEventOthersService 
+public class TUEventOthersServiceImpl implements ITUEventOthersService
 {
     @Resource
     private TUEventOthersMapper tUEventOthersMapper;
@@ -36,7 +36,7 @@ public class TUEventOthersServiceImpl implements ITUEventOthersService
 
     /**
      * 查询【请填写功能名称】
-     * 
+     *
      * @param id 【请填写功能名称】ID
      * @return 【请填写功能名称】
      */
@@ -48,7 +48,7 @@ public class TUEventOthersServiceImpl implements ITUEventOthersService
 
     /**
      * 查询【请填写功能名称】列表
-     * 
+     *
      * @param tUEventOthers 【请填写功能名称】
      * @return 【请填写功能名称】
      */
@@ -61,7 +61,7 @@ public class TUEventOthersServiceImpl implements ITUEventOthersService
 
     /**
      * 新增【请填写功能名称】
-     * 
+     *
      * @param tUEventOthers 【请填写功能名称】
      * @return 结果
      */
@@ -82,7 +82,7 @@ public class TUEventOthersServiceImpl implements ITUEventOthersService
 
     /**
      * 修改【请填写功能名称】
-     * 
+     *
      * @param tUEventOthers 【请填写功能名称】
      * @return 结果
      */
@@ -112,7 +112,12 @@ public class TUEventOthersServiceImpl implements ITUEventOthersService
         tUNotice.setEventId(tUEventOthers.getId());
         tUNotice.setContent(tUEventOthers.getReportContent());
         tUNotice.setTitle(tUEventOthers.getName());
-        sendMessageService.sendMessages(sendMessageVO,tUNotice);
+        try{
+            sendMessageService.sendMessages(sendMessageVO,tUNotice);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
 
         //}
         tUEventOthers.setUpdateTime(DateUtils.getNowDate());
@@ -156,7 +161,7 @@ public class TUEventOthersServiceImpl implements ITUEventOthersService
 
     /**
      * 删除【请填写功能名称】对象
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */
@@ -168,7 +173,7 @@ public class TUEventOthersServiceImpl implements ITUEventOthersService
 
     /**
      * 删除【请填写功能名称】信息
-     * 
+     *
      * @param id 【请填写功能名称】ID
      * @return 结果
      */

+ 420 - 406
mybusiness/src/main/resources/templates/business/manager/firemanager/index.html

@@ -1,159 +1,168 @@
 <!DOCTYPE html>
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
 <head>
-    <th:block th:include="include :: header('【事件信息(火险)】列表')" />
+    <th:block th:include="include :: header('【事件信息(火险)】列表')"/>
 </head>
 <body class="gray-bg">
-     <div class="container-div">
-        <div class="row">
-            <div class="col-sm-12 search-collapse">
-                <form id="formId">
-                    <div class="select-list">
-                        <ul>
-                            <li>
-                                <label>事件名称:</label>
-                                <input type="text" name="name"/>
-                            </li>
-                            <li>
-                                <label>上报方式类型:</label>
-                                <select name="reportType" class="form-control" th:with="type=${@dict.getType('report_type')}">
-                                    <option value="">所有</option>
-                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-                                </select>
-                            </li>
-                            <!--<li>
-                                <label>事件内容描述:</label>
-                                <input type="text" name="reportContent"/>
-                            </li>-->
-                            <li class="select-time">
-                                <label>上报时间:</label>
-                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginReportTime]"/>
-                                <span>-</span>
-                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endReportTime]"/>
-                            </li>
-                            <li>
-                                <label>上报人:</label>
-                                <input type="text" name="reportor"/>
-                            </li>
-                            <!--<li>
-                                <label>${comment}:</label>
-                                <input type="text" name="longitude"/>
-                            </li>
-                            <li>
-                                <label>${comment}:</label>
-                                <input type="text" name="latitude"/>
-                            </li>-->
-                            <li>
-                                <label>事件状态:</label>
-                                <select name="eventStatus" class="form-control m-b" th:with="type=${@dict.getType('event_status')}">
-                                    <option value="">所有</option>
-                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-                                </select>
-                            </li>
-                            <li>
-                                <label>事件等级:</label>
-                                <select name="eventLevel" class="form-control m-b" th:with="type=${@dict.getType('reserveplan_level')}">
-                                    <option value="">所有</option>
-                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-                                </select>
-                            </li>
-                            <!--<li>
-                                <label>${comment}:</label>
-                                <input type="text" name="deptId"/>
-                            </li>-->
-                            <li>
-                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
-                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
-                            </li>
-                        </ul>
-                    </div>
-                </form>
-            </div>
-
-            <div class="btn-group-sm" id="toolbar" role="group">
-                <a class="btn btn-success" onclick="add()" shiro:hasPermission="system:fire:add">
-                    <i class="fa fa-plus"></i> 添加
-                </a>
-                <!--<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:fire:edit">
-                    <i class="fa fa-edit"></i> 修改
-                </a>
-                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:fire:remove">
-                    <i class="fa fa-remove"></i> 删除
-                </a>
-                -->
-                <a class="btn btn-warning" onclick="$.table.exportExcel('formId')" shiro:hasPermission="system:fire:export">
-                    <i class="fa fa-download"></i> 导出
-                </a>
-                <a class="btn btn-primary" onclick="showHistoryFire()" shiro:hasPermission="system:fire:edit">
-                    <i class="fa fa-edit"></i> 历史火情
-                </a>
-                <a class="btn btn-danger" onclick="quickClear()">
-                    <i class="fa fa-edit"></i> 一键清理事件
-                </a>
-
-
-            </div>
-            <div class="col-sm-12 select-table table-striped">
-                <table id="bootstrap-table"></table>
-            </div>
+<div class="container-div">
+    <div class="row">
+        <div class="col-sm-12 search-collapse">
+            <form id="formId">
+                <div class="select-list">
+                    <ul>
+                        <li>
+                            <label>事件名称:</label>
+                            <input type="text" name="name"/>
+                        </li>
+                        <li>
+                            <label>上报方式类型:</label>
+                            <select name="reportType" class="form-control"
+                                    th:with="type=${@dict.getType('report_type')}">
+                                <option value="">所有</option>
+                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
+                                        th:value="${dict.dictValue}"></option>
+                            </select>
+                        </li>
+                        <!--<li>
+                            <label>事件内容描述:</label>
+                            <input type="text" name="reportContent"/>
+                        </li>-->
+                        <li class="select-time">
+                            <label>上报时间:</label>
+                            <input type="text" class="time-input" id="startTime" placeholder="开始时间"
+                                   name="params[beginReportTime]"/>
+                            <span>-</span>
+                            <input type="text" class="time-input" id="endTime" placeholder="结束时间"
+                                   name="params[endReportTime]"/>
+                        </li>
+                        <li>
+                            <label>上报人:</label>
+                            <input type="text" name="reportor"/>
+                        </li>
+                        <!--<li>
+                            <label>${comment}:</label>
+                            <input type="text" name="longitude"/>
+                        </li>
+                        <li>
+                            <label>${comment}:</label>
+                            <input type="text" name="latitude"/>
+                        </li>-->
+                        <li>
+                            <label>事件状态:</label>
+                            <select name="eventStatus" class="form-control m-b"
+                                    th:with="type=${@dict.getType('event_status')}">
+                                <option value="">所有</option>
+                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
+                                        th:value="${dict.dictValue}"></option>
+                            </select>
+                        </li>
+                        <li>
+                            <label>事件等级:</label>
+                            <select name="eventLevel" class="form-control m-b"
+                                    th:with="type=${@dict.getType('reserveplan_level')}">
+                                <option value="">所有</option>
+                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
+                                        th:value="${dict.dictValue}"></option>
+                            </select>
+                        </li>
+                        <!--<li>
+                            <label>${comment}:</label>
+                            <input type="text" name="deptId"/>
+                        </li>-->
+                        <li>
+                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
+                                    class="fa fa-search"></i>&nbsp;搜索</a>
+                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
+                                    class="fa fa-refresh"></i>&nbsp;重置</a>
+                        </li>
+                    </ul>
+                </div>
+            </form>
         </div>
-    </div>
-    <th:block th:include="include :: footer" />
-    <script th:inline="javascript">
 
-        function quickClear(){
-            $.ajax({
-                url : prefix + "/quickClear",
-                success : function (e) {
-                    $.modal.msgSuccess(e);
-                }
-            });
-        }
+        <div class="btn-group-sm" id="toolbar" role="group">
+            <a class="btn btn-success" onclick="add()" shiro:hasPermission="system:fire:add">
+                <i class="fa fa-plus"></i> 添加
+            </a>
+            <!--<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:fire:edit">
+                <i class="fa fa-edit"></i> 修改
+            </a>
+            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:fire:remove">
+                <i class="fa fa-remove"></i> 删除
+            </a>
+            -->
+            <a class="btn btn-warning" onclick="$.table.exportExcel('formId')" shiro:hasPermission="system:fire:export">
+                <i class="fa fa-download"></i> 导出
+            </a>
+            <a class="btn btn-primary" onclick="showHistoryFire()" shiro:hasPermission="system:fire:edit">
+                <i class="fa fa-edit"></i> 历史火情
+            </a>
+            <a class="btn btn-danger" onclick="quickClear()">
+                <i class="fa fa-edit"></i> 一键清理事件
+            </a>
 
-        function showHistoryFire() {
-            var url = prefix + "/showHistoryFire";
-            // window.open(url);
-            $.modal.openTab("查看【历史火情】详情", url);
-        }
-
-        function openDetailsDia(eventId){
-            var prefix = ctx + "visualization/event/getVisualizationDetails?eventId="+eventId+"&reservePlanType=reserveplan_type_1";
-            //$.modal.openTab('火情信息', prefix,$(document).width(),$(document).height());
-            $.modal.open('火情信息', prefix,$(document).width(),$(document).height());
-
-            $(".layui-layer-btn1").click(function () {
-                setTimeout(function(){
-                    parent.window.location.reload();//父页面刷新
-                    window.location.reload();//页面刷新
-                },500);
-            })
-
-        }
-
-        function myflush() {
-            parent.location.reload()
-        }
 
-
-
-        var report_typeDict = [[${@dict.getType('report_type')}]];
-        var event_statusDict = [[${@dict.getType('event_status')}]];
-        var reserveplan_levelDict = [[${@dict.getType('reserveplan_level')}]];
-        var editFlag = [[${@permission.hasPermi('system:fire:edit')}]];
-        var removeFlag = [[${@permission.hasPermi('system:fire:remove')}]];
-        var prefix = ctx + "business/manager/firemanager";
-
-        $(function() {
-            var options = {
-                url: prefix + "/list",
-                createUrl: prefix + "/add",
-                updateUrl: prefix + "/edit/{id}",
-                removeUrl: prefix + "/remove",
-                exportUrl: prefix + "/export",
-                modalName: "【事件信息(火险)】",
-                columns: [{
-                    checkbox: true
-                },
+        </div>
+        <div class="col-sm-12 select-table table-striped">
+            <table id="bootstrap-table"></table>
+        </div>
+    </div>
+</div>
+<th:block th:include="include :: footer"/>
+<script th:inline="javascript">
+
+    function quickClear() {
+        $.ajax({
+            url: prefix + "/quickClear",
+            success: function (e) {
+                $.modal.msgSuccess(e);
+            }
+        });
+    }
+
+    function showHistoryFire() {
+        var url = prefix + "/showHistoryFire";
+        // window.open(url);
+        $.modal.openTab("查看【历史火情】详情", url);
+    }
+
+    function openDetailsDia(eventId) {
+        var prefix = ctx + "visualization/event/getVisualizationDetails?eventId=" + eventId + "&reservePlanType=reserveplan_type_1";
+        //$.modal.openTab('火情信息', prefix,$(document).width(),$(document).height());
+        $.modal.open('火情信息', prefix, $(document).width(), $(document).height());
+
+        $(".layui-layer-btn1").click(function () {
+            setTimeout(function () {
+                parent.window.location.reload();//父页面刷新
+                window.location.reload();//页面刷新
+            }, 500);
+        })
+
+    }
+
+    function myflush() {
+        parent.location.reload()
+    }
+
+
+    var report_typeDict = [[${@dict.getType('report_type')}]];
+    var event_statusDict = [[${@dict.getType('event_status')}]];
+    var reserveplan_levelDict = [[${@dict.getType('reserveplan_level')}]];
+    var editFlag = [[${@permission.hasPermi('system:fire:edit')}]];
+    var removeFlag = [[${@permission.hasPermi('system:fire:remove')}]];
+    var prefix = ctx + "business/manager/firemanager";
+
+    $(function () {
+        var options = {
+            url: prefix + "/list",
+            createUrl: prefix + "/add",
+            updateUrl: prefix + "/edit/{id}",
+            removeUrl: prefix + "/remove",
+            exportUrl: prefix + "/export",
+            modalName: "【事件信息(火险)】",
+            columns: [{
+                checkbox: true
+            },
                 /*{
                     field: 'status',
                     title: '${comment}'
@@ -165,14 +174,14 @@
                 {
                     field: 'name',
                     title: '事件名称',
-                    formatter: function(value, row, index) {
+                    formatter: function (value, row, index) {
                         return '<a href="javascript:void(0)" onclick="openDetailsDia(\'' + row.id + '\')">' + value + '</a>';
                     }
                 },
                 {
                     field: 'reportType',
                     title: '上报方式类型',
-                    formatter: function(value, row, index) {
+                    formatter: function (value, row, index) {
                         return $.table.selectDictLabel(report_typeDict, value);
                     }
                 },
@@ -199,17 +208,18 @@
                 {
                     field: 'eventStatus',
                     title: '事件状态',
-                    formatter: function(value, row, index) {
+                    formatter: function (value, row, index) {
                         return $.table.selectDictLabel(event_statusDict, value);
                     }
                 },
                 {
                     field: 'eventLevel',
                     title: '事件等级',
-                    formatter: function(value, row, index) {
+                    formatter: function (value, row, index) {
                         return $.table.selectDictLabel(reserveplan_levelDict, value);
                     }
                 },
+
                 /*{
                     field: 'deptId',
                     title: '${comment}'
@@ -217,20 +227,21 @@
                 {
                     title: '操作',
                     align: 'center',
-                    formatter: function(value, row, index) {//已办结能填写查看报告 归档只能查看报告
-                        var confirm = row.eventStatus!='event_status_1'?'none':'inline-block'
+                    formatter: function (value, row, index) {//已办结能填写查看报告 归档只能查看报告
+                        var confirm = row.eventStatus != 'event_status_1' ? 'none' : 'inline-block'
                         //var needhelp = row.needhelp!='2'&&(row.eventStatus=='event_status_2'||row.eventStatus=='event_status_3')?'inline-block':'none'
-                        var needhelp = row.needhelp=='1'?'inline-block':'none'
+                        var needhelp = row.needhelp == '1' ? 'inline-block' : 'none'
                         //var helped = row.needhelp=='2'&&(row.eventStatus=='event_status_2'||row.eventStatus=='event_status_3')?'inline-block':'none'
                         //var helped = row.needhelp=='2'&&(row.eventStatus=='event_status_2'||row.eventStatus=='event_status_3')?'inline-block':'none'
-                        var done = row.eventStatus=='event_status_3'?'inline-block':'none'
-                        var finish = row.eventStatus=='event_status_4'?'inline-block':'none'
+                        var done = row.eventStatus == 'event_status_3' ? 'inline-block' : 'none'
+                        var finish = row.eventStatus == 'event_status_4' ? 'inline-block' : 'none'
                         var fillIn = finish
-                        var detail = row.eventStatus=='event_status_4'||row.eventStatus=='event_status_5'?'inline-block':'none'
-                        var assignTask = row.eventStatus=='event_status_2'||row.eventStatus=='event_status_3'?'inline-block':'none'
-                        var checkTask = row.eventStatus=='event_status_1'||row.eventStatus=='event_status_6'?'none':'inline-block'//不是新上报或无异常就显示
+                        var detail = row.eventStatus == 'event_status_4' || row.eventStatus == 'event_status_5' ? 'inline-block' : 'none'
+                        var assignTask = row.eventStatus == 'event_status_2' || row.eventStatus == 'event_status_3' ? 'inline-block' : 'none'
+                        var checkTask = row.eventStatus == 'event_status_1' || row.eventStatus == 'event_status_6' ? 'none' : 'inline-block'//不是新上报或无异常就显示
                         var actions = [];
                         //actions.push('<a style="display: ' + confirm + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="confirmReport(\'' + row.id + '\')"><i class="fa fa-edit"></i>确认事件</a> ');
+
                         actions.push('<a style="display: ' + confirm + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="drivingEvents(\'' + row.id + '\',\'' + row.reserveplanType + '\',\'confirm\')"><i class="fa fa-edit"></i>确认事件</a> ');
                         actions.push(' <a style="display: ' + needhelp + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="sendHelp(\'' + row.id + '\')"><i class="fa fa-edit"></i>派人帮助</a> ');
                         //actions.push(' <a style="display: ' + helped + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="alreadySend(\'' + row.id + '\')"><i class="fa fa-edit"></i>已派人</a> ');
@@ -246,281 +257,284 @@
                         return actions.join('');
                     }
                 }]
-            };
-            $.table.init(options);
-        });
-
-
-
-        /*function confirmReport(id) {
-            confirm_id = id
-            var options = {
-                title: '消息通知',
-                width: "680",
-                height: "480",
-                url: prefix + "/selectConfirmUserTree",
-                callBack: doSubmitConfirm
-            };
-            $.modal.openOptions(options);
-        }*/
-
-        //onclick="drivingEvents(visualization_event.ID,visualization_event.RESERVEPLAN_TYPE,'confirm')"
-
-        function drivingEvents(id,type,action){
-            type = "reserveplan_type_1"
-            confirmReport(id,type,action);
-        }
-        function confirmReport(eventId,eventType,action) {
-            confirm_id = eventId;
-            confirm_type = eventType;
-            confirm_action = action;
-            var options = {
-                title: '消息通知',
-                width: $(document).width(),
-                //url: "/visualization/confirm/selectUser",
-                url: prefix + "/selectUser",
-                callBack: doSubmitConfirm
-            };
-            //无异常不弹窗
-            if(confirm_action == "nomarl"){
-                var obj = new Object();
-                obj.id = confirm_id;
-                if(confirm_type == "reserveplan_type_1"){
-                    drivingFireEvents(confirm_action,obj);
-                }else{
-                    drivingOthersEvents(confirm_action,obj);
-                }
-                return;
-            }
-            $.modal.openOptions(options);
-        }
-        function doSubmitConfirm(index, layero){
-            var body = layer.getChildFrame('body', index);
-            var userIds = body.find('#selectorx').val();
-            if (userIds == null || userIds === "" || userIds.length === 0) {
-                $.modal.alertWarning("请至少选择一条记录");
-                return;
-            }
+        };
+        $.table.init(options);
+    });
+
+
+    /*function confirmReport(id) {
+        confirm_id = id
+        var options = {
+            title: '消息通知',
+            width: "680",
+            height: "480",
+            url: prefix + "/selectConfirmUserTree",
+            callBack: doSubmitConfirm
+        };
+        $.modal.openOptions(options);
+    }*/
+
+    //onclick="drivingEvents(visualization_event.ID,visualization_event.RESERVEPLAN_TYPE,'confirm')"
+
+    function drivingEvents(id, type, action) {
+        type = "reserveplan_type_1"
+        confirmReport(id, type, action);
+    }
+
+    function confirmReport(eventId, eventType, action) {
+        confirm_id = eventId;
+        confirm_type = eventType;
+        confirm_action = action;
+        var options = {
+            title: '消息通知',
+            width: $(document).width(),
+            //url: "/visualization/confirm/selectUser",
+            url: prefix + "/selectUser",
+            callBack: doSubmitConfirm
+        };
+        //无异常不弹窗
+        if (confirm_action == "nomarl") {
             var obj = new Object();
             obj.id = confirm_id;
-            obj.userIds = userIds.toString();
-            drivingFireEvents(confirm_action,obj);
-        }
-        function drivingFireEvents(action,obj) {
-            //var url = "/visualization/confirm";
-            var url = prefix;
-            if(action == 'nomarl'){
-                obj.eventStatus = 'event_status_6';
-                url += "/fireNomarl";
-            }else{
-                url += "/confirmFireEvent";
+            if (confirm_type == "reserveplan_type_1") {
+                drivingFireEvents(confirm_action, obj);
+            } else {
+                drivingOthersEvents(confirm_action, obj);
             }
-            ajaxPost(url,obj);
+            return;
         }
-        function drivingOthersEvents(action,obj) {
-            //var url = "/visualization/confirm";
-            var url = prefix;
-            if(action == 'nomarl'){
-                obj.eventStatus = 'event_status_6';
-                url += "/othersNomarl";
-            }else{
-                url += "/confirmOthersEvent";
-            }
-            ajaxPost(url,obj);
+        $.modal.openOptions(options);
+    }
+
+    function doSubmitConfirm(index, layero) {
+        var body = layer.getChildFrame('body', index);
+        var userIds = body.find('#selectorx').val();
+        if (userIds == null || userIds === "" || userIds.length === 0) {
+            $.modal.alertWarning("请至少选择一条记录");
+            return;
+        }
+        var obj = new Object();
+        obj.id = confirm_id;
+        obj.userIds = userIds.toString();
+        drivingFireEvents(confirm_action, obj);
+    }
+
+    function drivingFireEvents(action, obj) {
+        //var url = "/visualization/confirm";
+        var url = prefix;
+        if (action == 'nomarl') {
+            obj.eventStatus = 'event_status_6';
+            url += "/fireNomarl";
+        } else {
+            url += "/confirmFireEvent";
+        }
+        ajaxPost(url, obj);
+    }
+
+    function drivingOthersEvents(action, obj) {
+        //var url = "/visualization/confirm";
+        var url = prefix;
+        if (action == 'nomarl') {
+            obj.eventStatus = 'event_status_6';
+            url += "/othersNomarl";
+        } else {
+            url += "/confirmOthersEvent";
         }
-        function ajaxPost(url,obj){
+        ajaxPost(url, obj);
+    }
+
+    function ajaxPost(url, obj) {
+        $.ajax({
+            url: url,
+            method: 'post',
+            data: obj,
+            success: function (e) {
+                if (e.code == 0) {
+                    $.modal.msgSuccess(e.msg);
+                    setTimeout(function () {
+                        parent.window.location.reload();//父页面刷新
+                        window.location.reload();//页面刷新
+                    }, 1000);
+                } else {
+                    $.modal.msgError(e.msg);
+                }
+            }
+        });
+    }
+
+
+    /*function confirmReport(id) {
+        $.modal.confirm("您确定要确认事件吗?", function () {
+            var obj = new Object();
+            obj.id = id;
             $.ajax({
-                url:  url,
+                url: prefix + "/confirmEvent",
                 method: 'post',
                 data: obj,
                 success: function (e) {
-                    if(e.code == 0){
-                        $.modal.msgSuccess(e.msg);
-                        setTimeout(function(){
-                            parent.window.location.reload();//父页面刷新
-                            window.location.reload();//页面刷新
-                        },1000);
-                    }else{
-                        $.modal.msgError(e.msg);
-                    }
+                    window.location.reload();
+                    //layer.close(index);
                 }
             });
+        })
+    }
+    function doSubmitConfirm(index, layero){
+        var body = layer.getChildFrame('body', index);
+        $("#confirmIds").val(body.find('#confirmIds').val());
+        $("#confirmNames").val(body.find('#confirmNames').val());
+        if (body.find('#confirmIds').val().length == 0) {
+            $.modal.alertWarning("请至少选择一条记录");
+            return;
         }
-
-
-
-
-
-
-        /*function confirmReport(id) {
-            $.modal.confirm("您确定要确认事件吗?", function () {
-                var obj = new Object();
-                obj.id = id;
-                $.ajax({
-                    url: prefix + "/confirmEvent",
-                    method: 'post',
-                    data: obj,
-                    success: function (e) {
-                        window.location.reload();
-                        //layer.close(index);
-                    }
-                });
-            })
+        if (body.find('#messageType').val().length == 0) {
+            $.modal.alertWarning("请至少选择一种通知方式");
+            return;
         }
-        function doSubmitConfirm(index, layero){
-            var body = layer.getChildFrame('body', index);
-            $("#confirmIds").val(body.find('#confirmIds').val());
-            $("#confirmNames").val(body.find('#confirmNames').val());
-            if (body.find('#confirmIds').val().length == 0) {
-                $.modal.alertWarning("请至少选择一条记录");
-                return;
-            }
-            if (body.find('#messageType').val().length == 0) {
-                $.modal.alertWarning("请至少选择一种通知方式");
-                return;
+        var obj = new Object();
+        obj.id = confirm_id;
+        obj.userIds = body.find('#confirmIds').val();
+        obj.messageType = body.find('#messageType').val();
+        //obj.messageType = "event_notice_fun_1event_notice_fun_2event_notice_fun_3event_notice_fun_4";
+        $.ajax({
+            url : prefix + "/confirmEvent",
+            method : 'post',
+            data : obj,
+            success : function (e) {
+                window.location.reload();
+                //layer.close(index);
             }
+        });
+    }*/
+
+    /*function sendHelp(id) {
+        var url = prefix + "/assignHelp/"+id;
+        $.modal.openTab("【派人帮助】", url);
+        /*$.modal.confirm("您确认要派人帮助吗?", function() {
             var obj = new Object();
-            obj.id = confirm_id;
-            obj.userIds = body.find('#confirmIds').val();
-            obj.messageType = body.find('#messageType').val();
-            //obj.messageType = "event_notice_fun_1event_notice_fun_2event_notice_fun_3event_notice_fun_4";
+            obj.id = id;
+            obj.needhelp = '2';
             $.ajax({
-                url : prefix + "/confirmEvent",
+                url : prefix + "/edit",
                 method : 'post',
                 data : obj,
                 success : function (e) {
                     window.location.reload();
-                    //layer.close(index);
                 }
             });
-        }*/
-
-        /*function sendHelp(id) {
-            var url = prefix + "/assignHelp/"+id;
-            $.modal.openTab("【派人帮助】", url);
-            /*$.modal.confirm("您确认要派人帮助吗?", function() {
-                var obj = new Object();
-                obj.id = id;
-                obj.needhelp = '2';
-                $.ajax({
-                    url : prefix + "/edit",
-                    method : 'post',
-                    data : obj,
-                    success : function (e) {
-                        window.location.reload();
-                    }
-                });
-            })**
-        }*/
-
-        function doSubmit(index, layero){
-            var body = layer.getChildFrame('body', index);
-            $("#helpIds").val(body.find('#helpIds').val());
-            $("#helpNames").val(body.find('#helpNames').val());
-            if (body.find('#helpIds').val().length == 0) {
-                $.modal.alertWarning("请至少选择一条记录");
-                return;
-            }
-            if (body.find('#messageType').val().length == 0) {
-                $.modal.alertWarning("请至少选择一种通知方式");
-                return;
+        })**
+    }*/
+
+    function doSubmit(index, layero) {
+        var body = layer.getChildFrame('body', index);
+        $("#helpIds").val(body.find('#helpIds').val());
+        $("#helpNames").val(body.find('#helpNames').val());
+        if (body.find('#helpIds').val().length == 0) {
+            $.modal.alertWarning("请至少选择一条记录");
+            return;
+        }
+        if (body.find('#messageType').val().length == 0) {
+            $.modal.alertWarning("请至少选择一种通知方式");
+            return;
+        }
+        var obj = new Object();
+        obj.userIds = body.find('#helpIds').val();
+        obj.id = help_id;
+        obj.messageType = body.find('#messageType').val();
+        $.ajax({
+            url: prefix + "/help",
+            method: 'post',
+            data: obj,
+            success: function (e) {
+                window.location.reload();
+                //layer.close(index);
             }
+        });
+    }
+
+    function sendHelp(id) {
+        help_id = id
+        var options = {
+            title: '指派帮助人',
+            width: "680",
+            height: "480",
+            url: prefix + "/selectHelpUserTree",
+            callBack: doSubmit
+        };
+        $.modal.openOptions(options);
+    }
+
+    function alreadySend(id) {
+        $.modal.alert("已派人帮助,如需再次派人请先在APP请求帮助")
+    }
+
+    function processReport(id) {
+        var url = prefix + "/processReport/" + id;
+        $.modal.openTab("【事件处理过程】", url);
+    }
+
+    function done(id) {
+        $.modal.confirm("您确认要办结吗?", function () {
             var obj = new Object();
-            obj.userIds = body.find('#helpIds').val();
-            obj.id = help_id;
-            obj.messageType = body.find('#messageType').val();
+            obj.id = id;
+            obj.eventStatus = 'event_status_4';
             $.ajax({
-                url : prefix + "/help",
-                method : 'post',
-                data : obj,
-                success : function (e) {
+                url: prefix + "/edit",
+                method: 'post',
+                data: obj,
+                success: function (e) {
                     window.location.reload();
-                    //layer.close(index);
                 }
             });
-        }
-
-        function sendHelp(id) {
-            help_id = id
-            var options = {
-                title: '指派帮助人',
-                width: "680",
-                height: "480",
-                url: prefix + "/selectHelpUserTree",
-                callBack: doSubmit
-            };
-            $.modal.openOptions(options);
-        }
-
-        function alreadySend(id) {
-            $.modal.alert("已派人帮助,如需再次派人请先在APP请求帮助")
-        }
-
-        function processReport(id) {
-            var url = prefix + "/processReport/"+id;
-            $.modal.openTab("【事件处理过程】", url);
-        }
+        })
+    }
 
-        function done(id) {
-            $.modal.confirm("您确认要办结吗?", function() {
-                var obj = new Object();
-                obj.id = id;
-                obj.eventStatus = 'event_status_4';
-                $.ajax({
-                    url: prefix + "/edit",
-                    method: 'post',
-                    data: obj,
-                    success: function (e) {
-                        window.location.reload();
-                    }
-                });
-            })
-        }
-
-        function finishReport(id) {
-            $.modal.confirm("您确认要结束归档吗?", function() {
-                var obj = new Object();
-                obj.id = id;
-                obj.eventStatus = 'event_status_5';
-                $.ajax({
-                    url: prefix + "/edit",
-                    method: 'post',
-                    data: obj,
-                    success: function (e) {
-                        window.location.reload();
-                    }
-                });
-            })
-        }
-
-        function fillOutReport(id) {
-            var url = prefix + "/report/"+id;
-            $.modal.openTab("填写【火场资料】报告", url);
-        }
-        function checkReport(id) {
-            var url = prefix + "/checkReport/"+id+"";
-            $.modal.openTab("查看【火场资料】报告", url);
-        }
-        function assignTask(id) {
-            var url = prefix + "/assignTask/"+id;
-            $.modal.open("【指派任务】", url);
-        }
-        function checkTask(id) {
-            var url = prefix + "/checkTask/"+id;
-            $.modal.openTab("【查看任务】", url);
-        }
-
-        function add() {
-            var url = prefix + "/add";
-            //$.modal.openTab("新增【火险管理】", url);
-            $.modal.open("新增【火险管理】", url);
-        }
-
-        function edit(id) {
-            var url = prefix + "/edit/" + id;
-            //$.modal.openTab("修改【火险管理】", url);
-            $.modal.open("修改【火险管理】", url);
-        }
-    </script>
+    function finishReport(id) {
+        $.modal.confirm("您确认要结束归档吗?", function () {
+            var obj = new Object();
+            obj.id = id;
+            obj.eventStatus = 'event_status_5';
+            $.ajax({
+                url: prefix + "/edit",
+                method: 'post',
+                data: obj,
+                success: function (e) {
+                    window.location.reload();
+                }
+            });
+        })
+    }
+
+    function fillOutReport(id) {
+        var url = prefix + "/report/" + id;
+        $.modal.openTab("填写【火场资料】报告", url);
+    }
+
+    function checkReport(id) {
+        var url = prefix + "/checkReport/" + id + "";
+        $.modal.openTab("查看【火场资料】报告", url);
+    }
+
+    function assignTask(id) {
+        var url = prefix + "/assignTask/" + id;
+        $.modal.open("【指派任务】", url);
+    }
+
+    function checkTask(id) {
+        var url = prefix + "/checkTask/" + id;
+        $.modal.openTab("【查看任务】", url);
+    }
+
+    function add() {
+        var url = prefix + "/add";
+        //$.modal.openTab("新增【火险管理】", url);
+        $.modal.open("新增【火险管理】", url);
+    }
+
+    function edit(id) {
+        var url = prefix + "/edit/" + id;
+        //$.modal.openTab("修改【火险管理】", url);
+        $.modal.open("修改【火险管理】", url);
+    }
+</script>
 </body>
 </html>

+ 32 - 26
mybusiness/src/main/resources/templates/business/manager/othersmanager/index.html

@@ -159,10 +159,10 @@
                         return $.table.selectDictLabel(report_typeDict, value);
                     }
                 },
-                {
-                    field: 'reportContent',
-                    title: '事件内容描述'
-                },
+                // {
+                //     field: 'reportContent',
+                //     title: '事件内容描述'
+                // },
                 {
                     field: 'reportTime',
                     title: '上报时间'
@@ -171,14 +171,14 @@
                     field: 'reportor',
                     title: '上报人'
                 },
-                /*{
+                {
                     field: 'longitude',
-                    title: '${comment}'
+                    title: '经度'
                 },
                 {
                     field: 'latitude',
-                    title: '${comment}'
-                },*/
+                    title: '纬度'
+                },
                 {
                     field: 'eventStatus',
                     title: '事件状态',
@@ -194,12 +194,16 @@
                     }
                 },
                 {
-                    field: 'reserveplanType',
-                    title: '预案类型',
-                    formatter: function(value, row, index) {
-                        return $.table.selectDictLabel(reserveplan_typeDict, value);
-                    }
+                    field: 'eventStatus',
+                    title: '事件状态'
                 },
+                // {
+                //     field: 'reserveplanType',
+                //     title: '预案类型',
+                //     formatter: function(value, row, index) {
+                //         return $.table.selectDictLabel(reserveplan_typeDict, value);
+                //     }
+                // },
                 /*{
                     field: 'deptId',
                     title: '${comment}'
@@ -208,25 +212,27 @@
                     title: '操作',
                     align: 'center',
                     formatter: function(value, row, index) {
-                        var confirm = row.eventStatus!='event_status_1'?'none':'inline-block'
+                        var confirm = row.eventStatus != 'event_status_1' ? 'none' : 'inline-block'
                         //var needhelp = row.needhelp!='2'&&(row.eventStatus=='event_status_2'||row.eventStatus=='event_status_3')?'inline-block':'none'
-                        var needhelp = row.needhelp=='1'?'inline-block':'none'
+                        var needhelp = row.needhelp == '1' ? 'inline-block' : 'none'
                         //var helped = row.needhelp=='2'&&(row.eventStatus=='event_status_2'||row.eventStatus=='event_status_3')?'inline-block':'none'
-                        var done = row.eventStatus=='event_status_3'?'inline-block':'none'
-                        var finish = row.eventStatus=='event_status_4'?'inline-block':'none'
-                        //var finish = row.eventStatus=='event_status_4'?'none':'inline-block'
+                        var done = row.eventStatus == 'event_status_3' ? 'inline-block' : 'none'
+                        var finish = row.eventStatus == 'event_status_4' ? 'inline-block' : 'none'
+                        var fillIn = finish
+                        var detail = row.eventStatus == 'event_status_4' || row.eventStatus == 'event_status_5' ? 'inline-block' : 'none'
+                        var assignTask = row.eventStatus == 'event_status_2' || row.eventStatus == 'event_status_3' ? 'inline-block' : 'none'
+                        var checkTask = row.eventStatus == 'event_status_1' || row.eventStatus == 'event_status_6' ? 'none' : 'inline-block'//不是新上报或无异常就显示
                         var actions = [];
                         //actions.push('<a style="display: ' + confirm + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="confirmReport(\'' + row.id + '\')"><i class="fa fa-edit"></i>确认事件</a> ');
                         actions.push('<a style="display: ' + confirm + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="drivingEvents(\'' + row.id + '\',\'' + row.reserveplanType + '\',\'confirm\')"><i class="fa fa-edit"></i>确认事件</a> ');
                         actions.push(' <a style="display: ' + needhelp + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="sendHelp(\'' + row.id + '\')"><i class="fa fa-edit"></i>派人帮助</a> ');
                         //actions.push(' <a style="display: ' + helped + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="alreadySend(\'' + row.id + '\')"><i class="fa fa-edit"></i>已派人</a> ');
-                        actions.push(' <a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="processReport('+'\'' + row.id + '\')"><i class="fa fa-edit"></i>查看过程</a> ');
                         actions.push(' <a style="display: ' + done + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="done(\'' + row.id + '\')"><i class="fa fa-edit"></i>确认办结</a> ');
                         actions.push(' <a style="display: ' + finish + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="finishReport(\'' + row.id + '\')"><i class="fa fa-edit"></i>结束归档</a> ');
-                        /*actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="fillOutReport(\'' + row.id + '\')"><i class="fa fa-edit"></i>填写报告</a> ');
-                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="checkReport(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看报告</a> ');
-                        */actions.push(' <a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="assignTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>指派任务</a>');
-                        actions.push(' <a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="checkTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看任务</a>')
+                        actions.push(' <a style="display: ' + fillIn + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="fillOutReport(\'' + row.id + '\')"><i class="fa fa-edit"></i>填写报告</a> ');
+                        actions.push(' <a style="display: ' + detail + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="checkReport(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看报告</a> ');
+                        actions.push(' <a style="display: ' + assignTask + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="assignTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>指派任务</a>');
+                        actions.push(' <a style="display: ' + checkTask + '" class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="checkTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看任务</a>');
                         actions.push(' <a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                         actions.push(' <a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                         return actions.join('');
@@ -239,7 +245,7 @@
     //onclick="drivingEvents(visualization_event.ID,visualization_event.RESERVEPLAN_TYPE,'confirm')"
 
     function drivingEvents(id,type,action){
-        //type = "reserveplan_type_1"
+        type = "reserveplan_type_1"
         //alert(type)
         confirmReport(id,type,action);
     }
@@ -277,8 +283,8 @@
         var obj = new Object();
         obj.id = confirm_id;
         obj.userIds = userIds.toString();
-        drivingFireEvents(confirm_action,obj);
-        //drivingOthersEvents(confirm_action,obj);
+        //drivingFireEvents(confirm_action,obj);
+        drivingOthersEvents(confirm_action,obj);
     }
     function drivingFireEvents(action,obj) {
         //var url = "/visualization/confirm";

+ 17 - 10
mybusiness/src/main/resources/templates/business/manager/taskmanager/add.html

@@ -24,19 +24,19 @@
                     <input name="delFlag" class="form-control" type="text">
                 </div>
             </div>-->
-            <div class="form-group">    
+            <div class="form-group">
                 <label class="col-sm-3 control-label">任务名称:</label>
                 <div class="col-sm-8">
                     <input maxlength="100" name="name" class="form-control" type="text">
                 </div>
             </div>
-            <div class="form-group">    
+            <div class="form-group">
                 <label class="col-sm-3 control-label">任务内容:</label>
                 <div class="col-sm-8">
                     <textarea  name="content" class="form-control" ></textarea>
                 </div>
             </div>
-            <div class="form-group">    
+            <div class="form-group">
                 <label class="col-sm-3 control-label">任务开始时间:</label>
                 <div class="col-sm-8">
                     <div class="input-group date">
@@ -45,7 +45,7 @@
                     </div>
                 </div>
             </div>
-            <div class="form-group">    
+            <div class="form-group">
                 <label class="col-sm-3 control-label">任务结束时间:</label>
                 <div class="col-sm-8">
                     <div class="input-group date">
@@ -62,7 +62,7 @@
                     <input name="chargerId" class="form-control" type="text">
                 </div>
             </div>-->
-            <div class="form-group">    
+            <div class="form-group">
                 <label class="col-sm-3 control-label">负责人姓名:</label>
                 <div class="col-sm-8">
                     <!--<input name="chargerName" class="form-control" type="text" onclick='sendUser(" + row.id + ")'>-->
@@ -70,7 +70,7 @@
                     <input id="chargerNames" name="chargerNames" class="form-control" type="text" onclick="sendUser()">
                 </div>
             </div>
-            <div class="form-group">    
+            <div class="form-group">
                 <label class="col-sm-3 control-label">任务状态:</label>
                 <div class="col-sm-8">
                     <select name="taskStatus" class="form-control m-b" th:with="type=${@dict.getType('task_status')}">
@@ -83,7 +83,7 @@
                     <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
                 </div>
             </div>
-            <div class="form-group">    
+            <div class="form-group">
                 <label class="col-sm-3 control-label">任务类型:</label>
                 <div class="col-sm-8">
                     <select name="taskType" class="form-control m-b" th:with="type=${@dict.getType('task_type')}">
@@ -101,13 +101,13 @@
                     <input name="senderId" class="form-control" type="text">
                 </div>
             </div>
-            <div class="form-group">    
+            <div class="form-group">
                 <label class="col-sm-3 control-label">任务派发人姓名:</label>
                 <div class="col-sm-8">
                     <input name="senderName" class="form-control" type="text">
                 </div>
             </div>-->
-            <div class="form-group">    
+            <div class="form-group">
                 <label class="col-sm-3 control-label">任务派发时间:</label>
                 <div class="col-sm-8">
                     <div class="input-group date">
@@ -174,6 +174,13 @@
 
         function doSubmit(index, layero){
             var body = layer.getChildFrame('body', index);
+
+            // var checkboxs = $('input[name="btSelectItem"]:checked')
+            // console.log("***",checkboxs)
+            // for(var i=0;i<checkboxs.length;i++){
+            //     console.log("^^^^",checkboxs[i])
+            // }
+
              $("#chargerIds").val(body.find('#chargerIds').val());
              $("#chargerNames").val(body.find('#chargerNames').val());
             if (body.find('#chargerIds').val().length == 0) {
@@ -184,4 +191,4 @@
         }
     </script>
 </body>
-</html>
+</html>