123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title></title>
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <!-- 引入mui的css样式 -->
- <link href="../css/mui.css" rel="stylesheet" />
- <!-- 引入app样式 -->
- <link rel="stylesheet" type="text/css" href="../css/app.css" />
- <link rel="stylesheet" type="text/css" href="../css/app.new.css">
- <!-- 引入字体 -->
- <link rel="stylesheet" type="text/css" href="../fonts/TTTGB-Medium.css" />
- <link rel="stylesheet" type="text/css" href="../fonts/font-time.css" />
- <link rel="stylesheet" type="text/css" href="../fonts/font-jt.css">
- <!-- 本页独有样式 -->
- <style type="text/css">
- /* 通用样式 */
- html,
- body {
- height: 100%;
- background-color: rgba(0, 0, 0, 0.5);
- }
- /* 整体容器样式 */
- .divContentPanel {
- position: absolute;
- /* background-color: antiquewhite; */
- display: flex;
- flex-direction: column;
- height: calc(100% - 100px);
- width: 90%;
- margin-top: 50px;
- margin-left: calc(calc(10%)/2);
- }
- /* 主要内容容器样式 */
- .divContent {
- flex: 1;
- background-color: rgba(24, 35, 73, 1.0);
- border-radius: 10px;
- overflow-y: auto;
- }
- /* 强制修改mui-btn样式 */
- .mui-btn {
- margin-top: 10px;
- margin-bottom: 10px;
- margin-left: 20px;
- margin-right: 20px;
- }
- /* 强制mui的行样式 */
- .mui-row {
- margin-bottom: 5px;
- }
- /* 标题行样式 */
- .cr-row-title {
- height: 40px;
- line-height: 40px;
- background-color: rgb(27, 38, 80);
- border-radius: 10px 10px 0px 0px;
- text-align: center;
- color: rgb(255, 255, 255);
- font-size: 16px;
- font-family: 'TTTGB-Medium' !important;
- }
- /* 图表行样式 */
- .cr-row-charts {
- margin-top: 5px !important;
- height: 260px;
- line-height: 260px;
- background-color: rgba(42, 61, 133, 0.0);
- }
- /* 统计列表行容器样式 */
- .cr-row-list {
- height: 50px;
- line-height: 50px;
- background-color: rgb(255, 255, 255);
- display: flex;
- flex-direction: row;
- }
- /* 统计行-左侧样式 */
- .cr-row-list-left {
- width: 120px;
- display: flex;
- align-items: center;
- }
- /* 统计行左侧-标题样式 */
- .cr-row-list-left>div {
- flex: 1;
- background-color: rgb(121, 182, 251);
- height: 70%;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 0px 25px 25px 0px;
- font-size: 14px;
- color: rgb(255, 255, 255);
- }
- /* 统计行-右侧样式 */
- .cr-row-list-right {
- flex: 1;
- display: flex;
- flex-direction: column;
- height: 100%;
- }
- /* 统计行-子行样式 */
- .cr-row-list-subrow {
- flex: 1;
- display: flex;
- flex-direction: row;
- }
- /* 统计行-子行div样式 */
- .cr-row-list-subrow div {
- display: flex;
- align-items: center;
- justify-content: center;
- flex: 1;
- font-size: 13px;
- height: 100%;
- line-height: 100%;
- color: rgb(255, 255, 255);
- }
- /* 统计行-子行-标题行样式 */
- .cr-row-list-subrow-title {}
- /* 统计行-子行-值行样式 */
- .cr-row-list-subrow-value div {
- font-family: 'UnidreamLED' !important;
- font-size: 16px !important;
- color: rgb(135, 219, 153);
- }
- /* 统计行-子行-值行-第一个div样式 */
- .cr-row-list-subrow-value>div:nth-child(1) {
- color: rgb(206, 65, 152);
- }
- .cr-row-list-subrow-value>div:nth-child(2) {
- color: rgb(255, 0, 0);
- }
- .cr-row-list-subrow-value>div:nth-child(5) {
- color: rgb(0, 255, 0);
- }
- /* 统计图样式 */
- .divCountBar {
- width: 100%;
- height: 100%;
- background-color: rgba(42, 61, 133, 1.0);
- }
- /* 按钮样式 */
- .mui-btn-primary {
- background-color: rgba(42, 61, 133, 1.0);
- border: solid 0px rgb(255, 255, 255);
- }
- </style>
- </head>
- <body>
- <div class="divContentPanel">
- <div class="divContent">
- <!-- 统计标题栏 -->
- <div class="mui-row cr-row-title">案件信息统计</div>
- <!-- 统计图表容器 -->
- <div class="mui-row cr-row-charts"></div>
- <!-- 统计列表容器 -->
- <div id="divCountList"></div>
- </div>
- <button type="button" class="mui-btn mui-btn-primary" onclick="EventClick_Close()">确定</button>
- </div>
- </body>
- </html>
- <!-- 引入mui脚本 -->
- <script src="../js/mui.js" type="text/javascript" charset="utf-8"></script>
- <!-- 引入jquery脚本 -->
- <script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
- <!-- 引入存储脚本 -->
- <script src="../js/save.js" type="text/javascript" charset="utf-8"></script>
- <!-- 引入网络脚本 -->
- <script src="../js/ajax.js" type="text/javascript" charset="utf-8"></script>
- <!-- 引入通用脚本 -->
- <script src="../js/common.js" type="text/javascript" charset="utf-8"></script>
- <!-- 引入图表脚本 -->
- <script src="../js/ECharts/echarts.js" type="text/javascript" charset="utf-8"></script>
- <!-- 引入自定义图表脚本 -->
- <script src="../js/CRECharts.js" type="text/javascript" charset="utf-8"></script>
- <!-- 引入webview脚本 -->
- <script src="../js/webview.js" type="text/javascript" charset="utf-8"></script>
- <!-- 本页独有脚本 -->
- <script type="text/javascript">
- /* mui初始化 */
- mui.init();
- /* 本地存储的用户 */
- var joinUser = undefined;
- /* 统计数据 */
- var countData = [];
- /* 初始化完成 */
- plusInit(function() {
- /* 获取存储的用户信息 */
- getSaveUserInfo({
- success: function(userInfo) {
- joinUser = userInfo;
- asyncCountData(function() {
- addCountBar();
- });
- },
- error: function(err) {
- muiAlertError(err);
- },
- });
- });
- /**
- * 同步远程统计数据
- * @param {function} callback 同步完成回调
- */
- function asyncCountData(callback) {
- sendAjax({
- type: 'post',
- waitMessage: '正在同步统计数据...',
- url: 'appQueryXzqCaseCount',
- data: {
- userId: joinUser.userID,
- type: 'all',
- },
- success: function(resData) {
- countData = [];
- for (var i = 0; i < resData.length; i++) {
- countData.push(resData[i]);
- }
- if (callback != undefined) callback();
- },
- error: function(err) {
- muiAlertError(err);
- }
- })
- }
- /**
- * 添加统计词条,此处为了通过回调+动画实现
- */
- function addCountList() {
- addCountItemToList(0);
- }
- /**
- * 添加一项到列表中
- * @param {int} index 当前添加的索引
- */
- function addCountItemToList(index) {
- if (index == countData.length) {
- return;
- }
- var data = countData[index];
- var divList = document.createElement('div');
- if (index % 2 == 0) {
- divList.className = 'mui-row cr-row-list jt-row-even-number';
- } else {
- divList.className = 'mui-row cr-row-list jt-row-odd-number';
- }
- var listHtml = "";
- listHtml += "<div class='cr-row-list-left'>";
- listHtml += "<div>" + data.xzqName + "</div>";
- listHtml += "</div>";
- listHtml += "<div class='cr-row-list-right'>";
- listHtml += "<div class='cr-row-list-subrow cr-row-list-subrow-title'>";
- listHtml += "<div>总案件</div>";
- listHtml += "<div>处理中</div>";
- listHtml += "<div>复飞中</div>";
- listHtml += "<div>审核中</div>";
- listHtml += "<div>已结案</div>";
- listHtml += "</div>";
- listHtml += "<div class='cr-row-list-subrow cr-row-list-subrow-value'>";
- listHtml += "<div>" + (parseFloat(data.case_all) - parseFloat(data.wait_assign)) + "</div>";
- listHtml += "<div>" + data.wait_check + "</div>";
- listHtml += "<div>" + data.wait_flight + "</div>";
- listHtml += "<div>" + data.wait_verify + "</div>";
- listHtml += "<div>" + data.case_close + "</div>";
- listHtml += "</div>";
- listHtml += "</div>";
- divList.innerHTML = listHtml;
- $(divList).hide();
- $('#divCountList').append(divList);
- $(divList).slideDown(300, function() {
- addCountItemToList(index + 1);
- });;
- }
- /* 柱状图统计控件全局变量 */
- var objBarCaseCount = undefined;
- /**
- * 显示案件柱状图
- */
- function addCountBar() {
- /* 创建图表div */
- var divCharts = document.createElement('div');
- divCharts.className = 'divCountBar';
- divCharts.id = 'divCountTrendBar';
- $('.cr-row-charts').append(divCharts);
- $(divCharts).hide();
- $(divCharts).slideDown(300, function() {
- showCountBar(countData);
- });
- }
- /**
- * @param {Object} jsonData 统计数据
- */
- function showCountBar(jsonData) {
- /* 获取页面大小 */
- var pageSize = getPageSize();
- var dataZoomX = undefined;
- if (pageSize.width <= PageSize.smartSize) dataZoomX = true;
- var labels = [];
- var datas = [{
- name: '已派发',
- data: [],
- color: 'rgb(38,31,135)',
- }, {
- name: '处理中',
- data: [],
- color: 'rgb(241,25,39)',
- }, {
- name: '复飞中',
- data: [],
- color: 'rgb(247,184,31)',
- }, {
- name: '审核中',
- data: [],
- color: 'rgb(155,78,206)',
- }, {
- name: '已结案',
- data: [],
- color: 'rgb(30,125,22)',
- }];
- /* 循环数据和标签 */
- for (var i = 0; i < jsonData.length; i++) {
- var item = jsonData[i];
- var caseAll = getEChartsValue(item.case_all);
- if (caseAll >= 1) {
- labels.push(item.xzqName);
- var assign = getEChartsValue(parseFloat(item.case_all) - parseFloat(item.wait_assign));
- var waitCheck = getEChartsValue(item.wait_check);
- var waitFlight = getEChartsValue(item.wait_flight);
- var waitVerify = getEChartsValue(item.wait_verify);
- var close = getEChartsValue(item.case_close);
- datas[0].data.push(assign);
- datas[1].data.push(waitCheck);
- datas[2].data.push(waitFlight);
- datas[3].data.push(waitVerify);
- datas[4].data.push(close);
- }
- }
- /* 展示柱状图 */
- var bbsData = {
- title: '案件统计',
- labels: labels,
- datas: datas,
- xrotate: 45,
- gridBottom: 80,
- gridTop: 45,
- dataZoomX: dataZoomX,
- }
- if (objBarCaseCount != null && objBarCaseCount != "" && objBarCaseCount != undefined) objBarCaseCount.dispose();
- objBarCaseCount = new CrCharts({
- domId: 'divCountTrendBar',
- labelColor: 'rgb(255,255,255)',
- legendTextColor: 'rgb(255,255,255)',
- xAxisLineColor: 'rgba(255,255,255,1.0)',
- yAxisLineColor: 'rgb(133, 215, 253)',
- splitLineColor: 'rgba(255,255,255,0.3)',
- xAxisLabel: {
- color: "rgba(255,255,255,1.0)",
- fontSize: 12,
- fontFamily: 'TTTGB-Medium',
- interval: 0,
- },
- yAxisLabel: {
- color: "rgb(133, 215, 253)",
- fontSize: 12,
- fontFamily: 'TTTGB-Medium',
- interval: 0,
- },
- });
- objBarCaseCount.createVerticalBar(bbsData, 60, false, ['件', '件', '件', '件', '件']);
- /* 添加统计词条 */
- addCountList();
- }
- /**
- * 关闭窗口
- */
- function EventClick_Close() {
- mui.back();
- }
- </script>
|