|
@@ -0,0 +1,444 @@
|
|
|
+<!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('【事件信息(历史火情)】列表')" />
|
|
|
+</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 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>
|
|
|
+ <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
|
|
+ <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</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>
|
|
|
+ </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 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());
|
|
|
+ }
|
|
|
+
|
|
|
+ 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 + "/showHistoryFireList",
|
|
|
+ createUrl: prefix + "/add",
|
|
|
+ updateUrl: prefix + "/edit/{id}",
|
|
|
+ removeUrl: prefix + "/remove",
|
|
|
+ exportUrl: prefix + "/export",
|
|
|
+ modalName: "【事件信息(历史火情)】",
|
|
|
+ columns: [{
|
|
|
+ checkbox: true
|
|
|
+ },
|
|
|
+ /*{
|
|
|
+ field: 'status',
|
|
|
+ title: '${comment}'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'remark',
|
|
|
+ title: '${comment}'
|
|
|
+ },*/
|
|
|
+ {
|
|
|
+ field: 'name',
|
|
|
+ title: '事件名称',
|
|
|
+ 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) {
|
|
|
+ return $.table.selectDictLabel(report_typeDict, value);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /*{
|
|
|
+ field: 'reportContent',
|
|
|
+ title: '事件内容描述'
|
|
|
+ },*/
|
|
|
+ {
|
|
|
+ field: 'reportTime',
|
|
|
+ title: '上报时间'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'reportor',
|
|
|
+ title: '上报人'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'longitude',
|
|
|
+ title: '经度'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'latitude',
|
|
|
+ title: '纬度'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'eventStatus',
|
|
|
+ title: '事件状态',
|
|
|
+ formatter: function(value, row, index) {
|
|
|
+ return $.table.selectDictLabel(event_statusDict, value);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'eventLevel',
|
|
|
+ title: '事件等级',
|
|
|
+ formatter: function(value, row, index) {
|
|
|
+ return $.table.selectDictLabel(reserveplan_levelDict, value);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /*{
|
|
|
+ field: 'deptId',
|
|
|
+ title: '${comment}'
|
|
|
+ },*/
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ align: 'center',
|
|
|
+ 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 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 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 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('');
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ $.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;
|
|
|
+ }
|
|
|
+ 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";
|
|
|
+ }
|
|
|
+ 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: prefix + "/confirmEvent",
|
|
|
+ method: 'post',
|
|
|
+ data: obj,
|
|
|
+ success: function (e) {
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ 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 = 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;
|
|
|
+ }
|
|
|
+ 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.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>
|
|
|
+</body>
|
|
|
+</html>
|