This commit is contained in:
baoliang 2021-04-19 08:31:30 +08:00
commit 82c64018a4
19 changed files with 1771 additions and 99 deletions

View File

@ -0,0 +1,106 @@
{% extends 'dashboard/base/base.html' %}
{% load static %}
{% block css %}
<link href="{% static 'management/css/uikit.min.css' %}" rel="stylesheet" type="text/css" media="screen"/>
<link href="{% static 'management/css/nestable.min.css' %}" rel="stylesheet" type="text/css" media="screen"/>
{% endblock %}
{% block content %}
<body class=" ">
<div class="page-container row-fluid">
<div class="page-sidebar ">
{% include 'dashboard/base/left.html' %}
</div>
<section id="main-content" class=" ">
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>
<div class="page-title">
<div class="pull-left">
<h1 class="title">用户通知管理</h1></div>
</div>
</div>
<div class="clearfix"></div>
<div class="col-lg-12">
<section class="box ">
<header class="panel_header">
<h2 class="title pull-left">成员列表</h2>
{# <form action="{% url 'user-search-by-keyword' %}" method="post">{% csrf_token %}#}
{# <div class="btn-group col-md-2 title" style="display: inline-block;margin-left: 5%">#}
{# <select class="form-control" name="keytype">#}
{# <option value="1">姓名</option>#}
{# <option value="2">单位</option>#}
{# <option value="3">电话</option>#}
{# <option value="4">行政区划(市)</option>#}
{# <option value="5">行政区划(县)</option>#}
{# <option value="6">短信通知</option>#}
{# </select>#}
{# </div>#}
{# <div class="col-lg-6 title">#}
{# <div class="input-group">#}
{# <input type="text" class="form-control" placeholder="输入搜索关键字" name="keyword" value="{{ keyword }}">#}
{# <span class="input-group-btn">#}
{# <button class="btn btn-default" type="submit">搜索</button>#}
{# </span>#}
{# </div>#}
{# </div>#}
{# </form>#}
<h2 class="title pull-right" style="margin-right: 30px">成员总计:{{ user_count }}</h2>
</header>
<div class="content-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<table class="table table-hover">
<thead>
<tr>
<th style="text-align: center">序号</th>
<th style="text-align: center">头像</th>
<th style="text-align: center">姓名</th>
<th style="text-align: center">电话<a href="{% url 'user-management-management-sort' %}"></a></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>
</thead>
<tbody>
{% for u in userallinfo %}
<tr>
<td style="vertical-align: middle;text-align: center">{{ forloop.counter }}</td>
<td style="text-align: center"><img src="{{ u.image.url }}"
style="width: 80px;height: 80px;"
class="img-circle"></td>
<td style="vertical-align: middle;text-align: center">{{ u.name }}</td>
<td style="vertical-align: middle;text-align: center">{{ u.phone }}</td>
<td style="vertical-align: middle;text-align: center">{{ u.organization }}</td>
{# <td style="vertical-align: middle;text-align: center">{{ u.type }}</td>#}
<td style="vertical-align: middle;text-align: center">{{ u.administrativedivision }}</td>
<td style="vertical-align: middle;text-align: center">短信通知</td>
<td style="vertical-align: middle;text-align: center">
<a href="{% url 'backstage-app-inform-delete' u.user_id %}"
class="btn btn-danger btn-mini">取消</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="metadata-pagination">
{% include 'dashboard/paginator/user-management-paginate.html' %}
</div>
</div>
</div>
</div>
</section>
</div>
</section>
</section>
<div class="chatapi-windows ">
</div>
</div>
</body>
{% endblock %}
{% block add_js %}
<script src="{% static 'management/js/uikit.min.js' %}" type="text/javascript"></script>
<script src="{% static 'management/js/nestable.min.js' %}" type="text/javascript"></script>
<script>
</script>
{% endblock %}

View File

@ -29,7 +29,7 @@
<div class="panel panel-default">
<div class="panel-body">
<div class="panel panel-default">
<div class="panel-heading">微信数据更新</div>
<div class="panel-heading">微信数据对比(上传国办系统导出数据,可以获取数据对比结果)</div>
<div class="panel panel-default">
<!-- Default panel contents -->
<form action="{% url 'backstage-weixin_update' %}" method="post"
@ -58,6 +58,198 @@
</div>
</section>
<section id="main-content" class=" ">
<section class="wrapper" style='display:inline-block;width:100%;padding:15px 0 0 15px;'>
{% if messages %}
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
{% for message in messages %}
{{ message }}.<br/>
{% endfor %}
</div>
{% endif %}
</section>
<div class="chatapi-windows "></div>
<div class="panel panel-default">
<div class="panel-body">
<div class="panel panel-default">
<div class="panel-heading">微博数据对比(上传国办系统导出数据,可以获取数据对比结果)</div>
<div class="panel panel-default">
<!-- Default panel contents -->
<form action="{% url 'backstage-weibo_update' %}" method="post"
enctype="multipart/form-data">{% csrf_token %}
{# <div class="form-group col-md-4">#}
{# <label for="date">时间</label>#}
{# <input type="date" class="form-control" id="source"#}
{# name="date">#}
{# </div>#}
<div class="form-group">
<label for="exampleInputFile">点击上传文件</label>
<input type="file" id="exampleInputFile" name="file">
</div>
<button type="submit" class="btn btn-success">点击上传</button>
</form>
<div>
{% for d in data_results %}
{{ d }}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</section>
<section id="main-content" class=" ">
<section class="wrapper" style='display:inline-block;width:100%;padding:15px 0 0 15px;'>
{% if messages %}
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
{% for message in messages %}
{{ message }}.<br/>
{% endfor %}
</div>
{% endif %}
</section>
<div class="chatapi-windows "></div>
<div class="panel panel-default">
<div class="panel-body">
<div class="panel panel-default">
<div class="panel-heading">头条数据对比(上传国办系统导出数据,可以获取数据对比结果)</div>
<div class="panel panel-default">
<!-- Default panel contents -->
<form action="{% url 'backstage-toutiao_update' %}" method="post"
enctype="multipart/form-data">{% csrf_token %}
{# <div class="form-group col-md-4">#}
{# <label for="date">时间</label>#}
{# <input type="date" class="form-control" id="source"#}
{# name="date">#}
{# </div>#}
<div class="form-group">
<label for="exampleInputFile">点击上传文件</label>
<input type="file" id="exampleInputFile" name="file">
</div>
<button type="submit" class="btn btn-success">点击上传</button>
</form>
<div>
{% for d in data_results %}
{{ d }}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</section>
<section id="main-content" class=" ">
<section class="wrapper" style='display:inline-block;width:100%;padding:15px 0 0 15px;'>
{% if messages %}
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
{% for message in messages %}
{{ message }}.<br/>
{% endfor %}
</div>
{% endif %}
</section>
<div class="chatapi-windows "></div>
<div class="panel panel-default">
<div class="panel-body">
<div class="panel panel-default">
<div class="panel-heading">抖音数据对比(上传国办系统导出数据,可以获取数据对比结果)</div>
<div class="panel panel-default">
<!-- Default panel contents -->
<form action="{% url 'backstage-douyin_update' %}" method="post"
enctype="multipart/form-data">{% csrf_token %}
{# <div class="form-group col-md-4">#}
{# <label for="date">时间</label>#}
{# <input type="date" class="form-control" id="source"#}
{# name="date">#}
{# </div>#}
<div class="form-group">
<label for="exampleInputFile">点击上传文件</label>
<input type="file" id="exampleInputFile" name="file">
</div>
<button type="submit" class="btn btn-success">点击上传</button>
</form>
<div>
{% for d in data_results %}
{{ d }}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</section>
<section id="main-content" class=" ">
<section class="wrapper" style='display:inline-block;width:100%;padding:15px 0 0 15px;'>
{% if messages %}
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
{% for message in messages %}
{{ message }}.<br/>
{% endfor %}
</div>
{% endif %}
</section>
<div class="chatapi-windows "></div>
<div class="panel panel-default">
<div class="panel-body">
<div class="panel panel-default">
<div class="panel-heading">其他数据对比(上传国办系统导出数据,可以获取数据对比结果)</div>
<div class="panel panel-default">
<!-- Default panel contents -->
<form action="{% url 'backstage-qita_update' %}" method="post"
enctype="multipart/form-data">{% csrf_token %}
{# <div class="form-group col-md-4">#}
{# <label for="date">时间</label>#}
{# <input type="date" class="form-control" id="source"#}
{# name="date">#}
{# </div>#}
<div class="form-group">
<label for="exampleInputFile">点击上传文件</label>
<input type="file" id="exampleInputFile" name="file">
</div>
<button type="submit" class="btn btn-success">点击上传</button>
</form>
<div>
{% for d in data_results %}
{{ d }}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</body>
{% endblock %}

View File

@ -16,4 +16,6 @@ urlpatterns = [
path('backstage/toutiao/update/',views.backstage_toutiao_update,name='backstage-toutiao_update'),
path('backstage/qita/update/',views.backstage_qita_update,name='backstage-qita_update'),
path('backstage/add/unqualified/media/',views.add_unqualified_media,name='backstage-add-unqualified-media'),
path('backstage/app/inform/manage/',views.backstage_app_inform_manage,name='backstage-app-inform-manage'),
path('backstage/app/inform/delete/<str:pk>/',views.backstage_app_inform_delete,name='backstage-app-inform-delete'),
]

View File

@ -6,6 +6,8 @@ from datetime import datetime
import xlrd
from django.contrib import messages
from django.contrib.auth.models import User
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.http import HttpResponse, HttpResponseRedirect, FileResponse
from django.shortcuts import render
@ -14,7 +16,7 @@ from xlrd import xldate_as_tuple, xldate_as_datetime
from NewMediaMonitoring import settings
from dashboard.models import TimelinessMonitoring, Wrongly, Comment, Area_code_2020, Organization, Weixin, Douyin, \
Weibo, Toutiao, Qita, NewMedia
Weibo, Toutiao, Qita, NewMedia, Userprofile
from polls.models import UnqualifiedMedia
@ -121,7 +123,7 @@ def backstage_comment(request):
comment.save()
except:
print(v)
pass
else:
messages.error(request, '请上传正确的文件类型!!!')
@ -133,7 +135,6 @@ def backstage_user(request):
return render(request, '')
def backstage_organization_update(request):
print("____________________________________________________________________")
data_results = []
if request.method == 'POST':
o_code_list = []
@ -210,7 +211,6 @@ def backstage_weixin_update(request):
else:
x['c'] = '异常'
data_results.append(x)
print(data_results)
return render(request, 'backstage/backstage-weixin-update.html', {'data_results': data_results})
def backstage_douyin_update(request):
@ -251,7 +251,6 @@ def backstage_douyin_update(request):
else:
x['c'] = '异常'
data_results.append(x)
print(data_results)
return render(request, 'backstage/backstage-douyin-update.html', {'data_results': data_results})
def backstage_weibo_update(request):
@ -292,7 +291,6 @@ def backstage_weibo_update(request):
else:
x['c'] = '异常'
data_results.append(x)
print(data_results)
return render(request, 'backstage/backstage-weibo-update.html', {'data_results': data_results})
def backstage_toutiao_update(request):
@ -333,7 +331,6 @@ def backstage_toutiao_update(request):
else:
x['c'] = '异常'
data_results.append(x)
print(data_results)
return render(request, 'backstage/backstage-toutiao-update.html', {'data_results': data_results})
def backstage_qita_update(request):
@ -374,7 +371,6 @@ def backstage_qita_update(request):
else:
x['c'] = '异常'
data_results.append(x)
print(data_results)
return render(request, 'backstage/backstage-toutiao-update.html', {'data_results': data_results})
def add_unqualified_media(request):
@ -400,7 +396,6 @@ def add_unqualified_media(request):
unit = table.row_values(row)[1]
media_id = None
type = None
print(media_code)
try:
if "微信" in str(media_type):
media_id = Weixin.objects.get(code=name).id
@ -441,7 +436,6 @@ def add_unqualified_media(request):
unqualifiedmedia.save()
except:
pass
print(media_id)
messages.success(request,"上传成功")
return render(request,'backstage/backstage_add_unqualified_media.html')
@ -518,7 +512,6 @@ def backstage_data_download(request):
o_qita['function'] = qt.function
o_qita['articleurl'] = qt.articleurl
results.append(o_qita)
# print(results)
t = int(time.time())
os.popen('mkdir /var/www/p3/newmediamonitoring/static/upload')
f = '/var/www/p3/newmediamonitoring/static/upload'
@ -526,7 +519,6 @@ def backstage_data_download(request):
writer = csv.writer(csvfile)
writer.writerow(["类型","名称", "单位", "别名", "状态", "ID", "关注量","新媒体标识码","功能","文章URL"])
for r in results:
# print(r['type'])
writer.writerow([r['type'], r['code'], r['organization'],r['alias'], r['status'], r['id'], r['attention'],r['identificationcode'],r['function'], r['articleurl']])
file = open(f+'/'+user.username+'.csv','rb')
response = FileResponse(file)
@ -534,5 +526,94 @@ def backstage_data_download(request):
response['Content-Disposition'] = 'attachment;filename="data.csv"'
return response
def backstage_app_inform_manage(request):
user_count = User.objects.all().count()
user = request.user
o = Organization.objects.get(userprofile__user_id=user.id)
level = o.level.level
province = o.province
cities = o.cities
district = o.district
userpaginator = None
# if level == 1:
# userpaginator = Userprofile.objects.filter(organization__province=province).order_by('-created')
# elif level == 2:
# userpaginator = Userprofile.objects.filter(organization__province=province,
# organization__cities=cities).order_by('-created')
# elif level == 3:
# userpaginator = Userprofile.objects.filter(organization__province=province,
# organization__cities=cities,
# organization__district=district).order_by('-created')
if level == 9:
userpaginator = Userprofile.objects.filter(message_status=1).order_by('-created')
userallinfo = []
if userpaginator is not None:
paginator = Paginator(userpaginator, 6)
page = int(request.GET.get('page', 1))
try:
userpaginator = paginator.page(page)
except PageNotAnInteger:
userpaginator = paginator.page(1)
except EmptyPage:
userpaginator = paginator.page(paginator.num_pages)
for u in userpaginator:
o = dict()
o['id'] = str(u.id)
o['user_id'] = str(u.user_id)
if u.image:
o['image'] = u.image
else:
o['image'] = '/profile/user_default.jpg'
o['name'] = u.name
o['phone'] = u.user.username
o['organization'] = u.organization.name
organization_id = u.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(
id=organization_id).town and Organization.objects.get(id=organization_id).village:
o['administrativedivision'] = str(str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).province)) + '-' + str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).cities)) + '-' + str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).district)) + '-' + str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).town)) + '-' + str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).village))).replace(
'None', '')
elif 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(id=organization_id).town:
o['administrativedivision'] = str(str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).province)) + '-' + str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).cities)) + '-' + str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).district)) + '-' + str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).town))).replace('None',
'')
elif Organization.objects.get(id=organization_id).province and Organization.objects.get(
id=organization_id).cities and Organization.objects.get(id=organization_id).district:
o['administrativedivision'] = str(str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).province)) + '-' + str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).cities)) + '-' + str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).district))).replace(
'None', '')
elif Organization.objects.get(id=organization_id).province and Organization.objects.get(
id=organization_id).cities:
o['administrativedivision'] = str(str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).province)) + '-' + str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).cities))).replace(
'None', '')
elif Organization.objects.get(id=organization_id).province:
o['administrativedivision'] = str(str(
Area_code_2020.objects.get(code=Organization.objects.get(id=organization_id).province))).replace(
'None', '')
userallinfo.append(o)
return render(request, 'backstage/backstage-app-inform-management.html',
{'userallinfo': userallinfo, 'userpaginator': userpaginator, 'user_count': user_count})
def backstage_app_inform_delete(request,pk):
user = Userprofile.objects.get(user_id=pk)
user.message_status = 0
user.save()
messages.success(request,'取消成功')
return HttpResponseRedirect('/backstage/backstage/app/inform/manage/')

View File

@ -196,24 +196,28 @@
</li>
<li>
<a {% if url_name == 'backstage-weixin_update' %} class="active" {% endif %}
href="{% url 'backstage-weixin_update' %}">微信更新</a>
href="{% url 'backstage-weixin_update' %}">数据对比</a>
</li>
<li>
<a {% if url_name == 'backstage-toutiao_update' %} class="active" {% endif %}
href="{% url 'backstage-toutiao_update' %}">头条更新</a>
</li>
<li>
<a {% if url_name == 'backstage-douyin_update' %} class="active" {% endif %}
href="{% url 'backstage-douyin_update' %}">抖音更新</a>
</li>
<li>
<a {% if url_name == 'backstage-weibo_update' %} class="active" {% endif %}
href="{% url 'backstage-weibo_update' %}">微博更新</a>
</li>
<li>
<a {% if url_name == 'backstage-qita_update' %} class="active" {% endif %}
href="{% url 'backstage-qita_update' %}">其他更新</a>
<a {% if url_name == 'backstage-app-inform-manage' %} class="active" {% endif %}
href="{% url 'backstage-app-inform-manage' %}">app通知管理</a>
</li>
{# <li>#}
{# <a {% if url_name == 'backstage-toutiao_update' %} class="active" {% endif %}#}
{# href="{% url 'backstage-toutiao_update' %}">头条更新</a>#}
{# </li>#}
{# <li>#}
{# <a {% if url_name == 'backstage-douyin_update' %} class="active" {% endif %}#}
{# href="{% url 'backstage-douyin_update' %}">抖音更新</a>#}
{# </li>#}
{# <li>#}
{# <a {% if url_name == 'backstage-weibo_update' %} class="active" {% endif %}#}
{# href="{% url 'backstage-weibo_update' %}">微博更新</a>#}
{# </li>#}
{# <li>#}
{# <a {% if url_name == 'backstage-qita_update' %} class="active" {% endif %}#}
{# href="{% url 'backstage-qita_update' %}">其他更新</a>#}
{# </li>#}
<li>
<a {% if url_name == 'backstage-add-unqualified-media' %} class="active" {% endif %}
href="{% url 'backstage-add-unqualified-media' %}">添加不合格记录</a>

View File

@ -147,11 +147,9 @@ def user_login_for_phone(request):
# if float(time.time()) - float(check_code.c_time) > 60:
# check_code.delete()
# return '验证码超时已被删除'
# print(21333333333)
#
# except:
else:
print(1233333333)
messages.error(request, '请输入正确的验证码!!!')
return render(request, 'dashboard/login-for-phone-new.html')
@ -208,14 +206,12 @@ def author_code(request):
apikey = "304eb08353f7ebf00596737acfc31f53"
# mobile = "18119305139"
mobile = request.POST.get('mobile')
print(str(mobile) + "99999999999999999999999999999999999999999")
tpl_id = 4045320
code = ""
for i in range(6):
ch = chr(random.randrange(ord('0'), ord('9') + 1))
code += ch
print(code)
# tpl_value = {'#dateStart#': '10月1日', '#dateEnd#': '10日', '#type#': '微信公众号', '#name#': code}
tpl_value = {'#code#': code}
@ -238,7 +234,6 @@ def author_code(request):
check_code.phone_code = code
check_code.save()
except:
print(code, mobile, 1111111111)
check_code = CheckCode(phone_code=code, phone=mobile)
check_code.save()
conn.close()
@ -350,7 +345,6 @@ def get_province(request):
def get_city(request):
code = request.GET.get('code')
print(code)
# 市
cities = Area_code_2020.objects.filter(pcode=code)
res = []
@ -426,7 +420,6 @@ def import_user(request):
name = r[1]
zhiwei = r[2]
phone = r[3]
print(organization)
o = Organization.objects.get(name=organization)
password = str(phone)[5:]
if phone:
@ -439,10 +432,9 @@ def import_user(request):
u.save()
else:
if '平凉' in organization:
print(organization)
Userprofile.objects.filter(user__username=phone).update(organization_id=o.id)
except:
print(phone)
pass
return HttpResponse('ok')
@ -553,7 +545,6 @@ def user_search_by_keyword(request):
userprofile__organization__district=district)
elif level == 9:
if keytype == '1':
print(keyword)
userpaginator = Userprofile.objects.filter(name__contains=keyword)
elif keytype == '2':
userpaginator = Userprofile.objects.filter(organization__name__contains=keyword)
@ -769,7 +760,6 @@ def organization_search_by_keyword(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
@ -826,7 +816,6 @@ def weixin_search_by_keyword(request):
district = o.district
weixin = None
res = []
print(level)
if level == 1:
if keytype == '1':
weixin = Weixin.objects.filter(organization__province=province, code__contains=keyword).order_by('-created')
@ -1774,7 +1763,6 @@ def xxxx(request):
toutiao_count = []
douyin_count = []
qita_count = []
# print(u.count())
# o = []
# weixin = None
# for i in u:
@ -1786,16 +1774,11 @@ def xxxx(request):
# # weixin_count.append(weixin)
# # # toutiao_count.append(toutiao)
# #
# print(len(weixin_count),len(toutiao_count))
# # print(len(o))
# # print(len(list(set(o))))
u = Userprofile.objects.filter(status='1')
o_list = []
for i in u:
o_list.append(i.organization_id)
print(list(set(o_list)))
print(len(list(set(o_list))))
for j in list(set(o_list)):
if Weixin.objects.filter(organization_id=j).count() > 0:
@ -1809,6 +1792,4 @@ def xxxx(request):
if Qita.objects.filter(organization_id=j).count() > 0:
qita_count.append(Qita.objects.filter(organization_id=j))
print(len(weixin_count), len(weibo_count), len(toutiao_count), len(douyin_count), len(qita_count))
print(int(len(weixin_count))+ len(weibo_count)+len(toutiao_count)+len(douyin_count)+ len(qita_count))

View File

@ -75,6 +75,8 @@
<h6 class="title pull-right">我共管理{% if admin_count %}{{ admin_count }}{% else %}
0{% endif %}个矩阵</h6>
</ul>
<a href="{% url 'group-management-management-admin' %}"><button class="btn-success btn pull-right">按时间</button></a>
<a href="{% url 'group-management-management-admin-order-by-name' %}"><button class="btn-success btn pull-right">按名称</button></a>
</header>
<div class="content-body">
<div class="row">
@ -88,7 +90,6 @@
<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>
</thead>
@ -103,7 +104,6 @@
<td style="vertical-align: middle;text-align: center">{{ r.type }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.admin_count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.user_count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.status }}</td>
<td style="vertical-align: middle;text-align: center">
<a href="{% url 'group-management-update' r.id %}"
class="btn btn-primary btn-mini">编辑</a>

View File

@ -73,7 +73,8 @@
<h6 class="title pull-right">我共创建{% if init_count %}{{ init_count }}{% else %}
0{% endif %}个矩阵</h6>
</ul>
<a href="{% url 'group-management-management-init' %}"><button class="btn-success btn pull-right">按时间</button></a>
<a href="{% url 'group-management-management-init-order-by-name' %}"><button class="btn-success btn pull-right">按名称</button></a>
</header>
<div class="content-body">
<div class="row">
@ -87,7 +88,6 @@
<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>
</thead>
@ -102,7 +102,6 @@
<td style="vertical-align: middle;text-align: center">{{ r.type }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.admin_count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.user_count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.status }}</td>
<td style="vertical-align: middle;text-align: center">
<a href="{% url 'group-management-update' r.id %}"
class="btn btn-primary btn-mini">编辑</a>

View File

@ -75,6 +75,8 @@
<h6 class="title pull-right">共有{% if count %}{{ count }}{% else %}
0{% endif %}个矩阵</h6>
</ul>
<a href="{% url 'group-management-management-superuser' %}"><button class="btn-success btn pull-right">按时间</button></a>
<a href="{% url 'group-management-management-superuser-order-by-name' %}"><button class="btn-success btn pull-right">按名称</button></a>
</header>
<div class="content-body">
<div class="row">
@ -88,7 +90,6 @@
<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>
</thead>
@ -103,7 +104,6 @@
<td style="vertical-align: middle;text-align: center">{{ r.type }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.admin_count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.user_count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.status }}</td>
<td style="vertical-align: middle;text-align: center">
<a href="{% url 'group-management-update' r.id %}"
class="btn btn-primary btn-mini">编辑</a>

View File

@ -75,6 +75,8 @@
<h6 class="title pull-right">我共加入{% if user_count %}{{ user_count }}{% else %}
0{% endif %}个矩阵</h6>
</ul>
<a href="{% url 'group-management-management-user' %}"><button class="btn-success btn pull-right">按时间</button></a>
<a href="{% url 'group-management-management-user-order-by-name' %}"><button class="btn-success btn pull-right">按名称</button></a>
</header>
<div class="content-body">
<div class="row">
@ -88,7 +90,6 @@
<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>
</thead>
<tbody>
@ -102,7 +103,6 @@
<td style="vertical-align: middle;text-align: center">{{ r.type }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.admin_count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.user_count }}</td>
<td style="vertical-align: middle;text-align: center">{{ r.status }}</td>
</tr>
{% endfor %}
</tbody>

View File

@ -46,6 +46,17 @@
</form>
<h2 class="title pull-right" style="margin-right: 30px">抖音总计:{{ douyin_count }}</h2>
</header>
<div>
<a href="{% url 'newmedia-management-edit-douyin' %}">
<button class="btn-success btn pull-right">按时间</button>
</a>
<a href="{% url 'newmedia-management-edit-douyin-order-by-name' %}">
<button class="btn-success btn pull-right">按名称</button>
</a>
<a href="{% url 'newmedia-management-edit-douyin-order-by-o' %}">
<button class="btn-success btn pull-right">按单位</button>
</a>
</div>
<div class="content-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">

View File

@ -37,7 +37,8 @@
</div>
<div class="col-lg-6 title">
<div class="input-group">
<input type="text" class="form-control" placeholder="输入搜索关键字" name="keyword" value="{{ keyword }}">
<input type="text" class="form-control" placeholder="输入搜索关键字" name="keyword"
value="{{ keyword }}">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">搜索</button>
</span>
@ -46,6 +47,17 @@
</form>
<h2 class="title pull-right" style="margin-right: 30px">其他新媒体总计:{{ qita_count }}</h2>
</header>
<div>
<a href="{% url 'newmedia-management-edit-qita' %}">
<button class="btn-success btn pull-right">按时间</button>
</a>
<a href="{% url 'newmedia-management-edit-qita-order-by-name' %}">
<button class="btn-success btn pull-right">按名称</button>
</a>
<a href="{% url 'newmedia-management-edit-qita-order-by-o' %}">
<button class="btn-success btn pull-right">按单位</button>
</a>
</div>
<div class="content-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
@ -78,8 +90,11 @@
<td style="vertical-align: middle;text-align: center">{{ w.qitaid }}</td>
<td style="vertical-align: middle;text-align: center">{{ w.organization }}</td>
<td style="vertical-align: middle;text-align: center">{{ w.administrativedivision }}</td>
<td style="vertical-align: middle;text-align: center">{% if w.status == 0 %}已删除{% elif w.status == 3 %}正常{% elif w.status == 1 %}申请市级审核中
{% elif w.status == 2 %}申请省级审核中{% elif w.status == 4 %}市级注销审核中{% elif w.status == 5 %}省级注销审核中
<td style="vertical-align: middle;text-align: center">
{% if w.status == 0 %}已删除{% elif w.status == 3 %}
正常{% elif w.status == 1 %}申请市级审核中
{% elif w.status == 2 %}申请省级审核中{% elif w.status == 4 %}
市级注销审核中{% elif w.status == 5 %}省级注销审核中
{% endif %}</td>
<td style="vertical-align: middle;text-align: center">

View File

@ -37,7 +37,8 @@
</div>
<div class="col-lg-6 title">
<div class="input-group">
<input type="text" class="form-control" placeholder="输入搜索关键字" name="keyword" value="{{ keyword }}">
<input type="text" class="form-control" placeholder="输入搜索关键字" name="keyword"
value="{{ keyword }}">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">搜索</button>
</span>
@ -46,6 +47,17 @@
</form>
<h2 class="title pull-right" style="margin-right: 30px">头条总计:{{ toutiao_count }}</h2>
</header>
<div>
<a href="{% url 'newmedia-management-edit-toutiao' %}">
<button class="btn-success btn pull-right">按时间</button>
</a>
<a href="{% url 'newmedia-management-edit-toutiao-order-by-name' %}">
<button class="btn-success btn pull-right">按名称</button>
</a>
<a href="{% url 'newmedia-management-edit-toutiao-order-by-o' %}">
<button class="btn-success btn pull-right">按单位</button>
</a>
</div>
<div class="content-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
@ -75,8 +87,11 @@
<td style="vertical-align: middle;text-align: center">{{ w.toutiaoid }}</td>
<td style="vertical-align: middle;text-align: center">{{ w.organization }}</td>
<td style="vertical-align: middle;text-align: center">{{ w.administrativedivision }}</td>
<td style="vertical-align: middle;text-align: center">{% if w.status == 0 %}已删除{% elif w.status == 3 %}正常{% elif w.status == 1 %}申请市级审核中
{% elif w.status == 2 %}申请省级审核中{% elif w.status == 4 %}市级注销审核中{% elif w.status == 5 %}省级注销审核中
<td style="vertical-align: middle;text-align: center">
{% if w.status == 0 %}已删除{% elif w.status == 3 %}
正常{% elif w.status == 1 %}申请市级审核中
{% elif w.status == 2 %}申请省级审核中{% elif w.status == 4 %}
市级注销审核中{% elif w.status == 5 %}省级注销审核中
{% endif %}</td>
<td style="vertical-align: middle;text-align: center">

View File

@ -46,6 +46,17 @@
<h2 class="title pull-right" style="margin-right: 30px">微博总计:{{ weibo_count }}</h2>
</header>
<div>
<a href="{% url 'newmedia-management-edit-weibo' %}">
<button class="btn-success btn pull-right">按时间</button>
</a>
<a href="{% url 'newmedia-management-edit-weibo-order-by-name' %}">
<button class="btn-success btn pull-right">按名称</button>
</a>
<a href="{% url 'newmedia-management-edit-weibo-order-by-o' %}">
<button class="btn-success btn pull-right">按单位</button>
</a>
</div>
<div class="content-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">

View File

@ -37,15 +37,29 @@
</div>
<div class="col-lg-6 title">
<div class="input-group">
<input type="text" class="form-control" placeholder="输入搜索关键字" name="keyword" value="{{ keyword }}">
<input type="text" class="form-control" placeholder="输入搜索关键字" name="keyword"
value="{{ keyword }}">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">搜索</button>
</span>
</div>
</div>
</form>
<h2 class="title pull-right" style="margin-right: 30px">微信总计:{{ weixin_count }}</h2>
<h2 class="title pull-right" style="margin-right: 30px">微信总计:{{ weixin_count }}</h2><br>
</header>
<div>
<a href="{% url 'newmedia-management-edit-weixin' %}">
<button class="btn-success btn pull-right">按时间</button>
</a>
<a href="{% url 'newmedia-management-edit-weixin-order-by-name' %}">
<button class="btn-success btn pull-right">按名称</button>
</a>
<a href="{% url 'newmedia-management-edit-weixin-order-by-o' %}">
<button class="btn-success btn pull-right">按单位</button>
</a>
</div>
<div class="content-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
@ -75,8 +89,11 @@
<td style="vertical-align: middle;text-align: center">{{ w.weixinid }}</td>
<td style="vertical-align: middle;text-align: center">{{ w.organization }}</td>
<td style="vertical-align: middle;text-align: center">{{ w.administrativedivision }}</td>
<td style="vertical-align: middle;text-align: center">{% if w.status == 0 %}已删除{% elif w.status == 3 %}正常{% elif w.status == 1 %}申请市级审核中
{% elif w.status == 2 %}申请省级审核中{% elif w.status == 4 %}市级注销审核中{% elif w.status == 5 %}省级注销审核中
<td style="vertical-align: middle;text-align: center">
{% if w.status == 0 %}已删除{% elif w.status == 3 %}
正常{% elif w.status == 1 %}申请市级审核中
{% elif w.status == 2 %}申请省级审核中{% elif w.status == 4 %}
市级注销审核中{% elif w.status == 5 %}省级注销审核中
{% endif %} </td>
<td style="vertical-align: middle;text-align: center">

View File

@ -67,6 +67,15 @@
{# <i class="box_close fa fa-times"></i>#}
{# </div>#}
</header>
<div>
<a href="{% url 'organization-management-management' %}">
<button class="btn-success btn pull-right">按时间</button>
</a>
<a href="{% url 'organization-management-management-order-by-name' %}">
<button class="btn-success btn pull-right">按名称</button>
</a>
</div>
<div class="content-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">

View File

@ -36,7 +36,8 @@
</div>
<div class="col-lg-6 title">
<div class="input-group">
<input type="text" class="form-control" placeholder="输入搜索关键字" name="keyword" value="{{ keyword }}">
<input type="text" class="form-control" placeholder="输入搜索关键字" name="keyword"
value="{{ keyword }}">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">搜索</button>
</span>
@ -45,6 +46,21 @@
</form>
<h2 class="title pull-right" style="margin-right: 30px">成员总计:{{ user_count }}</h2>
</header>
<div>
<a href="{% url 'user-management-management' %}">
<button class="btn-success btn pull-right">按时间</button>
</a>
<a href="{% url 'user-management-management-order-by-name' %}">
<button class="btn-success btn pull-right">按姓名</button>
</a>
<a href="{% url 'user-management-management-order-by-o' %}">
<button class="btn-success btn pull-right">按单位</button>
</a>
<a href="{% url 'user-management-management-order-by-phone' %}">
<button class="btn-success btn pull-right">按电话</button>
</a>
</div>
<div class="content-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
@ -54,7 +70,8 @@
<th style="text-align: center">序号</th>
<th style="text-align: center">头像</th>
<th style="text-align: center">姓名</th>
<th style="text-align: center">电话<a href="{% url 'user-management-management-sort' %}"></a></th>
<th style="text-align: center">电话<a
href="{% url 'user-management-management-sort' %}"></a></th>
<th style="text-align: center">单位名称</th>
{# <th style="text-align: center">单位类型</th>#}
<th style="text-align: center">行政区划</th>

View File

@ -5,14 +5,21 @@ from management import views
urlpatterns = [
# 用户管理
path('user/management/', views.user_management, name='user-management-management'),
path('user/management/order/by/name/', views.user_management_order_by_name, name='user-management-management-order-by-name'),
path('user/management/order/by/o/', views.user_management_order_by_o, name='user-management-management-order-by-o'),
path('user/management/order/by/phone/', views.user_management_order_by_phone, name='user-management-management-order-by-phone'),
path('user/management/?sort=username/', views.user_management, name='user-management-management-sort'),
path('user/delete/<str:pk>/', views.user_delete, name='user-management-delete'),
path('user/update/<str:pk>/', views.user_update, name='user-management-update'),
# 矩阵管理
path('group/management/init/', views.group_management_init, name='group-management-management-init'),
path('group/management/init/order/by/name/', views.group_management_init_order_by_name, name='group-management-management-init-order-by-name'),
path('group/management/admin/', views.group_management_admin, name='group-management-management-admin'),
path('group/management/admin/order/by/name/', views.group_management_admin_order_by_name, name='group-management-management-admin-order-by-name'),
path('group/management/user/', views.group_management_user, name='group-management-management-user'),
path('group/management/user/order/by/name/', views.group_management_user_order_by_name, name='group-management-management-user-order-by-name'),
path('group/management/super/', views.group_management_superuser, name='group-management-management-superuser'),
path('group/management/super/order/by/name/', views.group_management_superuser_order_by_name, name='group-management-management-superuser-order-by-name'),
path('group/create/', views.group_create, name='group-management-create'),
path('group/update/<str:pk>/', views.group_update, name='group-management-update'),
path('group/delete/<str:pk>/', views.group_delete, name='group-management-delete'),
@ -27,6 +34,7 @@ urlpatterns = [
# 主体单位管理
path('organization/management/', views.organization_management, name='organization-management-management'),
path('organization/management/order/by/name/', views.organization_management_order_by_name, name='organization-management-management-order-by-name'),
path('organization/create/', views.organization_create, name='organization-management-create'),
path('organization/delete/<str:pk>/', views.organization_delete, name='organization-management-delete'),
path('organization/update/<str:pk>/', views.organization_update, name='organization-management-update'),
@ -40,10 +48,20 @@ urlpatterns = [
path('newmedia/management/create/douyin/',views.newmedia_management_create_douyin,name='newmedia-management-create-douyin'),
path('newmedia/management/create/qita/',views.newmedia_management_create_qita,name='newmedia-management-create-qita'),
path('newmedia/management/edit/weixin/',views.newmedia_management_edit_weixin,name='newmedia-management-edit-weixin'),
path('newmedia/management/edit/weixin/order/by/name/',views.newmedia_management_edit_weixin_order_by_name,name='newmedia-management-edit-weixin-order-by-name'),
path('newmedia/management/edit/weixin/order/by/o/',views.newmedia_management_edit_weixin_order_by_o,name='newmedia-management-edit-weixin-order-by-o'),
path('newmedia/management/edit/weibo/',views.newmedia_management_edit_weibo,name='newmedia-management-edit-weibo'),
path('newmedia/management/edit/weibo/order/by/name/',views.newmedia_management_edit_weibo_order_by_name,name='newmedia-management-edit-weibo-order-by-name'),
path('newmedia/management/edit/weibo/order/by/o/',views.newmedia_management_edit_weibo_order_by_o,name='newmedia-management-edit-weibo-order-by-o'),
path('newmedia/management/edit/toutiao/',views.newmedia_management_edit_toutiao,name='newmedia-management-edit-toutiao'),
path('newmedia/management/edit/toutiao/order/by/name/',views.newmedia_management_edit_toutiao_order_by_name,name='newmedia-management-edit-toutiao-order-by-name'),
path('newmedia/management/edit/toutiao/order/by/o/',views.newmedia_management_edit_toutiao_order_o,name='newmedia-management-edit-toutiao-order-by-o'),
path('newmedia/management/edit/douyin/',views.newmedia_management_edit_douyin,name='newmedia-management-edit-douyin'),
path('newmedia/management/edit/douyin/order/by/name/',views.newmedia_management_edit_douyin_order_by_name,name='newmedia-management-edit-douyin-order-by-name'),
path('newmedia/management/edit/douyin/order/by/o/',views.newmedia_management_edit_douyin_order_by_o,name='newmedia-management-edit-douyin-order-by-o'),
path('newmedia/management/edit/qita/',views.newmedia_management_edit_qita,name='newmedia-management-edit-qita'),
path('newmedia/management/edit/qita/order/by/name/',views.newmedia_management_edit_qita_order_by_name,name='newmedia-management-edit-qita-order-by-name'),
path('newmedia/management/edit/qita/order/by/o/',views.newmedia_management_edit_qita_order_by_o,name='newmedia-management-edit-qita-order-by-o'),
path('newmedia/management/update/weixin/<str:pk>/',views.newmedia_management_update_weixin,name='newmedia-management-update-weixin'),
path('newmedia/management/update/weibo/<str:pk>/',views.newmedia_management_update_weibo,name='newmedia-management-update-weibo'),
path('newmedia/management/update/toutiao/<str:pk>/',views.newmedia_management_update_toutiao,name='newmedia-management-update-toutiao'),

File diff suppressed because it is too large Load Diff