home.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>首页</title>
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  9. <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  10. <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
  11. <style>
  12. .topPart{
  13. display: flex;
  14. justify-content: space-between;
  15. flex-direction: row;
  16. flex-wrap: wrap;
  17. padding: 0 20px;
  18. background: #ffffff;
  19. }
  20. .dayAmount{
  21. width: 31%;
  22. margin: 10px 0;
  23. padding: 20px 0 20px 10px;
  24. background: #ff6600;
  25. }
  26. .monthAmount{
  27. width: 31%;
  28. margin: 10px 0;
  29. padding: 20px 0 20px 10px;
  30. background: #1abc9b;
  31. }
  32. .yearAmount{
  33. width: 31%;
  34. padding: 20px 0 20px 10px;
  35. margin: 10px 0;
  36. background: #1e9eb3;
  37. }
  38. .dayCount{
  39. width: 31%;
  40. padding: 20px 0 20px 10px;
  41. margin: 10px 0;
  42. background: #ee7c5c;
  43. }
  44. .monthCount{
  45. width: 31%;
  46. padding: 20px 0 20px 10px;
  47. margin: 10px 0;
  48. background: #ff9900;
  49. }
  50. .yearCount{
  51. width: 31%;
  52. padding: 20px 0 20px 10px;
  53. margin: 10px 0;
  54. background: #2ec7c9;
  55. }
  56. h4{
  57. margin-top: 5px;
  58. color: #ffffff;
  59. }
  60. cite{
  61. color: #ffffff;
  62. font-size: 30px;
  63. }
  64. .layui-card-header{
  65. padding-left: 20px;
  66. color: #000;
  67. font-size: 18px;
  68. }
  69. </style>
  70. </head>
  71. <body>
  72. <div class="layui-fluid">
  73. <div class="layui-row layui-col-space15">
  74. <div class="layui-col-md12">
  75. <div class="layui-row layui-col-space15">
  76. <!-- 统计数据 -->
  77. <div class="layui-col-md12">
  78. <div class="layui-card">
  79. <div class="layui-card-header">数据概览</div>
  80. <ul class="layui-col-md12 topPart">
  81. <li class="dayAmount">
  82. <p><cite id="today_report">10</cite></p>
  83. <h4>今日新增报备</h4>
  84. </li>
  85. <li class="monthAmount">
  86. <p><cite id="mouth_report">10</cite></p>
  87. <h4>本月新增报备</h4>
  88. </li>
  89. <li class="yearAmount">
  90. <p><cite id="general_report">10</cite></p>
  91. <h4>总报备</h4>
  92. </li>
  93. </ul>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <script src="../../layuiadmin/layui/layui.js?t=1"></script>
  101. <script>
  102. layui.config({
  103. base: '../../layuiadmin/' //静态资源所在路径
  104. }).extend({
  105. index: 'lib/index', //主入口模块
  106. }).use(['index', 'home'], function() {
  107. var $ = layui.$
  108. ,admin = layui.admin
  109. ,xData = [];
  110. admin.req({
  111. url: '/account/statistics/'
  112. ,type: 'get'
  113. , done: function (res) {
  114. $('#today_report').html(res.data.today_report);
  115. $('#mouth_report').html(res.data.mouth_report);
  116. $('#general_report').html(res.data.general_report);
  117. }
  118. });
  119. })
  120. </script>
  121. </body>
  122. </html>