戒酒的李白

【ipChar.html】ip地图页面完善

@@ -4,7 +4,138 @@ @@ -4,7 +4,138 @@
4 IP分析 4 IP分析
5 {% endblock %} 5 {% endblock %}
6 6
  7 +{% block nav %}
  8 +<nav class="iq-sidebar-menu">
  9 + <ul id="iq-sidebar-toggle" class="side-menu">
  10 + <li class="px-3 pt-3 pb-2 ">
  11 + <span class="text-uppercase small font-weight-bold">首页</span>
  12 + </li>
  13 + <li class=" sidebar-layout">
  14 + <a href="/page/home" class="svg-icon">
  15 + <i class="">
  16 + <svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none" viewbox="0 0 24 24" stroke="currentColor">
  17 + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path>
  18 + </svg>
  19 + </i>
  20 + <span class="ml-2">首页</span>
  21 + </a>
  22 + </li>
  23 + <li class=" sidebar-layout">
  24 + <a href="/page/hotWord" class="svg-icon ">
  25 + <i class="">
  26 + <svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none" viewbox="0 0 24 24" stroke="currentColor">
  27 + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
  28 + </svg>
  29 + </i>
  30 + <span class="ml-2">热词统计</span>
  31 + </a>
  32 + </li>
  33 + <li class=" sidebar-layout">
  34 + <a href="/page/tableData" class="svg-icon">
  35 + <i class="">
  36 + <svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none" viewbox="0 0 24 24" stroke="currentColor">
  37 + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"></path>
  38 + </svg>
  39 + </i>
  40 + <span class="ml-2">微博舆情统计</span>
  41 + </a>
  42 + </li>
  43 + <li class="px-3 pt-3 pb-2 ">
  44 + <span class="text-uppercase small font-weight-bold">数据可视化</span>
  45 + </li>
  46 + <li class=" sidebar-layout">
  47 + <a href="/page/articleChar" class="svg-icon">
  48 + <i class="">
  49 + <svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none" viewbox="0 0 24 24" stroke="currentColor">
  50 + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path>
  51 + </svg>
  52 + </i>
  53 + <span class="ml-2">文章分析</span>
  54 + </a>
  55 + </li>
  56 + <li class="active sidebar-layout">
  57 + <a href="/page/ipChar" class="svg-icon">
  58 + <i class="">
  59 + <svg class="icon line" width="18" id="receipt" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" stroke="currentColor">
  60 + <path d="M17,16V3L13,5,10,3,7,5,3,3V17.83A3.13,3.13,0,0,0,5.84,21,3,3,0,0,0,9,18V17a1,1,0,0,1,1-1H20a1,1,0,0,1,1,1v1a3,3,0,0,1-3,3H6" style="fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2;"></path>
  61 + <line x1="8" y1="10" x2="12" y2="10" style="fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2;"></line>
  62 + </svg>
  63 + </i>
  64 + <span class="ml-2">IP分析</span>
  65 + </a>
  66 + </li>
  67 + <li class=" sidebar-layout">
  68 + <a href="/page/commentChar" class="svg-icon">
  69 + <i class="">
  70 + <svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none" viewbox="0 0 24 24" stroke="currentColor">
  71 + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path>
  72 + </svg>
  73 + </i><span class="ml-2">评论分析</span>
  74 + </a>
  75 + </li>
  76 + <li class=" sidebar-layout">
  77 + <a href="/page/yuqingChar" class="svg-icon">
  78 + <i class="">
  79 + <svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none" viewbox="0 0 24 24" stroke="currentColor">
  80 + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
  81 + </svg>
  82 + </i>
  83 + <span class="ml-2">舆情分析</span>
  84 + </a>
  85 + </li>
  86 + <li class="px-3 pt-3 pb-2">
  87 + <span class="text-uppercase small font-weight-bold">词云图</span>
  88 + </li>
  89 + <li class=" sidebar-layout">
  90 + <a href="/page/articleCloud" class="svg-icon">
  91 + <i class="">
  92 + <svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none" viewbox="0 0 24 24" stroke="currentColor">
  93 + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"></path>
  94 + </svg>
  95 + </i><span class="ml-2">文章内容词云图</span>
  96 + </a>
  97 + </li>
  98 + </ul>
  99 + </nav>
  100 +{% endblock %}
  101 +{% block content %}
  102 + <div class="container-fluid">
  103 + <div class="row">
  104 + <div class="col-md-12 mb-4 mt-1">
  105 + <div class="d-flex flex-wrap justify-content-between align-items-center">
  106 + <h4 class="font-weight-bold">IP分析</h4>
  107 + </div>
  108 + </div>
  109 + </div>
  110 + <div class="row">
  111 + <div class="col-lg-12">
  112 + <div class="card card-block">
  113 + <div class="card-header d-flex justify-content-between pb-0">
  114 + <div class="header-title">
  115 + <h4 class="card-title mb-0">文章IP位置分析图</h4>
  116 + </div>
  117 + </div>
  118 + <div class="card-body">
  119 + <div id="main" style="width: 100%;height: 750px"></div>
  120 + </div>
  121 + </div>
  122 + </div>
  123 + <div class="col-lg-12">
  124 + <div class="card card-block">
  125 + <div class="card-header d-flex justify-content-between pb-0">
  126 + <div class="header-title">
  127 + <h4 class="card-title mb-0">评论IP位置分析图</h4>
  128 + </div>
  129 + </div>
  130 + <div class="card-body">
  131 + <div id="mainTwo" style="width: 100%;height: 750px"></div>
  132 + </div>
  133 + </div>
  134 + </div>
  135 + </div>
  136 + </div>
7 137
  138 +{% endblock %}
8 139
9 {% block echarts %} 140 {% block echarts %}
10 <script> 141 <script>
@@ -29,6 +160,68 @@ @@ -29,6 +160,68 @@
29 }, 160 },
30 visualMap:{ 161 visualMap:{
31 min:0, 162 min:0,
  163 + max:50,
  164 + text:['高','低'],
  165 + realtime:true,
  166 + calulable:true,
  167 + inRange:{
  168 + color:['orange','green']
  169 + }
  170 + },
  171 + series:[{
  172 + type:'map',
  173 + map:"china",
  174 + label:{
  175 + normal:{
  176 + show:true,
  177 + color:"white",
  178 + fontSize:'12'
  179 + }
  180 + },
  181 + emphasis:{
  182 + label:{
  183 + show:true
  184 + },
  185 + },
  186 + data:{{ articleRegionData | tojson }},
  187 + itemStyle:{
  188 + normal: {
  189 + areaColor:"skyblue",
  190 + borderColor:"#fff"
  191 + },
  192 + emphasis:{
  193 + areaColor: '#2b91b7'
  194 + }
  195 + },
  196 + zoom:1.4,
  197 + roam:true
  198 + }]
  199 + }
  200 +
  201 + option && myChart.setOption(option);
  202 + </script>
  203 + <script>
  204 + var chartDom = document.getElementById('mainTwo');
  205 + var myChart = echarts.init(chartDom);
  206 + var option;
  207 +
  208 + option = {
  209 + title:{
  210 + text:'文章IP发布地址地图',
  211 + left:'center',
  212 + textStyle:{
  213 + color:"#333",
  214 + fontWeight:"bold"
  215 + }
  216 + },
  217 + tooltip:{
  218 + trigger:'item',
  219 + formatter:function(params){
  220 + return params.name + '<br>微博发布个数: ' + params.value + ' 个'
  221 + }
  222 + },
  223 + visualMap:{
  224 + min:0,
32 max:200, 225 max:200,
33 text:['高','低'], 226 text:['高','低'],
34 realtime:true, 227 realtime:true,