#add message

This commit is contained in:
xieshen 2020-10-29 15:19:15 +08:00
parent 8e994f1c93
commit 1ca025f546
11 changed files with 608 additions and 344 deletions

View File

@ -0,0 +1,18 @@
<div id="pages" class="text-center">
<nav>
<ul class="pagination">
<li class="step-links">
{% if wrongly.has_previous %}
<a class='active' href="?page={{ wrongly.previous_page_number }}">上一页</a>
{% endif %}
<span class="current">
第{{ wrongly.number }}页 共{{ wrongly.paginator.num_pages }}页</span>
{% if wrongly.has_next %}
<a class='active' href="?page={{ wrongly.next_page_number }}">下一页</a>
{% endif %}
</li>
</ul>
</nav>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -35,12 +35,14 @@
<table class="table table-hover" style="font-size: 14px"> <table class="table table-hover" style="font-size: 14px">
<thead> <thead>
<tr> <tr>
<th style="text-align: center">上下文</th>
<th style="text-align: center">序号</th>
<th style="text-align: center">错别字</th> <th style="text-align: center">错别字</th>
<th style="text-align: center">校正字</th> <th style="text-align: center">校正字</th>
<th style="text-align: center">上下文</th>
<th style="text-align: center">网址</th> <th style="text-align: center">网址</th>
<th style="text-align: center">审核状态</th> <th style="text-align: center">审核状态</th>
<th style="text-align: center">修改标记</th> {# <th style="text-align: center">修改标记</th>#}
<th style="text-align: center">核实人</th> <th style="text-align: center">核实人</th>
<th style="text-align: center">监测时间</th> <th style="text-align: center">监测时间</th>
<th style="text-align: center">定位</th> <th style="text-align: center">定位</th>
@ -49,21 +51,31 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for r in wrongly %}
<tr> <tr>
<td style="vertical-align: middle;text-align: center">{{ r.code }}</td> <td style="vertical-align: middle;text-align: center">{{ forloop.counter }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.title }}</td> <td style="vertical-align: middle;text-align: center">{{ r.error }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.comment }}</td> <td style="vertical-align: middle;text-align: center">{{ r.idea }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.reply }}</td> <td style="vertical-align: middle;text-align: center">{{ r.site }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td> <td style="vertical-align: middle;text-align: center">暂无数据</td>
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td> <td style="vertical-align: middle;text-align: center">已审核</td>
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td> {# <td style="vertical-align: middle;text-align: center">已修改</td>#}
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td> <td style="vertical-align: middle;text-align: center">管理员</td>
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td> <td style="vertical-align: middle;text-align: center">{{ r.date }}</td>
<td style="vertical-align: middle;text-align: center"><a class="dingwei">截图</a>
</td>
<td style="vertical-align: middle;text-align: center">审核</td>
<td style="vertical-align: middle;text-align: center">已修改</td>
</tr> </tr>
{% endfor %}
</tbody> </tbody>
</table> </table>
<div class="metadata-pagination">
{% include 'dashboard/paginator/wrongly-management-paginate.html' %}
</div>
<div id="image" style="text-align: center;" hidden>
<img src="{% static 'monitor/image/dingwei.png' %}">
</div>
</div> </div>
</div> </div>
@ -74,3 +86,10 @@
</div> </div>
</body> </body>
{% endblock %} {% endblock %}
{% block add_js %}
<script>
$(".dingwei").click(function () {
$("#image").toggle();
});
</script>
{% endblock %}

View File

@ -39,19 +39,29 @@
<th style="text-align: center">出现次数</th> <th style="text-align: center">出现次数</th>
<th style="text-align: center">定位</th> <th style="text-align: center">定位</th>
<th style="text-align: center">百分比</th> <th style="text-align: center">百分比</th>
<th style="text-align: center">风险程度</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for r in data %}
<tr> <tr>
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td> <td style="vertical-align: middle;text-align: center">叙利亚</td>
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td> <td style="vertical-align: middle;text-align: center">1</td>
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td> <td style="vertical-align: middle;text-align: center"><a class="dingwei">截图</a>
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td> </td>
<td style="vertical-align: middle;text-align: center">%1</td>
<td style="vertical-align: middle;text-align: center">
<button class="btn btn-sm btn-success">低风险</button>
</td>
</tr> </tr>
{% endfor %}
</tbody> </tbody>
</table> </table>
</div>
</div>
<div id="image" style="text-align: center;" hidden>
<img src="{% static 'monitor/image/dingwei.png' %}">
</div>
</div> </div>
</div> </div>
</div> </div>
@ -60,3 +70,10 @@
</div> </div>
</body> </body>
{% endblock %} {% endblock %}
{% block add_js %}
<script>
$(".dingwei").click(function () {
$("#image").toggle();
});
</script>
{% endblock %}

View File

@ -84,7 +84,8 @@
href="{% url 'monitor-timeliness-monitoring-toutiao' %}">头条</a></li> href="{% url 'monitor-timeliness-monitoring-toutiao' %}">头条</a></li>
<li role="presentation"><a href="{% url 'monitor-timeliness-monitoring-weibo' %}">微博</a> <li role="presentation"><a href="{% url 'monitor-timeliness-monitoring-weibo' %}">微博</a>
</li> </li>
<li role="presentation" class="active"><a href="{% url 'monitor-timeliness-monitoring-douyin' %}">抖音</a> <li role="presentation" class="active"><a
href="{% url 'monitor-timeliness-monitoring-douyin' %}">抖音</a>
</li> </li>
<li role="presentation"><a href="{% url 'monitor-timeliness-monitoring-qita' %}">其他</a> <li role="presentation"><a href="{% url 'monitor-timeliness-monitoring-qita' %}">其他</a>
</li> </li>
@ -93,6 +94,7 @@
<table class="table table-hover" style="font-size: 14px"> <table class="table table-hover" style="font-size: 14px">
<thead> <thead>
<tr> <tr>
<th style="text-align: center">序号</th>
<th style="text-align: center">抖音号</th> <th style="text-align: center">抖音号</th>
<th style="text-align: center">更新次数</th> <th style="text-align: center">更新次数</th>
<th style="text-align: center">最近更新时间</th> <th style="text-align: center">最近更新时间</th>
@ -107,6 +109,7 @@
<tbody> <tbody>
{% for r in res %} {% for r in res %}
<tr> <tr>
<td style="vertical-align: middle;text-align: center">{{ forloop.counter }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.n_name }}</td> <td style="vertical-align: middle;text-align: center">{{ r.n_name }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.count }}</td> <td style="vertical-align: middle;text-align: center">{{ r.count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.start_data }}</td> <td style="vertical-align: middle;text-align: center">{{ r.start_data }}</td>
@ -134,75 +137,74 @@
<script src="{% static 'js/echarts.min.js' %}" type="text/javascript"></script> <script src="{% static 'js/echarts.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/chart-sparkline.js' %}" type="text/javascript"></script> <script src="{% static 'js/chart-sparkline.js' %}" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据 // 指定图表的配置项和数据
option = { $.getJSON('/monitor/timeliness/monitoring/json/', function (res) {
title: { // 基于准备好的dom初始化echarts实例
text: '更新次数/天' var myChart = echarts.init(document.getElementById('main'));
}, option = {
tooltip: { title: {
trigger: 'axis' text: '更新次数/市'
},
legend: {
data: ['微信', '微博', '头条', '抖音', '其他']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value'
},
series: [
{
name: '微信',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
}, },
{ tooltip: {
name: '微博', trigger: 'axis'
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
}, },
{ legend: {
name: '头条', data: ['微信', '微博', '头条', '抖音', '其他']
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
}, },
{ grid: {
name: '抖音', left: '3%',
type: 'line', right: '4%',
stack: '总量', bottom: '3%',
data: [320, 332, 301, 334, 390, 330, 320] containLabel: true
}, },
{ toolbox: {
name: '其他', feature: {
type: 'line', saveAsImage: {}
stack: '总量', }
data: [820, 932, 901, 934, 1290, 1330, 1320] },
} xAxis: {
] type: 'category',
}; boundaryGap: false,
data: ['兰州市', '嘉峪关市', '金昌市', '酒泉市', '张掖市', '武威市', '白银市', '天水市', '平凉市', '庆阳市', '定西市', '陇南市', '甘南州', '临夏州']
},
// 使用刚指定的配置项和数据显示图表。 yAxis: {
myChart.setOption(option); type: 'value'
},
series: [
{
name: '微信',
type: 'line',
stack: '总量',
data: res.weixin
},
{
name: '微博',
type: 'line',
stack: '总量',
data: res.weibo
},
{
name: '头条',
type: 'line',
stack: '总量',
data: res.toutiao
},
{
name: '抖音',
type: 'line',
stack: '总量',
data: res.douyin
},
{
name: '其他',
type: 'line',
stack: '总量',
data: res.qita
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
})
</script> </script>
{% endblock %} {% endblock %}

View File

@ -93,6 +93,7 @@
<table class="table table-hover" style="font-size: 14px"> <table class="table table-hover" style="font-size: 14px">
<thead> <thead>
<tr> <tr>
<th style="text-align: center">序号</th>
<th style="text-align: center">新媒体类型</th> <th style="text-align: center">新媒体类型</th>
<th style="text-align: center">新媒体账号</th> <th style="text-align: center">新媒体账号</th>
<th style="text-align: center">更新次数</th> <th style="text-align: center">更新次数</th>
@ -108,6 +109,7 @@
<tbody> <tbody>
{% for r in res %} {% for r in res %}
<tr> <tr>
<td style="vertical-align: middle;text-align: center">{{ forloop.counter }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.n_type }}</td> <td style="vertical-align: middle;text-align: center">{{ r.n_type }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.n_name }}</td> <td style="vertical-align: middle;text-align: center">{{ r.n_name }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.count }}</td> <td style="vertical-align: middle;text-align: center">{{ r.count }}</td>
@ -136,75 +138,74 @@
<script src="{% static 'js/echarts.min.js' %}" type="text/javascript"></script> <script src="{% static 'js/echarts.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/chart-sparkline.js' %}" type="text/javascript"></script> <script src="{% static 'js/chart-sparkline.js' %}" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据 // 指定图表的配置项和数据
option = { $.getJSON('/monitor/timeliness/monitoring/json/', function (res) {
title: { // 基于准备好的dom初始化echarts实例
text: '更新次数/天' var myChart = echarts.init(document.getElementById('main'));
}, option = {
tooltip: { title: {
trigger: 'axis' text: '更新次数/市'
},
legend: {
data: ['微信', '微博', '头条', '抖音', '其他']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value'
},
series: [
{
name: '微信',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
}, },
{ tooltip: {
name: '微博', trigger: 'axis'
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
}, },
{ legend: {
name: '头条', data: ['微信', '微博', '头条', '抖音', '其他']
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
}, },
{ grid: {
name: '抖音', left: '3%',
type: 'line', right: '4%',
stack: '总量', bottom: '3%',
data: [320, 332, 301, 334, 390, 330, 320] containLabel: true
}, },
{ toolbox: {
name: '其他', feature: {
type: 'line', saveAsImage: {}
stack: '总量', }
data: [820, 932, 901, 934, 1290, 1330, 1320] },
} xAxis: {
] type: 'category',
}; boundaryGap: false,
data: ['兰州市', '嘉峪关市', '金昌市', '酒泉市', '张掖市', '武威市', '白银市', '天水市', '平凉市', '庆阳市', '定西市', '陇南市', '甘南州', '临夏州']
},
// 使用刚指定的配置项和数据显示图表。 yAxis: {
myChart.setOption(option); type: 'value'
},
series: [
{
name: '微信',
type: 'line',
stack: '总量',
data: res.weixin
},
{
name: '微博',
type: 'line',
stack: '总量',
data: res.weibo
},
{
name: '头条',
type: 'line',
stack: '总量',
data: res.toutiao
},
{
name: '抖音',
type: 'line',
stack: '总量',
data: res.douyin
},
{
name: '其他',
type: 'line',
stack: '总量',
data: res.qita
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
})
</script> </script>
{% endblock %} {% endblock %}

View File

@ -93,6 +93,7 @@
<table class="table table-hover" style="font-size: 14px"> <table class="table table-hover" style="font-size: 14px">
<thead> <thead>
<tr> <tr>
<th style="text-align: center">序号</th>
<th style="text-align: center">头条号</th> <th style="text-align: center">头条号</th>
<th style="text-align: center">更新次数</th> <th style="text-align: center">更新次数</th>
<th style="text-align: center">最近更新时间</th> <th style="text-align: center">最近更新时间</th>
@ -107,6 +108,7 @@
<tbody> <tbody>
{% for r in res %} {% for r in res %}
<tr> <tr>
<td style="vertical-align: middle;text-align: center">{{ forloop.counter }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.n_name }}</td> <td style="vertical-align: middle;text-align: center">{{ r.n_name }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.count }}</td> <td style="vertical-align: middle;text-align: center">{{ r.count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.start_data }}</td> <td style="vertical-align: middle;text-align: center">{{ r.start_data }}</td>
@ -134,75 +136,74 @@
<script src="{% static 'js/echarts.min.js' %}" type="text/javascript"></script> <script src="{% static 'js/echarts.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/chart-sparkline.js' %}" type="text/javascript"></script> <script src="{% static 'js/chart-sparkline.js' %}" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据 // 指定图表的配置项和数据
option = { $.getJSON('/monitor/timeliness/monitoring/json/', function (res) {
title: { // 基于准备好的dom初始化echarts实例
text: '更新次数/天' var myChart = echarts.init(document.getElementById('main'));
}, option = {
tooltip: { title: {
trigger: 'axis' text: '更新次数/市'
},
legend: {
data: ['微信', '微博', '头条', '抖音', '其他']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value'
},
series: [
{
name: '微信',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
}, },
{ tooltip: {
name: '微博', trigger: 'axis'
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
}, },
{ legend: {
name: '头条', data: ['微信', '微博', '头条', '抖音', '其他']
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
}, },
{ grid: {
name: '抖音', left: '3%',
type: 'line', right: '4%',
stack: '总量', bottom: '3%',
data: [320, 332, 301, 334, 390, 330, 320] containLabel: true
}, },
{ toolbox: {
name: '其他', feature: {
type: 'line', saveAsImage: {}
stack: '总量', }
data: [820, 932, 901, 934, 1290, 1330, 1320] },
} xAxis: {
] type: 'category',
}; boundaryGap: false,
data: ['兰州市', '嘉峪关市', '金昌市', '酒泉市', '张掖市', '武威市', '白银市', '天水市', '平凉市', '庆阳市', '定西市', '陇南市', '甘南州', '临夏州']
},
// 使用刚指定的配置项和数据显示图表。 yAxis: {
myChart.setOption(option); type: 'value'
},
series: [
{
name: '微信',
type: 'line',
stack: '总量',
data: res.weixin
},
{
name: '微博',
type: 'line',
stack: '总量',
data: res.weibo
},
{
name: '头条',
type: 'line',
stack: '总量',
data: res.toutiao
},
{
name: '抖音',
type: 'line',
stack: '总量',
data: res.douyin
},
{
name: '其他',
type: 'line',
stack: '总量',
data: res.qita
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
})
</script> </script>
{% endblock %} {% endblock %}

View File

@ -93,6 +93,7 @@
<table class="table table-hover" style="font-size: 14px"> <table class="table table-hover" style="font-size: 14px">
<thead> <thead>
<tr> <tr>
<th style="text-align: center">序号</th>
<th style="text-align: center">微博号</th> <th style="text-align: center">微博号</th>
<th style="text-align: center">更新次数</th> <th style="text-align: center">更新次数</th>
<th style="text-align: center">最近更新时间</th> <th style="text-align: center">最近更新时间</th>
@ -107,6 +108,7 @@
<tbody> <tbody>
{% for r in res %} {% for r in res %}
<tr> <tr>
<td style="vertical-align: middle;text-align: center">{{ forloop.counter }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.n_name }}</td> <td style="vertical-align: middle;text-align: center">{{ r.n_name }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.count }}</td> <td style="vertical-align: middle;text-align: center">{{ r.count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.start_data }}</td> <td style="vertical-align: middle;text-align: center">{{ r.start_data }}</td>
@ -134,75 +136,74 @@
<script src="{% static 'js/echarts.min.js' %}" type="text/javascript"></script> <script src="{% static 'js/echarts.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/chart-sparkline.js' %}" type="text/javascript"></script> <script src="{% static 'js/chart-sparkline.js' %}" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据 // 指定图表的配置项和数据
option = { $.getJSON('/monitor/timeliness/monitoring/json/', function (res) {
title: { // 基于准备好的dom初始化echarts实例
text: '更新次数/天' var myChart = echarts.init(document.getElementById('main'));
}, option = {
tooltip: { title: {
trigger: 'axis' text: '更新次数/市'
},
legend: {
data: ['微信', '微博', '头条', '抖音', '其他']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value'
},
series: [
{
name: '微信',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
}, },
{ tooltip: {
name: '微博', trigger: 'axis'
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
}, },
{ legend: {
name: '头条', data: ['微信', '微博', '头条', '抖音', '其他']
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
}, },
{ grid: {
name: '抖音', left: '3%',
type: 'line', right: '4%',
stack: '总量', bottom: '3%',
data: [320, 332, 301, 334, 390, 330, 320] containLabel: true
}, },
{ toolbox: {
name: '其他', feature: {
type: 'line', saveAsImage: {}
stack: '总量', }
data: [820, 932, 901, 934, 1290, 1330, 1320] },
} xAxis: {
] type: 'category',
}; boundaryGap: false,
data: ['兰州市', '嘉峪关市', '金昌市', '酒泉市', '张掖市', '武威市', '白银市', '天水市', '平凉市', '庆阳市', '定西市', '陇南市', '甘南州', '临夏州']
},
// 使用刚指定的配置项和数据显示图表。 yAxis: {
myChart.setOption(option); type: 'value'
},
series: [
{
name: '微信',
type: 'line',
stack: '总量',
data: res.weixin
},
{
name: '微博',
type: 'line',
stack: '总量',
data: res.weibo
},
{
name: '头条',
type: 'line',
stack: '总量',
data: res.toutiao
},
{
name: '抖音',
type: 'line',
stack: '总量',
data: res.douyin
},
{
name: '其他',
type: 'line',
stack: '总量',
data: res.qita
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
})
</script> </script>
{% endblock %} {% endblock %}

View File

@ -93,6 +93,7 @@
<table class="table table-hover" style="font-size: 14px"> <table class="table table-hover" style="font-size: 14px">
<thead> <thead>
<tr> <tr>
<th style="text-align: center">序号</th>
<th style="text-align: center">公众号</th> <th style="text-align: center">公众号</th>
<th style="text-align: center">更新次数</th> <th style="text-align: center">更新次数</th>
<th style="text-align: center">最近更新时间</th> <th style="text-align: center">最近更新时间</th>
@ -107,6 +108,7 @@
<tbody> <tbody>
{% for r in res %} {% for r in res %}
<tr> <tr>
<td style="vertical-align: middle;text-align: center">{{ forloop.counter }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.n_name }}</td> <td style="vertical-align: middle;text-align: center">{{ r.n_name }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.count }}</td> <td style="vertical-align: middle;text-align: center">{{ r.count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.start_data }}</td> <td style="vertical-align: middle;text-align: center">{{ r.start_data }}</td>
@ -134,75 +136,78 @@
<script src="{% static 'js/echarts.min.js' %}" type="text/javascript"></script> <script src="{% static 'js/echarts.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/chart-sparkline.js' %}" type="text/javascript"></script> <script src="{% static 'js/chart-sparkline.js' %}" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据 // 指定图表的配置项和数据
option = { $.getJSON('/monitor/timeliness/monitoring/json/', function (res) {
title: { // 基于准备好的dom初始化echarts实例
text: '更新次数/天' var myChart = echarts.init(document.getElementById('main'));
}, option = {
tooltip: { title: {
trigger: 'axis' text: '更新次数/市'
},
legend: {
data: ['微信', '微博', '头条', '抖音', '其他']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value'
},
series: [
{
name: '微信',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
}, },
{ tooltip: {
name: '微博', trigger: 'axis'
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
}, },
{ legend: {
name: '头条', data: ['微信', '微博', '头条', '抖音', '其他']
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
}, },
{ grid: {
name: '抖音', left: '3%',
type: 'line', right: '4%',
stack: '总量', bottom: '3%',
data: [320, 332, 301, 334, 390, 330, 320] containLabel: true
}, },
{ toolbox: {
name: '其他', feature: {
type: 'line', saveAsImage: {}
stack: '总量', }
data: [820, 932, 901, 934, 1290, 1330, 1320] },
} xAxis: {
] type: 'category',
}; boundaryGap: false,
data: ['兰州市', '嘉峪关市', '金昌市', '酒泉市', '张掖市', '武威市', '白银市', '天水市', '平凉市', '庆阳市', '定西市', '陇南市', '甘南州', '临夏州']
},
yAxis: {
type: 'value'
},
series: [
{
name: '微信',
type: 'line',
stack: '总量',
data: res.weixin
},
{
name: '微博',
type: 'line',
stack: '总量',
data: res.weibo
},
{
name: '头条',
type: 'line',
stack: '总量',
data: res.toutiao
},
{
name: '抖音',
type: 'line',
stack: '总量',
data: res.douyin
},
{
name: '其他',
type: 'line',
stack: '总量',
data: res.qita
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
})
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script> </script>
{% endblock %} {% endblock %}

View File

@ -10,6 +10,7 @@ urlpatterns = [
path('new/media/public/opinion/douyin/',views.new_media_public_opinion_douyin,name='monitor-new-media-public-opinion-douyin'), path('new/media/public/opinion/douyin/',views.new_media_public_opinion_douyin,name='monitor-new-media-public-opinion-douyin'),
path('new/media/public/opinion/qita/',views.new_media_public_opinion_qita,name='monitor-new-media-public-opinion-qita'), path('new/media/public/opinion/qita/',views.new_media_public_opinion_qita,name='monitor-new-media-public-opinion-qita'),
#时效性监测 #时效性监测
path('timeliness/monitoring/json/',views.timeliness_monitoring_json,name='monitor-timeliness-monitoring-json'),
path('timeliness/monitoring/weixin/',views.timeliness_monitoring_weixin,name='monitor-timeliness-monitoring-weixin'), path('timeliness/monitoring/weixin/',views.timeliness_monitoring_weixin,name='monitor-timeliness-monitoring-weixin'),
path('timeliness/monitoring/weibo/',views.timeliness_monitoring_weibo,name='monitor-timeliness-monitoring-weibo'), path('timeliness/monitoring/weibo/',views.timeliness_monitoring_weibo,name='monitor-timeliness-monitoring-weibo'),
path('timeliness/monitoring/toutiao/',views.timeliness_monitoring_toutiao,name='monitor-timeliness-monitoring-toutiao'), path('timeliness/monitoring/toutiao/',views.timeliness_monitoring_toutiao,name='monitor-timeliness-monitoring-toutiao'),

View File

@ -454,7 +454,8 @@ def timeliness_monitoring_qita(request):
organization_count_month = Organization.objects.filter(created__range=(this_month_start, this_month_end)).count() organization_count_month = Organization.objects.filter(created__range=(this_month_start, this_month_end)).count()
organization_count_week = Organization.objects.filter(created__range=(this_week_start, this_week_end)).count() organization_count_week = Organization.objects.filter(created__range=(this_week_start, this_week_end)).count()
timelinessmonitoring = TimelinessMonitoring.objects.exclude(n_type__in=['微信','微博','今日头条','抖音']).order_by('n_name') timelinessmonitoring = TimelinessMonitoring.objects.exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).order_by(
'n_name')
res = [] res = []
if timelinessmonitoring is not None: if timelinessmonitoring is not None:
@ -496,11 +497,21 @@ def timeliness_monitoring_qita(request):
def error_monitoring(request): def error_monitoring(request):
return render(request, 'monitor/error-monitoring.html') wrongly = Wrongly.objects.all()
paginator = Paginator(wrongly, 8)
page = int(request.GET.get('page', 1))
try:
wrongly = paginator.page(page)
except PageNotAnInteger:
wrongly = paginator.page(1)
except EmptyPage:
wrongly = paginator.page(paginator.num_pages)
return render(request, 'monitor/error-monitoring.html',{'wrongly':wrongly})
def sensitive_word_monitoring(request): def sensitive_word_monitoring(request):
return render(request, 'monitor/sensitive-word-monitoring.html') data = range(1,8)
return render(request, 'monitor/sensitive-word-monitoring.html',{'data':data})
def comment_on_interactive_monitoring(request): def comment_on_interactive_monitoring(request):
@ -508,7 +519,7 @@ def comment_on_interactive_monitoring(request):
def comment_on_interactive_monitoring_json(request): def comment_on_interactive_monitoring_json(request):
data = Test.objects.all()[:500] data = Test.objects.all()[:50]
r = [] r = []
for d in data: for d in data:
content = d.content content = d.content
@ -568,3 +579,191 @@ def test_json(request):
return HttpResponse(json.dumps({ return HttpResponse(json.dumps({
"res": res "res": res
})) }))
def timeliness_monitoring_json(request):
timelinessmonitoring_lanzhou_weixin = \
TimelinessMonitoring.objects.filter(city='兰州市', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_lanzhou_weibo = \
TimelinessMonitoring.objects.filter(city='兰州市', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_lanzhou_toutiao = \
TimelinessMonitoring.objects.filter(city='兰州市', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_lanzhou_douyin = \
TimelinessMonitoring.objects.filter(city='兰州市', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_lanzhou_qita = \
TimelinessMonitoring.objects.filter(city='兰州市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_jiayuguan_weixin = \
TimelinessMonitoring.objects.filter(city__contains='嘉峪关', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jiayuguan_weibo = \
TimelinessMonitoring.objects.filter(city__contains='嘉峪关', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jiayuguan_toutiao = \
TimelinessMonitoring.objects.filter(city__contains='嘉峪关', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jiayuguan_douyin = \
TimelinessMonitoring.objects.filter(city__contains='嘉峪关', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jiayuguan_qita = \
TimelinessMonitoring.objects.filter(city__contains='嘉峪关').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_jinchang_weixin = \
TimelinessMonitoring.objects.filter(city='金昌市', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jinchang_weibo = \
TimelinessMonitoring.objects.filter(city='金昌市', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jinchang_toutiao = \
TimelinessMonitoring.objects.filter(city='金昌市', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jinchang_douyin = \
TimelinessMonitoring.objects.filter(city='金昌市', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jinchang_qita = \
TimelinessMonitoring.objects.filter(city='金昌市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_jiuquan_weixin = \
TimelinessMonitoring.objects.filter(city='酒泉市', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jiuquan_weibo = \
TimelinessMonitoring.objects.filter(city='酒泉市', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jiuquan_toutiao = \
TimelinessMonitoring.objects.filter(city='酒泉市', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jiuquan_douyin = \
TimelinessMonitoring.objects.filter(city='酒泉市', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_jiuquan_qita = \
TimelinessMonitoring.objects.filter(city='酒泉市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_zhangye_weixin = \
TimelinessMonitoring.objects.filter(city='张掖市', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_zhangye_weibo = \
TimelinessMonitoring.objects.filter(city='张掖市', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_zhangye_toutiao = \
TimelinessMonitoring.objects.filter(city='张掖市', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_zhangye_douyin = \
TimelinessMonitoring.objects.filter(city='张掖市', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_zhangye_qita = \
TimelinessMonitoring.objects.filter(city='张掖市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_wuwei_weixin = \
TimelinessMonitoring.objects.filter(city='武威市', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_wuwei_weibo = \
TimelinessMonitoring.objects.filter(city='武威市', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_wuwei_toutiao = \
TimelinessMonitoring.objects.filter(city='武威市', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_wuwei_douyin = \
TimelinessMonitoring.objects.filter(city='武威市', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_wuwei_qita = \
TimelinessMonitoring.objects.filter(city='武威市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_baiyin_weixin = \
TimelinessMonitoring.objects.filter(city='白银市', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_baiyin_weibo = \
TimelinessMonitoring.objects.filter(city='白银市', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_baiyin_toutiao = \
TimelinessMonitoring.objects.filter(city='白银市', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_baiyin_douyin = \
TimelinessMonitoring.objects.filter(city='白银市', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_baiyin_qita = \
TimelinessMonitoring.objects.filter(city='白银市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_tianshui_weixin = \
TimelinessMonitoring.objects.filter(city='天水市', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_tianshui_weibo = \
TimelinessMonitoring.objects.filter(city='天水市', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_tianshui_toutiao = \
TimelinessMonitoring.objects.filter(city='天水市', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_tianshui_douyin = \
TimelinessMonitoring.objects.filter(city='天水市', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_tianshui_qita = \
TimelinessMonitoring.objects.filter(city='天水市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_pingliang_weixin = \
TimelinessMonitoring.objects.filter(city='平凉市', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_pingliang_weibo = \
TimelinessMonitoring.objects.filter(city='平凉市', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_pingliang_toutiao = \
TimelinessMonitoring.objects.filter(city='平凉市', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_pingliang_douyin = \
TimelinessMonitoring.objects.filter(city='平凉市', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_pingliang_qita = \
TimelinessMonitoring.objects.filter(city='平凉市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_qingyang_weixin = \
TimelinessMonitoring.objects.filter(city='庆阳市', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_qingyang_weibo = \
TimelinessMonitoring.objects.filter(city='庆阳市', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_qingyang_toutiao = \
TimelinessMonitoring.objects.filter(city='庆阳市', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_qingyang_douyin = \
TimelinessMonitoring.objects.filter(city='庆阳市', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_qingyang_qita = \
TimelinessMonitoring.objects.filter(city='庆阳市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_dingxi_weixin = \
TimelinessMonitoring.objects.filter(city='定西市', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_dingxi_weibo = \
TimelinessMonitoring.objects.filter(city='定西市', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_dingxi_toutiao = \
TimelinessMonitoring.objects.filter(city='定西市', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_dingxi_douyin = \
TimelinessMonitoring.objects.filter(city='定西市', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_dingxi_qita = \
TimelinessMonitoring.objects.filter(city='定西市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_longnan_weixin = \
TimelinessMonitoring.objects.filter(city='陇南市', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_longnan_weibo = \
TimelinessMonitoring.objects.filter(city='陇南市', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_longnan_toutiao = \
TimelinessMonitoring.objects.filter(city='陇南市', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_longnan_douyin = \
TimelinessMonitoring.objects.filter(city='陇南市', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_longnan_qita = \
TimelinessMonitoring.objects.filter(city='陇南市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_gannan_weixin = \
TimelinessMonitoring.objects.filter(city__contains='甘南', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_gannan_weibo = \
TimelinessMonitoring.objects.filter(city__contains='甘南', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_gannan_toutiao = \
TimelinessMonitoring.objects.filter(city__contains='甘南', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_gannan_douyin = \
TimelinessMonitoring.objects.filter(city__contains='甘南', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_gannan_qita = \
TimelinessMonitoring.objects.filter(city__contains='甘南').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
timelinessmonitoring_linxia_weixin = \
TimelinessMonitoring.objects.filter(city__contains='临夏', n_type='微信').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_linxia_weibo = \
TimelinessMonitoring.objects.filter(city__contains='临夏', n_type='微博').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_linxia_toutiao = \
TimelinessMonitoring.objects.filter(city__contains='临夏', n_type='今日头条').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_linxia_douyin = \
TimelinessMonitoring.objects.filter(city__contains='临夏', n_type='抖音').aggregate(nums=Sum('update'))['nums']
timelinessmonitoring_linxia_qita = \
TimelinessMonitoring.objects.filter(city__contains='临夏').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(
nums=Sum('update'))['nums']
weixin = [timelinessmonitoring_lanzhou_weixin,timelinessmonitoring_jiayuguan_weixin,timelinessmonitoring_jinchang_weixin,timelinessmonitoring_jiuquan_weixin,timelinessmonitoring_zhangye_weixin,timelinessmonitoring_wuwei_weixin,timelinessmonitoring_baiyin_weixin,timelinessmonitoring_tianshui_weixin,timelinessmonitoring_pingliang_weixin,timelinessmonitoring_qingyang_weixin,timelinessmonitoring_dingxi_weixin,timelinessmonitoring_longnan_weixin,timelinessmonitoring_gannan_weixin,timelinessmonitoring_linxia_weixin]
weibo = [timelinessmonitoring_lanzhou_weibo,timelinessmonitoring_jiayuguan_weibo,timelinessmonitoring_jinchang_weibo,timelinessmonitoring_jiuquan_weibo,timelinessmonitoring_zhangye_weibo,timelinessmonitoring_wuwei_weibo,timelinessmonitoring_baiyin_weibo,timelinessmonitoring_tianshui_weibo,timelinessmonitoring_pingliang_weibo,timelinessmonitoring_qingyang_weibo,timelinessmonitoring_dingxi_weibo,timelinessmonitoring_longnan_weibo,timelinessmonitoring_gannan_weibo,timelinessmonitoring_linxia_weibo]
toutiao = [timelinessmonitoring_lanzhou_toutiao,timelinessmonitoring_jiayuguan_toutiao,timelinessmonitoring_jinchang_toutiao,timelinessmonitoring_jiuquan_toutiao,timelinessmonitoring_zhangye_toutiao,timelinessmonitoring_wuwei_toutiao,timelinessmonitoring_baiyin_toutiao,timelinessmonitoring_tianshui_toutiao,timelinessmonitoring_pingliang_toutiao,timelinessmonitoring_qingyang_toutiao,timelinessmonitoring_dingxi_toutiao,timelinessmonitoring_longnan_toutiao,timelinessmonitoring_gannan_toutiao,timelinessmonitoring_linxia_toutiao]
douyin = [timelinessmonitoring_lanzhou_douyin,timelinessmonitoring_jiayuguan_douyin,timelinessmonitoring_jinchang_douyin,timelinessmonitoring_jiuquan_douyin,timelinessmonitoring_zhangye_douyin,timelinessmonitoring_wuwei_douyin,timelinessmonitoring_baiyin_douyin,timelinessmonitoring_tianshui_douyin,timelinessmonitoring_pingliang_douyin,timelinessmonitoring_qingyang_douyin,timelinessmonitoring_dingxi_douyin,timelinessmonitoring_longnan_douyin,timelinessmonitoring_gannan_douyin,timelinessmonitoring_linxia_douyin]
qita = [timelinessmonitoring_lanzhou_qita,timelinessmonitoring_jiayuguan_qita,timelinessmonitoring_jinchang_qita,timelinessmonitoring_jiuquan_qita,timelinessmonitoring_zhangye_qita,timelinessmonitoring_wuwei_qita,timelinessmonitoring_baiyin_qita,timelinessmonitoring_tianshui_qita,timelinessmonitoring_pingliang_qita,timelinessmonitoring_qingyang_qita,timelinessmonitoring_dingxi_qita,timelinessmonitoring_longnan_qita,timelinessmonitoring_gannan_qita,timelinessmonitoring_linxia_qita]
print(weixin)
print(weibo)
print(toutiao)
print(douyin)
print(qita)
return HttpResponse(json.dumps({
"status":"1",
"weixin":weixin,
"weibo":weibo,
"toutiao":toutiao,
"douyin":douyin,
"qita":qita
}))