Merge branch 'master' of http://210.77.77.77/xieshen/newmediamonitoring
This commit is contained in:
commit
a700ea40ec
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -18,6 +18,7 @@
|
|||
<script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
{% block add_css %} {% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="flex-container">
|
||||
|
@ -25,5 +26,6 @@
|
|||
</div>
|
||||
<script src="{% static 'js/jquery-1.11.2.min.js' %}"></script>
|
||||
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
||||
{% block add_js %} {% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
{% extends 'polls/base.html' %}
|
||||
{% load static %}
|
||||
{% block content%}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div id="chart1" style="width: 100%%;height:400px;margin-bottom:40px;"></div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div id="chart2" style="width: 100%%;height:400px;margin-bottom:40px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock%}
|
||||
{% block add_js %}
|
||||
<script src="{% static 'polls/js/echarts.min.js' %}"></script>
|
||||
<script type="text/javascript">
|
||||
var myChart = echarts.init(document.getElementById('chart1'));
|
||||
var option = {
|
||||
title: {
|
||||
text: '新媒体数量'
|
||||
},
|
||||
tooltip: {},
|
||||
legend: {
|
||||
data:['数量']
|
||||
},
|
||||
xAxis: {
|
||||
data: ["公众号","微博","头条号","其他"]
|
||||
},
|
||||
yAxis: {},
|
||||
series: [{
|
||||
name: '数量',
|
||||
type: 'bar',
|
||||
data: [5, 20, 36, 10]
|
||||
}]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
var myChart2 = echarts.init(document.getElementById('chart2'));
|
||||
var option = {
|
||||
title: {
|
||||
text: '新媒体文章量'
|
||||
},
|
||||
xAxis: {
|
||||
data: ["公众号","微博","头条号","其他"]
|
||||
},
|
||||
yAxis: {},
|
||||
series: [{
|
||||
data: [820, 932, 901, 934, 1290, ],
|
||||
type: 'line'
|
||||
}]
|
||||
};
|
||||
myChart2.setOption(option);
|
||||
</script>
|
||||
{% endblock %}
|
|
@ -17,4 +17,5 @@ urlpatterns = [
|
|||
path('medias/create/', views.create_media, name='polls_add_media'),
|
||||
path('medias/list/', views.medias, name='polls_medias'),
|
||||
path('news/detail/', views.news_detail, name='polls_news_detail'),
|
||||
path('monitor/statistics/', views.monitor_statistics, name='polls_monitor_statistics')
|
||||
]
|
||||
|
|
|
@ -2,3 +2,4 @@ from .user import index, status_500, status_401, polls_login, send_code, registe
|
|||
from .notice import notices, read_notice
|
||||
from .media import medias, create_media
|
||||
from .news import news_detail
|
||||
from .monitor import monitor_statistics
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,4 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
def monitor_statistics(request):
|
||||
return render(request, 'polls/monitor_statistics.html')
|
Loading…
Reference in New Issue