add polls
This commit is contained in:
parent
9a51ff4ea5
commit
0aaf61a457
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/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
|
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
{% block add_css %} {% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="flex-container">
|
<div class="flex-container">
|
||||||
|
@ -25,5 +26,6 @@
|
||||||
</div>
|
</div>
|
||||||
<script src="{% static 'js/jquery-1.11.2.min.js' %}"></script>
|
<script src="{% static 'js/jquery-1.11.2.min.js' %}"></script>
|
||||||
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
||||||
|
{% block add_js %} {% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</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/create/', views.create_media, name='polls_add_media'),
|
||||||
path('medias/list/', views.medias, name='polls_medias'),
|
path('medias/list/', views.medias, name='polls_medias'),
|
||||||
path('news/detail/', views.news_detail, name='polls_news_detail'),
|
path('news/detail/', views.news_detail, name='polls_news_detail'),
|
||||||
|
path('monitor/statistics/', views.monitor_statistics, name='polls_monitor_statistics')
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from .user import index, status_500, status_401, polls_login, send_code, register_step_one, register_step_two, password_recover_step_one, password_recover_step_two
|
from .user import index, status_500, status_401, polls_login, send_code, register_step_one, register_step_two, password_recover_step_one, password_recover_step_two
|
||||||
from .notice import notices, read_notice
|
from .notice import notices, read_notice
|
||||||
from .media import medias, create_media
|
from .media import medias, create_media
|
||||||
from .news import news_detail
|
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