1.预警、超时 新加字段 部门ID
2.事件受理 可修改事件
This commit is contained in:
parent
c33550ba79
commit
6564da0af1
@ -32,10 +32,8 @@ public class ReportVO {
|
|||||||
@CheckEmptyAnnotation(name = "事发位置纬度")
|
@CheckEmptyAnnotation(name = "事发位置纬度")
|
||||||
private String reportLat;
|
private String reportLat;
|
||||||
@ApiModelProperty(name = "bGId", value = "网格编码(必填)",required=true)
|
@ApiModelProperty(name = "bGId", value = "网格编码(必填)",required=true)
|
||||||
@CheckEmptyAnnotation(name = "所在网格")
|
|
||||||
private String bGId;
|
private String bGId;
|
||||||
@ApiModelProperty(name = "bGName", value = "网格名称(必填)",required=true)
|
@ApiModelProperty(name = "bGName", value = "网格名称(必填)",required=true)
|
||||||
@CheckEmptyAnnotation(name = "所在网格")
|
|
||||||
private String bGName;
|
private String bGName;
|
||||||
|
|
||||||
@ApiModelProperty(name = "caseTypeCode", value = "事件大分类编码(必填)",required=true)
|
@ApiModelProperty(name = "caseTypeCode", value = "事件大分类编码(必填)",required=true)
|
||||||
|
@ -264,7 +264,6 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ
|
|||||||
if(checkCount > 0){
|
if(checkCount > 0){
|
||||||
throw new SaveException("编码异常,请重新上报");
|
throw new SaveException("编码异常,请重新上报");
|
||||||
}
|
}
|
||||||
|
|
||||||
return reportCode;
|
return reportCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,7 +297,7 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ
|
|||||||
private List<Map<String,Object>> setAcceptedUser(String areaCode){
|
private List<Map<String,Object>> setAcceptedUser(String areaCode){
|
||||||
List<Map<String, Object>> list = remoteBaseService.getAreaCaseAdmin(areaCode);
|
List<Map<String, Object>> list = remoteBaseService.getAreaCaseAdmin(areaCode);
|
||||||
if(list.size() == 0){
|
if(list.size() == 0){
|
||||||
throw new SearchException("为获取到事件受理人员");
|
throw new SearchException("未获取到事件受理人员");
|
||||||
}
|
}
|
||||||
//自动找上级管理员逻辑 暂时取消
|
//自动找上级管理员逻辑 暂时取消
|
||||||
/*if(list.size() == 0){
|
/*if(list.size() == 0){
|
||||||
|
@ -3,7 +3,11 @@ package cn.com.tenlion.service.timeout.impl;
|
|||||||
import cn.com.tenlion.pojo.vos.taskmsg.SocketVO;
|
import cn.com.tenlion.pojo.vos.taskmsg.SocketVO;
|
||||||
import cn.com.tenlion.service.remotebase.IRemoteBaseService;
|
import cn.com.tenlion.service.remotebase.IRemoteBaseService;
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
|
import ink.wgink.interfaces.department.IDepartmentUserBaseService;
|
||||||
|
import ink.wgink.interfaces.user.IUserBaseService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.dtos.department.DepartmentUserDTO;
|
||||||
|
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.util.date.DateUtil;
|
import ink.wgink.util.date.DateUtil;
|
||||||
@ -40,7 +44,8 @@ public class TimeoutServiceImpl extends DefaultBaseService implements ITimeoutSe
|
|||||||
private ProcessEngine processEngine;
|
private ProcessEngine processEngine;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IRemoteBaseService remoteBaseService;
|
private IRemoteBaseService remoteBaseService;
|
||||||
|
@Autowired
|
||||||
|
private IDepartmentUserBaseService departmentUserBaseService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -56,6 +61,7 @@ public class TimeoutServiceImpl extends DefaultBaseService implements ITimeoutSe
|
|||||||
String timeoutId = UUIDUtil.getUUID();
|
String timeoutId = UUIDUtil.getUUID();
|
||||||
Map<String, Object> params = HashMapUtil.beanToMap(timeoutVO);
|
Map<String, Object> params = HashMapUtil.beanToMap(timeoutVO);
|
||||||
params.put("timeoutId", timeoutId);
|
params.put("timeoutId", timeoutId);
|
||||||
|
params.put("taskDeptId", this.setUserDeptId(timeoutVO.getTaskUserId()));
|
||||||
params.put("status", "0");
|
params.put("status", "0");
|
||||||
params.put("creator", "0");
|
params.put("creator", "0");
|
||||||
params.put("gmtCreate", DateUtil.getTime());
|
params.put("gmtCreate", DateUtil.getTime());
|
||||||
@ -75,6 +81,19 @@ public class TimeoutServiceImpl extends DefaultBaseService implements ITimeoutSe
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String setUserDeptId(String userId){
|
||||||
|
List<String> list = Arrays.asList(userId.split(","));
|
||||||
|
if(list.size() <= 0){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
List<DepartmentUserDTO> departmentUserDTOS = departmentUserBaseService.listByUserIds(list);
|
||||||
|
if(departmentUserDTOS.size() <= 0){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return departmentUserDTOS.get(0).getDepartmentId();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void updateByTaskId(String taskId){
|
public void updateByTaskId(String taskId){
|
||||||
Map<String,Object> poParams = new HashMap<>();
|
Map<String,Object> poParams = new HashMap<>();
|
||||||
|
@ -8,7 +8,11 @@ import cn.com.tenlion.service.remotebase.IRemoteBaseService;
|
|||||||
import cn.com.tenlion.util.UserUtil;
|
import cn.com.tenlion.util.UserUtil;
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
|
import ink.wgink.interfaces.department.IDepartmentUserBaseService;
|
||||||
|
import ink.wgink.interfaces.user.IUserBaseService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.dtos.department.DepartmentUserDTO;
|
||||||
|
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.util.date.DateUtil;
|
import ink.wgink.util.date.DateUtil;
|
||||||
@ -47,6 +51,8 @@ public class WarningServiceImpl extends DefaultBaseService implements IWarningSe
|
|||||||
private ProcessEngine processEngine;
|
private ProcessEngine processEngine;
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserUtil userUtil;
|
private UserUtil userUtil;
|
||||||
|
@Autowired
|
||||||
|
private IDepartmentUserBaseService departmentUserBaseService;
|
||||||
|
|
||||||
|
|
||||||
public void saveSystem(WarningVO warningVO){
|
public void saveSystem(WarningVO warningVO){
|
||||||
@ -71,6 +77,7 @@ public class WarningServiceImpl extends DefaultBaseService implements IWarningSe
|
|||||||
if(WarningLevelEnum.YELLOW.getValue().equals(level)){
|
if(WarningLevelEnum.YELLOW.getValue().equals(level)){
|
||||||
String warningId = UUIDUtil.getUUID();
|
String warningId = UUIDUtil.getUUID();
|
||||||
Map<String, Object> params = HashMapUtil.beanToMap(warningVO);
|
Map<String, Object> params = HashMapUtil.beanToMap(warningVO);
|
||||||
|
params.put("taskDeptId",this.getUserDeptId(warningVO.getTaskUserId()));
|
||||||
params.put("warningId", warningId);
|
params.put("warningId", warningId);
|
||||||
params.put("warningStatus","0");
|
params.put("warningStatus","0");
|
||||||
params.put("warningType","system");
|
params.put("warningType","system");
|
||||||
@ -111,6 +118,20 @@ public class WarningServiceImpl extends DefaultBaseService implements IWarningSe
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getUserDeptId(String userId){
|
||||||
|
List<String> list = Arrays.asList(userId.split(","));
|
||||||
|
if(list.size() <= 0){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
List<DepartmentUserDTO> departmentUserDTOS = departmentUserBaseService.listByUserIds(list);
|
||||||
|
if(departmentUserDTOS.size() <= 0){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return departmentUserDTOS.get(0).getDepartmentId();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void updateByTaskId(String taksId){
|
public void updateByTaskId(String taksId){
|
||||||
Map<String,Object> countParams = new HashMap<>();
|
Map<String,Object> countParams = new HashMap<>();
|
||||||
countParams.put("taskId",taksId);
|
countParams.put("taskId",taksId);
|
||||||
|
@ -327,12 +327,12 @@
|
|||||||
<!--获取每个节点最新的配置-->
|
<!--获取每个节点最新的配置-->
|
||||||
<select id="listConfig" parameterType="map" resultMap="ruleWarningDTO">
|
<select id="listConfig" parameterType="map" resultMap="ruleWarningDTO">
|
||||||
SELECT
|
SELECT
|
||||||
rule_warning_id,
|
any_value(rule_warning_id) AS rule_warning_id,
|
||||||
node_id,
|
any_value(node_id) AS node_id,
|
||||||
yellow_rule_time_type,
|
any_value(yellow_rule_time_type) AS yellow_rule_time_type,
|
||||||
yellow_rule_time,
|
any_value(yellow_rule_time) AS yellow_rule_time,
|
||||||
red_rule_time_type,
|
any_value(red_rule_time_type) AS red_rule_time_type,
|
||||||
red_rule_time
|
any_value(red_rule_time) AS red_rule_time
|
||||||
FROM(
|
FROM(
|
||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
task_name,
|
task_name,
|
||||||
task_user_id,
|
task_user_id,
|
||||||
task_user_name,
|
task_user_name,
|
||||||
|
task_dept_id,
|
||||||
status,
|
status,
|
||||||
creator,
|
creator,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
@ -64,6 +65,7 @@
|
|||||||
#{taskName},
|
#{taskName},
|
||||||
#{taskUserId},
|
#{taskUserId},
|
||||||
#{taskUserName},
|
#{taskUserName},
|
||||||
|
#{taskDeptId},
|
||||||
#{status},
|
#{status},
|
||||||
#{creator},
|
#{creator},
|
||||||
#{gmtCreate},
|
#{gmtCreate},
|
||||||
|
@ -89,6 +89,7 @@
|
|||||||
task_id,
|
task_id,
|
||||||
task_user_id,
|
task_user_id,
|
||||||
task_user_name,
|
task_user_name,
|
||||||
|
task_dept_id,
|
||||||
warning_type,
|
warning_type,
|
||||||
warning_level,
|
warning_level,
|
||||||
warning_status,
|
warning_status,
|
||||||
@ -105,6 +106,7 @@
|
|||||||
#{taskId},
|
#{taskId},
|
||||||
#{taskUserId},
|
#{taskUserId},
|
||||||
#{taskUserName},
|
#{taskUserName},
|
||||||
|
#{taskDeptId},
|
||||||
#{warningType},
|
#{warningType},
|
||||||
#{warningLevel},
|
#{warningLevel},
|
||||||
#{warningStatus},
|
#{warningStatus},
|
||||||
|
717
src/main/resources/static/route/report/update.html
Normal file
717
src/main/resources/static/route/report/update.html
Normal file
@ -0,0 +1,717 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<base href="/case/">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||||
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="assets/layuiadmin/modules/cascader/cascader.css">
|
||||||
|
<style>
|
||||||
|
.el-input__inner{border-top-left-radius: 0;border-bottom-left-radius: 0;padding:0px 10px}
|
||||||
|
.el-cascader{line-height: 38px;padding-left:0;border:none}
|
||||||
|
.el-cascader input{height: 38px;}
|
||||||
|
.layui-form-pane .layui-form-label{width:116px !important;}
|
||||||
|
.layui-form-pane .layui-input-block{margin-left: 116px !important;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header">
|
||||||
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
|
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||||
|
<a href="javascript:void(0);"><cite>修改内容</cite></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">事件地区</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input readonly type="text" class="layui-input" name="reportAreaName" id="reportAreaName">
|
||||||
|
<!--<input id="areaSelect" class="layui-input" placeholder="请选择地区名称">
|
||||||
|
<input type="hidden" id="reportAreaName" name="reportAreaName" lay-verify="required">
|
||||||
|
<input type="hidden" id="reportAreaCode" name="reportAreaCode" >-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row layui-col-space10">
|
||||||
|
<div class="layui-col-md6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">所在网格</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="hidden" id="bGId" name="bGId">
|
||||||
|
<input type="text" readonly id="bGName" name="bGName" class="layui-input" value="" placeholder="请输入所在网格" maxlength="15" lay-verify="required">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md6">
|
||||||
|
<div class="layui-form-item" pane>
|
||||||
|
<label class="layui-form-label">是否自处理</label>
|
||||||
|
<div class="layui-input-block" >
|
||||||
|
<input type="radio" name="isSelf" value="0" title="否" checked >
|
||||||
|
<!--<input type="radio" name="isSelf" value="1" title="是" >-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row layui-col-space10">
|
||||||
|
<div class="layui-col-md6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">事件类型</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input id="caseTypeSelect" readonly class="layui-input" id="caseTypeName" name="caseTypeName" placeholder="请选择事件类型">
|
||||||
|
<input type="hidden" id="caseTypeName1" name="caseTypeName1" lay-verify="required">
|
||||||
|
<input type="hidden" id="caseTypeCode1" name="caseTypeCode1" >
|
||||||
|
<input type="hidden" id="caseTypeName2" name="caseTypeName2" lay-verify="required">
|
||||||
|
<input type="hidden" id="caseTypeCode2" name="caseTypeCode2" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">部件名称</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="casePartsObjName" name="casePartsObjName" class="layui-input" value="" placeholder="请输入部件名称" maxlength="255" readonly="readonly">
|
||||||
|
<input type="hidden" id="casePartsObjId" name="casePartsObjId"><!--部件标识码-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label" style="width:100%!important;">事件说明</label>
|
||||||
|
<div class="layui-input-block" style="margin-left: 0!important;">
|
||||||
|
<textarea id="reportContent" name="reportContent" class="layui-textarea" placeholder="请输入事件说明"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">事发位置</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="reportAddress" name="reportAddress" class="layui-input" value="" placeholder="请输入事发位置" maxlength="500" lay-verify="required">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row layui-col-space10">
|
||||||
|
<div class="layui-col-md6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">事发位置经度</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="reportLng" name="reportLng" class="layui-input" value="" placeholder="地图选点获得" maxlength="255" readonly="readonly" lay-verify="required">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">事发位置纬度</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="reportLat" name="reportLat" class="layui-input" value="" placeholder="地图选点获得" maxlength="255" readonly="readonly" lay-verify="required">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md12 layui-col-sm12" style="padding: 0 0px;">
|
||||||
|
<div id="mapContainer" style="width: 100%;height: 350px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label" style="width:100%!important;">事件图片</label>
|
||||||
|
<div class="layui-input-block" style="margin-left: 0!important;">
|
||||||
|
<input type="hidden" id="reportPhotos" name="reportPhotos">
|
||||||
|
<div class="layui-btn-container" id="reportPhotosFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||||
|
<script id="reportPhotosFileDownload" type="text/html">
|
||||||
|
{{# var fileName = 'reportPhotos'; }}
|
||||||
|
{{# if(d[fileName].length > 0) { }}
|
||||||
|
{{# var files = d[fileName];}}
|
||||||
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||||
|
<div class="upload-image-box">
|
||||||
|
<span class="upload-image-span">
|
||||||
|
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||||||
|
</span>
|
||||||
|
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="reportPhotosRemoveFile">
|
||||||
|
<i class="fa fa-trash-o"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{# } }}
|
||||||
|
{{# } }}
|
||||||
|
{{# if(d[fileName].length < 9) { }}
|
||||||
|
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||||||
|
<a href="javascript:void(0);" lay-form-button data-explain="事件图片" data-name="reportPhotos" lay-filter="reportPhotosUploadFile">
|
||||||
|
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{# } }}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label" style="width:100%!important;">事件音频</label>
|
||||||
|
<div class="layui-input-block" style="margin-left: 0!important;">
|
||||||
|
<input type="hidden" id="reportAudio" name="reportAudio">
|
||||||
|
<div class="layui-btn-container" id="reportAudioFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||||
|
<script id="reportAudioFileDownload" type="text/html">
|
||||||
|
{{# var fileName = 'reportAudio' }}
|
||||||
|
{{# if(d[fileName] != '') { }}
|
||||||
|
{{# var files = d[fileName];}}
|
||||||
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||||
|
<div class="upload-audio-box">
|
||||||
|
<audio src="route/file/download/true/{{item.fileId}}" controls="controls">您的浏览器不支持音频 标签。</audio>
|
||||||
|
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-audio" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="reportAudioRemoveFile">
|
||||||
|
<i class="fa fa-trash-o"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{# } }}
|
||||||
|
{{# } }}
|
||||||
|
{{# if(d[fileName].length < 1) { }}
|
||||||
|
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||||||
|
<a href="javascript:void(0);" lay-form-button data-explain="事件音频" data-name="reportAudio" lay-filter="reportAudioUploadFile">
|
||||||
|
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{# } }}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label" style="width:100%!important;">事件视频</label>
|
||||||
|
<div class="layui-input-block" style="margin-left: 0!important;">
|
||||||
|
<input type="hidden" id="reportVideo" name="reportVideo">
|
||||||
|
<div class="layui-btn-container" id="reportVideoFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||||
|
<script id="reportVideoFileDownload" type="text/html">
|
||||||
|
{{# var fileName = 'reportVideo' }}
|
||||||
|
{{# if(d[fileName] != '') { }}
|
||||||
|
{{# var files = d[fileName];}}
|
||||||
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||||
|
<div class="upload-video-box">
|
||||||
|
<div id="{{fileName}}{{i}}" style="width:300px; height:200px;"></div>
|
||||||
|
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-video" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="reportVideoRemoveFile">
|
||||||
|
<i class="fa fa-trash-o"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{# } }}
|
||||||
|
{{# } }}
|
||||||
|
{{# if(d[fileName].length < 1) { }}
|
||||||
|
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||||||
|
<a href="javascript:void(0);" lay-form-button data-explain="事件视频" data-name="reportVideo" lay-filter="reportVideoUploadFile">
|
||||||
|
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{# } }}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item layui-layout-admin">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<div class="layui-footer" style="left: 0;">
|
||||||
|
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交修改</button>
|
||||||
|
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
|
||||||
|
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||||
|
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||||
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index' //主入口模块
|
||||||
|
}).use(['index', 'form', 'laydate', 'laytpl','cascader'], function(){
|
||||||
|
var $ = layui.$;
|
||||||
|
var form = layui.form;
|
||||||
|
var laytpl = layui.laytpl;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var cascader = layui.cascader;
|
||||||
|
var wangEditor = window.wangEditor;
|
||||||
|
var wangEditorObj = {};
|
||||||
|
var viewerObj = {};
|
||||||
|
var reportId = top.restAjax.params(window.location.href).reportId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function closeBox() {
|
||||||
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
|
}
|
||||||
|
function refreshDownloadTemplet(fileName, file) {
|
||||||
|
var dataRander = {};
|
||||||
|
dataRander[fileName] = file;
|
||||||
|
|
||||||
|
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||||
|
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化文件列表
|
||||||
|
function initFileList(fileName, ids, callback) {
|
||||||
|
var dataForm = {};
|
||||||
|
dataForm[fileName] = ids;
|
||||||
|
form.val('dataForm', dataForm);
|
||||||
|
|
||||||
|
if(!ids) {
|
||||||
|
refreshDownloadTemplet(fileName, []);
|
||||||
|
if(callback) {
|
||||||
|
callback(fileName, []);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||||
|
ids: ids
|
||||||
|
}, null, function(code, data) {
|
||||||
|
refreshDownloadTemplet(fileName, data);
|
||||||
|
if(callback) {
|
||||||
|
callback(fileName, data);
|
||||||
|
}
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 初始化视频
|
||||||
|
function initVideo(fileName, data) {
|
||||||
|
for(var i = 0, item; item = data[i++];) {
|
||||||
|
var player = new ckplayer({
|
||||||
|
container: '#'+ fileName + i,
|
||||||
|
variable: 'player',
|
||||||
|
flashplayer: false,
|
||||||
|
video: {
|
||||||
|
file: 'route/file/download/true/'+ item.fileId,
|
||||||
|
type: 'video/mp4'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 初始化上报图片图片上传
|
||||||
|
function initReportPhotosUploadFile() {
|
||||||
|
var files = $('#reportPhotos').val();
|
||||||
|
initFileList('reportPhotos', files, function(fileName) {
|
||||||
|
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||||||
|
viewerObj[fileName] = viewer;
|
||||||
|
});
|
||||||
|
|
||||||
|
form.on('button(reportPhotosUploadFile)', function(obj) {
|
||||||
|
var name = this.dataset.name;
|
||||||
|
var explain = this.dataset.explain;
|
||||||
|
top.dialog.file({
|
||||||
|
type: 'image',
|
||||||
|
title: '上传'+ explain,
|
||||||
|
width: '400px',
|
||||||
|
height: '420px',
|
||||||
|
maxFileCount: '1',
|
||||||
|
onClose: function() {
|
||||||
|
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||||
|
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||||||
|
var files = $('#'+ name).val();
|
||||||
|
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||||||
|
if(files.length > 0) {
|
||||||
|
files += ',';
|
||||||
|
}
|
||||||
|
files += file.data;
|
||||||
|
}
|
||||||
|
initFileList(name, files, function(fileName) {
|
||||||
|
viewerObj[fileName].update();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
form.on('button(reportPhotosRemoveFile)', function(obj) {
|
||||||
|
var name = this.dataset.name;
|
||||||
|
var id = this.dataset.id;
|
||||||
|
var files = $('#'+ name).val().replace(id, '');
|
||||||
|
files = files.replace(/\,+/g, ',');
|
||||||
|
if(files.charAt(0) == ',') {
|
||||||
|
files = files.substring(1);
|
||||||
|
}
|
||||||
|
if(files.charAt(files.length - 1) == ',') {
|
||||||
|
files = files.substring(0, files.length - 1);
|
||||||
|
}
|
||||||
|
initFileList(name, files, function(fileName) {
|
||||||
|
viewerObj[fileName].update();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 初始化上报音频音频上传
|
||||||
|
function initReportAudioUploadFile() {
|
||||||
|
var files = $('#reportAudio').val();
|
||||||
|
initFileList('reportAudio', files);
|
||||||
|
form.on('button(reportAudioUploadFile)', function(obj) {
|
||||||
|
var name = this.dataset.name;
|
||||||
|
var explain = this.dataset.explain;
|
||||||
|
top.dialog.file({
|
||||||
|
type: 'audio',
|
||||||
|
title: '上传'+ explain,
|
||||||
|
width: '400px',
|
||||||
|
height: '420px',
|
||||||
|
maxFileCount: '1',
|
||||||
|
onClose: function() {
|
||||||
|
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||||
|
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||||||
|
var files = $('#'+ name).val();
|
||||||
|
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||||||
|
if(files.length > 0) {
|
||||||
|
files += ',';
|
||||||
|
}
|
||||||
|
files += file.data;
|
||||||
|
}
|
||||||
|
initFileList(name, files);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
form.on('button(reportAudioRemoveFile)', function(obj) {
|
||||||
|
var name = this.dataset.name;
|
||||||
|
var id = this.dataset.id;
|
||||||
|
var files = $('#'+ name).val().replace(id, '');
|
||||||
|
files = files.replace(/\,+/g, ',');
|
||||||
|
if(files.charAt(0) == ',') {
|
||||||
|
files = files.substring(1);
|
||||||
|
}
|
||||||
|
if(files.charAt(files.length - 1) == ',') {
|
||||||
|
files = files.substring(0, files.length - 1);
|
||||||
|
}
|
||||||
|
initFileList(name, files);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 初始化上报视频视频上传
|
||||||
|
function initReportVideoUploadFile() {
|
||||||
|
var files = $('#reportVideo').val();
|
||||||
|
initFileList('reportVideo', files, initVideo);
|
||||||
|
form.on('button(reportVideoUploadFile)', function(obj) {
|
||||||
|
var name = this.dataset.name;
|
||||||
|
var explain = this.dataset.explain;
|
||||||
|
top.dialog.file({
|
||||||
|
type: 'video',
|
||||||
|
title: '上传'+ explain,
|
||||||
|
width: '400px',
|
||||||
|
height: '420px',
|
||||||
|
maxFileCount: '1',
|
||||||
|
onClose: function() {
|
||||||
|
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||||
|
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||||||
|
var files = $('#'+ name).val();
|
||||||
|
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||||||
|
if(files.length > 0) {
|
||||||
|
files += ',';
|
||||||
|
}
|
||||||
|
files += file.data;
|
||||||
|
}
|
||||||
|
initFileList(name, files, initVideo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
form.on('button(reportVideoRemoveFile)', function(obj) {
|
||||||
|
var name = this.dataset.name;
|
||||||
|
var id = this.dataset.id;
|
||||||
|
var files = $('#'+ name).val().replace(id, '');
|
||||||
|
files = files.replace(/\,+/g, ',');
|
||||||
|
if(files.charAt(0) == ',') {
|
||||||
|
files = files.substring(1);
|
||||||
|
}
|
||||||
|
if(files.charAt(files.length - 1) == ',') {
|
||||||
|
files = files.substring(0, files.length - 1);
|
||||||
|
}
|
||||||
|
initFileList(name, files, initVideo);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//初始化百度地图
|
||||||
|
function initMap(longitude, latitude) {
|
||||||
|
map = new BMap.Map("mapContainer", {enableMapClick: false,});
|
||||||
|
var point = new BMap.Point(longitude, latitude);
|
||||||
|
map.centerAndZoom(point, 12);
|
||||||
|
map.disableDoubleClickZoom();
|
||||||
|
map.addControl(new BMap.NavigationControl());
|
||||||
|
map.addControl(new BMap.ScaleControl());
|
||||||
|
map.addControl(new BMap.OverviewMapControl());
|
||||||
|
map.addControl(new BMap.MapTypeControl());
|
||||||
|
map.enableScrollWheelZoom();//启用地图滚轮放大缩小
|
||||||
|
map.enableContinuousZoom();//开启缩放平滑
|
||||||
|
var geocoder= new BMap.Geocoder();
|
||||||
|
mapMarkPoint(map, point);
|
||||||
|
// 点击获取地址
|
||||||
|
map.addEventListener("click", function(e) {
|
||||||
|
map.clearOverlays();
|
||||||
|
$('#reportLng').val(e.point.lng);
|
||||||
|
$('#reportLat').val(e.point.lat);
|
||||||
|
point = new BMap.Point(e.point.lng, e.point.lat);
|
||||||
|
mapMarkPoint(map, point);
|
||||||
|
geocoder.getLocation(e.point, function(rs) {
|
||||||
|
$('#reportAddress').val(rs.address);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//地图标点
|
||||||
|
function mapMarkPoint(map, point) {
|
||||||
|
var marker = new BMap.Marker(point);
|
||||||
|
map.addOverlay(marker);
|
||||||
|
}
|
||||||
|
//初始化区域选择
|
||||||
|
function initSelectArea() {
|
||||||
|
var id;
|
||||||
|
var area = cascader({
|
||||||
|
elem: '#areaSelect',
|
||||||
|
placeholder:'请选择地区名称',
|
||||||
|
clearable: true,
|
||||||
|
props:{
|
||||||
|
lazy:true,
|
||||||
|
checkStrictly: true,
|
||||||
|
lazyLoad:function (node, resolve) {
|
||||||
|
var level = node.level;
|
||||||
|
id = node.value;
|
||||||
|
if(id === undefined){
|
||||||
|
id = 110889
|
||||||
|
}
|
||||||
|
var loadLayerIndex;
|
||||||
|
top.restAjax.get(top.restAjax.path('api/mongo/area/list/parent-id/{areaParentId}', [id]), {}, null, function(code, data) {
|
||||||
|
var dataFormData = [];
|
||||||
|
data.forEach(function (e) {
|
||||||
|
var arr = {};
|
||||||
|
arr.value = e.areaId;
|
||||||
|
arr.code = e.areaCode;
|
||||||
|
arr.label = e.areaName;
|
||||||
|
arr.leaf = level >= 3;
|
||||||
|
dataFormData.push(arr);
|
||||||
|
});
|
||||||
|
// 通过调用resolve将子节点数据返回,通知组件数据加载完成
|
||||||
|
resolve(dataFormData);
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
area.change(function (value, node) {
|
||||||
|
var separator = ' / '
|
||||||
|
var label = node.path.map(function (node) {
|
||||||
|
return node.label;
|
||||||
|
}).join(separator);
|
||||||
|
|
||||||
|
if($('#reportAreaCode').val() != node.data.code){
|
||||||
|
$('#reportAreaCode').val(node.data.code);
|
||||||
|
$('#reportAreaName').val('内蒙古自治区'+ separator + '乌兰察布市'+ separator + label);
|
||||||
|
$('#bGId').val("")
|
||||||
|
$('#bGName').val("")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//初始化事件类型
|
||||||
|
function initCaseType(){
|
||||||
|
var id;
|
||||||
|
var level = 0;
|
||||||
|
var area = cascader({
|
||||||
|
elem: '#caseTypeSelect',
|
||||||
|
placeholder:'请选择事件分类',
|
||||||
|
clearable: true,
|
||||||
|
props:{
|
||||||
|
lazy:true,
|
||||||
|
lazyLoad:function (node, resolve) {
|
||||||
|
id = node.value;
|
||||||
|
if(id === undefined){
|
||||||
|
id = 0
|
||||||
|
}
|
||||||
|
var loadLayerIndex;
|
||||||
|
top.restAjax.get(top.restAjax.path('api/casetype/listbyparentid/{parentId}', [id]), {}, null, function(code, data) {
|
||||||
|
var dataFormData = [];
|
||||||
|
data.forEach(function (e) {
|
||||||
|
var arr = {};
|
||||||
|
arr.value = e.typeId;
|
||||||
|
arr.code = e.typeCode;
|
||||||
|
arr.label = e.typeName;
|
||||||
|
arr.leaf = level >= 1;
|
||||||
|
dataFormData.push(arr);
|
||||||
|
});
|
||||||
|
// 通过调用resolve将子节点数据返回,通知组件数据加载完成
|
||||||
|
resolve(dataFormData);
|
||||||
|
level++;
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
area.change(function (value, node) {
|
||||||
|
$('#caseTypeCode1').val(node.parentNode.data.code)
|
||||||
|
$('#caseTypeName1').val(node.parentNode.data.label)
|
||||||
|
$('#caseTypeCode2').val(node.data.code)
|
||||||
|
$('#caseTypeName2').val(node.data.label)
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* // 初始化内容
|
||||||
|
function initData() {
|
||||||
|
initReportPhotosUploadFile();
|
||||||
|
initReportAudioUploadFile();
|
||||||
|
initReportVideoUploadFile();
|
||||||
|
initMap(113.127,41.000625);
|
||||||
|
initSelectArea();
|
||||||
|
initCaseType();
|
||||||
|
}
|
||||||
|
initData();*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//选择部件
|
||||||
|
$(document).on('click','#casePartsObjName',function () {
|
||||||
|
selectCasePartsObjName($('#casePartsObjId').val());
|
||||||
|
});
|
||||||
|
function selectCasePartsObjName(){
|
||||||
|
top.dialog.open({
|
||||||
|
title: '部件列表',
|
||||||
|
url: top.restAjax.path('route/parts/list-select.html', []),
|
||||||
|
width: '1200px',
|
||||||
|
height: '600px',
|
||||||
|
onClose: function() {
|
||||||
|
var selectedObjArray = top.dialog.dialogData.selectedObjArray;
|
||||||
|
var objId = '';
|
||||||
|
var objName = '';
|
||||||
|
if(selectedObjArray.length > 0) {
|
||||||
|
for(var i = 0, item; item = selectedObjArray[i++];) {
|
||||||
|
objId = item.objId;
|
||||||
|
objName = item.objName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$('#casePartsObjId').val(objId);
|
||||||
|
$('#casePartsObjName').val(objName);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//选择网格
|
||||||
|
$(document).on('click','#bGName',function () {
|
||||||
|
selectGrid($('#reportAreaCode').val());
|
||||||
|
});
|
||||||
|
function selectGrid(areaCode){
|
||||||
|
if(areaCode == ''){
|
||||||
|
top.layer.msg("请选择事件区域");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var bGId = $("#bGId").val();
|
||||||
|
var bGName = $("#bGName").val();
|
||||||
|
if(bGId != ''){
|
||||||
|
top.dialog.dialogData.selectedObjArray.push({
|
||||||
|
gridCode:bGId,
|
||||||
|
gridName:bGName
|
||||||
|
});
|
||||||
|
}
|
||||||
|
top.dialog.open({
|
||||||
|
title: '网格列表',
|
||||||
|
url: top.restAjax.path('route/gridbase/select-area-grid.html?areaCode={areaCode}', [areaCode]),
|
||||||
|
width: '1200px',
|
||||||
|
height: '600px',
|
||||||
|
onClose: function() {
|
||||||
|
var selectedObjArray = top.dialog.dialogData.selectedObjArray;
|
||||||
|
var gridCode = '';
|
||||||
|
var gridName = '';
|
||||||
|
if(selectedObjArray.length > 0) {
|
||||||
|
for(var i = 0, item; item = selectedObjArray[i++];) {
|
||||||
|
gridCode = item.gridCode;
|
||||||
|
gridName = item.gridName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$('#bGId').val(gridCode);
|
||||||
|
$('#bGName').val(gridName);
|
||||||
|
top.dialog.dialogData.selectedObjArray = [];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化内容
|
||||||
|
function initData() {
|
||||||
|
var loadLayerIndex;
|
||||||
|
top.restAjax.get(top.restAjax.path('api/report/get/{reportId}', [reportId]), {}, null, function(code, data) {
|
||||||
|
var dataFormData = {};
|
||||||
|
for(var i in data) {
|
||||||
|
dataFormData[i] = data[i] +'';
|
||||||
|
}
|
||||||
|
dataFormData['caseTypeName'] = initCaseTypeName(data['caseTypeName1'],data['caseTypeName2']);
|
||||||
|
form.val('dataForm', dataFormData);
|
||||||
|
form.render(null, 'dataForm');
|
||||||
|
initReportPhotosUploadFile();
|
||||||
|
initReportAudioUploadFile();
|
||||||
|
initReportVideoUploadFile();
|
||||||
|
initMap(data.reportLng,data.reportLat)
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initData();
|
||||||
|
|
||||||
|
|
||||||
|
function initCaseTypeName(type1Name,type2Name) {
|
||||||
|
return type1Name + ' / ' + type2Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 提交表单
|
||||||
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
//参数封装
|
||||||
|
formData.field.caseTypeName = $('#caseTyp2 option:selected').text();
|
||||||
|
formData.field.caseTypeCode = $('#caseTyp2 option:selected').attr('code');
|
||||||
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
|
top.dialog.close(index);
|
||||||
|
var loadLayerIndex;
|
||||||
|
top.restAjax.put(top.restAjax.path('api/report/update', []), formData.field, null, function(code, data) {
|
||||||
|
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||||
|
time: 0,
|
||||||
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||||
|
shade: 0.3,
|
||||||
|
yes: function(index) {
|
||||||
|
top.dialog.close(index);
|
||||||
|
window.location.reload();
|
||||||
|
},
|
||||||
|
btn2: function() {
|
||||||
|
closeBox();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.close').on('click', function() {
|
||||||
|
closeBox();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 校验
|
||||||
|
form.verify({
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -160,6 +160,7 @@
|
|||||||
var level = row['taskLevel'];
|
var level = row['taskLevel'];
|
||||||
var rowData = '<div class="layui-btn-group">';
|
var rowData = '<div class="layui-btn-group">';
|
||||||
rowData += '<button type="button" class="layui-btn layui-btn-sm" lay-event="showEvent">详情</button>';
|
rowData += '<button type="button" class="layui-btn layui-btn-sm" lay-event="showEvent">详情</button>';
|
||||||
|
rowData += '<button type="button" class="layui-btn layui-btn-sm" lay-event="updateReportEvent">修改事件</button>';
|
||||||
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="logEvent">日志</button>';
|
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="logEvent">日志</button>';
|
||||||
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="caseRegisterEvent">受理</button>';
|
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="caseRegisterEvent">受理</button>';
|
||||||
if(level > 1){
|
if(level > 1){
|
||||||
@ -242,6 +243,20 @@
|
|||||||
reloadTable();
|
reloadTable();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}else if(layEvent === 'updateReportEvent'){
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: '修改事件',
|
||||||
|
closeBtn: 1,
|
||||||
|
area: ['90%', '90%'],
|
||||||
|
shadeClose: true,
|
||||||
|
anim: 2,
|
||||||
|
maxmin:true,
|
||||||
|
content: top.restAjax.path('route/report/update.html?reportId={reportId}', [data.reportId]),
|
||||||
|
end: function() {
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
}else if(layEvent === 'logEvent'){
|
}else if(layEvent === 'logEvent'){
|
||||||
layer.open({
|
layer.open({
|
||||||
type: 2,
|
type: 2,
|
||||||
|
@ -162,11 +162,11 @@
|
|||||||
var specialDeptId = $('#specialDeptId').val();
|
var specialDeptId = $('#specialDeptId').val();
|
||||||
var specialDeptName = $('#specialDeptName').val();
|
var specialDeptName = $('#specialDeptName').val();
|
||||||
|
|
||||||
if(specialDeptId == ''){
|
if(specialDeptId != ''){
|
||||||
var selectedNodes = [];
|
var selectedNodes = {};
|
||||||
selectedNodes.id = specialDeptId;
|
selectedNodes.id = specialDeptId;
|
||||||
selectedNodes.name = specialDeptName;
|
selectedNodes.name = specialDeptName;
|
||||||
top.dialog.dialogTreeData.selectedNodes = selectedNodes;
|
top.dialog.dialogTreeData.selectedNodes.push(selectedNodes);
|
||||||
}
|
}
|
||||||
top.dialog.open({
|
top.dialog.open({
|
||||||
url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []),
|
url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []),
|
||||||
@ -175,6 +175,7 @@
|
|||||||
height: '500px',
|
height: '500px',
|
||||||
onClose: function() {
|
onClose: function() {
|
||||||
var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes;
|
var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes;
|
||||||
|
top.dialog.dialogTreeData.selectedNodes = [];
|
||||||
if(selectedTypeRBArray.length > 0) {
|
if(selectedTypeRBArray.length > 0) {
|
||||||
if(selectedTypeRBArray.length > 1){
|
if(selectedTypeRBArray.length > 1){
|
||||||
top.dialog.msg('专办单位人员只能选择一名,请重新选择')
|
top.dialog.msg('专办单位人员只能选择一名,请重新选择')
|
||||||
@ -182,12 +183,24 @@
|
|||||||
}
|
}
|
||||||
$('#specialDeptId').val(selectedTypeRBArray[0].id);
|
$('#specialDeptId').val(selectedTypeRBArray[0].id);
|
||||||
$('#specialDeptName').val(selectedTypeRBArray[0].name);
|
$('#specialDeptName').val(selectedTypeRBArray[0].name);
|
||||||
|
}else{
|
||||||
|
$('#specialDeptId').val('');
|
||||||
|
$('#specialDeptName').val('');
|
||||||
}
|
}
|
||||||
top.dialog.dialogTreeData.selectedNodes = [];
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function selectMasterUser(){
|
function selectMasterUser(){
|
||||||
|
var masterDeptId = $('#masterDeptId').val();
|
||||||
|
var masterDeptName = $('#masterDeptName').val();
|
||||||
|
|
||||||
|
if(masterDeptId != ''){
|
||||||
|
var selectedNodes = {};
|
||||||
|
selectedNodes.id = masterDeptId;
|
||||||
|
selectedNodes.name = masterDeptName;
|
||||||
|
top.dialog.dialogTreeData.selectedNodes.push(selectedNodes);
|
||||||
|
}
|
||||||
|
|
||||||
top.dialog.open({
|
top.dialog.open({
|
||||||
url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []),
|
url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []),
|
||||||
title: '选择主办单位',
|
title: '选择主办单位',
|
||||||
@ -195,6 +208,7 @@
|
|||||||
height: '500px',
|
height: '500px',
|
||||||
onClose: function() {
|
onClose: function() {
|
||||||
var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes;
|
var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes;
|
||||||
|
top.dialog.dialogTreeData.selectedNodes = [];
|
||||||
if(selectedTypeRBArray.length > 0) {
|
if(selectedTypeRBArray.length > 0) {
|
||||||
if(selectedTypeRBArray.length > 1){
|
if(selectedTypeRBArray.length > 1){
|
||||||
top.dialog.msg('主办单位人员只能选择一名,请重新选择')
|
top.dialog.msg('主办单位人员只能选择一名,请重新选择')
|
||||||
@ -202,12 +216,25 @@
|
|||||||
}
|
}
|
||||||
$('#masterDeptId').val(selectedTypeRBArray[0].id);
|
$('#masterDeptId').val(selectedTypeRBArray[0].id);
|
||||||
$('#masterDeptName').val(selectedTypeRBArray[0].name);
|
$('#masterDeptName').val(selectedTypeRBArray[0].name);
|
||||||
|
}else{
|
||||||
|
$('#masterDeptId').val('');
|
||||||
|
$('#masterDeptName').val('');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function selectAssistUser(){
|
function selectAssistUser(){
|
||||||
|
var assistDeptId = $('#assistDeptId').val();
|
||||||
|
var assistDeptName = $('#assistDeptName').val();
|
||||||
|
|
||||||
|
if(assistDeptId != ''){
|
||||||
|
var selectedNodes = {};
|
||||||
|
selectedNodes.id = assistDeptId;
|
||||||
|
selectedNodes.name = assistDeptName;
|
||||||
|
top.dialog.dialogTreeData.selectedNodes.push(selectedNodes);
|
||||||
|
}
|
||||||
|
|
||||||
top.dialog.open({
|
top.dialog.open({
|
||||||
url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []),
|
url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []),
|
||||||
title: '选择协办单位',
|
title: '选择协办单位',
|
||||||
@ -215,6 +242,7 @@
|
|||||||
height: '500px',
|
height: '500px',
|
||||||
onClose: function() {
|
onClose: function() {
|
||||||
var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes;
|
var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes;
|
||||||
|
top.dialog.dialogTreeData.selectedNodes = [];
|
||||||
if(selectedTypeRBArray.length > 0) {
|
if(selectedTypeRBArray.length > 0) {
|
||||||
if(selectedTypeRBArray.length > 1){
|
if(selectedTypeRBArray.length > 1){
|
||||||
top.dialog.msg('协办单位人员只能选择一名,请重新选择')
|
top.dialog.msg('协办单位人员只能选择一名,请重新选择')
|
||||||
@ -222,12 +250,27 @@
|
|||||||
}
|
}
|
||||||
$('#assistDeptId').val(selectedTypeRBArray[0].id);
|
$('#assistDeptId').val(selectedTypeRBArray[0].id);
|
||||||
$('#assistDeptName').val(selectedTypeRBArray[0].name);
|
$('#assistDeptName').val(selectedTypeRBArray[0].name);
|
||||||
|
}else{
|
||||||
|
$('#assistDeptId').val('');
|
||||||
|
$('#assistDeptName').val('')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function selectDeptsUser(){
|
function selectDeptsUser(){
|
||||||
top.dialog.dialogData.selectedUserIds = $('#specialUserId').val();
|
let deptsDeptId = $('#deptsDeptId').val();
|
||||||
|
let deptsDeptName = $('#deptsDeptName').val();
|
||||||
|
|
||||||
|
if(deptsDeptId != ''){
|
||||||
|
let deptsDeptIdArr = deptsDeptId.split(',');
|
||||||
|
let deptsDeptNameArr = deptsDeptName.split(',');
|
||||||
|
for(let i = 0; i < deptsDeptIdArr.length; i++){
|
||||||
|
let selectedNodes = {};
|
||||||
|
selectedNodes.id = deptsDeptIdArr[i];
|
||||||
|
selectedNodes.name = deptsDeptNameArr[i];
|
||||||
|
top.dialog.dialogTreeData.selectedNodes.push(selectedNodes);
|
||||||
|
}
|
||||||
|
}
|
||||||
top.dialog.open({
|
top.dialog.open({
|
||||||
url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []),
|
url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []),
|
||||||
title: '选择责任单位',
|
title: '选择责任单位',
|
||||||
@ -235,6 +278,7 @@
|
|||||||
height: '500px',
|
height: '500px',
|
||||||
onClose: function() {
|
onClose: function() {
|
||||||
var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes;
|
var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes;
|
||||||
|
top.dialog.dialogTreeData.selectedNodes = []
|
||||||
var deptIds = '';
|
var deptIds = '';
|
||||||
var deptNames = '';
|
var deptNames = '';
|
||||||
if(selectedTypeRBArray.length > 0) {
|
if(selectedTypeRBArray.length > 0) {
|
||||||
@ -245,9 +289,7 @@
|
|||||||
}else{
|
}else{
|
||||||
deptIds += item.id + ',';
|
deptIds += item.id + ',';
|
||||||
deptNames += item.name + ',';
|
deptNames += item.name + ',';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$('#deptsDeptId').val(deptIds);
|
$('#deptsDeptId').val(deptIds);
|
||||||
|
Loading…
Reference in New Issue
Block a user