wordOrderGrid1.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <meta name="format-detection"content="telephone=no">
  8. <title>停送电管理</title>
  9. <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
  10. <link rel="stylesheet" href="../../css/aui.css">
  11. <link rel="stylesheet" href="../../css/projeck.css">
  12. <style media="screen">
  13. *{
  14. box-sizing: border-box;
  15. }
  16. .grid_wrap{
  17. padding: 10px;
  18. background: #fff;
  19. }
  20. .grid{
  21. display: -webkit-flex;
  22. display: flex;
  23. justify-content: flex-start;
  24. -webkit-justify-content: flex-start;
  25. flex-wrap: wrap;
  26. -webkit-flex-wrap: wrap;
  27. align-items: center;
  28. background: #fff;
  29. }
  30. .grid-item{
  31. width: 25%;
  32. text-align: center;
  33. font-size:14px;
  34. margin-bottom: 10px;
  35. }
  36. .grid-item img{
  37. width: 40px;
  38. height: 40px;
  39. border-radius: 50%;
  40. margin: auto;
  41. }
  42. .grid-item p{
  43. height: 42px;
  44. overflow: hidden;
  45. text-overflow: ellipsis;
  46. display: -webkit-box;
  47. -webkit-line-clamp: 2;
  48. -webkit-box-orient: vertical;
  49. padding:0 5px;
  50. margin-top:10px;
  51. }
  52. </style>
  53. </head>
  54. <body>
  55. <div class="grid_wrap">
  56. <ul class="grid" id="seeApply">
  57. </ul>
  58. </div>
  59. <div class="noText hide">
  60. <img src="../../image/noText.png" alt="">
  61. </div>
  62. </body>
  63. </html>
  64. <!-- onclick="openChangeFill('{{=value.id}}','{{=value.title}}')" -->
  65. <script type="text/template" id="templateApply">
  66. {{~it:value}}
  67. {{?value.id === 5 || value.id === 6}}
  68. <li class="grid-item" onclick="openPowerOffPage('{{=value.id}}')">
  69. <img src="{{=value.icon}}" alt="">
  70. <p>{{=value.title}}</p>
  71. </li>
  72. {{?}}
  73. {{~}}
  74. </script>
  75. <script type="text/javascript" src="../../script/api.js"></script>
  76. <script src="../../script/config.js" charset="utf-8"></script>
  77. <script type="text/javascript" src="../../script/doT.min.js"></script>
  78. <script type="text/javascript">
  79. var toast = new auiToast()
  80. apiready = function(){
  81. var info = $api.getStorage('data'),
  82. token = JSON.parse(info).data.access_token;
  83. openOrderList(token)
  84. };
  85. // 可申请工单列表
  86. function openOrderList(token) {
  87. var headers = {
  88. "Authorization": "Bearer " + token
  89. };
  90. $http.fnReuestData(UrlRouter.getAll_list,headers,'get','',function (ret,err) {
  91. toast.hide()
  92. if (ret && ret.code == 0) {
  93. if (ret.data.length>0) {
  94. $apis.html(seeApply,'#templateApply',ret.data);
  95. $api.addCls($api.dom('.noText'), 'hide')
  96. }else {
  97. $apis.html(seeApply,'#templateApply',ret.data);
  98. $api.removeCls($api.dom('.noText'), 'hide');
  99. }
  100. }else {
  101. api.toast({
  102. msg: '加载超时,请检查网络',
  103. duration: 2000,
  104. location: 'bottom'
  105. });
  106. }
  107. })
  108. }
  109. // 填写停送电工单
  110. function openChangeFill(ids,title) {
  111. var pageParam = {
  112. id:ids,
  113. title:title
  114. }
  115. $event.openWin('changeFill_win','changefillword_win',pageParam,'')
  116. }
  117. function openPowerOffPage(id) {
  118. if(id == 5) {
  119. $event.openTabLayout('stopPower','../powerOff/stopPower','停电审核','')
  120. } else if (id == 6) {
  121. $event.openTabLayout('sendPower','../powerOff/sendPower','送电审核','')
  122. }
  123. }
  124. </script>