| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Hello MUI</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link href="css/mui.min.css" rel="stylesheet" />
- <link href="css/mui.indexedlist.css" rel="stylesheet" />
- <link href="css/OA-style.css" rel="stylesheet" />
- <style type="text/css">
- .mui-content>.mui-table-view:first-child {
- margin-top: -1px;
- }
- </style>
- </head>
- <body>
- <div class="mui-content">
- <ul class="mui-table-view mui-grid-view mui-grid-9" id="grid">
- <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="attendance">
- <a href="attendance.html">
- <div class="media-body-img"><img src="images/yy_kq.png"></div>
- <div class="mui-media-body">考勤管理</div>
- </a>
- </li>
- <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="process">
- <a href="#">
- <div class="media-body-img"><img src="images/yy_splc.png"></div>
- <div class="mui-media-body">流程管理</div>
- </a>
- </li>
- <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="notice">
- <a href="#">
- <div class="media-body-img"><img src="images/yy_tzgg.png"></div>
- <div class="mui-media-body">通知公告</div>
- </a>
- </li>
- <!-- <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="schedule">
- <a href="#">
- <div class="media-body-img"><img src="images/index_richeng.png"></div>
- <div class="mui-media-body">我的日程</div>
- </a>
- </li> -->
- <!--<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="document">
- <a href="#">
- <div class="media-body-img"><img src="images/yy_fmwjcy.png"></div>
- <div class="mui-media-body">公文管理</div>
- </a>
- </li>
- <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="office">
- <a href="#">
- <div class="media-body-img"><img src="images/yy_wpgl.png"></div>
- <div class="mui-media-body">日常办公</div>
- </a>
- </li>-->
- <!-- <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" id="meeting">
- <a href="#">
- <div class="media-body-img"><img src="images/meeting.png"></div>
- <div class="mui-media-body">会议通知</div>
- </a>
- </li> -->
-
- </ul>
- </div>
- </body>
- <script type="text/javascript" src="js/jquery.min.js"></script>
- <script src="js/mui.min.js"></script>
- <script src="js/config.js"></script>
- <script>
- mui.init({
- swipeBack: true //启用右滑关闭功能
- });
- mui.plusReady(function() {
- mui('#grid').on('tap', 'li', function() {
- // if(this.getAttribute("id") == 'notice') {
- // mui.openWindow({
- // url: 'page/notice/noticeFolder.html',
- // id: 'noticeFolder.html'
- // })
- //
- // } else
- if(this.getAttribute("id") == 'attendance') {
- mui.openWindow({
- url: 'page/attendance/attendance.html',
- id: 'attendance.html'
- })
- }
- else if(this.getAttribute("id") == 'notice') {//通知公告
- mui.openWindow({
- url: 'page/notice/noticeList.html',
- id: 'noticeList.html'
- })
-
- }
- // else if(this.getAttribute("id") == 'food') {
- // mui.openWindow({
- // url: 'page/food/foodFolder.html',
- // id: 'foodFolder.html'
- // })
- // }
- else if(this.getAttribute("id") == 'process') {
- mui.openWindow({
- url: 'page/flow/flow_main.html',
- id: 'flow_main.html'
- })
- }
- // else if(this.getAttribute("id") == 'materials') {
- // mui.openWindow({
- // url: 'page/material/materialFolder.html',
- // id: 'materialFolder.html'
- // })
- // } else if(this.getAttribute("id") == 'efficiency') {
- // mui.openWindow({
- // url: 'page/efficiency/efficiency.html',
- // id: 'efficiency.html'
- // })
- // }
- else if(this.getAttribute("id")=='schedule'){
- mui.openWindow({
- url:'page/schedule/scheduleList.html',
- id:'scheduleList.html'
- })
- }
- // else if(this.getAttribute("id")=='trip'){
- // mui.openWindow({
- // url:'page/trip/tripFolder.html',
- // id:'tripFolder.html'
- // })
- // }
- else if(this.getAttribute("id")=='document'){
- mui.openWindow({
- url:'page/document/document.html',
- id:'document.html'
- })
- }
- else if(this.getAttribute("id")=='office'){
- mui.openWindow({
- url:'page/office/office.html',
- id:'office.html'
- })
- }
- else if(this.getAttribute("id")=='meeting'){ //会议通知
- mui.openWindow({
- url:'page/meeting/meetingFolder.html',
- id:'meetingFolder.html'
- })
- }
- })
- //自定义事件,模拟点击“首页选项卡”
- document.addEventListener('appEvent', function() {
- // alert(22);
- // getNotice();
- });
- //公告点击事件
- // var pageDetail = mui.preload({
- // url: 'page/article/detailList.html',
- // id: 'detailList.html',
- // })
- // mui('#noticeList').on('tap', 'li', function() {
- // mui.fire(pageDetail, 'newsEvent', {
- // 'articleId': this.getAttribute('articleId')
- // })
- // mui.openWindow({
- // url: 'page/article/detailList.html',
- // id: 'detailList.html'
- // })
- // })
- })
- // function timer(opj) {
- // $(opj).find('ul').animate({
- // marginTop: "-1.5rem"
- // }, 500, function() {
- // $(this).css({
- // marginTop: "0.75rem"
- // }).find("li:first").appendTo(this);
- // })
- // }
- // $(function() {
- // var num = $('.notice_active').find('li').length;
- // if(num > 1) {
- // var time = setInterval('timer(".notice_active")', 3500);
- // $('.gg_more a').mousemove(function() {
- // clearInterval(time);
- // }).mouseout(function() {
- // time = setInterval('timer(".notice_active")', 3500);
- // });
- // }
- // $(".news_ck").click(function() {
- // location.href = $(".notice_active .notice_active_ch").children(":input").val();
- // })
- // });
- //获取最新5条公告
- function getNotice() {
- var url = API.API_URL();
- mui.ajax(url, {
- dataType: 'json', //服务器返回json格式数据
- type: 'post', //HTTP请求类型
- data: {
- method: 'pageArticle',
- pageNo: 1,
- pageSize: 5,
- p: '{folderId:291}'
- },
- timeout: 10000, //超时时间设置为10秒;
- headers: {
- 'Accept': 'application/json'
- },
- success: function(data) {
- //服务器返回响应
- console.log(JSON.stringify(data))
- var response = data;
- var obj = eval(response);
- var totalRow = obj.data.totalRow;
- var totalPage = obj.data.totalPage;
- var list = obj.data.list;
- var table = document.body.querySelector('#noticeList');
- //$('#noticeList').empty();
- table.innerHTML = ''; //清空公告
- for(var i = 0, len = list.length; i < len; i++) {
- var listTitle = list[i].title;
- var articleId = list[i].id;
- var li = document.createElement('li');
- li.setAttribute("articleId", articleId);
- li.className = 'notice_active_ch';
- li.innerHTML = '<span>' + listTitle + '</span>';
- table.appendChild(li);
- }
- // var num = $('.notice_active').find('li').length;
- // alert(num +'=='+totalRow);
- var time = null;
- if(totalRow > 1) {
- // clearInterval(time);
- if(time == null) {
- // time = setInterval('timer(".notice_active")', 3500);
- }
- // $('.gg_more a').mousemove(function() {
- // clearInterval(time);
- // }).mouseout(function() {
- // time = setInterval('timer(".notice_active")', 3500);
- // });
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- console.log(type);
- }
- });
- }
- </script>
- </html>
|