index5.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <!--#include file="inc/header.html"-->
  2. <script src="/src/echarts.min.js"></script>
  3. <!-- <script src="/src/shandong.js"></script> -->
  4. <div class="con-wrap map-area">
  5. <!-- <h1>山东省分公司</h1> -->
  6. <div class="con" id="mapcontainer">
  7. <div id="main-map"></div>
  8. <div id="mapLw-show"></div>
  9. <ul id="list-show"></ul>
  10. </div>
  11. </div>
  12. <script type="text/javascript">
  13. var chart;
  14. var city = {
  15. "烟台市": {
  16. '莱州市': 'lzfk',
  17. },
  18. "聊城市": {
  19. '东昌府区': 'lcbk',
  20. }
  21. };
  22. var city2 = {
  23. "jinan": "济南市",
  24. "qingdao": "青岛市",
  25. "zibo": "淄博市",
  26. "zaozhuang": "枣庄市",
  27. "dongying": "东营市",
  28. "yantai": "烟台市",
  29. "weifang": "潍坊市",
  30. "jining": "济宁市",
  31. "taian": "泰安市",
  32. "weihai": "威海市",
  33. "rizhao": "日照市",
  34. "linyi": "临沂市",
  35. "dezhou": "德州市",
  36. "liaocheng": "聊城市",
  37. "binzhou": "滨州市",
  38. "heze": "菏泽市"
  39. };
  40. var name = city2[window.location.hash.replace("#", "")],
  41. data = [];
  42. $.each(city[name], function(ind, ele){
  43. var obj = {};
  44. obj.name = ind;
  45. obj.value = Math.round(Math.random()*1000);
  46. data.push(obj);
  47. })
  48. $.get('/src/map/'+ name +'.json', function (json) {
  49. echarts.registerMap(name, json);
  50. var ename=name.substr(0, 2);
  51. var liaocc="聊城中储粮物流有限公司";
  52. var yantt="中储粮莱州丰和物流有限公司";
  53. if(ename=="聊城"){
  54. ename=liaocc;
  55. }else if(ename=="烟台"){
  56. ename=yantt;
  57. }
  58. chart = echarts.init(document.getElementById('main-map'));
  59. chart.setOption({
  60. title: {
  61. text: ename,
  62. subtext: '',
  63. left: 'center'
  64. },
  65. legend: {
  66. orient: 'vertical',
  67. top: 'bottom',
  68. left: 'right',
  69. itemHeight: 20,
  70. itemWidth: 20,
  71. shadowBlur: '10',
  72. selectedMode: 'single'
  73. },
  74. tooltip: {
  75. trigger: 'item',
  76. formatter: '{b}'
  77. },
  78. series: [{
  79. name: name,
  80. map: name,
  81. type: 'map',
  82. selectedMode: 'single',
  83. // showLegendSymbol: true,
  84. label: {
  85. normal: {
  86. show: true,
  87. textStyle: {
  88. color: '#1A9856'
  89. }
  90. },
  91. emphasis: {
  92. show: true,
  93. textStyle: {
  94. color: '#fff'
  95. }
  96. }
  97. },
  98. itemStyle: {
  99. normal: {
  100. areaColor: '#ccc',
  101. borderColor: '#333'
  102. },
  103. emphasis: {
  104. areaColor: '#007B3A',
  105. borderColor: '#666'
  106. }
  107. },
  108. data: data
  109. }]
  110. });
  111. chart.on('click',function(param) {
  112. var html;
  113. if (param.name == '兰陵县') {
  114. html = "";
  115. html += '<li><a href="/map/grain/csfk.html">兰陵县分公司</a></li>';
  116. html += '<li><a href="/map/grain/nqsnk.html">南桥收纳库</a></li>';
  117. $('#list-show').empty().show().append($(html));
  118. return;
  119. } else if(param.name == '单县') {
  120. html = "";
  121. html += '<li><a href="/map/grain/dxfk.html">单县分公司</a></li>';
  122. html += '<li><a href="/map/grain/igscd.html">黄岗收储点</a></li>';
  123. $('#list-show').empty().show().append($(html));
  124. return;
  125. } else if(param.name == '东昌府区') {
  126. html = "";
  127. /*html += '<li><a href="/map/grain/lcbk.html">东昌府区分库</a></li>';*/
  128. html += '<li><a href="/map/grain/lcwl.html">聊城物流</a></li>';
  129. $('#list-show').empty().show().append($(html));
  130. return;
  131. } else if(param.name == '莱州市') {
  132. html = "";
  133. /*html += '<li><a href="/map/grain/lzfk.html">莱州分库</a></li>';*/
  134. html += '<li><a href="/map/grain/lzfiwl.html">丰和物流</a></li>';
  135. $('#list-show').empty().show().append($(html));
  136. return;
  137. } else if (param.name == '郓城县') {
  138. html = "";
  139. html += '<li><a href="/map/grain/ycfk.html">郓城县分公司</a></li>';
  140. html += '<li><a href="/map/grain/ylscd.html">杨楼收储点</a></li>';
  141. html += '<li><a href="/map/grain/gyjscd.html">古营集收储点</a></li>';
  142. $('#list-show').empty().show().append($(html));
  143. return;
  144. } else if (param.name == '牡丹区') {
  145. html = "";
  146. html += '<li><a href="/map/grain/hjscd.html">牡丹区分公司</a></li>';
  147. html += '<li><a href="/map/grain/hjscd.html">韩集收储点</a></li>';
  148. $('#list-show').empty().show().append($(html));
  149. return;
  150. } else {
  151. var hrefname = city[param.seriesName][param.name];
  152. if( hrefname ) {
  153. window.location.href="/map/grain/"+ hrefname +".html";
  154. $('#list-show').hide();
  155. } else {
  156. chart.dispatchAction({
  157. type: 'mapUnSelect',
  158. name: param.name
  159. })
  160. $('#list-show').hide();
  161. return;
  162. }
  163. }
  164. });
  165. })
  166. </script>
  167. <div class="bottom-wrap">&copy; 2018 中储粮-单仓档案管理系统 版权所有</div>
  168. </body>
  169. </html>