123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- <!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" />
- <link href="../css/mui.css" rel="stylesheet" />
- <link href="../css/app.css" rel="stylesheet" />
- <style>
- /* 顶部案件统计信息背景样式 */
- .wc-top-back{
- position: relative;
- width: calc(100% - 10px);
- height: 300px;
- background-color: '#000000';
- margin: 5px;
- border: solid 1px #d8d8d8;
- border-radius: 5px;
- }
- /* 顶部统计柱状图样式 */
- .wc-top-chart{
- width: 100%;
- height: calc(100% - 40px);
- }
- /* 顶部下侧统计信息背景样式 */
- .wc-top-info-back{
- width: 100%;
- height: 40px;
- border-top: solid 1px #d8d8d8;
- }
- /* 顶部下侧统计信息子项样式 */
- .wc-top-info-sub{
- width: 50%;
- float: left;
- height: 40px;
- line-height: 40px;
- text-align: center;
- font-size: 14px;
- font-weight: bold;
- }
- /* 富字体样式 */
- font{
- color: blue;
- }
- /* 九宫格图片外部背景样式 */
- .wc-li-img-back{
- width: 40px;
- height: 40px;
- line-height: 40px;
- text-align: center;
- padding: 0px;
- border-radius: 5px;
- background: -moz-linear-gradient(top,#0f7dee,#03c1fb);
- background: -webkit-linear-gradient(top,#0f7dee,#03c1fb);
- }
- /* 九宫格子项内部图片样式 */
- .wc-li-img-back span{
- width: 30px;
- height: 30px;
- font-size: 10px;
- color: #FFFFFF;
- }
- /* 菜单容器样式 */
- .wc-menu-content{
- position: absolute;
- width: 100%;
- bottom: 0px;
- top:305px;
- }
- </style>
- </head>
- <body>
- <div class="mui-content">
- <div class="wc-top-back">
- <div id="barChart" class="wc-top-chart"></div>
- <div class="wc-top-info-back">
- <div class="wc-top-info-sub">派发处理率<font><label id="lblCheck">0.00%</label></font>
- </div>
- <div class="wc-top-info-sub">审核结案率<font><label id="lblClose">0.00%</label></font>
- </div>
- </div>
- </div>
- <div class="wc-menu-content">
- <div class="mui-scroll-wrapper">
- <ul class="mui-table-view mui-grid-view mui-grid-9" id="menuGrid">
- </ul>
- </div>
- </div>
- </div>
- <script src="../js/mui.js"></script>
- <script src="../js/echarts-all.js"></script>
- <script src="../js/case.js"></script>
- <script src="../js/common.js"></script>
- <!--引入存储读取通用脚本-->
- <script src="../js/save.js"></script>
- <!--引入图表通用脚本-->
- <script src="../js/echarts-common.js"></script>
- <script type="text/javascript">
- /* DOM定义 */
- var ul = document.getElementById("menuGrid");
- var domLblCheck = document.getElementById("lblCheck");
- var domLblClose = document.getElementById("lblClose");
- /* 变量定义 */
- var subPages = [];
- var subPageStyles = [];
- var userInfo = null;
- /* mui初始化 */
- mui.init();
- /* 设置菜单滚动条 */
- mui('.mui-scroll-wrapper').scroll({
- scrollY: true,
- indicators: false,
- });
- /* 九宫格点击事件 */
- mui('.mui-grid-9').on('tap', 'a', function(e) {
- var tag = this.getAttribute('href');
- var subPageWindowID = subPages[tag]; //子页面的ID标识
- var subPageURL = subPages[tag]; //子页面的URL
- var subPageStyle = subPages[tag]; //子页面导航栏的样式
- // mui.openWindow({
- // id: subPageWindowID,
- // url: subPageURL,
- // styles: subPageStyle,
- // show: {
- // aniShow: 'slide-in-right',
- // duration: 300
- // },
- // waiting: {
- // autoShow: false,
- // }
- // });
- mui.openWindow(subPageWindowID);
- });
- /*设置顶部导航栏*/
- mui.plusReady(function() {
- /* 子页面初始化 */
- AppendSubpageConfig('task-waitcheck.html');
- AppendSubpageConfig('task-waitrepeat.html');
- AppendSubpageConfig('task-waitverify.html');
- AppendSubpageConfig('task-close.html');
- AppendSubpageConfig('task-waitassign.html');
- AppendSubpageConfig('task-undoassign.html');
- /* 获取当前页面 */
- var self = plus.webview.currentWebview();
- alert(self);
- //设置导航栏
- plusSetNavbar("主页", false);
- /* 获取存储的用户登录信息 */
- getSaveUserInfo({
- success:function(userInfo){
- //获取用户类型
- var strUserType = userInfo.userType;
- //创建菜单前清除原有菜单内容
- ul.innerHTML = "";
- //创建默认菜单
- CreateDefaultMenu();
- //创建动态菜单
- CreateDynamicMenu(strUserType);
- /* 展示统计图表 */
- var barChart = echarts.init(document.getElementById('barChart'));
- echartsCreateCount(userInfo, function(option,checkRate,closeRate) {
- barChart.setOption(option);
- domLblCheck.innerHTML = checkRate;
- domLblClose.innerHTML = closeRate;
- });
- },
- error:function(err){
- muiAlertError(err);
- }
- });
- });
- /**
- * @param {Object} title 菜单标题
- * @param {Object} icoName 图标的类名称
- * @param {Object} tag 页面标识
- */
- function CreateMenu(title, icoName, tag) {
- var li = document.createElement('li');
- li.className = 'mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3';
- var strHtml = "<a href='" + tag + "'>";
- strHtml += "<div class='wc-li-img-back mui-icon'>";
- strHtml += "<span class='mui-icon app-icon " + icoName + "' style='font-size:30px'></span>"
- strHtml += "</div>"
- strHtml += "<div class='mui-media-body'>" + title + "</div>"
- strHtml += "</a>";
- li.innerHTML = strHtml;
- ul.appendChild(li);
- }
- /**
- * 创建通用菜单
- */
- function CreateDefaultMenu() {
- CreateMenu('待处理', 'app-cion-menu-waitcheck', 0);
- CreateMenu('待复飞', 'app-cion-menu-waitrepeat', 1);
- CreateMenu('审核中', 'app-cion-menu-waitverify', 2);
- CreateMenu('已结案', 'app-cion-menu-close', 3);
- }
- /**
- * 创建动态菜单
- * @param {Object} strUserType
- */
- function CreateDynamicMenu(strUserType) {
- if (strUserType == userType.memberCL) {
- } else if (strUserType == userType.memberSH) {
- CreateMenu('案件派发', 'app-cion-menu-assign', 4);
- CreateMenu('案件撤派', 'app-cion-menu-undoassign', 5);
- } else if (strUserType == userType.memberLD) {
- CreateMenu('案件督办', 'app-cion-menu-supervise', '');
- } else {
- }
- }
- /**
- * 添加子页面的配置项
- * @param {Object} pageHtmlName 页面HTML文件名称
- */
- function AppendSubpageConfig(pageHtmlName) {
- subPages.push(pageHtmlName);
- subPageStyles.push({
- "titleNView": {
- backgroundColor: colorBackground,
- titleColor: colorTitle
- },
- top: '0px',
- bottom: '51px'
- });
- /* 全部预先加载页面 试验阶段 */
- var subPage = plus.webview.create(pageHtmlName,pageHtmlName,{
- "titleNView": {
- backgroundColor: colorBackground,
- titleColor: colorTitle
- },
- top: '0px',
- bottom: '51px'
- });
- subPage.addEventListener('show',function(obj){
- printToConsole(obj.target + '显示');
- })
- subPage.hide();
- }
- </script>
- </body>
- </html>
|