增加争议案件
This commit is contained in:
parent
fb0334ade7
commit
4cb281d215
@ -19,6 +19,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -62,6 +63,17 @@ public class ReportCaseController extends AbstractController {
|
||||
reportCaseService.updateBackDeleteCase(query);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复已争议案件
|
||||
*/
|
||||
@GetMapping("update-back-disputed-case/{reportCaseId}")
|
||||
public SuccessResult updateBackDisputedCase(@PathVariable("reportCaseId") String reportCaseId){
|
||||
Map<String, Object> query = new HashMap<>(8);
|
||||
query.put("reportCaseId", reportCaseId);
|
||||
reportCaseService.updateBackDisputedCase(query);
|
||||
return new SuccessResult();
|
||||
}
|
||||
/**
|
||||
* 已删除案件列表
|
||||
*/
|
||||
@ -71,6 +83,15 @@ public class ReportCaseController extends AbstractController {
|
||||
page.setParams(params);
|
||||
return reportCaseService.listPageReportDelete(page);
|
||||
}
|
||||
/**
|
||||
* 已删除且有争议案件
|
||||
*/
|
||||
@GetMapping("list-page-report-disputed")
|
||||
public SuccessResultList<List<ReportCaseDTO>> listPageReportDisputed(ListPage page) throws SearchException {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return reportCaseService.listPageReportDisputed(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "上报案件新增", notes = "上报案件新增接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@ -93,6 +114,21 @@ public class ReportCaseController extends AbstractController {
|
||||
return reportCaseService.removeReportCase(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除为争议案件", notes = "删除为争议案件接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "ids", value = "上报案件ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove-to-disputed-cases/{id}")
|
||||
public SuccessResult removeToDisputedCases(@PathVariable("id") String id) throws RemoveException {
|
||||
Map<String, Object> params = getParams();
|
||||
params.put("reportCaseIds", Arrays.asList(id));
|
||||
reportCaseService.removeToDisputedCases(params);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "上报案件修改", notes = "上报案件修改接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "reportCaseId", value = "上报案件ID", paramType = "path")
|
||||
|
@ -36,6 +36,9 @@ public interface IReportCaseDao {
|
||||
*/
|
||||
void removeReportCase(Map<String, Object> params) throws RemoveException;
|
||||
|
||||
void removeToDisputedCases(Map<String, Object> params);
|
||||
|
||||
|
||||
/**
|
||||
* 修改上报案件
|
||||
*
|
||||
@ -382,4 +385,5 @@ public interface IReportCaseDao {
|
||||
|
||||
Integer countReportCaseAssign(Map<String, Object> reportCaseAssignMap);
|
||||
|
||||
|
||||
}
|
||||
|
@ -77,6 +77,8 @@ public interface IReportCaseService {
|
||||
*/
|
||||
SuccessResult removeReportCase(Map<String, Object> params) throws RemoveException;
|
||||
|
||||
void removeToDisputedCases(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 修改上报案件
|
||||
*
|
||||
@ -449,11 +451,19 @@ public interface IReportCaseService {
|
||||
*/
|
||||
SuccessResultList<List<ReportCaseDTO>> listPageReportDelete(ListPage page);
|
||||
|
||||
SuccessResultList<List<ReportCaseDTO>> listPageReportDisputed(ListPage page);
|
||||
|
||||
|
||||
/**
|
||||
* 恢复已删除案件
|
||||
* @param query
|
||||
*/
|
||||
void updateBackDeleteCase(Map<String, Object> query);
|
||||
|
||||
void updateBackDisputedCase(Map<String, Object> query);
|
||||
|
||||
|
||||
ReportCaseDTO getReportCaseForDel(Map<String, Object> params);
|
||||
|
||||
|
||||
}
|
||||
|
@ -57,6 +57,23 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* @ClassName: ReportCaseServiceImpl
|
||||
* @Description: 上报案件
|
||||
* 案件状态:
|
||||
* case '0':
|
||||
* value = '待受理';
|
||||
* case '1':
|
||||
* value = '待立案';
|
||||
* case '2':
|
||||
* value = '待转派';
|
||||
* case '3':
|
||||
* value = '待处理';
|
||||
* case '4':
|
||||
* value = '待检查';
|
||||
* case '5':
|
||||
* value = '待结案';
|
||||
* case '6':
|
||||
* value = '已归档';
|
||||
* case '7':
|
||||
* value = '删除且有争议';
|
||||
* @Author: admin
|
||||
* @Date: 2019-07-28 16:56:15
|
||||
* @Version: 1.0
|
||||
@ -123,9 +140,40 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
|
||||
reportCaseDao.saveReportCaseLog(log);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBackDisputedCase(Map<String, Object> query) {
|
||||
setUpdateInfo(query);
|
||||
query.put("isDelete", '0');
|
||||
// 恢复为归档
|
||||
query.put("caseStatus", 6);
|
||||
reportCaseDao.updateReportCase(query);
|
||||
// 保存案件恢复日志
|
||||
Map<String, Object> log = new HashMap<>(8);
|
||||
log.put("caseId", query.get("reportCaseId"));
|
||||
log.put("optionType", "案件恢复");
|
||||
log.put("userId", "1");
|
||||
log.put("userName", "系统管理员");
|
||||
log.put("userPhone", "系统管理员");
|
||||
log.put("userOpinion", "系统管理员手动恢复已争议的案件");
|
||||
log.put("handleStatus", "1");
|
||||
log.put("gmtCreate", DateUtil.getTime());
|
||||
reportCaseDao.saveReportCaseLog(log);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<ReportCaseDTO>> listPageReportDelete(ListPage page) {
|
||||
setNPersonAreaParams(page.getParams());
|
||||
page.getParams().put("caseStatusNot", 7);
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<ReportCaseDTO> deleteList = reportCaseDao.listPageReportDelete(page.getParams());
|
||||
PageInfo<ReportCaseDTO> pageInfo = new PageInfo<>(deleteList);
|
||||
return new SuccessResultList<>(deleteList, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<ReportCaseDTO>> listPageReportDisputed(ListPage page) {
|
||||
setNPersonAreaParams(page.getParams());
|
||||
page.getParams().put("caseStatus", 7);
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<ReportCaseDTO> deleteList = reportCaseDao.listPageReportDelete(page.getParams());
|
||||
PageInfo<ReportCaseDTO> pageInfo = new PageInfo<>(deleteList);
|
||||
@ -237,6 +285,13 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeToDisputedCases(Map<String, Object> params) {
|
||||
setUpdateInfo(params);
|
||||
params.put("caseStatus", 7);
|
||||
reportCaseDao.removeToDisputedCases(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResult updateReportCase(Map<String, Object> params) throws UpdateException {
|
||||
setUpdateInfo(params);
|
||||
|
@ -150,6 +150,12 @@
|
||||
<if test="caseTypeId != null and caseTypeId != ''">
|
||||
AND t1.case_type_id = #{caseTypeId}
|
||||
</if>
|
||||
<if test="caseStatus != null">
|
||||
AND t1.case_status = #{caseStatus}
|
||||
</if>
|
||||
<if test="caseStatusNot != null">
|
||||
AND t1.case_status != #{caseStatus}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
@ -266,6 +272,22 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 删除上报案件 -->
|
||||
<update id="removeToDisputedCases" parameterType="map">
|
||||
UPDATE
|
||||
city_report_case
|
||||
SET
|
||||
is_delete = 1,
|
||||
case_status = #{caseStatus},
|
||||
modifier = #{modifier},
|
||||
gmt_modified = #{gmtModified}
|
||||
WHERE
|
||||
report_case_id IN
|
||||
<foreach collection="reportCaseIds" index="index" open="(" separator="," close=")">
|
||||
#{reportCaseIds[${index}]}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 修改上报案件 -->
|
||||
<update id="updateReportCase" parameterType="map">
|
||||
UPDATE
|
||||
|
@ -392,6 +392,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -406,6 +406,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -277,6 +277,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -382,6 +382,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -388,6 +388,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -355,6 +355,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -366,6 +366,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -375,6 +375,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -389,6 +389,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -361,6 +361,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -381,6 +381,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -387,6 +387,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -376,6 +376,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -357,6 +357,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -357,6 +357,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -362,6 +362,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -346,6 +346,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -346,6 +346,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -350,6 +350,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -334,6 +334,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -334,6 +334,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -350,6 +350,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -353,6 +353,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
423
src/main/resources/static/route/reportcase/list_disputed.html
Normal file
423
src/main/resources/static/route/reportcase/list_disputed.html
Normal file
@ -0,0 +1,423 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<base href="/servicecity/">
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
|
||||
<!-- 图片 -->
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/swiper3/css/swiper.min.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
<!-- 图片 -->
|
||||
<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">
|
||||
<style>
|
||||
.layui-table-cell{
|
||||
height: auto;
|
||||
}
|
||||
.layui-table-body td{
|
||||
height: 210px;
|
||||
}
|
||||
.layui-table img{
|
||||
max-width: 100%;
|
||||
}
|
||||
.info-row {border-bottom: 1px dotted;}
|
||||
.info-row:last-child {border: none;}
|
||||
.info-row .col-left {width:30%;height:28px;text-align:center;border-right:1px dotted;display:inline-block;padding:5px;vertical-align:top;}
|
||||
.info-row .col-right {width:70%;display:inline-block;padding:5px;vertical-align:top;}
|
||||
.info-row .col-line {width:100%;color:black;text-align:center;display:block;padding:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
|
||||
.info-row .col-line .fa {color: red; margin-right: 5px;}
|
||||
.info-row .col-content {width:100%;display:inline-block;padding:5px;height:86px;overflow:auto;white-space:normal;word-break:break-all;word-wrap:break-word;vertical-align:top;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn layui-form" style="margin-bottom: 5px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="caseNumber" class="layui-input search-item" placeholder="案件编号" style="height: 38px;width:150px;" autocomplete="off">
|
||||
</div>
|
||||
<div class="layui-inline" id="areaSelectTemplateBox" style="width: 150px;"></div>
|
||||
<script id="areaSelectTemplate" type="text/html">
|
||||
<select id="areaId" name="areaId">
|
||||
<option value="">选择街镇</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictId}}">{{item.dictName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline" id="caseTypeSelectTemplateBox" style="width: 150px;"></div>
|
||||
<script id="caseTypeSelectTemplate" type="text/html">
|
||||
<select id="caseTypeId" name="caseTypeId" lay-filter="changeCaseType">
|
||||
<option value="">案件类型</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictId}}">{{item.dictName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline" id="childCaseTypeSelectTemplateBox" style="width: 150px;"></div>
|
||||
<script id="childCaseTypeSelectTemplate" type="text/html">
|
||||
<select id="childCaseTypeId" name="childCaseTypeId">
|
||||
<option value="">案件子类型</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictId}}">{{item.dictName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="startTime" class="layui-input search-item"
|
||||
readonly="readonly" placeholder="开始时间" style="height: 38px;width:150px;cursor: pointer" autocomplete="off">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item"
|
||||
readonly="readonly" placeholder="结束时间" style="height: 38px;width:150px;cursor: pointer" autocomplete="off">
|
||||
</div>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<!-- 图片 -->
|
||||
<script type="text/javascript" src="assets/js/vendor/swiper3/js/swiper.min.js"></script>
|
||||
<script type="text/javascript" src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<!-- 图片 -->
|
||||
|
||||
<script type="text/javascript">
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laytpl', 'form','laydate'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var laytpl = layui.laytpl;
|
||||
var table = layui.table;
|
||||
var admin = layui.admin;
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var tableUrl = 'api/reportcase/list-page-report-disputed';
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: top.restAjax.path(getParamsUrl(tableUrl), []),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 100,
|
||||
limit: 10,
|
||||
limits: [10, 20, 40, 80, 100, 200],
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
},
|
||||
cols: [[
|
||||
{field:'rowNum', width:60, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{width: 300, title: '案件图片', align:'center',
|
||||
templet: function(row) {
|
||||
var photos = row.casePhotos.split(',')
|
||||
var value = '<div id="photo_'+ row.reportCaseId +'" class="swiper-container" style="width:100%;">' +
|
||||
'<div class="swiper-wrapper" style="width:100%">';
|
||||
for(var i = 0, item = photos[i]; item = photos[i++];) {
|
||||
value += '<div class="swiper-slide" style="width:100%;">' +
|
||||
'<img class="swiper-lazy" src="route/file/downloadfile/true/'+ item +'" style="width:270px;height:180px;cursor:pointer;"/>' +
|
||||
'<div class="swiper-lazy-preloader"></div>' +
|
||||
'</div>';
|
||||
}
|
||||
value += '</div><div id="photo_swiper_'+ row.reportCaseId +'" class="swiper-pagination"></div></div>';
|
||||
setTimeout(function() {
|
||||
new Swiper('#photo_'+ row.reportCaseId, {
|
||||
lazyLoading: true,
|
||||
autoplay: 3000,
|
||||
pagination : '#photo_swiper_'+ row.reportCaseId,
|
||||
paginationClickable :true,
|
||||
});
|
||||
new Viewer(document.getElementById('photo_'+ row.reportCaseId));
|
||||
}, 50);
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{width: 450, title: '案件信息', align: 'center',
|
||||
templet: function (row) {
|
||||
var caseFlowType = row.caseFlowType;
|
||||
if(caseFlowType == '1'){
|
||||
caseFlowType = '(职能部门案件)';
|
||||
} else {
|
||||
caseFlowType = '(街镇案件)'
|
||||
}
|
||||
var value = '<div style="text-align: left">'+
|
||||
'<div class="info-row"><span class="col-left">案件编号</span><span class="col-right">'+ row.caseNumber +'</span></div>'+
|
||||
'<div class="info-row"><span class="col-left">所在地区</span><span class="col-right">'+ row.areaName +'</span></div>'+
|
||||
'<div class="info-row"><span class="col-left">所在社区</span><span class="col-right">'+ row.communityName +'</span></div>'+
|
||||
'<div class="info-row"><span class="col-left">案件类型</span><span class="col-right">'+ caseFlowType + row.caseTypeName +'</span></div>'+
|
||||
'<div class="info-row"><span class="col-left">操作</span>' +
|
||||
'<span class="col-right">'+
|
||||
'<div class="btn-group btn-group-xs">' +
|
||||
'<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="showEvent">详情</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-warm layui-btn-sm" lay-event="caseFlowEvent">流程</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="reportBack">恢复</button>'+
|
||||
'</div>'+
|
||||
'</span>'+
|
||||
'</div>'+
|
||||
'</div>'
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{width: 300, title: '案件内容', align: 'center',
|
||||
templet: function (row) {
|
||||
var value = '<div style="text-align: left">'+
|
||||
'<div class="info-row"><span class="col-left">案件来源</span><span class="col-right">'+ sourceFormatter(row.caseSource) +'</span></div>'+
|
||||
'<div class="info-row"><a href="javascript:;" class="col-line" lay-event="showLocation"><i class="fa fa-map-marker"></i>'+ row.casePosition +'</a></div>'+
|
||||
'<div class="info-row"><span class="col-content">'+ row.caseContent +'</span></div>'+
|
||||
'</div>';
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{width: 250, title: '案件状态', align: 'center',
|
||||
templet: function (row) {
|
||||
var value = '<div style="text-align: left">'+
|
||||
'<div class="info-row"><span class="col-left">上报时间</span><span class="col-right">'+ row.reportDate +'</span></div>'+
|
||||
'<div class="info-row"><span class="col-left">上报人员</span><span class="col-right">'+ row.caseReporter +'</span></div>'+
|
||||
'<div class="info-row"><span class="col-left">删除时间</span><span class="col-right">'+ row.gmtModified +'</span></div>'+
|
||||
'<div class="info-row"><span class="col-left"></span><span class="col-right"></span></div>'+
|
||||
'</div>';
|
||||
return value;
|
||||
}
|
||||
}
|
||||
]],
|
||||
page: true,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
},
|
||||
});
|
||||
}
|
||||
setTimeout(function(){
|
||||
initTable();
|
||||
},500);
|
||||
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
table.reload('dataTable', {
|
||||
url: top.restAjax.path(getParamsUrl(tableUrl), []),
|
||||
page: {
|
||||
curr: currentPage
|
||||
},
|
||||
height: $win.height() - 100,
|
||||
});
|
||||
}
|
||||
|
||||
//初始化地区
|
||||
function initArea(){
|
||||
top.restAjax.get('api/dict/listdict/9d179f05-3ea0-48f7-853c-d3b7124b791c', {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('areaSelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('areaSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
initArea();
|
||||
|
||||
//初始化案件类型
|
||||
function initCaseType(){
|
||||
top.restAjax.get('api/dict/listdict/46d108b2-4ef9-4f6f-b30c-0c700e3ee852', {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('caseTypeSelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('caseTypeSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
initCaseType();
|
||||
|
||||
//初始化子案件类型
|
||||
function initChildCaseType(parentId){
|
||||
if(typeof(parentId) === 'undefined' || '' == parentId){
|
||||
laytpl(document.getElementById('childCaseTypeSelectTemplate').innerHTML).render([], function(html) {
|
||||
document.getElementById('childCaseTypeSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
top.restAjax.get('api/dict/listdict/' + parentId, {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('childCaseTypeSelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('childCaseTypeSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
initChildCaseType();
|
||||
|
||||
//初始化时间
|
||||
function initDateTime(){
|
||||
laydate.render({
|
||||
elem: '#startTime'
|
||||
,value: ''
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#endTime'
|
||||
,value: ''
|
||||
});
|
||||
}
|
||||
initDateTime();
|
||||
|
||||
function getParamsUrl(url) {
|
||||
var areaId = $('#areaId').val();
|
||||
var caseTypeId = $('#caseTypeId').val();
|
||||
var childCaseTypeId = $('#childCaseTypeId').val();
|
||||
var startTime = $('#startTime').val();
|
||||
var endTime = $('#endTime').val();
|
||||
var caseNumber = $('#caseNumber').val();
|
||||
var params = '?t='+ new Date().getTime();
|
||||
if('' != areaId && 'undefined' != typeof(areaId)) {
|
||||
params += '&areaId='+ areaId;
|
||||
}
|
||||
if('' != caseTypeId && '' != childCaseTypeId) {
|
||||
params += '&caseTypeId='+ childCaseTypeId;
|
||||
} else {
|
||||
params += '&caseTypeId='+ caseTypeId;
|
||||
}
|
||||
if('' != startTime) {
|
||||
params += '&startTime='+ startTime;
|
||||
}
|
||||
if('' != endTime) {
|
||||
params += '&endTime='+ endTime;
|
||||
}
|
||||
if('' != caseNumber) {
|
||||
params += '&caseNumber='+ caseNumber;
|
||||
}
|
||||
return url + params;
|
||||
}
|
||||
|
||||
// 来源格式化
|
||||
function sourceFormatter(val) {
|
||||
var value;
|
||||
switch (val) {
|
||||
case '1':
|
||||
value = '群众举报';
|
||||
break;
|
||||
case '2':
|
||||
value = '巡检采集';
|
||||
break;
|
||||
case '3':
|
||||
value = '专管员上报';
|
||||
break;
|
||||
default:
|
||||
value = '未知';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
// 案件状态
|
||||
function caseStatusFormatter(val) {
|
||||
var value;
|
||||
switch (val) {
|
||||
case '0':
|
||||
value = '待受理';
|
||||
break;
|
||||
case '1':
|
||||
value = '待立案';
|
||||
break;
|
||||
case '2':
|
||||
value = '待转派';
|
||||
break;
|
||||
case '3':
|
||||
value = '待处理';
|
||||
break;
|
||||
case '4':
|
||||
value = '待检查';
|
||||
break;
|
||||
case '5':
|
||||
value = '待结案';
|
||||
break;
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
if(obj.event === 'showEvent'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '详情',
|
||||
closeBtn: 1,
|
||||
area: ['70%', '80%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/reportcase/show.html?reportCaseId={id}',
|
||||
[obj.data.reportCaseId]),
|
||||
end: function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
if(obj.event === 'caseFlowEvent'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '案件流程',
|
||||
closeBtn: 1,
|
||||
area: ['50%', '60%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/reportcase/list_case_log.html?reportCaseId={id}',
|
||||
[obj.data.reportCaseId]),
|
||||
end: function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
if(obj.event === 'reportBack'){
|
||||
top.dialog.confirm('确定恢复案件吗?', function(index) {
|
||||
top.dialog.close(index);
|
||||
top.restAjax.get(top.restAjax.path('api/reportcase/update-back-disputed-case/{reportCaseId}',
|
||||
[obj.data.reportCaseId]), {}, null, function(code, data) {
|
||||
top.dialog.msg('恢复完成');
|
||||
reloadTable();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
form.on('select(changeCaseType)',function(data){
|
||||
if(data.value == ''){
|
||||
$('#childCaseTypeId').val('');
|
||||
initChildCaseType();
|
||||
} else {
|
||||
initChildCaseType(data.value);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -357,6 +357,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -377,6 +377,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -364,6 +364,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
@ -161,6 +161,7 @@
|
||||
'<div class="btn-group btn-group-xs">' +
|
||||
'<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="showEvent">详情</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-warm layui-btn-sm" lay-event="caseFlowEvent">流程</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="disputedEvent">争议案件</button>'+
|
||||
'</div>'+
|
||||
'</span>'+
|
||||
'</div>'+
|
||||
@ -349,6 +350,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
@ -429,6 +433,32 @@
|
||||
if(obj.event === 'deleteEvent'){
|
||||
remove(obj.data.reportCaseId);
|
||||
}
|
||||
if(obj.event === 'disputedEvent') {
|
||||
top.dialog.msg('确定删除为争议案件吗?', {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var layIndex;
|
||||
top.restAjax.delete(top.restAjax.path('api/reportcase/remove-to-disputed-cases/{id}', [obj.data.reportCaseId]), {}, null, function (code, data) {
|
||||
// success
|
||||
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000}, function () {
|
||||
reloadTable();
|
||||
});
|
||||
}, function (code, data) {
|
||||
// error
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
// before
|
||||
layIndex = top.dialog.msg('正在提交...', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
// complete
|
||||
top.dialog.close(layIndex);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
form.on('select(changeCaseType)',function(data){
|
||||
|
@ -352,6 +352,9 @@
|
||||
case '6':
|
||||
value = '已归档';
|
||||
break;
|
||||
case '7':
|
||||
value = '删除且有争议';
|
||||
break;
|
||||
default:
|
||||
value = '异常';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user