index.html 24 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="refresh" content="300" />
  6. <title>乳山市数字供销智慧平台</title>
  7. <script type="text/javascript" src="js/jquery.js"></script>
  8. <script type="text/javascript" src="js/echarts.min.js"></script>
  9. <script type="text/javascript" src="js/china.js"></script>
  10. <script type="text/javascript" src="js/map.js"></script>
  11. <script type="text/javascript" src="js/js.js"></script>
  12. <script type="text/javascript" src="js/Bubble.js"></script>
  13. <link rel="stylesheet" href="css/style.css">
  14. </head>
  15. <body>
  16. <div class="head clearfix">
  17. <h1 class="pulll_left">乳山市数字供销智慧平台</h1>
  18. <div class="menu menu2 pulll_left">
  19. <ul>
  20. <li><a href="https://zhgx.sdshengyuekeji.cn/">商贸流通</a></li>
  21. <li><a href="https://zhgx.sdshengyuekeji.cn/">社会化服务</a></li>
  22. <li><a href="https://zhgx.sdshengyuekeji.cn/">农资供应</a></li>
  23. <li><a href="https://zhgx.sdshengyuekeji.cn/">资产管理</a></li>
  24. </ul>
  25. </div>
  26. <div class="time" id="showTime"></div>
  27. <script>
  28. var t = null;
  29. t = setTimeout(time, 1000);//開始运行
  30. function time() {
  31. clearTimeout(t);//清除定时器
  32. dt = new Date();
  33. var y = dt.getFullYear();
  34. var mt = dt.getMonth() + 1;
  35. var day = dt.getDate();
  36. var h = dt.getHours();//获取时
  37. var m = dt.getMinutes();//获取分
  38. var s = dt.getSeconds();//获取秒
  39. if(s<10) s = '0'+s;
  40. document.getElementById("showTime").innerHTML = y + "/" + mt + "/" + day + " " + h + ":" + m + ":" + s + "";
  41. t = setTimeout(time, 1000); //设定定时器,循环运行
  42. }
  43. </script>
  44. </div>
  45. <div class="mainbox">
  46. <ul class="clearfix nav1">
  47. <li style="width: 22%">
  48. <div class="box">
  49. <div class="tit">商品销量统计</div>
  50. <div class="boxnav" style="height: 200px;">
  51. <table class="table1" width="100%" border="0" cellspacing="0" cellpadding="0">
  52. <tbody>
  53. <tr>
  54. <th>商品名称</th>
  55. <th>上月销量</th>
  56. <th>本月销量</th>
  57. <th>增长率</th>
  58. </tr>
  59. {volist name="newGoodsData" id='goods'}
  60. <tr>
  61. <td>{$goods.name}</td>
  62. <td><span class="text-w">{$goods.last_total_num}</span></td>
  63. <td><span class="text-b">{$goods.now_total_num}</span></td>
  64. <td>
  65. {if $goods.type}<div class="text-d">↑{$goods.growth}</div>{/if}
  66. {if !$goods.type}<div class="text-s">↓{$goods.growth}</div>{/if}
  67. </td>
  68. </tr>
  69. {/volist}
  70. </tbody>
  71. </table>
  72. </div>
  73. </div>
  74. <div class="box">
  75. <div class="tit">分类销量排名</div>
  76. <div class="boxnav" style="height: 250px;">
  77. <div class="" style="height: 190px" id="echart1"></div>
  78. <div class="leidanav">
  79. <ul class="clearfix">
  80. {volist name="order_goods_category" id='category'}
  81. <li><span>{$category.name}</span>
  82. <p>{$category.total_num}</p>
  83. </li>
  84. {/volist}
  85. </ul>
  86. </div>
  87. </div>
  88. </div>
  89. </li>
  90. <li style="width: 56%">
  91. <div class="box">
  92. <div class="boxnav mapc" style="height: 550px; position: relative">
  93. <div class="mapnav">
  94. <ul>
  95. <li>
  96. <div><span>商品数量</span>
  97. <p>{$middle.goods_number}个</p>
  98. </div>
  99. </li>
  100. <li>
  101. <div><span>订单派送中</span>
  102. <p>{$middle.delivery_number}件</p>
  103. </div>
  104. </li>
  105. <li>
  106. <div><span>合作商</span>
  107. <p>{$middle.distribution_number}位</p>
  108. </div>
  109. </li>
  110. <li>
  111. <div><span>总订单</span>
  112. <p>{$middle.order_number}笔</p>
  113. </div>
  114. </li>
  115. <li>
  116. <div><span>农资供应</span>
  117. <p>{$middle.agricultural_supply_number}条</p>
  118. </div>
  119. </li>
  120. </ul>
  121. </div>
  122. <div class="mapnav2">
  123. <div class="box">
  124. <div class="tit">销量与收益</div>
  125. <div class="boxnav" style="height: 130px;" id="sysx">
  126. </div>
  127. <div class="leidanav leidanav3" style="margin-bottom: 15px;">
  128. <ul class="clearfix">
  129. <li><span>今日订单</span>
  130. <p>{$middle.today_order_number}</p>
  131. </li>
  132. <li><span>今日收益</span>
  133. <p>{$middle.today_total_amount}</p>
  134. </li>
  135. <li><span>本月订单</span>
  136. <p>{$middle.this_month_order_number}</p>
  137. </li>
  138. <li><span>本月收益</span>
  139. <p>{$middle.this_month_total_amount}</p>
  140. </li>
  141. </ul>
  142. </div>
  143. </div>
  144. </div>
  145. <div class="map" id="map"></div>
  146. <script>
  147. $(".mapbtn a").hover(function () {
  148. var ind = $(this).index()
  149. $(".mapnav ul").eq(ind).show().siblings().hide()
  150. })
  151. </script>
  152. </div>
  153. </div>
  154. </li>
  155. <li style="width: 22%">
  156. <div class="box">
  157. <div class="tit">下单与退款</div>
  158. <div class="boxnav" id="echart3" style="height: 200px;">
  159. </div>
  160. </div>
  161. <div class="box">
  162. <div class="tit">农资供应</div>
  163. <div class="boxnav" style="height: 250px;">
  164. <div style="height: 200px; float: left; width: 40%; padding: 0 5px;">
  165. <div class="tit02 text-b">热门搜索</div>
  166. <div class="huati">
  167. <ul>
  168. <li>1.农机手 <span class="text-s">↑2167</span></li>
  169. <li>2.化肥 <span class="text-s">↑2167</span></li>
  170. <li>3.饲料 <span class="text-d">↓2167</span></li>
  171. <li>4.树苗 <span class="text-d">↓2167</span></li>
  172. <li>5.收割机 <span class="text-d">↓2167</span></li>
  173. </ul>
  174. </div>
  175. </div>
  176. <div style="height: 200px; float: left; width: 60%">
  177. <div class="text-b tit02" style="text-align: center;">关键词</div>
  178. <div class="tagcloud">
  179. <!-- bo大小 co颜色 -->
  180. <a class="b01 co01" href="#">农机手</a>
  181. <a class="b02 co02" href="#">化肥</a>
  182. <a class="b03 co05" href="#">饲料</a>
  183. <a class="b04 co02" href="#">树苗</a>
  184. <a class="b03 co05" href="#">小麦</a>
  185. </div>
  186. <script type="text/javascript">
  187. /*3D标签云*/
  188. tagcloud({
  189. selector: ".tagcloud", //元素选择器
  190. fontsize: 6, //基本字体大小, 单位px
  191. radius: 40, //滚动半径, 单位px 页面宽度和高度的五分之一
  192. mspeed: "slow", //滚动最大速度, 取值: slow, normal(默认), fast
  193. ispeed: "slow", //滚动初速度, 取值: slow, normal(默认), fast
  194. direction: 0, //初始滚动方向, 取值角度(顺时针360): 0对应top, 90对应left, 135对应right-bottom(默认)...
  195. keep: false //鼠标移出组件后是否继续随鼠标滚动, 取值: false, true(默认) 对应 减速至初速度滚动, 随鼠标滚动
  196. });
  197. </script>
  198. </div>
  199. </div>
  200. </div>
  201. </li>
  202. </ul>
  203. <div class="box" style="padding: 20px 0;">
  204. <ul class="clearfix nav2 ">
  205. <li style="width:25%">
  206. <div class="tit01">农资供应</div>
  207. <div style="width: 100%;height: 100%;text-align: center;">版块开发中...</div>
  208. <div class="" id="">
  209. <div style="float: left; width: 50%; height: 0" id="fb01"></div>
  210. <div style="float: left; width: 50%; height: 0" id="fb02"></div>
  211. </div>
  212. <!-- <div class="" id="">
  213. <div style="float: left; width: 50%; height: 170px" id="fb01"></div>
  214. <div style="float: left; width: 50%; height: 170px" id="fb02"></div>
  215. </div> -->
  216. <!-- <div class="leidanav leidanav2" >
  217. <ul class="clearfix">
  218. <li><span>总人数</span>
  219. <p>128</p>
  220. </li>
  221. <li><span>男职员</span>
  222. <p>100</p>
  223. </li>
  224. <li><span>女职员</span>
  225. <p>28</p>
  226. </li>
  227. </ul>
  228. </div> -->
  229. </li>
  230. <li style="width:25%">
  231. <div class="tit01">供需信息统计</div>
  232. <div class="ftechart" id="echart4"></div>
  233. </li>
  234. <li style="width:25%">
  235. <div class="tit01">资产管理</div>
  236. <div class="" style="height:100%;display: flex; align-items: center;">
  237. <div style="float: left; width: 50%; height: 100%" class="wancheng">
  238. <div><span>闲置资产</span>
  239. <h3>{$asset_info.leave_unused_num}</h3>
  240. </div>
  241. <div class="yuan">
  242. <span>{$asset_info.unused_rate}%</span>
  243. </div>
  244. </div>
  245. <div style="float: left; width: 50%; height: 50%" id="myd1"></div>
  246. </div>
  247. </li>
  248. <li style="width:25%">
  249. <div class="tit01">农资供应</div>
  250. <div style="width: 100%;height: 100%;text-align: center;">版块开发中...</div>
  251. <div class="" id="">
  252. <div style="float: left; width: 50%; height: 0" id="fb03"></div>
  253. <div style="float: left; width: 50%; height: 0" id="fb04"></div>
  254. </div>
  255. <!-- <div class="" id="">
  256. <div style="float: left; width: 50%; height: 200px" id="fb03"></div>
  257. <div style="float: left; width: 50%; height: 200px" id="fb04"></div>
  258. </div> -->
  259. </li>
  260. </ul>
  261. </div>
  262. <input id="chars_category_data" value="{$chars_category}" hidden/>
  263. <input id="category_data" value="{$goods_category_data}" hidden/>
  264. <input id="month_data" value="{$middle.MonthFormatData}" hidden/>
  265. <input id="month_order_data" value="{$middle.MonthOrderData}" hidden/>
  266. <input id="month_arr_data" value="{$order_refund_info.MonthData}" hidden/>
  267. <input id="order_month_info" value="{$order_refund_info.order_month_info}" hidden/>
  268. <input id="refund_month_info" value="{$order_refund_info.refund_month_info}" hidden/>
  269. </div>
  270. </body>
  271. <script >
  272. //分类图表
  273. function echarts_1() {
  274. // 基于准备好的dom,初始化echarts实例
  275. var myChart = echarts.init(document.getElementById('echart1'));
  276. var category_data = JSON.parse(document.getElementById('category_data').value);
  277. var chars_category_data = JSON.parse(document.getElementById('chars_category_data').value);
  278. console.log(252501,category_data);
  279. console.log(252502,chars_category_data);
  280. var data = [{
  281. title: '乳山市'
  282. },
  283. ['本年'],
  284. chars_category_data,
  285. category_data,
  286. ]
  287. option = {
  288. color: ['#9DD060', '#35C96E', '#4DCEF8'],
  289. tooltip: {},
  290. radar: {
  291. center: ['50%', '50%'],
  292. radius: ["25%", "70%"],
  293. name: {
  294. textStyle: {
  295. color: '#72ACD1'
  296. }
  297. },
  298. splitLine: {
  299. lineStyle: {
  300. color: 'rgba(255,255,255,.0',
  301. width: 2
  302. }
  303. },
  304. axisLine: {
  305. lineStyle: {
  306. color: 'rgba(255,255,255,0.2)',
  307. width: 1,
  308. type: 'dotted'
  309. },
  310. },
  311. splitArea: {
  312. areaStyle: {
  313. color: ['rgba(255,255,255,.1)', 'rgba(255,255,255,0)']
  314. }
  315. },
  316. indicator: data[2]
  317. },
  318. series: [{
  319. name: '',
  320. type: 'radar',
  321. data: [{
  322. areaStyle: {
  323. normal: {
  324. opacity: 0.3,
  325. }
  326. },
  327. value: data[3],
  328. name: data[1][0]
  329. },
  330. {
  331. areaStyle: {
  332. normal: {
  333. opacity: 0.3,
  334. }
  335. },
  336. value: data[4],
  337. name: data[1][1]
  338. },
  339. {
  340. areaStyle: {
  341. normal: {
  342. opacity: 0.3,
  343. }
  344. },
  345. value: data[5],
  346. name: data[1][2]
  347. }
  348. ]
  349. }]
  350. };
  351. // 使用刚指定的配置项和数据显示图表。
  352. myChart.setOption(option);
  353. window.addEventListener("resize",function(){
  354. myChart.resize();
  355. });
  356. }
  357. //销量收益、农资供应
  358. function echarts_31() {
  359. var month_data = JSON.parse(document.getElementById('month_data').value);
  360. var month_order_data = JSON.parse(document.getElementById('month_order_data').value);
  361. // 基于准备好的dom,初始化echarts实例
  362. var myChart = echarts.init(document.getElementById('fb01'));
  363. var myChart2 = echarts.init(document.getElementById('fb02'));
  364. var myChart3 = echarts.init(document.getElementById('fb03'));
  365. var myChart4 = echarts.init(document.getElementById('fb04'));
  366. var myChart5 = echarts.init(document.getElementById('myd1'));
  367. var myChart7 = echarts.init(document.getElementById('sysx'));
  368. option = {
  369. tooltip: {
  370. trigger: 'item',
  371. formatter: "{a} <br/>{b}: {c} ({d}%)",
  372. position:function(p){ //其中p为当前鼠标的位置
  373. return [p[0] + 10, p[1] - 10];
  374. }
  375. },
  376. legend: {
  377. orient: 'vertical',
  378. top:'25%',
  379. right:0,
  380. itemWidth: 10,
  381. itemHeight: 10,
  382. data:['20-29岁','30-39岁','40-49岁','50岁以上'],
  383. textStyle: {
  384. color: 'rgba(255,255,255,.5)',
  385. fontSize:'12',
  386. }
  387. },
  388. series: [
  389. {
  390. name:'年龄分布',
  391. type:'pie',
  392. center: ['35%', '50%'],
  393. radius: ['40%', '50%'],
  394. color: ['#62c98d', '#2f89cf', '#4cb9cf', '#e0c828','#e58c00','#eb295b'],
  395. label: {show:false},
  396. labelLine: {show:false},
  397. data:[
  398. {value:4, name:'20-29岁'},
  399. {value:2, name:'30-39岁'},
  400. {value:2, name:'40-49岁'},
  401. {value:1, name:'50岁以上'},
  402. ]
  403. }
  404. ]
  405. };
  406. option2 = {
  407. tooltip: {
  408. trigger: 'item',
  409. formatter: "{a} <br/>{b}: {c} ({d}%)",
  410. position:function(p){ //其中p为当前鼠标的位置
  411. return [p[0] + 10, p[1] - 10];
  412. }
  413. },
  414. legend: {
  415. orient: 'vertical',
  416. top:'25%',
  417. right:'8%',
  418. itemWidth: 10,
  419. itemHeight: 10,
  420. data:['博士','硕士','本科','专科'],
  421. textStyle: {
  422. color: 'rgba(255,255,255,.5)',
  423. fontSize:'12',
  424. }
  425. },
  426. series: [
  427. {
  428. name:'学历构成',
  429. type:'pie',
  430. center: ['40%', '50%'],
  431. radius: ['40%', '50%'],
  432. color: ['#62c98d', '#2f89cf', '#4cb9cf', '#e0c828','#e58c00','#eb295b'],
  433. label: {show:false},
  434. labelLine: {show:false},
  435. data:[
  436. {value:10, name:'博士'},
  437. {value:20, name:'硕士'},
  438. {value:30, name:'本科'},
  439. {value:40, name:'专科'},
  440. ]
  441. }
  442. ]
  443. };
  444. option3 = {
  445. tooltip: {
  446. trigger: 'item',
  447. formatter: "{a} <br/>{b}: {c} ({d}%)",
  448. position:function(p){ //其中p为当前鼠标的位置
  449. return [p[0] + 10, p[1] - 10];
  450. }
  451. },
  452. legend: {
  453. orient: 'vertical',
  454. top:'center',
  455. right:0,
  456. itemWidth: 10,
  457. itemHeight: 10,
  458. data:['数据分门别类','数据关系部门','今日数据交易'],
  459. textStyle: {
  460. color: 'rgba(255,255,255,.5)',
  461. fontSize:'12',
  462. }
  463. },
  464. series: [
  465. {
  466. name:'数据',
  467. type:'pie',
  468. center: ['35%', '50%'],
  469. radius: ['40%', '50%'],
  470. color: ['#62c98d', '#2f89cf', '#4cb9cf', '#e0c828','#e58c00','#eb295b'],
  471. label: {show:false},
  472. labelLine: {show:false},
  473. data:[
  474. {value:4, name:'数据分门别类'},
  475. {value:2, name:'数据关系部门'},
  476. {value:2, name:'今日数据交易'},
  477. ]
  478. }
  479. ]
  480. };
  481. option4 = {
  482. tooltip: {
  483. trigger: 'item',
  484. formatter: "{a} <br/>{b}: {c} ({d}%)",
  485. position:function(p){ //其中p为当前鼠标的位置
  486. return [p[0] + 10, p[1] - 10];
  487. }
  488. },
  489. legend: {
  490. orient: 'vertical',
  491. top:'center',
  492. right:'8%',
  493. itemWidth: 10,
  494. itemHeight: 10,
  495. data:['零销类','服务类','销售类','软件类','硬件类','其它类'],
  496. textStyle: {
  497. color: 'rgba(255,255,255,.5)',
  498. fontSize:'12',
  499. }
  500. },
  501. series: [
  502. {
  503. name:'业务分类',
  504. type:'pie',
  505. center: ['40%', '50%'],
  506. radius: ['40%', '50%'],
  507. color: ['#62c98d', '#2f89cf', '#4cb9cf', '#e0c828','#e58c00','#eb295b'],
  508. label: {show:false},
  509. labelLine: {show:false},
  510. data:[
  511. {value:10, name:'零销类'},
  512. {value:20, name:'服务类'},
  513. {value:30, name:'销售类'},
  514. {value:40, name:'软件类'},
  515. {value:50, name:'硬件类'},
  516. {value:60, name:'其它类'},
  517. ]
  518. }
  519. ]
  520. };
  521. option5 = {
  522. grid: {
  523. left: '0',
  524. right: '0',
  525. top: '10%',
  526. bottom: '24%',
  527. //containLabel: true
  528. },
  529. legend: {
  530. data: ['闲置中', '待续约', '租赁中'],
  531. bottom:0,
  532. itemWidth: 10,
  533. itemHeight: 10,
  534. textStyle: {
  535. color: "#fff",
  536. fontSize: '10',
  537. },
  538. itemGap: 5
  539. },
  540. tooltip: {
  541. show: "true",
  542. trigger: 'item'
  543. },
  544. yAxis: {
  545. type: 'value',
  546. show: false,
  547. },
  548. xAxis: [{
  549. type: 'category',
  550. axisTick: {
  551. show: false
  552. },
  553. axisLine: {
  554. show: true,
  555. lineStyle: {
  556. color: '#363e83',
  557. }
  558. },
  559. axisLabel: {
  560. show: false,
  561. // inside: true,
  562. textStyle: {
  563. color: "rgba(255,255,255,1)",
  564. fontWeight: 'normal',
  565. fontSize: '12',
  566. },
  567. // formatter:function(val){
  568. // return val.split("").join("\n")
  569. // },
  570. },
  571. data: ['业务办量统计']
  572. }
  573. ],
  574. series: [
  575. {
  576. name: '闲置中',
  577. type: 'bar',
  578. barWidth: '20',
  579. itemStyle: {
  580. normal: {
  581. show: true,
  582. color:'#20aa92',
  583. barBorderRadius: 50,
  584. borderWidth: 0,
  585. }
  586. },
  587. zlevel: 2,
  588. barGap: '100%',
  589. data: [{$asset_info.unlease}],
  590. label: {
  591. formatter: "{c}",
  592. show: true,
  593. position: 'top',
  594. textStyle: {
  595. fontSize:12,
  596. color: 'rgba(255,255,255,.6)',
  597. }
  598. },
  599. },
  600. {
  601. name: '待续约',
  602. type: 'bar',
  603. itemStyle: {
  604. normal: {
  605. show: true,
  606. color:'#f4664e',
  607. barBorderRadius: 50,
  608. borderWidth: 0,
  609. }
  610. },
  611. zlevel: 2,
  612. barWidth: '20',
  613. data: [{$asset_info.leaseend}],
  614. label: {
  615. formatter: "{c}",
  616. show: true,
  617. position: 'top',
  618. textStyle: {
  619. fontSize:12,
  620. color: 'rgba(255,255,255,.6)',
  621. }
  622. },
  623. },
  624. {
  625. name: '租赁中',
  626. type: 'bar',
  627. itemStyle: {
  628. normal: {
  629. show: true,
  630. color:'#0c93dc',
  631. barBorderRadius: 50,
  632. borderWidth: 0,
  633. }
  634. },
  635. zlevel: 2,
  636. barWidth: '20',
  637. data: [{$asset_info.leaseing}],
  638. label: {
  639. formatter: "{c}",
  640. show: true,
  641. position: 'top',
  642. textStyle: {
  643. fontSize:12,
  644. color: 'rgba(255,255,255,.6)',
  645. }
  646. },
  647. },
  648. ]
  649. };
  650. option7 = {
  651. // backgroundColor: '#00265f',
  652. tooltip: {
  653. trigger: 'axis',
  654. axisPointer: {
  655. type: 'shadow'
  656. }
  657. },
  658. grid: {
  659. left: '0%',
  660. top:'10px',
  661. right: '0%',
  662. bottom: '0',
  663. containLabel: true
  664. },
  665. xAxis: [{
  666. type: 'category',
  667. data: month_data,
  668. axisLine: {
  669. show: true,
  670. lineStyle: {
  671. color: "rgba(255,255,255,.1)",
  672. width: 1,
  673. type: "solid"
  674. },
  675. },
  676. axisTick: {
  677. show: false,
  678. },
  679. axisLabel: {
  680. interval: 0,
  681. // rotate:50,
  682. show: true,
  683. splitNumber: 5,
  684. textStyle: {
  685. color: "rgba(255,255,255,.6)",
  686. fontSize: '12',
  687. },
  688. },
  689. }],
  690. yAxis: [{
  691. type: 'value',
  692. axisLabel: {
  693. //formatter: '{value} %'
  694. show:true,
  695. textStyle: {
  696. color: "rgba(255,255,255,.6)",
  697. fontSize: '12',
  698. },
  699. },
  700. axisTick: {
  701. show: false,
  702. },
  703. axisLine: {
  704. show: true,
  705. lineStyle: {
  706. color: "rgba(255,255,255,.1 )",
  707. width: 1,
  708. type: "solid"
  709. },
  710. },
  711. splitLine: {
  712. show: false,
  713. lineStyle: {
  714. color: "rgba(255,255,255,.1)",
  715. }
  716. }
  717. }],
  718. series: [{
  719. name: '{$middle.YearData}年',
  720. type: 'line',
  721. //smooth: true,
  722. data: month_order_data,
  723. itemStyle: {
  724. normal: {
  725. color:'#2f89cf',
  726. opacity: 1,
  727. barBorderRadius: 5,
  728. }
  729. }
  730. }
  731. ]
  732. };
  733. // 使用刚指定的配置项和数据显示图表。
  734. myChart.setOption(option);
  735. myChart2.setOption(option2);
  736. myChart3.setOption(option3);
  737. myChart4.setOption(option4);
  738. myChart5.setOption(option5);
  739. myChart7.setOption(option7);
  740. window.addEventListener("resize",function(){
  741. myChart.resize();
  742. myChart7.resize();
  743. myChart2.resize();
  744. myChart3.resize();
  745. myChart4.resize();
  746. myChart5.resize();
  747. });
  748. }
  749. //供需信息统计
  750. function echarts_4() {
  751. var month_arr_data = JSON.parse(document.getElementById('month_arr_data').value);
  752. var order_month_info = JSON.parse(document.getElementById('order_month_info').value);
  753. var refund_month_info = JSON.parse(document.getElementById('refund_month_info').value);
  754. // 基于准备好的dom,初始化echarts实例
  755. var myChart = echarts.init(document.getElementById('echart4'));
  756. var myChart2 = echarts.init(document.getElementById('echart3'));
  757. option = {
  758. tooltip: {
  759. trigger: 'axis',
  760. axisPointer: {
  761. type: 'shadow'
  762. }
  763. },
  764. legend: {
  765. data: ['下单', '退款'],
  766. top:'2%',
  767. textStyle: {
  768. color: "rgba(255,255,255,.5)",
  769. fontSize: '12',
  770. },
  771. itemWidth: 12,
  772. itemHeight: 12,
  773. itemGap: 35
  774. },
  775. grid: {
  776. left: '0%',
  777. top:'40px',
  778. right: '0%',
  779. bottom: '0%',
  780. containLabel: true
  781. },
  782. xAxis: [{
  783. type: 'category',
  784. data: month_arr_data,
  785. axisLine: {
  786. show: true,
  787. lineStyle: {
  788. color: "rgba(255,255,255,.1)",
  789. width: 1,
  790. type: "solid"
  791. },
  792. },
  793. axisTick: {
  794. show: false,
  795. },
  796. axisLabel: {
  797. interval: 0,
  798. // rotate:50,
  799. show: true,
  800. splitNumber: 15,
  801. textStyle: {
  802. color: "rgba(255,255,255,.6)",
  803. fontSize: '14',
  804. },
  805. },
  806. }],
  807. yAxis: [{
  808. type: 'value',
  809. axisLabel: {
  810. //formatter: '{value} %'
  811. show:true,
  812. textStyle: {
  813. color: "rgba(255,255,255,.6)",
  814. fontSize: '14',
  815. },
  816. },
  817. axisTick: {
  818. show: false,
  819. },
  820. axisLine: {
  821. show: true,
  822. lineStyle: {
  823. color: "rgba(255,255,255,.1 )",
  824. width: 1,
  825. type: "solid"
  826. },
  827. },
  828. splitLine: {
  829. lineStyle: {
  830. color: "rgba(255,255,255,.1)",
  831. }
  832. }
  833. }],
  834. series: [{
  835. name: '下单',
  836. type: 'bar',
  837. data: order_month_info,
  838. barWidth:'20%', //柱子宽度
  839. // barGap: 1, //柱子之间间距
  840. itemStyle: {
  841. normal: {
  842. color:'#2f89cf',
  843. opacity: 1,
  844. barBorderRadius: 5,
  845. }
  846. }
  847. }, {
  848. name: '退款',
  849. type: 'bar',
  850. data: refund_month_info,
  851. barWidth:'20%',
  852. // barGap: 1,
  853. itemStyle: {
  854. normal: {
  855. color:'#62c98d',
  856. opacity: 1,
  857. barBorderRadius: 5,
  858. }
  859. }
  860. },
  861. ]
  862. };
  863. option2 = {
  864. // backgroundColor: '#00265f',
  865. tooltip: {
  866. trigger: 'axis',
  867. axisPointer: {
  868. type: 'shadow'
  869. }
  870. },
  871. legend: {
  872. data: ['供应信息', '需求信息'],
  873. top:'5%',
  874. textStyle: {
  875. color: "#fff",
  876. fontSize: '12',
  877. },
  878. itemGap: 35
  879. },
  880. grid: {
  881. left: '0%',
  882. top:'40px',
  883. right: '0%',
  884. bottom: '0',
  885. containLabel: true
  886. },
  887. xAxis: [{
  888. type: 'category',
  889. data: ['5月', '6月', '7月', '8月', '9月', '10月'],
  890. axisLine: {
  891. show: true,
  892. lineStyle: {
  893. color: "rgba(255,255,255,.1)",
  894. width: 1,
  895. type: "solid"
  896. },
  897. },
  898. axisTick: {
  899. show: false,
  900. },
  901. axisLabel: {
  902. interval: 0,
  903. // rotate:50,
  904. show: true,
  905. splitNumber: 5,
  906. textStyle: {
  907. color: "rgba(255,255,255,.6)",
  908. fontSize: '12',
  909. },
  910. },
  911. }],
  912. yAxis: [{
  913. type: 'value',
  914. axisLabel: {
  915. //formatter: '{value} %'
  916. show:true,
  917. textStyle: {
  918. color: "rgba(255,255,255,.6)",
  919. fontSize: '12',
  920. },
  921. },
  922. axisTick: {
  923. show: false,
  924. },
  925. axisLine: {
  926. show: true,
  927. lineStyle: {
  928. color: "rgba(255,255,255,.1 )",
  929. width: 1,
  930. type: "solid"
  931. },
  932. },
  933. splitLine: {
  934. lineStyle: {
  935. color: "rgba(255,255,255,.1)",
  936. }
  937. }
  938. }],
  939. series: [{
  940. name: '供应信息',
  941. type: 'line',
  942. smooth: true,
  943. data: [20, 16, 31, 28, 15, 28],
  944. itemStyle: {
  945. normal: {
  946. color:'#2f89cf',
  947. opacity: 1,
  948. barBorderRadius: 5,
  949. }
  950. }
  951. }, {
  952. name: '需求信息',
  953. type: 'line',
  954. smooth: true,
  955. data: [15, 22, 6, 24, 35, 12],
  956. barWidth:'15',
  957. // barGap: 1,
  958. itemStyle: {
  959. normal: {
  960. color:'#62c98d',
  961. opacity: 1,
  962. barBorderRadius: 5,
  963. }
  964. }
  965. },
  966. ]
  967. };
  968. // 使用刚指定的配置项和数据显示图表。
  969. myChart.setOption(option2);
  970. myChart2.setOption(option);
  971. window.addEventListener("resize",function(){
  972. myChart.resize();
  973. });
  974. }
  975. </script>
  976. </html>