#首页修改
This commit is contained in:
parent
4175686f12
commit
2401f73973
|
@ -16,7 +16,6 @@ def backstage_new_media_public_opinion(request):
|
|||
if request.method == 'POST':
|
||||
filename = request.FILES.get('file')
|
||||
date = request.POST.get("date")
|
||||
print(filename)
|
||||
if not os.path.exists(settings.MEDIA_ROOT):
|
||||
os.makedirs(settings.MEDIA_ROOT)
|
||||
if filename is None:
|
||||
|
@ -61,7 +60,6 @@ def backstage_new_media_public_opinion(request):
|
|||
results=results, update=update, silet=silet,
|
||||
start_data=start_data, end_data=end_data,
|
||||
comment=0, date=date)
|
||||
print(timelinessmonitoring.n_type)
|
||||
timelinessmonitoring.save()
|
||||
# else:
|
||||
# messages.error(request, '更新次数只能为数字!!!')
|
||||
|
@ -129,7 +127,6 @@ def backstage_comment(request):
|
|||
v = l.split(',')
|
||||
try:
|
||||
if v[0] != '评论':
|
||||
print(v[0])
|
||||
comment = v[0]
|
||||
reply = v[1]
|
||||
name = v[2]
|
||||
|
|
|
@ -144,6 +144,7 @@
|
|||
background-color: #A5BBFF;
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
margin-top: -40px;
|
||||
}
|
||||
|
||||
.download-head {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</li>
|
||||
<li class="sidebar-toggle-wrap">
|
||||
<a href="{% url 'dashboard-home' %}" class="sidebar_toggle">
|
||||
主页
|
||||
首页
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
<div class="col-md-6 col-xs-6 col-lg-6">
|
||||
<div class="menu">
|
||||
<span class="menu-right"><a href="{% url 'dashboard-home' %}">主页</a></span>
|
||||
<span class="menu-right"><a href="{% url 'dashboard-home' %}">首页</a></span>
|
||||
<span class="menu-right"><a href="{% url 'dashboard-login' %}">新媒体监测服务</a></span>
|
||||
<span class="menu-right"><a>新媒体监测优势</a></span>
|
||||
<span class="menu-right"><a href="{% url 'dashboard-download' %}">APP下载</a></span>
|
||||
|
|
|
@ -28,17 +28,17 @@
|
|||
</div>
|
||||
<div class="col-md-6 col-xs-6 col-lg-6">
|
||||
<div class="menu">
|
||||
<span class="menu-right"><a href="{% url 'dashboard-home' %}">主页</a></span>
|
||||
<span class="menu-right"><a href="{% url 'dashboard-login' %}">新媒体监测服务</a></span>
|
||||
<span class="menu-right"><a>新媒体监测优势</a></span>
|
||||
<span class="menu-right"><a href="{% url 'dashboard-download' %}">APP下载</a></span>
|
||||
<span class="menu-right"><a>行业动态</a></span>
|
||||
<span class="menu-right"><a href="{% url 'dashboard-home' %}">首页</a></span>
|
||||
<span class="menu-right"><a href="{% url 'dashboard-login' %}">政务新媒体监测</a></span>
|
||||
<span class="menu-right"><a>网站云监测</a></span>
|
||||
<span class="menu-right"><a href="{% url 'dashboard-download' %}">政务新媒体管理</a></span>
|
||||
{# <span class="menu-right"><a>行业动态</a></span>#}
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn col-md-12 col-lg-12 col-xs-12">
|
||||
{# <div class="btn col-md-12 col-lg-12 col-xs-12">#}
|
||||
{# <img src="{% static 'dashboard/image/组 18.png' %}">#}
|
||||
<a href="{% url 'dashboard-login' %}"><button>立即体验</button></a>
|
||||
</div>
|
||||
{# <a href="{% url 'dashboard-login' %}"><button>立即体验</button></a>#}
|
||||
{# </div>#}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -48,22 +48,22 @@
|
|||
<div class="model1 col-md-8 col-xs-8 col-lg-8">
|
||||
<div class="col-xs-4 col-md-4 col-lg-4" style="text-align: center">
|
||||
<div style="display: inline-block">
|
||||
<p class="model1-p" style="margin-top: 40px;font-weight: 1000">用户量</p>
|
||||
<p class="model1-p" style="color: #00a8e6;font-size: 25px;font-weight: 1000">11120</p>
|
||||
<p class="model1-p" style="margin-top: 40px;font-weight: 1000">监测新媒体数量</p>
|
||||
<p class="model1-p" style="color: #00a8e6;font-size: 25px;font-weight: 1000">{{ newmedia_count }}</p>
|
||||
</div>
|
||||
<div style="width: 1px;height: 130px;background-color: black;float: right;opacity: .1"></div>
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-4 col-lg-4" style="text-align: center">
|
||||
<div style="display: inline-block">
|
||||
<p class="model1-p" style="margin-top: 40px;font-weight: 1000">每日使用量</p>
|
||||
<p class="model1-p" style="color: #00a8e6;font-size: 25px;font-weight: 1000">28936478</p>
|
||||
<p class="model1-p" style="margin-top: 40px;font-weight: 1000">分析文章数量</p>
|
||||
<p class="model1-p" style="color: #00a8e6;font-size: 25px;font-weight: 1000">{{ article_count }}</p>
|
||||
</div>
|
||||
<div style="width: 1px;height: 130px;background-color: black;float: right;opacity: .1"></div>
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-4 col-lg-4" style="text-align: center">
|
||||
<div style="display: inline-block">
|
||||
<p class="model1-p" style="margin-top: 40px;font-weight: 1000">处理文章数量</p>
|
||||
<p class="model1-p" style="color: #00a8e6;font-size: 25px;font-weight: 1000">30065981</p>
|
||||
<p class="model1-p" style="margin-top: 40px;font-weight: 1000">预警次数</p>
|
||||
<p class="model1-p" style="color: #00a8e6;font-size: 25px;font-weight: 1000">{{ news_count }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -74,8 +74,8 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12 col-xs-12 col-lg-12 middle2">
|
||||
<div class="page-header" style="text-align: center;margin-top: 80px;">
|
||||
<h2>新媒体监测服务<br>
|
||||
<small>NEW MEDIA MONITORING SERVICE</small>
|
||||
<h2>政务新媒体监测服务<br>
|
||||
<small>Government Affairs New Media Service</small>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="col-md-12 col-xs-12 col-lg-12" style="text-align: center">
|
||||
|
@ -86,8 +86,8 @@
|
|||
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">发布时效性监测</p></a>
|
||||
<p style="font-size: 12px">监测最新发布时间、最长更新时间、发布不达标天数等,全面分析新媒体内容发布及时性。</p>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">更新时效性监测</p></a>
|
||||
<p style="font-size: 12px">监测新媒体更新时间,统计最长更新间隔时间、达标天数、最近更新时间等,分析新媒体更新时效性。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -97,8 +97,8 @@
|
|||
src="{% static 'dashboard/image/图层 11.png' %}"></a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">错别字及敏感词监测</p></a>
|
||||
<p style="font-size: 12px">监测新媒体内容中存在的错别字及敏感词,能准确校对政治性错误,并提供错别字及敏感词的定位功能。</p>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">错别字敏感词监测</p></a>
|
||||
<p style="font-size: 12px">采用大数据平台分析发布内容的准确性,提供错别字、敏感词校对建议。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-2 col-lg-2 all-circle" style="margin-top: 40px">
|
||||
|
@ -106,8 +106,8 @@
|
|||
style="display: inline-block; vertical-align: middle;margin-top: 10px;width: 40px;height: 35px;"
|
||||
src="{% static 'dashboard/image/图层 12.png' %}"></a></div>
|
||||
<div>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">外链监测</p></a>
|
||||
<p style="font-size: 12px">监测新媒体内容中的所有外部链接,支持审核,从而及时发现“非法外链”。</p>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">链接有效性监测</p></a>
|
||||
<p style="font-size: 12px">监测新媒体发布内容中所有外部链接,按错误类型汇总各个新媒体的错链监测情况。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-2 col-lg-2 all-circle" style="margin-top: 100px">
|
||||
|
@ -115,8 +115,8 @@
|
|||
style="display: inline-block; vertical-align: middle;margin-top: 10px;width: 35px;height: 35px;"
|
||||
src="{% static 'dashboard/image/图层 14.png' %}"></a></div>
|
||||
<div>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">影响力分析</p></a>
|
||||
<p style="font-size: 12px">在监测到的常规运营指标数据(如发布量、阅读量等)的基础上,通过影响力传播算法,获得新媒体的影响力传播指数。</p>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">互动行为监测</p></a>
|
||||
<p style="font-size: 12px">监测政务新媒体是否提供有效互动功能,群众评论是否及时回应,分析评论数量和评论热词。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-2 col-lg-2 all-circle" style="margin-top: 50px">
|
||||
|
@ -124,8 +124,8 @@
|
|||
style="display: inline-block; vertical-align: middle;margin-top: 17px;width: 40px;height: 30px;"
|
||||
src="{% static 'dashboard/image/热点.png' %}"></a></div>
|
||||
<div>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">热点文章榜</p></a>
|
||||
<p style="font-size: 12px">根据新媒体文章的阅读与分享情况,分析新媒体粉丝关注热点,为内容运营提供依据。</p>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">政务新媒体矩阵</p></a>
|
||||
<p style="font-size: 12px">构建政务新媒体矩阵,体现归属地域、部门领域以及行业特点,提供相应统计、分析和管理辅助。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-2 col-lg-2 all-circle" style="margin-top: 60px">
|
||||
|
@ -133,8 +133,8 @@
|
|||
style="display: inline-block; vertical-align: middle;margin-top: 10px;width: 35px;height: 35px;"
|
||||
src="{% static 'dashboard/image/月度考核.png' %}"></a></div>
|
||||
<div>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">新媒体绩效考核</p></a>
|
||||
<p style="font-size: 12px">基于新媒体矩阵考核指标,定制新媒体绩效考核排名报表。</p>
|
||||
<a href="{% url 'dashboard-login' %}"><p style="width: 100%">新媒体协同宣传</p></a>
|
||||
<p style="font-size: 12px">跨越新媒体平台实现统一管理和协同宣传,使各级各部门能快速响应统一宣传任务,支持短信和语音提醒。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -143,8 +143,8 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12 col-xs-12 col-lg-12 middle3">
|
||||
<div style="text-align: center;margin-top: 50px;color: white">
|
||||
<h2>新媒体监测优势<br>
|
||||
<small style="color: white">ADVANTAGES OF NEW MEDIA MONITORING</small>
|
||||
<h2>产品与服务<br>
|
||||
<small style="color: white">PRODUCTS AND SERVICES</small>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="col-md-12 col-xs-12 col-lg-12" style="text-align: center">
|
||||
|
@ -153,23 +153,23 @@
|
|||
<div class="col-md-12 col-xs-12 col-lg-12">
|
||||
<div class=" rectangle-blue ">
|
||||
<img src="{% static 'dashboard/image/全面.png' %}">
|
||||
<p>全面</p>
|
||||
<p>支持查看可用性统计数据、可用性持续时间、监测点详情监测数据。</p>
|
||||
<p>政务新媒体监测服务</p>
|
||||
<p>监测政务新媒体更新时效性、评论互动,分析发布内容,掌握舆情热点。</p>
|
||||
</div>
|
||||
<div class=" rectangle-blue">
|
||||
<img src="{% static 'dashboard/image/快速 (1).png' %}">
|
||||
<p>快速</p>
|
||||
<p>日诊断页面资源数可超过1000万。一旦发现问题,则秒级告警。</p>
|
||||
<p>网站监测服务</p>
|
||||
<p>监测网站功能开设完成度、内容发布准确度、内容更新频度、网站联通有效性。</p>
|
||||
</div>
|
||||
<div class=" rectangle-blue">
|
||||
<img src="{% static 'dashboard/image/准确.png' %}">
|
||||
<p>准确</p>
|
||||
<p>数据预处理,对数据进行归一、过滤,确保数据一致性与准确性。</p>
|
||||
<p>政务新媒体统一管理</p>
|
||||
<p>实现政务新媒体及其运维人员、管理人员、主体单位综合信息管理。</p>
|
||||
</div>
|
||||
<div class=" rectangle-blue">
|
||||
<img style="width: 45px;height: 70px" src="{% static 'dashboard/image/稳定 (1).png' %}">
|
||||
<p>稳定</p>
|
||||
<p>自动化的运维监控、异常流量发现并处理的技术。</p>
|
||||
<img style="width: 35px;height: 30px" src="{% static 'dashboard/image/稳定 (1).png' %}">
|
||||
<p>大数据分析服务</p>
|
||||
<p>提供大规模数据采集和分析服务,通过云端服务方式向用户提供分析结果和决策支持。</p>
|
||||
</div>
|
||||
</div>
|
||||
{# <div class="col-md-1 col-xs-1 col-lg-1"></div>#}
|
||||
|
@ -184,14 +184,16 @@
|
|||
<div class="col-xs-6 col-md-6 col-lg-6" style="text-align: center">
|
||||
<img class="col-xs-6 col-md-6 col-lg-6" style="margin-top: 30px;width: 120px;height: 75px;" src="{% static 'dashboard/image/组 15 拷贝.png' %}">
|
||||
<div style="margin-top: 30px" class="col-xs-6 col-md-6 col-lg-6">
|
||||
<p class="model1-p" style="color: blue">Android客户端下载</p>
|
||||
<p class="model1-p" style="color: blue">政务新媒体管理</p>
|
||||
<p class="model1-p" style="color: blue">Android端</p>
|
||||
<a href="{% url 'dashboard-download' %}"><button class="download-btn">立即下载</button></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-6 col-lg-6" style="text-align: center">
|
||||
<img class="col-xs-6 col-md-6 col-lg-6" style="margin-top: 25px;width: 120px;height: 75px;" src="{% static 'dashboard/image/组 16 拷贝.png' %}">
|
||||
<div style="margin-top: 30px" class="col-xs-6 col-md-6 col-lg-6">
|
||||
<p class="model1-p" style="color: blue">IOS客户端下载</p>
|
||||
<p class="model1-p" style="color: blue">政务新媒体管理</p>
|
||||
<p class="model1-p" style="color: blue">iOS端</p>
|
||||
<a href="{% url 'dashboard-download' %}"><button class="download-btn">立即下载</button></a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -200,58 +202,58 @@
|
|||
<div class="col-lg-2 col-xs-2 col-md-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-xs-12 col-lg-12 middle4">
|
||||
<div class="page-header" style="text-align: center;margin-top: 80px;">
|
||||
<h2>行业动态<br>
|
||||
<small>INDUSTRY TRENDS</small>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="col-md-12 col-xs-12 col-lg-12" style="text-align: center">
|
||||
<div class="col-md-12 middle4">
|
||||
|
||||
<div class="col-md-4" style="margin-top: 30px">
|
||||
<img src="{% static 'dashboard/image/组 21.png' %}">
|
||||
</div>
|
||||
<div class="col-md-4" style="margin-top: 30px">
|
||||
<img src="{% static 'dashboard/image/组 22.png' %}">
|
||||
</div>
|
||||
<div class="col-md-4" style="margin-top: 30px">
|
||||
<img src="{% static 'dashboard/image/组 23.png' %}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{# <div class="row">#}
|
||||
{# <div class="col-md-12 col-xs-12 col-lg-12 middle4">#}
|
||||
{# <div class="page-header" style="text-align: center;margin-top: 80px;">#}
|
||||
{# <h2>行业动态<br>#}
|
||||
{# <small>INDUSTRY TRENDS</small>#}
|
||||
{# </h2>#}
|
||||
{# </div>#}
|
||||
{# <div class="col-md-12 col-xs-12 col-lg-12" style="text-align: center">#}
|
||||
{# <div class="col-md-12 middle4">#}
|
||||
{##}
|
||||
{# <div class="col-md-4" style="margin-top: 30px">#}
|
||||
{# <img src="{% static 'dashboard/image/组 21.png' %}">#}
|
||||
{# </div>#}
|
||||
{# <div class="col-md-4" style="margin-top: 30px">#}
|
||||
{# <img src="{% static 'dashboard/image/组 22.png' %}">#}
|
||||
{# </div>#}
|
||||
{# <div class="col-md-4" style="margin-top: 30px">#}
|
||||
{# <img src="{% static 'dashboard/image/组 23.png' %}">#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{##}
|
||||
{##}
|
||||
{##}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{##}
|
||||
{##}
|
||||
{##}
|
||||
{# </div>#}
|
||||
<div class="row">
|
||||
<div class="foot col-md-12">
|
||||
<div class="col-md-1">
|
||||
<img width="100" height="50" style="margin-left: 10%;margin-top: 30px"
|
||||
<div class="col-md-11">
|
||||
<img width="100" height="50" style="margin-left: 90%;margin-top: 140px"
|
||||
src="{% static 'dashboard/image/图层 26@2x.png' %}">
|
||||
</div>
|
||||
<div class="col-md-11">
|
||||
<p style="color: #ffffff;font-size: 16px;margin-left: 15%;margin-top: 20px">合作连接</p>
|
||||
<span style="color: white;font-size: 14px;margin-left: 15%;margin-top: 20px">公众号</span>
|
||||
<span style="color: white;font-size: 14px;margin-left: 5%;margin-top: 20px">微博</span>
|
||||
<span style="color: white;font-size: 14px;margin-left: 5%;margin-top: 20px">抖音</span>
|
||||
<span style="color: white;font-size: 14px;margin-left: 5%;margin-top: 20px">头条</span>
|
||||
<span style="color: white;font-size: 14px;margin-left: 5%;margin-top: 20px">其他</span>
|
||||
<div class="col-md-1">
|
||||
{# <p style="color: #ffffff;font-size: 16px;margin-left: 15%;margin-top: 20px">合作连接</p>#}
|
||||
{# <span style="color: white;font-size: 14px;margin-left: 15%;margin-top: 20px">公众号</span>#}
|
||||
{# <span style="color: white;font-size: 14px;margin-left: 5%;margin-top: 20px">微博</span>#}
|
||||
{# <span style="color: white;font-size: 14px;margin-left: 5%;margin-top: 20px">抖音</span>#}
|
||||
{# <span style="color: white;font-size: 14px;margin-left: 5%;margin-top: 20px">头条</span>#}
|
||||
{# <span style="color: white;font-size: 14px;margin-left: 5%;margin-top: 20px">其他</span>#}
|
||||
</div>
|
||||
<div class="col-md-12" style="height: 1px;border-top: solid #FFFFFF 1px;margin-top: 10px"></div>
|
||||
{# <div class="col-md-12" style="height: 1px;border-top: solid #FFFFFF 1px;margin-top: 10px"></div>#}
|
||||
<div class="col-md-12">
|
||||
<div style="color: white;text-align: left;height: 250px;margin-left: 22%">
|
||||
<p>电话:15293151340</p>
|
||||
<p>电子邮箱:greatfeature@126.com</p>
|
||||
<p>公司地址:兰州市城关区南昌路421号华宇大厦C座</p>
|
||||
<div class="col-md-12" style="color: white;margin-left: 25%;margin-top: 30px">甘肃大未来科技文化发展有限公司</div>
|
||||
<div style="color: white;text-align: center;height: 150px;margin-top: 0px">
|
||||
{# <p>电话:15293151340</p>#}
|
||||
<p>甘肃大未来科技 版权所有 陇ICP备2020003882号-1</p>
|
||||
<p>© CopyRight 2020 gsdwl.com. All Rights Reserved</p>
|
||||
{# <div class="col-md-12" style="color: white;margin-left: 25%;margin-top: 30px">甘肃大未来科技文化发展有限公司</div>#}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<div class="col-md-6 col-xs-6 col-lg-6">
|
||||
<div style="margin-top: 50px">
|
||||
<span style="margin-left: 40%"><a style="color: white"
|
||||
href="{% url 'dashboard-home' %}">主页</a></span>
|
||||
href="{% url 'dashboard-home' %}">首页</a></span>
|
||||
<span style="margin-left: 10%"><a style="color: white"
|
||||
href="{% url 'dashboard-login' %}">登录</a></span>
|
||||
<span style="margin-left: 10%"><a style="color: white"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<div class="col-md-6 col-xs-6 col-lg-6">
|
||||
<div style="margin-top: 50px">
|
||||
<span style="margin-left: 40%"><a style="color: white"
|
||||
href="{% url 'dashboard-home' %}">主页</a></span>
|
||||
href="{% url 'dashboard-home' %}">首页</a></span>
|
||||
<span style="margin-left: 10%"><a style="color: white" href="{% url 'dashboard-login-for-phone' %}">手机号注册/登录</a></span>
|
||||
<span style="margin-left: 10%"><a style="color: white" href="{% url 'dashboard-register' %}">注册</a></span>
|
||||
</div>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<div class="col-md-6 col-xs-6 col-lg-6">
|
||||
<div style="margin-top: 50px">
|
||||
<span style="margin-left: 40%"><a style="color: white"
|
||||
href="{% url 'dashboard-home' %}">主页</a></span>
|
||||
href="{% url 'dashboard-home' %}">首页</a></span>
|
||||
<span style="margin-left: 10%"><a style="color: white"
|
||||
href="{% url 'dashboard-login' %}">登录</a></span>
|
||||
<span style="margin-left: 10%"><a style="color: white"
|
||||
|
|
|
@ -2,7 +2,7 @@ import csv
|
|||
import json
|
||||
import http.client
|
||||
import random
|
||||
|
||||
from django.db.models import Sum
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.contrib.auth.hashers import make_password
|
||||
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
|
||||
|
@ -23,7 +23,7 @@ import datetime
|
|||
|
||||
# Create your views here.
|
||||
from dashboard.models import Userprofile, Organization, Area_code_2020, Weixin, Weibo, Toutiao, Qita, News, Douyin, \
|
||||
CheckCode, Group, Group_admin, Group_user
|
||||
CheckCode, Group, Group_admin, Group_user, TimelinessMonitoring
|
||||
from dashboard.yunpian import YunPian
|
||||
import os
|
||||
|
||||
|
@ -37,7 +37,16 @@ def refresh_captcha(request):
|
|||
|
||||
|
||||
def home(request):
|
||||
return render(request, 'dashboard/home.html')
|
||||
weixin_count = Weixin.objects.all().count()
|
||||
weibo_count = Weibo.objects.all().count()
|
||||
toutiao_count = Toutiao.objects.all().count()
|
||||
qita_count = Qita.objects.all().count()
|
||||
douyin_count = Douyin.objects.all().count()
|
||||
newmedia_count = weixin_count + weibo_count + toutiao_count + qita_count + douyin_count
|
||||
|
||||
article_count = TimelinessMonitoring.objects.all().aggregate(nums=Sum('update'))['nums']
|
||||
news_count = News.objects.filter(type='3').count()
|
||||
return render(request, 'dashboard/home.html',{'newmedia_count':newmedia_count,'article_count':article_count,'news_count':news_count})
|
||||
|
||||
|
||||
def index(request):
|
||||
|
@ -75,7 +84,6 @@ def user_login(request):
|
|||
except CaptchaStore.DoesNotExist:
|
||||
messages.error(request, '验证码错误')
|
||||
return HttpResponseRedirect('/login')
|
||||
print(username, password)
|
||||
if username is not None and password is not None:
|
||||
try:
|
||||
user = authenticate(username=username, password=password)
|
||||
|
@ -99,9 +107,7 @@ def user_login_for_phone(request):
|
|||
elif request.method == 'POST':
|
||||
p_code = request.POST.get('check_code')
|
||||
phone = request.POST.get('phone')
|
||||
print(phone, p_code)
|
||||
results = CheckCode.objects.filter(phone=phone).count()
|
||||
print(str(results) + "11111111111111111")
|
||||
# try:
|
||||
res = User.objects.filter(username=phone).count()
|
||||
if res > 0:
|
||||
|
@ -246,7 +252,6 @@ def register(request):
|
|||
image_url = captcha_image_url(hash_key)
|
||||
organization = Organization.objects.filter(status='1')
|
||||
if request.method == 'POST':
|
||||
print("111111111111111111111111")
|
||||
if not request.POST.get('organization'):
|
||||
messages.error(request, '请选择单位')
|
||||
else:
|
||||
|
@ -279,7 +284,6 @@ def register(request):
|
|||
image = '/profile/user_default.jpg'
|
||||
else:
|
||||
image = request.FILES.get('image')
|
||||
print(str(image) + "1111111111111111111111111111111111111111111")
|
||||
if request.POST.get('sex') == '1':
|
||||
sex = '男'
|
||||
elif request.POST.get('sex') == '2':
|
||||
|
@ -393,7 +397,6 @@ def get_organization(request):
|
|||
else:
|
||||
d['district'] = ''
|
||||
topten_list.append(d)
|
||||
print(str(topten_list))
|
||||
return render(request, 'dashboard/results_by_keywords.html', {'topten_list': topten_list})
|
||||
|
||||
|
||||
|
@ -433,7 +436,6 @@ def user_search_by_keyword(request):
|
|||
district = o.district
|
||||
keytype = request.POST.get('keytype')
|
||||
keyword = request.POST.get('ketword')
|
||||
print(keytype, keyword)
|
||||
userpaginator = None
|
||||
if level == 1:
|
||||
if keytype == '1':
|
||||
|
@ -489,7 +491,6 @@ def user_search_by_keyword(request):
|
|||
o['phone'] = User.objects.get(id=u.user_id).username
|
||||
o['organization'] = u.organization.name
|
||||
organization_id = u.organization_id
|
||||
print(organization_id)
|
||||
if Organization.objects.get(id=organization_id).province and Organization.objects.get(
|
||||
id=organization_id).cities and Organization.objects.get(
|
||||
id=organization_id).district and Organization.objects.get(
|
||||
|
@ -528,7 +529,6 @@ def user_search_by_keyword(request):
|
|||
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).province))).replace(
|
||||
'None', '')
|
||||
userallinfo.append(o)
|
||||
print(userallinfo)
|
||||
return render(request, 'management/user-management.html',
|
||||
{'userallinfo': userallinfo, 'userpaginator': userpaginator, 'user_count': user_count})
|
||||
|
||||
|
@ -537,7 +537,6 @@ def user_search_by_keyword(request):
|
|||
def news_search_by_keyword(request):
|
||||
keytype = request.POST.get('keytype')
|
||||
keyword = request.POST.get('keyword')
|
||||
print(keytype, keyword)
|
||||
news = None
|
||||
if keytype == '1':
|
||||
news = News.objects.filter(type='0', title__contains=keyword)
|
||||
|
@ -588,12 +587,10 @@ def organization_search_by_keyword(request):
|
|||
keyword = request.POST.get('keyword')
|
||||
user = request.user
|
||||
o = Organization.objects.get(userprofile__user_id=user.id)
|
||||
print(o)
|
||||
level = o.level.level
|
||||
province = o.province
|
||||
cities = o.cities
|
||||
district = o.district
|
||||
print(level, province, cities, district)
|
||||
organization = None
|
||||
res = []
|
||||
if level == 1:
|
||||
|
@ -613,7 +610,6 @@ def organization_search_by_keyword(request):
|
|||
organization = Organization.objects.filter(name__contains=keyword).order_by('-created')
|
||||
organization_count = organization.count()
|
||||
for i in organization[:30]:
|
||||
print(i)
|
||||
o = dict()
|
||||
o['id'] = str(i.id)
|
||||
o['name'] = i.name
|
||||
|
@ -1069,7 +1065,6 @@ def group_init_search_by_keyword(request):
|
|||
group_initer = Group.objects.filter(user_id=user.id, name__contains=keyword).order_by('-created')
|
||||
elif keytype == '2':
|
||||
group_initer = Group.objects.filter(user_id=user.id, type__type__contains=keyword).order_by('-created')
|
||||
print(group_initer)
|
||||
res_g_i = []
|
||||
init_count = group_initer.count()
|
||||
for r_g_i in group_initer[:30]:
|
||||
|
@ -1176,6 +1171,8 @@ def group_super_search_by_keyword(request):
|
|||
|
||||
def download(request):
|
||||
return render(request, 'dashboard/download-app.html')
|
||||
|
||||
|
||||
def app_download(request):
|
||||
file = open('/var/www/p3/newmediamonitoring/media/app-10.apk', 'rb')
|
||||
response = HttpResponse(file)
|
||||
|
|
|
@ -55,7 +55,6 @@ def user_management(request):
|
|||
o['phone'] = u.user.username
|
||||
o['organization'] = u.organization.name
|
||||
organization_id = u.organization.id
|
||||
print(organization_id)
|
||||
if Organization.objects.get(id=organization_id).province and Organization.objects.get(
|
||||
id=organization_id).cities and Organization.objects.get(
|
||||
id=organization_id).district and Organization.objects.get(
|
||||
|
@ -94,14 +93,12 @@ def user_management(request):
|
|||
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).province))).replace(
|
||||
'None', '')
|
||||
userallinfo.append(o)
|
||||
print(userallinfo)
|
||||
return render(request, 'management/user-management.html',
|
||||
{'userallinfo': userallinfo, 'userpaginator': userpaginator,'user_count':user_count})
|
||||
|
||||
|
||||
@login_required
|
||||
def user_delete(request, pk):
|
||||
print(pk)
|
||||
user = User.objects.get(id=pk)
|
||||
user.delete()
|
||||
return HttpResponseRedirect('/management/user/management/')
|
||||
|
@ -122,7 +119,6 @@ def user_update(request, pk):
|
|||
passwordold = request.POST.get('passwordold')
|
||||
passwordnew = request.POST.get('passwordnew')
|
||||
confirm_password = request.POST.get('confirm_password')
|
||||
print(len(passwordold), len(passwordnew), confirm_password)
|
||||
if len(passwordold) != 0 and len(passwordnew) != 0 and len(confirm_password) != 0:
|
||||
if passwordnew == confirm_password:
|
||||
user.email = email
|
||||
|
@ -160,11 +156,9 @@ def group_management_init(request):
|
|||
|
||||
user = request.user
|
||||
level = Userprofile.objects.get(user_id=user.id).organization.level.level
|
||||
print(level)
|
||||
init_count = Group.objects.filter(user_id=user.id).count()
|
||||
# 创建的矩阵
|
||||
group_initer = Group.objects.filter(user_id=user.id).order_by('-created')
|
||||
print(group_initer)
|
||||
paginator = Paginator(group_initer, 6)
|
||||
page = int(request.GET.get('page', 1))
|
||||
try:
|
||||
|
@ -305,7 +299,6 @@ def group_update(request, pk):
|
|||
g_c_c_res.append([list(g_c_c)[0], list(g_c_c)[1]])
|
||||
group_type = Group_type.objects.all()
|
||||
group_admin = Group_admin.objects.filter(group_id=pk)
|
||||
print(pk)
|
||||
g_a_list = []
|
||||
for g_a in group_admin:
|
||||
o = dict()
|
||||
|
@ -374,7 +367,6 @@ def group_update(request, pk):
|
|||
status = request.POST.get('status')
|
||||
province = request.POST.get('province')
|
||||
classify = request.POST.get('classify')
|
||||
print(str(province) + "66666666666666666666666666")
|
||||
if province != '' and province.isdigit():
|
||||
province_r = province
|
||||
else:
|
||||
|
@ -468,7 +460,6 @@ def group_create(request):
|
|||
village_r = village
|
||||
else:
|
||||
village_r = village
|
||||
print(name, presentation, image, type, status, province, city, district, town, village)
|
||||
if name is not None:
|
||||
group = Group(name=name, presentation=presentation, image=image, type_id=type, status=status,
|
||||
province=province_r, cities=city_r, district=district_r, town=town_r, village=village_r,
|
||||
|
@ -512,7 +503,6 @@ def get_user(request):
|
|||
d['phone'] = u.user.username
|
||||
d['o'] = u.organization.name
|
||||
topten_list.append(d)
|
||||
print(str(topten_list))
|
||||
return render(request, 'management/user_results_by_keywords.html', {'topten_list': topten_list})
|
||||
|
||||
|
||||
|
@ -524,11 +514,9 @@ def group_admin_create(request, pk):
|
|||
messages.error(request, '请选择用户')
|
||||
else:
|
||||
user_name = request.POST.get('user_name')
|
||||
print(str(user_name)+"1111111111111111111111")
|
||||
res = User.objects.filter(username=user_name).count()
|
||||
if res > 0:
|
||||
user_id = User.objects.get(username=user_name).id
|
||||
print(str(user_id)+"===================================")
|
||||
else:
|
||||
messages.error(request, '您填写的用户不存在')
|
||||
results = Group_admin.objects.filter(user_id=user_id, group_id=pk).count()
|
||||
|
@ -559,11 +547,9 @@ def group_user_create(request, pk):
|
|||
messages.error(request, '请选择用户')
|
||||
else:
|
||||
user_name = request.POST.get('user_name')
|
||||
print(str(user_name) + "1111111111111111111111")
|
||||
res = User.objects.filter(username=user_name).count()
|
||||
if res > 0:
|
||||
user_id = User.objects.get(username=user_name).id
|
||||
print(str(user_id) + "===================================")
|
||||
else:
|
||||
messages.error(request, '您填写的用户不存在')
|
||||
results = Group_user.objects.filter(user_id=user_id, group_id=pk).count()
|
||||
|
@ -599,12 +585,10 @@ def organization_management(request):
|
|||
organization_count = Organization.objects.all().count()
|
||||
user = request.user
|
||||
o = Organization.objects.get(userprofile__user_id=user.id)
|
||||
print(o)
|
||||
level = o.level.level
|
||||
province = o.province
|
||||
cities = o.cities
|
||||
district = o.district
|
||||
print(level, province, cities, district)
|
||||
organization = None
|
||||
res = []
|
||||
if level == 1:
|
||||
|
@ -626,7 +610,6 @@ def organization_management(request):
|
|||
except EmptyPage:
|
||||
organization = paginator.page(paginator.num_pages)
|
||||
for i in organization:
|
||||
print(i)
|
||||
o = dict()
|
||||
o['id'] = str(i.id)
|
||||
o['name'] = i.name
|
||||
|
@ -698,7 +681,6 @@ def organization_update(request, pk):
|
|||
if province:
|
||||
province = Area_code_2020.objects.get(name=province).code
|
||||
city = request.POST.get('city')
|
||||
print(str(city) + "99999999999999999")
|
||||
if city:
|
||||
city = Area_code_2020.objects.get(name=city).code
|
||||
district = request.POST.get('district')
|
||||
|
@ -839,7 +821,6 @@ def newmedia_management_create_weibo(request):
|
|||
if request.method == 'POST':
|
||||
code = request.POST.get('code')
|
||||
weiboid = request.POST.get('weiboid')
|
||||
print(str(weiboid) + "11111111111111111111111111111111111111")
|
||||
alias = request.POST.get('alias')
|
||||
image = request.FILES.get('image')
|
||||
o = request.POST.get('organization')
|
||||
|
@ -927,7 +908,6 @@ def newmedia_management_create_douyin(request):
|
|||
douyin_status_choices_list = []
|
||||
for w in range(2):
|
||||
douyin_status_choices_list.append(w)
|
||||
print(douyin_status_choices_list)
|
||||
organization = Organization.objects.filter(status='1').order_by('-name')
|
||||
if request.method == 'POST':
|
||||
code = request.POST.get('code')
|
||||
|
@ -1718,7 +1698,6 @@ def news_management_create(request):
|
|||
content = request.POST.get('content')
|
||||
source = request.POST.get('source')
|
||||
image = request.FILES.get('image')
|
||||
print(str(image) + "5555555555555555555555555")
|
||||
t = None
|
||||
if type == '政策依据':
|
||||
t = '0'
|
||||
|
@ -1735,7 +1714,6 @@ def news_management_create(request):
|
|||
elif type == '重点新闻':
|
||||
t = '6'
|
||||
|
||||
print(str(title), str(content))
|
||||
news = News(type=t, title=title, author=author, date=date, content=content, source=source, image=image)
|
||||
news.save()
|
||||
messages.success(request, '添加成功!!!')
|
||||
|
|
|
@ -806,7 +806,6 @@ def timeliness_monitoring_json(request):
|
|||
linxia = []
|
||||
for d in date:
|
||||
date_list.append(d.date)
|
||||
print(str(d.date)+"1111111111111111111111111")
|
||||
lanzhou.append(TimelinessMonitoring.objects.filter(city__contains='兰州',date=d.date).aggregate(nums=Sum('update'))['nums'])
|
||||
jiayuguan.append(TimelinessMonitoring.objects.filter(city__contains='嘉峪关',date=d.date).aggregate(nums=Sum('update'))['nums'])
|
||||
jinchang.append(TimelinessMonitoring.objects.filter(city__contains='金昌',date=d.date).aggregate(nums=Sum('update'))['nums'])
|
||||
|
@ -860,7 +859,6 @@ def timeliness_monitoring_json_weixin(request):
|
|||
linxia = []
|
||||
for d in date:
|
||||
date_list.append(d.date)
|
||||
print(str(d.date)+"1111111111111111111111111")
|
||||
lanzhou.append(TimelinessMonitoring.objects.filter(city__contains='兰州',date=d.date,n_type='微信').aggregate(nums=Sum('update'))['nums'])
|
||||
jiayuguan.append(TimelinessMonitoring.objects.filter(city__contains='嘉峪关',date=d.date,n_type='微信').aggregate(nums=Sum('update'))['nums'])
|
||||
jinchang.append(TimelinessMonitoring.objects.filter(city__contains='金昌',date=d.date,n_type='微信').aggregate(nums=Sum('update'))['nums'])
|
||||
|
@ -914,7 +912,6 @@ def timeliness_monitoring_json_weibo(request):
|
|||
linxia = []
|
||||
for d in date:
|
||||
date_list.append(d.date)
|
||||
print(str(d.date)+"1111111111111111111111111")
|
||||
lanzhou.append(TimelinessMonitoring.objects.filter(city__contains='兰州',date=d.date,n_type='微博').aggregate(nums=Sum('update'))['nums'])
|
||||
jiayuguan.append(TimelinessMonitoring.objects.filter(city__contains='嘉峪关',date=d.date,n_type='微博').aggregate(nums=Sum('update'))['nums'])
|
||||
jinchang.append(TimelinessMonitoring.objects.filter(city__contains='金昌',date=d.date,n_type='微博').aggregate(nums=Sum('update'))['nums'])
|
||||
|
@ -968,7 +965,6 @@ def timeliness_monitoring_json_toutiao(request):
|
|||
linxia = []
|
||||
for d in date:
|
||||
date_list.append(d.date)
|
||||
print(str(d.date)+"1111111111111111111111111")
|
||||
lanzhou.append(TimelinessMonitoring.objects.filter(city__contains='兰州',date=d.date,n_type__contains='头条').aggregate(nums=Sum('update'))['nums'])
|
||||
jiayuguan.append(TimelinessMonitoring.objects.filter(city__contains='嘉峪关',date=d.date,n_type__contains='头条').aggregate(nums=Sum('update'))['nums'])
|
||||
jinchang.append(TimelinessMonitoring.objects.filter(city__contains='金昌',date=d.date,n_type__contains='头条').aggregate(nums=Sum('update'))['nums'])
|
||||
|
@ -1022,7 +1018,6 @@ def timeliness_monitoring_json_douyin(request):
|
|||
linxia = []
|
||||
for d in date:
|
||||
date_list.append(d.date)
|
||||
print(str(d.date)+"1111111111111111111111111")
|
||||
lanzhou.append(TimelinessMonitoring.objects.filter(city__contains='兰州',date=d.date,n_type__contains='抖音').aggregate(nums=Sum('update'))['nums'])
|
||||
jiayuguan.append(TimelinessMonitoring.objects.filter(city__contains='嘉峪关',date=d.date,n_type__contains='抖音').aggregate(nums=Sum('update'))['nums'])
|
||||
jinchang.append(TimelinessMonitoring.objects.filter(city__contains='金昌',date=d.date,n_type__contains='抖音').aggregate(nums=Sum('update'))['nums'])
|
||||
|
@ -1076,7 +1071,6 @@ def timeliness_monitoring_json_qita(request):
|
|||
linxia = []
|
||||
for d in date:
|
||||
date_list.append(d.date)
|
||||
print(str(d.date)+"1111111111111111111111111")
|
||||
lanzhou.append(TimelinessMonitoring.objects.filter(city__contains='兰州',date=d.date).exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(nums=Sum('update'))['nums'])
|
||||
jiayuguan.append(TimelinessMonitoring.objects.filter(city__contains='嘉峪关',date=d.date).exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(nums=Sum('update'))['nums'])
|
||||
jinchang.append(TimelinessMonitoring.objects.filter(city__contains='金昌',date=d.date).exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate(nums=Sum('update'))['nums'])
|
||||
|
@ -1113,7 +1107,6 @@ def timeliness_monitoring_json_qita(request):
|
|||
@login_required
|
||||
def index_map(request):
|
||||
name = request.GET.get('name').split('市')[0]
|
||||
print(name)
|
||||
timelinessmonitoring_weixin = \
|
||||
TimelinessMonitoring.objects.filter(city__contains=name, n_type='微信').aggregate(nums=Sum('update'))['nums']
|
||||
timelinessmonitoring_weibo = \
|
||||
|
@ -1174,7 +1167,6 @@ def index_warning_count(request):
|
|||
data = []
|
||||
date_list = []
|
||||
for d in date:
|
||||
print(d.date)
|
||||
date_list.append(str(d.date))
|
||||
news = News.objects.filter(type='3', date=str(d.date)).count()
|
||||
data.append(news)
|
||||
|
|
Loading…
Reference in New Issue