index.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. @extends('admin/layout')
  2. @section('header')
  3. <style>
  4. .box-my {
  5. width: 60%;
  6. margin: 0 auto;
  7. border-radius: 12px;
  8. background-color: white;
  9. }
  10. .box-my > .box-my-header {
  11. border-radius: 12px 12px 0 0;
  12. background: #2A94E0;
  13. padding-top: 14px;
  14. height: 50px;
  15. color: white;
  16. text-align: center;
  17. }
  18. .box-my > .box-my-content {
  19. padding: 10px 20px;
  20. }
  21. .box-my > .box-my-content .status {
  22. text-align: center;
  23. font-size: 20px;
  24. }
  25. .box-my > .box-my-content .status img {
  26. margin-bottom: 4px;
  27. /*position: absolute;*/
  28. /*top: 8px;*/
  29. /*left: 40%*/
  30. }
  31. .my-detail {
  32. margin-top: 10px;
  33. }
  34. .my-detail:after {
  35. content: '';
  36. display: block;
  37. clear: both;
  38. }
  39. .my-detail .day-title {
  40. float: left;
  41. font-size: 16px;
  42. }
  43. .my-detail b {
  44. font-size: 16px;
  45. float: right;
  46. }
  47. </style>
  48. @endsection
  49. @section('content')
  50. <body class="wrapper wrapper-content" style="background-color: #F3F3F4">
  51. {{--<div class="row">
  52. <div class="col-sm-4">
  53. <div class="box-my">
  54. <div class="box-my-header">
  55. <img src="/img/kzt-img-01.png" alt="">
  56. 流量
  57. </div>
  58. <div class="box-my-content">
  59. <div class="status" style="position: relative">
  60. @if($trafficLine['yAxis'][0]>=$trafficLine['yAxis'][1])
  61. <img src="/img/kzt-top-img.png" alt="">
  62. @else
  63. <img src="/img/kzt-down-img.png" alt="">
  64. @endif
  65. {{number_format($trafficLine['yAxis'][0]-$trafficLine['yAxis'][1],0,'.',', ')}}
  66. </div>
  67. <div class="my-detail"><span class="day-title">昨天</span> <b>{{$trafficLine['yAxis'][0]}}</b></div>
  68. <div class="my-detail"><span class="day-title">前天</span> <b>{{$trafficLine['yAxis'][1]}}</b></div>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="col-sm-4">
  73. <div class="box-my">
  74. <div class="box-my-header">
  75. <img src="/img/kzt-img-01.png" alt="">
  76. 询盘
  77. </div>
  78. <div class="box-my-content">
  79. <div class="status" style="position: relative">
  80. @if($inquireLine['yAxis'][0]>=$inquireLine['yAxis'][1])
  81. <img src="/img/kzt-top-img.png" alt="">
  82. @else
  83. <img src="/img/kzt-down-img.png" alt="">
  84. @endif
  85. {{number_format($inquireLine['yAxis'][0]-$inquireLine['yAxis'][1],0,'.',', ')}}
  86. </div>
  87. <div class="my-detail"><span class="day-title">昨天</span> <b>{{$inquireLine['yAxis'][0]}}</b></div>
  88. <div class="my-detail"><span class="day-title">前天</span> <b>{{$inquireLine['yAxis'][1]}}</b></div>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="col-sm-4">
  93. <div class="box-my">
  94. <div class="box-my-header">
  95. <img src="/img/kzt-img-01.png" alt="">
  96. 首页关键词
  97. </div>
  98. <div class="box-my-content">
  99. <div class="status" style="position: relative">
  100. @if($keywordLine['yAxis'][0]>=$keywordLine['yAxis'][1])
  101. <img src="/img/kzt-top-img.png" alt="">
  102. @else
  103. <img src="/img/kzt-down-img.png" alt="">
  104. @endif
  105. {{number_format($keywordLine['yAxis'][0]-$keywordLine['yAxis'][1],0,'.',', ')}}
  106. </div>
  107. <div class="my-detail"><span class="day-title">昨天</span> <b>{{$keywordLine['yAxis'][0]}}</b></div>
  108. <div class="my-detail"><span class="day-title">前天</span> <b>{{$keywordLine['yAxis'][1]}}</b></div>
  109. </div>
  110. </div>
  111. </div>
  112. </div>--}}
  113. <br>
  114. <div class="row">
  115. <div class="col-sm-4">
  116. <div class="ibox float-e-margins">
  117. <div class="ibox-title" style="border-style: none">
  118. <h5>流量趋势图</h5>
  119. </div>
  120. <div class="ibox-content">
  121. <div id="trafficLine" style="width: 100%;height: 300px;"></div>
  122. </div>
  123. </div>
  124. </div>
  125. <div class="col-sm-4">
  126. <div class="ibox float-e-margins">
  127. <div class="ibox-title" style="border-style: none">
  128. <h5>询盘趋势图</h5>
  129. </div>
  130. <div class="ibox-content">
  131. <div id="inquireLine" style="width: 100%;height: 300px;"></div>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="col-sm-4">
  136. <div class="ibox float-e-margins">
  137. <div class="ibox-title" style="border-style: none">
  138. <h5>关键词趋势图</h5>
  139. </div>
  140. <div class="ibox-content">
  141. <div id="keywordLine" style="width: 100%;height: 300px;"></div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </body>
  147. @endsection
  148. @section('footer')
  149. <script src="{{asset('js/jquery.min.js?v=2.1.4')}}"></script>
  150. {{--echarts--}}
  151. <script src="{{asset('js/plugins/echarts/echarts.min.js')}}"></script>
  152. <script src="{{asset('js/plugins/wonderland/wonderland.js?v=1.3')}}"></script>
  153. <script>
  154. // 流量折线图
  155. var trafficLineChart = echarts.init(document.getElementById('trafficLine'),'wonderland');
  156. // var trafficLineXAxis = [];
  157. var trafficLineXAxis = JSON.parse('{!! json_encode($trafficLine['xAxis']) !!}');
  158. var trafficLineYAix = JSON.parse('{!! json_encode($trafficLine['yAxis']) !!}');
  159. var trafficLineOption = {
  160. tooltip: {
  161. trigger: 'axis',
  162. axisPointer: {
  163. type: 'cross',
  164. crossStyle: {
  165. color: '#999'
  166. }
  167. }
  168. },
  169. toolbox: {
  170. feature: {
  171. dataView: {show: true, readOnly: false},
  172. magicType: {show: true, type: ['bar', 'pie']},
  173. restore: {show: true},
  174. saveAsImage: {show: true}
  175. }
  176. },
  177. legend: {
  178. data: ['流量']
  179. },
  180. xAxis: [
  181. {
  182. type: 'category',
  183. data: trafficLineXAxis,
  184. axisPointer: {
  185. type: 'shadow'
  186. },
  187. splitLine: {
  188. show: false
  189. }
  190. }
  191. ],
  192. yAxis: [
  193. {
  194. type: 'value',
  195. name: '',
  196. min: 0,
  197. axisLabel: {
  198. formatter: '{value}'
  199. },
  200. axisLine: {
  201. show: false //隐藏Y轴
  202. }
  203. }
  204. ],
  205. series: [
  206. {
  207. name: '流量',
  208. type: 'line',
  209. data: trafficLineYAix
  210. }
  211. ]
  212. };
  213. trafficLineChart.setOption(trafficLineOption);
  214. // 询盘折线图
  215. var inquireLineChart = echarts.init(document.getElementById('inquireLine'),'wonderland');
  216. var inquireLineXAxis = JSON.parse('{!! json_encode($inquireLine['xAxis']) !!}');
  217. var inquireLineYAix = JSON.parse('{!! json_encode($inquireLine['yAxis']) !!}');
  218. var inquireLineOption = {
  219. tooltip: {
  220. trigger: 'axis',
  221. axisPointer: {
  222. type: 'cross',
  223. crossStyle: {
  224. color: '#999'
  225. }
  226. }
  227. },
  228. toolbox: {
  229. feature: {
  230. dataView: {show: true, readOnly: false},
  231. magicType: {show: true, type: ['bar', 'pie']},
  232. restore: {show: true},
  233. saveAsImage: {show: true}
  234. }
  235. },
  236. legend: {
  237. data: ['询盘']
  238. },
  239. xAxis: [
  240. {
  241. type: 'category',
  242. data: inquireLineXAxis,
  243. axisPointer: {
  244. type: 'shadow'
  245. },
  246. splitLine: {
  247. show: false
  248. }
  249. }
  250. ],
  251. yAxis: [
  252. {
  253. type: 'value',
  254. name: '',
  255. min: 0,
  256. axisLabel: {
  257. formatter: '{value}'
  258. },
  259. axisLine: {
  260. show: false //隐藏Y轴
  261. }
  262. }
  263. ],
  264. series: [
  265. {
  266. name: '询盘',
  267. type: 'line',
  268. data: inquireLineYAix
  269. }
  270. ]
  271. };
  272. inquireLineChart.setOption(inquireLineOption);
  273. var keywordLineChart = echarts.init(document.getElementById('keywordLine'),'wonderland');
  274. var keywordLineXAxis = JSON.parse('{!! json_encode($keywordLine['xAxis']) !!}');
  275. var keywordLineYAix = JSON.parse('{!! json_encode($keywordLine['yAxis']) !!}');
  276. var keywordLineOption = {
  277. tooltip: {
  278. trigger: 'axis',
  279. axisPointer: {
  280. type: 'cross',
  281. crossStyle: {
  282. color: '#999'
  283. }
  284. }
  285. },
  286. toolbox: {
  287. feature: {
  288. dataView: {show: true, readOnly: false},
  289. magicType: {show: true, type: ['bar', 'pie']},
  290. restore: {show: true},
  291. saveAsImage: {show: true}
  292. }
  293. },
  294. legend: {
  295. data: ['关键词']
  296. },
  297. xAxis: [
  298. {
  299. type: 'category',
  300. data: keywordLineXAxis,
  301. axisPointer: {
  302. type: 'shadow'
  303. },
  304. splitLine: {
  305. show: false
  306. }
  307. }
  308. ],
  309. yAxis: [
  310. {
  311. type: 'value',
  312. name: '',
  313. min: 0,
  314. axisLabel: {
  315. formatter: '{value}'
  316. },
  317. axisLine: {
  318. show: false //隐藏Y轴
  319. }
  320. }
  321. ],
  322. series: [
  323. {
  324. name: '关键词',
  325. type: 'line',
  326. data: keywordLineYAix
  327. }
  328. ]
  329. };
  330. keywordLineChart.setOption(keywordLineOption);
  331. </script>
  332. @endsection