新增统计功能和页面
This commit is contained in:
parent
2346b115a6
commit
387f7db472
@ -159,4 +159,24 @@ public class CountController extends AbstractController {
|
||||
return countService.countHiddenDangerReportDetail(year);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "企业检查情况表", notes = "企业检查情况表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "year", value = "年份", paramType = "path"),
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("countenterprisechecktable/{year}")
|
||||
public SuccessResultData<Map<String, Object>> countEnterpriseCheckTable(@PathVariable("year") String year) {
|
||||
return countService.countEnterpriseCheckTable(year);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "计划实际检查情况表", notes = "计划实际检查情况表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "year", value = "年份", paramType = "path"),
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("countenterpriseplanrealchecktable/{year}")
|
||||
public SuccessResultData<Map<String, Object>> countEnterprisePlanRealCheckTable(@PathVariable("year") String year) {
|
||||
return countService.countEnterprisePlanRealCheckTable(year);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -81,4 +81,12 @@ public interface ICheckDao {
|
||||
*/
|
||||
List<CheckDTO> listCheckSimple(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 统计企业的检查数
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
Integer countEnterpriseCheck(Map<String, Object> params) throws SearchException;
|
||||
}
|
||||
|
@ -288,4 +288,13 @@ public interface ICheckService {
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<CheckDTO> listCheckSimple(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 企业检查情况表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
Integer countEnterpriseCheck(Map<String, Object> params) throws SearchException;
|
||||
}
|
||||
|
@ -713,6 +713,12 @@ public class CheckServiceImpl extends BaseService implements ICheckService {
|
||||
return checkDao.listCheckSimple(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countEnterpriseCheck(Map<String, Object> params) throws SearchException {
|
||||
Integer result = checkDao.countEnterpriseCheck(params);
|
||||
return result == null ? 0 : result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户ID
|
||||
*
|
||||
|
@ -175,4 +175,15 @@ public interface ICheckPlanService {
|
||||
* @throws SearchException
|
||||
*/
|
||||
Integer countCheckPlanByUserIdsAndYear(List<String> userIdList, String year) throws SearchException;
|
||||
|
||||
/**
|
||||
* 统计年度月度检查计划
|
||||
*
|
||||
* @param userIdList
|
||||
* @param year
|
||||
* @param month
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
Integer countCheckPlanByUserIdsAndYearMonth(List<String> userIdList, String year, int month) throws SearchException;
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.cm.inspection.service.checkplan.impl;
|
||||
|
||||
import com.cm.common.exception.ParamsException;
|
||||
import com.cm.common.exception.RemoveException;
|
||||
import com.cm.common.exception.SaveException;
|
||||
import com.cm.common.exception.SearchException;
|
||||
@ -24,7 +23,9 @@ import org.joda.time.DateTime;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: CheckPlanServiceImpl
|
||||
@ -248,6 +249,16 @@ public class CheckPlanServiceImpl extends BaseService implements ICheckPlanServi
|
||||
return result == null ? 0 : result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countCheckPlanByUserIdsAndYearMonth(List<String> userIdList, String year, int month) throws SearchException {
|
||||
Map<String, Object> params = getHashMap(5);
|
||||
params.put("userIdList", userIdList);
|
||||
params.put("year", year);
|
||||
params.put("month", month);
|
||||
Integer result = checkPlanDao.countTotalCheckPlan(params);
|
||||
return result == null ? 0 : result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultData<Map<String, Object>> countCurrentMonthCheckPlanOfMine() throws SearchException {
|
||||
return countCurrentMonthCheckPlanOfMine(null);
|
||||
|
@ -72,4 +72,22 @@ public interface ICountService {
|
||||
* @throws SearchException
|
||||
*/
|
||||
SuccessResultData<Map<String, Object>> countHiddenDangerReportDetail(String year) throws Exception;
|
||||
|
||||
/**
|
||||
* 企业检查情况表
|
||||
*
|
||||
* @param year
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
SuccessResultData<Map<String, Object>> countEnterpriseCheckTable(String year) throws SearchException;
|
||||
|
||||
/**
|
||||
* 计划实际检查情况表
|
||||
*
|
||||
* @param year
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
SuccessResultData<Map<String, Object>> countEnterprisePlanRealCheckTable(String year) throws SearchException;
|
||||
}
|
||||
|
@ -26,10 +26,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.format.DateTimeFormat;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@ -170,7 +168,7 @@ public class CountServiceImpl extends BaseService implements ICountService {
|
||||
// 地区企业认领总数
|
||||
Integer enterpriseReceiveCount = countEnterpriseOfArea(areaDTO.getDictionaryId(), year);
|
||||
resultListMap.put("enterpriseReceiveCount", enterpriseReceiveCount);
|
||||
resultListMap.put("enterpriseReceiveRatio", enterpriseCount == 0 ? 0 : new BigDecimal((double) enterpriseReceiveCount / enterpriseCount).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() * 100);
|
||||
resultListMap.put("enterpriseReceiveRatio", enterpriseCount == 0 ? 0 : String.format("%.2f", (double) enterpriseReceiveCount / enterpriseCount * 100));
|
||||
resultList.add(resultListMap);
|
||||
}
|
||||
Map<String, Object> result = getHashMap(3);
|
||||
@ -198,7 +196,7 @@ public class CountServiceImpl extends BaseService implements ICountService {
|
||||
// 实际检查企业统计
|
||||
Integer checkCount = getCheckCountByYear(userIdList, year);
|
||||
resultListMap.put("checkCount", checkCount);
|
||||
resultListMap.put("completeRatio", checkPlanCount == null || checkPlanCount == 0 ? 0 : new BigDecimal((double) checkCount / checkPlanCount).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
|
||||
resultListMap.put("completeRatio", checkPlanCount == null || checkPlanCount == 0 ? 0 : String.format("%.2f", (double) checkCount / checkPlanCount * 100));
|
||||
// 待复查企业
|
||||
List<String> listNeedReCheck = listNeedReCheckIds(userIdList);
|
||||
List<CheckDTO> checkDTOs = listNeedReCheck(listNeedReCheck, year);
|
||||
@ -216,7 +214,7 @@ public class CountServiceImpl extends BaseService implements ICountService {
|
||||
Integer countRectification = countCheckHiddenDanger - countReCheckHiddenDanger;
|
||||
resultListMap.put("countRectification", countRectification);
|
||||
// 整改率
|
||||
resultListMap.put("rectificationRate", countCheckHiddenDanger == null || countCheckHiddenDanger == 0 ? 0 : new BigDecimal((double) countRectification / countCheckHiddenDanger).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
|
||||
resultListMap.put("rectificationRate", countCheckHiddenDanger == null || countCheckHiddenDanger == 0 ? 0 : String.format("%.2f", (double) countRectification / countCheckHiddenDanger * 100));
|
||||
// 不配合次数(上报条数)
|
||||
Integer countUnCoordination = countUnCoordination(userIdList, year);
|
||||
resultListMap.put("countUnCoordination", countUnCoordination);
|
||||
@ -278,6 +276,74 @@ public class CountServiceImpl extends BaseService implements ICountService {
|
||||
return new SuccessResultData<>(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultData<Map<String, Object>> countEnterpriseCheckTable(String year) throws SearchException {
|
||||
LOG.debug("获取三级区域");
|
||||
List<DataDictionaryDTO> areaDTOs = dataDictionaryService.listDictionaryByParentId("3f62e230-47a5-4ad9-ab01-08fd2c5218d8");
|
||||
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||
Map<String, Object> params = getHashMap(3);
|
||||
params.put("year", year);
|
||||
for (DataDictionaryDTO areaDTO : areaDTOs) {
|
||||
Map<String, Object> resultListMap = getHashMap(4);
|
||||
resultListMap.put("areaName", areaDTO.getDictionaryName());
|
||||
// 网格员的Id列表
|
||||
List<String> userIdList = listGridPersonnelUserId(areaDTO.getDictionaryId());
|
||||
params.put("userIdList", userIdList);
|
||||
// 统计检查多少家
|
||||
Integer enterpriseCheckCount = checkService.countEnterpriseCheck(params);
|
||||
resultListMap.put("enterpriseCheckCount", enterpriseCheckCount);
|
||||
// 统计地区有多少企业
|
||||
params.put("isLogOff", 0);
|
||||
params.put("area3", areaDTO.getDictionaryId());
|
||||
params.put("year", year);
|
||||
Integer enterpriseCount = enterpriseService.countEnterpriseReturnInteger(params);
|
||||
resultListMap.put("enterpriseCount", enterpriseCount);
|
||||
// 覆盖率
|
||||
resultListMap.put("coverage", enterpriseCount == 0 ? 0 : String.format("%.2f", (double) enterpriseCheckCount / enterpriseCount * 100));
|
||||
resultList.add(resultListMap);
|
||||
}
|
||||
Map<String, Object> result = getHashMap(4);
|
||||
result.put("year", year);
|
||||
result.put("resultList", resultList);
|
||||
return new SuccessResultData<>(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultData<Map<String, Object>> countEnterprisePlanRealCheckTable(String year) throws SearchException {
|
||||
LOG.debug("获取三级区域");
|
||||
List<DataDictionaryDTO> areaDTOs = dataDictionaryService.listDictionaryByParentId("3f62e230-47a5-4ad9-ab01-08fd2c5218d8");
|
||||
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||
Map<String, Object> params = getHashMap(3);
|
||||
for (DataDictionaryDTO areaDTO : areaDTOs) {
|
||||
Map<String, Object> resultListMap = getHashMap(4);
|
||||
resultListMap.put("areaName", areaDTO.getDictionaryName());
|
||||
// 网格员的Id列表
|
||||
List<String> userIdList = listGridPersonnelUserId(areaDTO.getDictionaryId());
|
||||
params.put("userIdList", userIdList);
|
||||
List<Map<String, Object>> yearMonthList = new ArrayList<>();
|
||||
for (int month = 1; month <= 12; month++) {
|
||||
Map<String, Object> yearMonthMap = getHashMap(3);
|
||||
yearMonthMap.put("month", month);
|
||||
Integer planCount = checkPlanService.countCheckPlanByUserIdsAndYearMonth(userIdList, year, month);
|
||||
yearMonthMap.put("planCount", planCount);
|
||||
// 计划总数
|
||||
params.remove("month");
|
||||
params.put("yearMonth", String.format("%s-%02d", year, month));
|
||||
// 统计检查多少家
|
||||
Integer enterpriseCheckCount = checkService.countEnterpriseCheck(params);
|
||||
yearMonthMap.put("enterpriseCheckCount", enterpriseCheckCount);
|
||||
yearMonthMap.put("completionRate", planCount == 0 ? 0 : String.format("%.2f", (double) enterpriseCheckCount / planCount * 100));
|
||||
yearMonthList.add(yearMonthMap);
|
||||
}
|
||||
resultListMap.put("yearMonthList", yearMonthList);
|
||||
resultList.add(resultListMap);
|
||||
}
|
||||
Map<String, Object> result = getHashMap(4);
|
||||
result.put("year", year);
|
||||
result.put("resultList", resultList);
|
||||
return new SuccessResultData<>(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建检查结果到检查项中
|
||||
*
|
||||
@ -626,8 +692,8 @@ public class CountServiceImpl extends BaseService implements ICountService {
|
||||
*/
|
||||
private SuccessResultData<Map<String, Object>> returnCountResult(List<Map<String, Object>> resultList, String startDate, String endDate) {
|
||||
Map<String, Object> result = getHashMap(5);
|
||||
result.put("startDate", startDate.substring(0, 7).replace("-", "年"));
|
||||
result.put("endDate", endDate.substring(0, 7).replace("-", "年"));
|
||||
result.put("startDate", startDate.substring(0, 7).replace("-", "年") +"月");
|
||||
result.put("endDate", endDate.substring(0, 7).replace("-", "年") +"月");
|
||||
result.put("resultList", resultList);
|
||||
return new SuccessResultData<>(result);
|
||||
}
|
||||
@ -734,7 +800,7 @@ public class CountServiceImpl extends BaseService implements ICountService {
|
||||
resultListMap.put("rectificationCount", rectificationCount);
|
||||
int totalRectificationCount = unRectificationCount + rectificationCount;
|
||||
// 整改率
|
||||
resultListMap.put("rectificationRatio", totalRectificationCount == 0 ? 0 : new BigDecimal((double) rectificationCount / (unRectificationCount + rectificationCount)).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() * 100);
|
||||
resultListMap.put("rectificationRatio", totalRectificationCount == 0 ? 0 : String.format("%.2f", (double) rectificationCount / (unRectificationCount + rectificationCount) * 100));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -421,4 +421,35 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 企业检查情况 -->
|
||||
<select id="countEnterpriseCheck" parameterType="map" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM (
|
||||
SELECT
|
||||
enterprise_id
|
||||
FROM
|
||||
gen_check
|
||||
WHERE
|
||||
is_delete = 0
|
||||
<if test="year != null and year != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 4) = #{year}
|
||||
</if>
|
||||
<if test="yearMonth != null and yearMonth != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 7) = #{yearMonth}
|
||||
</if>
|
||||
<if test="userIdList != null and userIdList.size > 0">
|
||||
AND
|
||||
creator IN
|
||||
<foreach collection="userIdList" index="index" open="(" separator="," close=")">
|
||||
#{userIdList[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY
|
||||
enterprise_id
|
||||
) temp
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -218,6 +218,10 @@
|
||||
AND
|
||||
check_plan_year = #{year}
|
||||
</if>
|
||||
<if test="month != null and month != ''">
|
||||
AND
|
||||
check_plan_month = #{month}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,150 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<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">
|
||||
<style>
|
||||
table th, td {text-align: center !important;}
|
||||
#title {text-align: center;}
|
||||
</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="layui-row">
|
||||
<div class="layui-col-md12 button-group-box" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="year" class="layui-input search-item" placeholder="年份" readonly>
|
||||
</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="print" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-print"></i> 打印
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-col-md12" id="tableBox"></div>
|
||||
<script id="tableBoxTemplate" type="text/html">
|
||||
<h2 id="title" style="line-height: 32px; text-align: center;">{{d.data.year}}综合统计情况</h2>
|
||||
<table class="layui-table" id="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">地区</th>
|
||||
<th rowspan="2">认领企业数(家)</th>
|
||||
<th colspan="3">检(协)查情况</th>
|
||||
<th colspan="2">待复查(家)</th>
|
||||
<th colspan="3">隐患情况</th>
|
||||
<th rowspan="2">上报(家次)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>计划(家)</th>
|
||||
<th>实际(家)</th>
|
||||
<th>完成率</th>
|
||||
<th>总数</th>
|
||||
<th>超期</th>
|
||||
<th>发现(条)</th>
|
||||
<th>整改(条)</th>
|
||||
<th>整改率</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{# for(var i = 0, item; item = d.data.resultList[i++];) { }}
|
||||
<tr>
|
||||
<td>{{item.areaName}}</td>
|
||||
<td>{{item.enterpriseReceiveCount}}</td>
|
||||
<td>{{item.checkPlanCount}}</td>
|
||||
<td>{{item.checkCount}}</td>
|
||||
<td>{{item.completeRatio}}%</td>
|
||||
<td>{{item.needReCheck}}</td>
|
||||
<td>{{item.countTimeoutCheck}}</td>
|
||||
<td>{{item.countCheckHiddenDanger}}</td>
|
||||
<td>{{item.countRectification}}</td>
|
||||
<td>{{item.rectificationRate}}%</td>
|
||||
<td>{{item.countUnCoordination}}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var laydate = layui.laydate;
|
||||
var laytpl = layui.laytpl;
|
||||
var common = layui.common;
|
||||
|
||||
var today = common.formatDate('yyyy', new Date())
|
||||
|
||||
// 初始化日期
|
||||
function initDate() {
|
||||
// 日期选择
|
||||
laydate.render({
|
||||
elem: '#year',
|
||||
type: 'year',
|
||||
format: 'yyyy',
|
||||
trigger: 'click',
|
||||
value: today
|
||||
});
|
||||
}
|
||||
initDate();
|
||||
|
||||
function initTable() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/count/countcheckdetailtable/{year}', [$('#year').val() ? $('#year').val() : today]), {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('tableBoxTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('tableBox').innerHTML = html;
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg('正在加载...', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
initTable();
|
||||
});
|
||||
|
||||
$(document).on('click', '#print', function() {
|
||||
var bodyHtml = $('html');
|
||||
var html = bodyHtml.clone();
|
||||
html.find('.button-group-box').remove();
|
||||
html.find('.layui-anim').css({'padding': '0px'});
|
||||
var win = window.open("打印窗口", "_blank");
|
||||
win.document.write(html.html());
|
||||
$(win.document).ready(function() {
|
||||
setTimeout(function() {
|
||||
win.print();
|
||||
win.close();
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
154
src/main/resources/static/route/count/list-countchecktable.html
Normal file
154
src/main/resources/static/route/count/list-countchecktable.html
Normal file
@ -0,0 +1,154 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<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">
|
||||
<style>
|
||||
table th, td {text-align: center !important;}
|
||||
#title {text-align: center;}
|
||||
</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="layui-row">
|
||||
<div class="layui-col-md12 button-group-box" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||
</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="print" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-print"></i> 打印
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-col-md12" id="tableBox"></div>
|
||||
<script id="tableBoxTemplate" type="text/html">
|
||||
<h2 id="title" style="line-height: 32px; text-align: center;">{{d.data.startDate}}到{{d.data.endDate}}各地区安全检查统计</h2>
|
||||
<table class="layui-table" id="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="3">地区</th>
|
||||
<th colspan="3">检查企业</th>
|
||||
<th colspan="3">整改情况(家)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">计划(家)</th>
|
||||
<th colspan="2">实际</th>
|
||||
<th rowspan="2">未整改</th>
|
||||
<th rowspan="2">已整改</th>
|
||||
<th rowspan="2">整改率</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>(家)</th>
|
||||
<th>(次)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{# for(var i = 0, item; item = d.data.resultList[i++];) { }}
|
||||
<tr>
|
||||
<td>{{item.areaName}}</td>
|
||||
<td>{{item.planCount}}</td>
|
||||
<td>{{item.checkCount}}</td>
|
||||
<td>{{item.checkTotalCount}}</td>
|
||||
<td>{{item.unRectificationCount}}</td>
|
||||
<td>{{item.rectificationCount}}</td>
|
||||
<td>{{item.rectificationRatio}}%</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'laytpl', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var laydate = layui.laydate;
|
||||
var laytpl = layui.laytpl;
|
||||
var common = layui.common;
|
||||
|
||||
var today = common.formatDate('yyyy-MM', new Date())
|
||||
|
||||
// 初始化日期
|
||||
function initDate() {
|
||||
// 日期选择
|
||||
laydate.render({
|
||||
elem: '#startTime',
|
||||
type: 'month',
|
||||
format: 'yyyy-MM',
|
||||
trigger: 'click',
|
||||
value: today
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#endTime',
|
||||
type: 'month',
|
||||
format: 'yyyy-MM',
|
||||
trigger: 'click',
|
||||
value: today
|
||||
});
|
||||
}
|
||||
initDate();
|
||||
|
||||
function initTable() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/count/countchecktable/{startDate}/{endDate}', [$('#startTime').val() ? $('#startTime').val() : today, $('#endTime').val() ? $('#endTime').val() : today]), {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('tableBoxTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('tableBox').innerHTML = html;
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg('正在加载...', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
initTable();
|
||||
});
|
||||
|
||||
$(document).on('click', '#print', function() {
|
||||
var bodyHtml = $('html');
|
||||
var html = bodyHtml.clone();
|
||||
html.find('.button-group-box').remove();
|
||||
html.find('.layui-anim').css({'padding': '0px'});
|
||||
var win = window.open("打印窗口", "_blank");
|
||||
win.document.write(html.html());
|
||||
$(win.document).ready(function() {
|
||||
setTimeout(function() {
|
||||
win.print();
|
||||
win.close();
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,131 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<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">
|
||||
<style>
|
||||
table th, td {text-align: center !important;}
|
||||
#title {text-align: center;}
|
||||
</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="layui-row">
|
||||
<div class="layui-col-md12 button-group-box" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="year" class="layui-input search-item" placeholder="年份" readonly>
|
||||
</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="print" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-print"></i> 打印
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-col-md3" id="tableBox"></div>
|
||||
<script id="tableBoxTemplate" type="text/html">
|
||||
<h2 id="title" style="line-height: 32px;">{{d.data.year}}各地区企业检查情况表</h2>
|
||||
<table class="layui-table" id="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>地区</th>
|
||||
<th>单位(家)</th>
|
||||
<th>检、协查(家)</th>
|
||||
<th>覆盖率</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{# for(var i = 0, item; item = d.data.resultList[i++];) { }}
|
||||
<tr>
|
||||
<td>{{item.areaName}}</td>
|
||||
<td>{{item.enterpriseCount}}</td>
|
||||
<td>{{item.enterpriseCheckCount}}</td>
|
||||
<td>{{item.coverage}}%</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var laydate = layui.laydate;
|
||||
var laytpl = layui.laytpl;
|
||||
var common = layui.common;
|
||||
|
||||
var today = common.formatDate('yyyy', new Date())
|
||||
|
||||
// 初始化日期
|
||||
function initDate() {
|
||||
// 日期选择
|
||||
laydate.render({
|
||||
elem: '#year',
|
||||
type: 'year',
|
||||
format: 'yyyy',
|
||||
trigger: 'click',
|
||||
value: today
|
||||
});
|
||||
}
|
||||
initDate();
|
||||
|
||||
function initTable() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/count/countenterprisechecktable/{year}', [$('#year').val() ? $('#year').val() : today]), {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('tableBoxTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('tableBox').innerHTML = html;
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg('正在加载...', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
initTable();
|
||||
});
|
||||
|
||||
$(document).on('click', '#print', function() {
|
||||
var bodyHtml = $('html');
|
||||
var html = bodyHtml.clone();
|
||||
html.find('.button-group-box').remove();
|
||||
html.find('.layui-anim').css({'padding': '0px'});
|
||||
var win = window.open("打印窗口", "_blank");
|
||||
win.document.write(html.html());
|
||||
$(win.document).ready(function() {
|
||||
setTimeout(function() {
|
||||
win.print();
|
||||
win.close();
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,156 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<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">
|
||||
<style>
|
||||
table th, td {text-align: center !important;}
|
||||
#title {text-align: center;}
|
||||
</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="layui-row">
|
||||
<div class="layui-col-md12 button-group-box" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="year" class="layui-input search-item" placeholder="年份" readonly>
|
||||
</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="print" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-print"></i> 打印
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-col-md12" id="tableBox"></div>
|
||||
<script id="tableBoxTemplate" type="text/html">
|
||||
<h2 id="title" style="line-height: 32px;">{{d.data.year}}计划实际检查情况表</h2>
|
||||
<table class="layui-table" id="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">月份</th>
|
||||
{{# for(var i = 0, item; item = d.data.resultList[i++];) { }}
|
||||
<th>{{item.areaName}}</th>
|
||||
{{# } }}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{# for(var month = 1; month <= 12; month++) { }}
|
||||
<tr>
|
||||
<td rowspan="3">{{month}}</td>
|
||||
<td>计划(家)</td>
|
||||
{{# for(var i = 0, item; item = d.data.resultList[i++];) { }}
|
||||
{{# for(var j = 0, jItem; jItem = item.yearMonthList[j++];) { }}
|
||||
{{# if(jItem.month == month) { }}
|
||||
<td>{{jItem.planCount}}</td>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>实际(家)</td>
|
||||
{{# for(var i = 0, item; item = d.data.resultList[i++];) { }}
|
||||
{{# for(var j = 0, jItem; jItem = item.yearMonthList[j++];) { }}
|
||||
{{# if(jItem.month == month) { }}
|
||||
<td>{{jItem.enterpriseCheckCount}}</td>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>完成率</td>
|
||||
{{# for(var i = 0, item; item = d.data.resultList[i++];) { }}
|
||||
{{# for(var j = 0, jItem; jItem = item.yearMonthList[j++];) { }}
|
||||
{{# if(jItem.month == month) { }}
|
||||
<td>{{jItem.completionRate}}</td>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</tr>
|
||||
{{# } }}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var laydate = layui.laydate;
|
||||
var laytpl = layui.laytpl;
|
||||
var common = layui.common;
|
||||
|
||||
var today = common.formatDate('yyyy', new Date())
|
||||
|
||||
// 初始化日期
|
||||
function initDate() {
|
||||
// 日期选择
|
||||
laydate.render({
|
||||
elem: '#year',
|
||||
type: 'year',
|
||||
format: 'yyyy',
|
||||
trigger: 'click',
|
||||
value: today
|
||||
});
|
||||
}
|
||||
initDate();
|
||||
|
||||
function initTable() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/count/countenterpriseplanrealchecktable/{year}', [$('#year').val() ? $('#year').val() : today]), {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('tableBoxTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('tableBox').innerHTML = html;
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg('正在加载...', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
initTable();
|
||||
});
|
||||
|
||||
$(document).on('click', '#print', function() {
|
||||
var bodyHtml = $('html');
|
||||
var html = bodyHtml.clone();
|
||||
html.find('.button-group-box').remove();
|
||||
html.find('.layui-anim').css({'padding': '0px'});
|
||||
var win = window.open("打印窗口", "_blank");
|
||||
win.document.write(html.html());
|
||||
$(win.document).ready(function() {
|
||||
setTimeout(function() {
|
||||
win.print();
|
||||
win.close();
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,131 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<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">
|
||||
<style>
|
||||
table th, td {text-align: center !important;}
|
||||
#title {text-align: center;}
|
||||
</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="layui-row">
|
||||
<div class="layui-col-md12 button-group-box" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="year" class="layui-input search-item" placeholder="年份" readonly>
|
||||
</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="print" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-print"></i> 打印
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-col-md12" id="tableBox"></div>
|
||||
<script id="tableBoxTemplate" type="text/html">
|
||||
<h2 id="title" style="line-height: 32px; text-align: center;">{{d.data.year}}各地企业认领情况统计</h2>
|
||||
<table class="layui-table" id="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>地区</th>
|
||||
<th>企业数量</th>
|
||||
<th>认领数量</th>
|
||||
<th>认领率</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{# for(var i = 0, item; item = d.data.areaList[i++];) { }}
|
||||
<tr>
|
||||
<td>{{item.areaName}}</td>
|
||||
<td>{{item.enterpriseCount}}</td>
|
||||
<td>{{item.enterpriseReceiveCount}}</td>
|
||||
<td>{{item.enterpriseReceiveRatio}}%</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var laydate = layui.laydate;
|
||||
var laytpl = layui.laytpl;
|
||||
var common = layui.common;
|
||||
|
||||
var today = common.formatDate('yyyy', new Date())
|
||||
|
||||
// 初始化日期
|
||||
function initDate() {
|
||||
// 日期选择
|
||||
laydate.render({
|
||||
elem: '#year',
|
||||
type: 'year',
|
||||
format: 'yyyy',
|
||||
trigger: 'click',
|
||||
value: today
|
||||
});
|
||||
}
|
||||
initDate();
|
||||
|
||||
function initTable() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/count/countenterprisereceive/{year}', [$('#year').val() ? $('#year').val() : today]), {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('tableBoxTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('tableBox').innerHTML = html;
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg('正在加载...', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
initTable();
|
||||
});
|
||||
|
||||
$(document).on('click', '#print', function() {
|
||||
var bodyHtml = $('html');
|
||||
var html = bodyHtml.clone();
|
||||
html.find('.button-group-box').remove();
|
||||
html.find('.layui-anim').css({'padding': '0px'});
|
||||
var win = window.open("打印窗口", "_blank");
|
||||
win.document.write(html.html());
|
||||
$(win.document).ready(function() {
|
||||
setTimeout(function() {
|
||||
win.print();
|
||||
win.close();
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,63 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<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">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>地区</th>
|
||||
<th>计划数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>昆都仑区</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<script id="tableTemplate" type="text/html">
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var laydate = layui.laydate;
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = setTimeout(function() {
|
||||
reloadTable();
|
||||
}, 500);
|
||||
});
|
||||
|
||||
function initTable() {
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,104 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<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">
|
||||
<style>
|
||||
table th, td {text-align: center !important;}
|
||||
#title {text-align: center;}
|
||||
</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="layui-row">
|
||||
<div class="layui-col-md12 button-group-box" style="margin-bottom: 10px;">
|
||||
<button type="button" id="print" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-print"></i> 打印
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-col-md12" id="tableBox"></div>
|
||||
<script id="tableBoxTemplate" type="text/html">
|
||||
<h2 id="title" style="line-height: 32px;">安全生产行业分类统计</h2>
|
||||
<table class="layui-table" id="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>地区</th>
|
||||
{{# for(var i = 0, item; item = d.data[0].industryTypeCountList[i++];) { }}
|
||||
<th>{{item.areaName}}</th>
|
||||
{{# } }}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{# for(var i = 0, item; item = d.data[i++];) { }}
|
||||
<tr>
|
||||
<td>{{item.areaName}}</td>
|
||||
{{# for(var j = 0, jItem; jItem = item.industryTypeCountList[j++];) { }}
|
||||
<td>{{jItem.enterpriseCount}}</td>
|
||||
{{# } }}
|
||||
</tr>
|
||||
{{# } }}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var laytpl = layui.laytpl;
|
||||
var common = layui.common;
|
||||
|
||||
function initTable() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/count/countindustryenterprisetable', []), {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('tableBoxTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('tableBox').innerHTML = html;
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg('正在加载...', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
|
||||
$(document).on('click', '#print', function() {
|
||||
var bodyHtml = $('html');
|
||||
var html = bodyHtml.clone();
|
||||
html.find('.button-group-box').remove();
|
||||
html.find('.layui-anim').css({'padding': '0px'});
|
||||
var win = window.open("打印窗口", "_blank");
|
||||
win.document.write(html.html());
|
||||
$(win.document).ready(function() {
|
||||
setTimeout(function() {
|
||||
win.print();
|
||||
win.close();
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
137
src/main/resources/static/route/count/list-countworktable.html
Normal file
137
src/main/resources/static/route/count/list-countworktable.html
Normal file
@ -0,0 +1,137 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<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">
|
||||
<style>
|
||||
table th, td {text-align: center !important;}
|
||||
#title {text-align: center;}
|
||||
</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="layui-row">
|
||||
<div class="layui-col-md12 button-group-box" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||
</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="print" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-print"></i> 打印
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-col-md3" id="tableBox"></div>
|
||||
<script id="tableBoxTemplate" type="text/html">
|
||||
<h2 id="title" style="line-height: 32px;">{{d.data.startDate}}到{{d.data.endDate}}各地区工作计划统计</h2>
|
||||
<table class="layui-table" id="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>地区</th>
|
||||
<th>计划数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{# for(var i = 0, item; item = d.data.resultList[i++];) { }}
|
||||
<tr>
|
||||
<td>{{item.areaName}}</td>
|
||||
<td>{{item.planCount}}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'laytpl', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var laydate = layui.laydate;
|
||||
var laytpl = layui.laytpl;
|
||||
var common = layui.common;
|
||||
|
||||
var today = common.formatDate('yyyy-MM', new Date())
|
||||
|
||||
// 初始化日期
|
||||
function initDate() {
|
||||
// 日期选择
|
||||
laydate.render({
|
||||
elem: '#startTime',
|
||||
type: 'month',
|
||||
format: 'yyyy-MM',
|
||||
trigger: 'click',
|
||||
value: today
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#endTime',
|
||||
type: 'month',
|
||||
format: 'yyyy-MM',
|
||||
trigger: 'click',
|
||||
value: today
|
||||
});
|
||||
}
|
||||
initDate();
|
||||
|
||||
function initTable() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/count/countworktable/{startDate}/{endDate}', [$('#startTime').val() ? $('#startTime').val() : today, $('#endTime').val() ? $('#endTime').val() : today]), {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('tableBoxTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('tableBox').innerHTML = html;
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg('正在加载...', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
initTable();
|
||||
});
|
||||
|
||||
$(document).on('click', '#print', function() {
|
||||
var bodyHtml = $('html');
|
||||
var html = bodyHtml.clone();
|
||||
html.find('.button-group-box').remove();
|
||||
html.find('.layui-anim').css({'padding': '0px'});
|
||||
var win = window.open("打印窗口", "_blank");
|
||||
win.document.write(html.html());
|
||||
$(win.document).ready(function() {
|
||||
setTimeout(function() {
|
||||
win.print();
|
||||
win.close();
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user