373 lines
16 KiB
HTML
373 lines
16 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<base href="/bigdata/">
|
|
<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">
|
|
</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" style="margin-bottom: 10px;">
|
|
<div class="layui-inline">
|
|
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入部门名称">
|
|
</div>
|
|
<div class="layui-inline">
|
|
<input type="text" id="deptTotalYear" class="layui-input search-item" placeholder="年份" readonly>
|
|
</div>
|
|
<div class="layui-inline">
|
|
<div class="layui-inline layui-form search-item">
|
|
<select id="deptTotalQuarter">
|
|
<option value="1">第一季度</option>
|
|
<option value="2">第二季度</option>
|
|
<option value="3">第三季度</option>
|
|
<option value="4">第四季度</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
|
<i class="fa fa-lg fa-search"></i> 搜索
|
|
</button>
|
|
<button type="button" id="total" class="layui-btn layui-btn-normal layui-btn-sm">
|
|
<i class="fa fa-lg fa-bar-chart"></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 src="assets/js/vendor/viewer/viewer.min.js"></script>
|
|
<script>
|
|
layui.config({
|
|
base: 'assets/layuiadmin/'
|
|
}).extend({
|
|
index: 'lib/index'
|
|
}).use(['index', 'table', 'laydate', 'common'], function() {
|
|
var $ = layui.$;
|
|
var $win = $(window);
|
|
var table = layui.table;
|
|
var admin = layui.admin;
|
|
var laydate = layui.laydate;
|
|
var common = layui.common;
|
|
var resizeTimeout = null;
|
|
var tableUrl = 'api/deptassess/listnopagedeptassess';
|
|
|
|
// 初始化表格
|
|
function initTable() {
|
|
table.render({
|
|
elem: '#dataTable',
|
|
id: 'dataTable',
|
|
url: top.restAjax.path(tableUrl, []),
|
|
width: admin.screen() > 1 ? '100%' : '',
|
|
height: $win.height() - 90,
|
|
toolbar: '#headerToolBar',
|
|
where:{
|
|
deptTotalQuarter: $('#deptTotalQuarter').val(),
|
|
deptTotalYear:$('#deptTotalYear').val()
|
|
},
|
|
cols: [[
|
|
/* {type:'checkbox', fixed: 'left'},*/
|
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
|
{field: 'cz', width: 150, title: '操作', align:'center',
|
|
templet: function(row) {
|
|
var rowData = '<div class="layui-btn-group">'+
|
|
'<button type="button" class="layui-btn layui-btn-sm" lay-event="deptTotalScoreDetails">明细</button>'+
|
|
'</div>';
|
|
return rowData;
|
|
}
|
|
},
|
|
{field: 'deptName', width: 150, title: '部门名称', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
return '-';
|
|
}
|
|
return rowData;
|
|
}
|
|
},
|
|
{field: 'deptCaseNum', width: 160, title: '部门已处理案件数量', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
return rowData;
|
|
}
|
|
},
|
|
{field: 'deptCaseSettleScore', width: 150, title: '案件处理情况分数', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
return '<font color="green">加'+rowData+'分</font>';
|
|
}
|
|
},
|
|
{field: 'deptCaseTimeoutNum', width: 150, title: '部门超时案件数量', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
return rowData;
|
|
}
|
|
},
|
|
{field: 'deptCaseTimeoutScore', width: 150, title: '案件处置时效分数', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
return '<font color="green">加'+rowData+'分</font>';
|
|
}
|
|
},
|
|
{field: 'deptCaseGrossScore', width: 150, title: '案件处理结果分数', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
return '<font color="green">加'+rowData+'分</font>';
|
|
}
|
|
},
|
|
{field: 'deptInspectorNum', width: 150, title: '案件督查分数', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
return '<font color="red">扣'+rowData+'分</font>';
|
|
}
|
|
},
|
|
{field: 'deptCaseTotalScore', width: 150, title: '总分', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
return '<font color="blue">'+rowData+'分</font>';
|
|
}
|
|
},
|
|
{field: 'eventScore', width: 150, title: '最终得分', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
return '<font color="blue">'+rowData+'分</font>';
|
|
}
|
|
},
|
|
{field: 'deptTotalYear', width: 150, title: '统计年份', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
return '-';
|
|
}
|
|
return rowData;
|
|
}
|
|
},
|
|
{field: 'deptTotalQuarter', width: 150, title: '统计季度', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
return '-';
|
|
}
|
|
return rowData;
|
|
}
|
|
},
|
|
{field: 'deptTotalTime', width: 150, title: '数据统计时间', align:'center',
|
|
templet: function(row) {
|
|
var rowData = row[this.field];
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
return '-';
|
|
}
|
|
return rowData;
|
|
}
|
|
},
|
|
]],
|
|
parseData: function(data) {
|
|
return {
|
|
'code': 0,
|
|
'msg': '',
|
|
'count': data.total,
|
|
'data': data.rows
|
|
};
|
|
}
|
|
});
|
|
}
|
|
// 重载表格
|
|
function reloadTable(currentPage) {
|
|
table.reload('dataTable', {
|
|
url: top.restAjax.path(tableUrl, []),
|
|
where: {
|
|
keywords: $('#keywords').val(),
|
|
deptTotalQuarter: $('#deptTotalQuarter').val(),
|
|
deptTotalYear:$('#deptTotalYear').val()
|
|
},
|
|
/* page: {
|
|
curr: currentPage
|
|
},*/
|
|
height: $win.height() - 90,
|
|
});
|
|
}
|
|
// 初始化日期
|
|
function initDate() {
|
|
// 日期选择
|
|
laydate.render({
|
|
elem: '#deptTotalYear',
|
|
type: 'year',
|
|
value:new Date()
|
|
});
|
|
|
|
}
|
|
// 删除
|
|
function removeData(ids) {
|
|
top.dialog.msg(top.dataMessage.delete, {
|
|
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/deptassess/removedeptassess/{ids}', [ids]), {}, null, function (code, data) {
|
|
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
|
|
reloadTable();
|
|
}, function (code, data) {
|
|
top.dialog.msg(data.msg);
|
|
}, function () {
|
|
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
|
|
}, function () {
|
|
top.dialog.close(layIndex);
|
|
});
|
|
}
|
|
});
|
|
}
|
|
initDate();
|
|
initTable();
|
|
|
|
// 事件 - 页面变化
|
|
$win.on('resize', function() {
|
|
clearTimeout(resizeTimeout);
|
|
resizeTimeout = setTimeout(function() {
|
|
reloadTable();
|
|
}, 500);
|
|
});
|
|
// 事件 - 搜索
|
|
$(document).on('click', '#search', function() {
|
|
reloadTable(1);
|
|
});
|
|
//手动统计
|
|
$(document).on('click', '#total', function() {
|
|
var v1 = $('#deptTotalYear').val();
|
|
var v2 = $('#deptTotalQuarter').val();
|
|
total(v1,v2);
|
|
});
|
|
|
|
|
|
|
|
function total(v1,v2){
|
|
if(v1 === ''){
|
|
layer.msg('请选择统计年份')
|
|
}
|
|
if(v2 === ''){
|
|
layer.msg('请选择统计季度')
|
|
}
|
|
var v2Str = "";
|
|
if(v2 === '1'){
|
|
v2Str = '第一季度'
|
|
}
|
|
if(v2 === '2'){
|
|
v2Str = '第二季度'
|
|
}
|
|
if(v2 === '3'){
|
|
v2Str = '第三季度'
|
|
}
|
|
if(v2 === '4'){
|
|
v2Str = '第四季度'
|
|
}
|
|
top.dialog.msg('确定要统计'+v1+'年'+v2Str+'的数据吗?', {
|
|
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.get(top.restAjax.path('api/deptassess/initManualDeptData/{year}/{quarter}', [v1,v2]), {}, null, function (code, data) {
|
|
top.dialog.msg('统计完成', {time: 1000});
|
|
reloadTable();
|
|
}, function (code, data) {
|
|
top.dialog.msg(data.msg);
|
|
}, function () {
|
|
layIndex = top.dialog.msg('统计中...', {icon: 16, time: 0, shade: 0.3});
|
|
}, function () {
|
|
top.dialog.close(layIndex);
|
|
});
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
//按钮事件
|
|
table.on('tool(dataTable)',function(obj){
|
|
var layEvent = obj.event;
|
|
var data = obj.data;
|
|
if(layEvent === 'deptTotalScoreDetails') {
|
|
layer.open({
|
|
type: 2,
|
|
title: false,
|
|
closeBtn: 1,
|
|
area: ['90%', '90%'],
|
|
shadeClose: true,
|
|
anim: 2,
|
|
content: top.restAjax.path('route/deptassesschangescore/list-score-details-deptassesschangescore.html?deptAssessId={deptAssessId}', [data.deptAssessId]),
|
|
end: function() {
|
|
// reloadTable();
|
|
}
|
|
});
|
|
}
|
|
});
|
|
/* // 事件 - 增删改
|
|
table.on('toolbar(dataTable)', function(obj) {
|
|
var layEvent = obj.event;
|
|
var checkStatus = table.checkStatus('dataTable');
|
|
var checkDatas = checkStatus.data;
|
|
if(layEvent === 'saveEvent') {
|
|
layer.open({
|
|
type: 2,
|
|
title: false,
|
|
closeBtn: 0,
|
|
area: ['100%', '100%'],
|
|
shadeClose: true,
|
|
anim: 2,
|
|
content: top.restAjax.path('route/deptassess/save-deptassess.html', []),
|
|
end: function() {
|
|
reloadTable();
|
|
}
|
|
});
|
|
} else if(layEvent === 'updateEvent') {
|
|
if(checkDatas.length === 0) {
|
|
top.dialog.msg(top.dataMessage.table.selectEdit);
|
|
} else if(checkDatas.length > 1) {
|
|
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
|
} else {
|
|
layer.open({
|
|
type: 2,
|
|
title: false,
|
|
closeBtn: 0,
|
|
area: ['100%', '100%'],
|
|
shadeClose: true,
|
|
anim: 2,
|
|
content: top.restAjax.path('route/deptassess/update-deptassess.html?deptAssessId={deptAssessId}', [checkDatas[0].deptAssessId]),
|
|
end: function() {
|
|
reloadTable();
|
|
}
|
|
});
|
|
}
|
|
} else if(layEvent === 'removeEvent') {
|
|
if(checkDatas.length === 0) {
|
|
top.dialog.msg(top.dataMessage.table.selectDelete);
|
|
} else {
|
|
var ids = '';
|
|
for(var i = 0, item; item = checkDatas[i++];) {
|
|
if(i > 1) {
|
|
ids += '_';
|
|
}
|
|
ids += item['deptAssessId'];
|
|
}
|
|
removeData(ids);
|
|
}
|
|
}
|
|
});*/
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |