statusList.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. <title></title>
  8. <link rel="stylesheet" type="text/css" href="../../css/api.css">
  9. <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
  10. <link rel="stylesheet" href="../../css/aui.css">
  11. <link rel="stylesheet" href="../../css/projeck.css">
  12. <style>
  13. body{
  14. background: #fff;
  15. }
  16. .nav_title{
  17. padding: 0 5px;
  18. background: #f3f6fa;
  19. }
  20. .nav_title li{
  21. text-align: center;
  22. font-size: 14px;
  23. padding: 12px 0 ;
  24. }
  25. .row_content{
  26. padding: 0 5px;
  27. }
  28. .row_content li{
  29. text-align: center;
  30. font-size: 13px;
  31. padding: 12px 0;
  32. align-items: center;
  33. }
  34. </style>
  35. </head>
  36. <body>
  37. <div class="api_layout">
  38. <div class="row_contents">
  39. <ul class="row_content" id="row_content">
  40. </ul>
  41. </div>
  42. </div>
  43. <div class="noText hide" id="nocode">
  44. <img src="../../image/noText.png" alt="">
  45. </div>
  46. <script type="text/template" id="templateStatu">
  47. {{~it:value}}
  48. <li class="flex-wrap after-border relative {{=value.status}}">
  49. <span class="flex-con">{{=value.id}}</span>
  50. <span class="flex-con">{{=value.position}}</span>
  51. <span class="flex-con">{{=value.value}}{{=value.unit}}</span>
  52. </li>
  53. {{~}}
  54. </script>
  55. <script src="../../script/api.js"></script>
  56. <!-- <script src="../../script/fastclick.min.js"></script> -->
  57. <!-- <script src="../../script/aui-toast.js" charset="utf-8"></script> -->
  58. <script src="../../script/doT.min.js"></script>
  59. <script src="../../script/config.js"></script>
  60. <script>
  61. var title = "";
  62. var toast = new auiToast();
  63. apiready = function () {
  64. var statusType = api.pageParam.statusType;
  65. var type = api.pageParam.type;
  66. monitorStatusFun(statusType,type);
  67. }
  68. // 全部数据详情
  69. function monitorStatusFun(sType,type) {
  70. var data = {
  71. name:'',
  72. status:sType,
  73. type:type
  74. }
  75. toast.loading({
  76. title: "加载中",
  77. duration: 2000
  78. });
  79. $http.fnReuestDataNologing(UrlRouter.safetyDetaile,'','post',data,function(ret,err){
  80. toast.hide();
  81. if (ret.data.length == 0) {
  82. document.getElementById("nocode").style.display = 'block';
  83. return false;
  84. }else {
  85. document.getElementById("nocode").style.display = 'none';
  86. }
  87. if (ret && ret.code == 0) {
  88. if (ret.data.length > 0) {
  89. $apis.html(row_content,'#templateStatu',ret.data);
  90. } else {
  91. }
  92. }else {
  93. api.toast({
  94. msg: '网络请求超时,请稍后重试',
  95. duration: 2000,
  96. location: 'bottom'
  97. });
  98. }
  99. })
  100. }
  101. </script>
  102. </body>
  103. </html>