123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
- <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
- <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
- <style type="text/css">
- #classify-list {
- width: 5.4rem;
- height: 100%;
- background-color: #ffffff;
- overflow-x: hidden;
- }
- #classify-list .aui-list {
- overflow-y: scroll;
- }
- .aui-list .aui-list-item-title {
- font-size: 0.7rem;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .active{
- background: #f5f5f5;
- }
- .active .aui-list-item-title{
- color: #009fe8;
- }
- .active:after{
- content: "";
- position: absolute;
- top: 0;
- left: 0;
- width: 3px;
- height: 100%;
- background: #009fe8;
- }
- .aui-list.aui-list-noborder .aui-list-item:last-child{
- background-size: 100% 1px;
- background-image: linear-gradient(0,#dddddd,#dddddd 50%,transparent 50%);
- background-image: -webkit-linear-gradient(90deg,#dddddd,#dddddd 50%,transparent 50%);
- }
- .aui-bar-nav{
- height: 50px;
- line-height: 50px;
- }
- .aui-bar-nav .aui-btn{
- height: 50px;
- padding-left: 23px;
- }
- </style>
- </head>
- <body>
- <header class="aui-bar aui-bar-nav" id="aui-header">
- <a class="aui-btn aui-pull-left" onclick="closeWin()">
- <span class="aui-iconfont aui-icon-left"></span>
- </a>
- <div class="aui-title">审批列表</div>
- </header>
- <section class="aui-content" id="classify-list">
- <ul class="aui-list aui-list-noborder" id="wordOrderList_id">
- </ul>
- </section>
- </body>
- <script type="text/template" id="templateWord_List">
- {{~it:value:index}}
- <li class="aui-list-item {{=index == 0?'active':''}}" onclick="randomSwitchBtn(this,'{{=value.id}}')">
- <div class="aui-list-item-inner">
- <div class="aui-list-item-title">{{=value.title}}</div>
- </div>
- </li>
- {{~}}
- </script>
- <script type="text/javascript" src="../../script/api.js"></script>
- <script type="text/javascript" src="../../script/doT.min.js"></script>
- <script type="text/javascript" src="../../script/config.js"></script>
- <script type="text/javascript">
- var token,headerPos,body_h,classifyListH;
- var toast = new auiToast();
- apiready = function(){
- var header = $api.byId('aui-header');
- $api.fixStatusBar(header);
- headerPos = $api.offset(header);
- body_h = $api.offset($api.dom('body')).h;
- classifyListH = $api.offset($api.byId('classify-list')).w;
- document.getElementById("classify-list").style.height = api.winHeight-headerPos.h+"px";
- // 工单列表
- var info = $api.getStorage('data');
- token = JSON.parse(info).data.access_token;
- var headers = {
- "Authorization": "Bearer " + token
- };
- wordOrderList(headers);
- };
- // 关闭
- function closeWin(){
- api.closeWin();
- }
- // 随意切换分类
- function randomSwitchBtn( tag ,id) {
- seeApplyList(token,id)
- if( tag == $api.dom('.aui-list li.active') )return;
- var eFootLis = $api.domAll('.aui-list li');
- index = 0;
- for (var i = 0,len = eFootLis.length; i < len; i++) {
- if( tag == eFootLis[i] ){
- index = i;
- }else{
- $api.removeCls(eFootLis[i], 'active');
- }
- }
- $api.addCls( eFootLis[index], 'active');
- }
- // 工单列表
- function wordOrderList(header) {
- $http. fnReuestData(UrlRouter.wordOrderList,header,'get','',function (ret,err) {
- if (ret.code === 0) {
- toast.hide();
- $apis.html(wordOrderList_id,'#templateWord_List',ret.data);
- firstApplylist(token,ret.data[0].id);
- }
- })
- }
- function firstApplylist(token, id) {
- api.openFrame({
- name: 'worderorder_frm',
- url: 'wordorder_frm.html',
- bounces: true,
- rect: {
- x: classifyListH+5,
- y: headerPos.h+1,
- w: api.winWidth-classifyListH-5,
- h: 'auto'
- },
- pageParam:{
- token:token,
- id:id
- }
- })
- }
- // 查看可申请工单列表
- function seeApplyList(tokens,id) {
- api.execScript({
- name: 'wordorder_win',
- frameName:'worderorder_frm',
- script : 'applyList("'+tokens+'","'+id+'");'
- })
- }
- </script>
- </html>
|