#修改
This commit is contained in:
parent
e6e9ad93bd
commit
62503b1605
|
@ -144,6 +144,8 @@ class Userprofile(models.Model):
|
|||
Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
# 用户状态:注册进来默认为0,为未审核状态,审核后status=1
|
||||
status = models.IntegerField('用户状态', null=True, blank=True, default=0)
|
||||
#20201017新增字段(职位)
|
||||
zhiwei = models.CharField('职位',max_length=256,null=True,blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
<a href="javascript:;">
|
||||
<i class="fa fa-gift"></i>
|
||||
<span class="title">新媒体管理</span>
|
||||
<span class="arrow "></span>
|
||||
{# <span class="arrow "></span><span class="label label-orange">NEW</span>#}
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
|
@ -114,6 +115,7 @@
|
|||
<a href="javascript:;">
|
||||
<i class="fa fa-envelope"></i>
|
||||
<span class="title">主体单位管理</span>
|
||||
<span class="arrow "></span>
|
||||
{# <span class="arrow "></span><span class="label label-orange">0</span>#}
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
|
|
|
@ -22,6 +22,7 @@ urlpatterns = [
|
|||
path('get/village/',views.get_village),
|
||||
#单位搜索
|
||||
path('get/organization/',views.get_organization,name='get-organization'),
|
||||
path('tencent13722515905013783955.txt', views.wechat_verify, name='wechat-verify')
|
||||
path('tencent13722515905013783955.txt', views.wechat_verify, name='wechat-verify'),
|
||||
path('import/user',views.import_user)
|
||||
|
||||
]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import csv
|
||||
import json
|
||||
import http.client
|
||||
import random
|
||||
|
@ -345,3 +346,24 @@ def get_organization(request):
|
|||
|
||||
def wechat_verify(request):
|
||||
return HttpResponse("11833201729252855821")
|
||||
|
||||
def import_user(request):
|
||||
with open('F:/总.csv') as csvfile:
|
||||
reader = csv.reader(csvfile)
|
||||
for r in reader:
|
||||
organization = r[0]
|
||||
name = r[1]
|
||||
zhiwei = r[2]
|
||||
phone = r[3]
|
||||
o = Organization.objects.get(name=organization)
|
||||
password = str(phone)[5:]
|
||||
if phone:
|
||||
try:
|
||||
user = User.objects.create_user(username=phone, password=password, last_login=timezone.now())
|
||||
user.save()
|
||||
u = Userprofile(user_id=user.id, organization_id=o.id, status=1, image='/profile/user_default.jpg',
|
||||
sex='男', name=name, zhiwei=zhiwei)
|
||||
u.save()
|
||||
except:
|
||||
print(phone)
|
||||
return HttpResponse('ok')
|
|
@ -63,12 +63,24 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{# <div class="controls">#}
|
||||
{# <select class="form-control" name="organization">#}
|
||||
{# {% for o in organization %}#}
|
||||
{# <option value="{{ o.id }}">{{ o.name }}</option>#}
|
||||
{# {% endfor %}#}
|
||||
{# </select>#}
|
||||
{# </div>#}
|
||||
<div class="input-group main-search">
|
||||
<input type="text" class="form-control" placeholder="请输入关键字"
|
||||
style="height: 40px;width: 550px;opacity: .9 "
|
||||
name="organization">
|
||||
<div class="input-group-btn" style="display: none">
|
||||
<button class="btn btn-default" type="button">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="autocomplete-panel" style="z-index: 9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -88,6 +100,24 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="identificationcode">新媒体标识码</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="identificationcode">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="function">功能</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="function">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="articleurl">文章url</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="articleurl">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">点击新建
|
||||
</button>
|
||||
</form>
|
||||
|
@ -102,4 +132,33 @@
|
|||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('.main-search input').focus(function (e) {
|
||||
e.preventDefault();
|
||||
$("#history_query").hide()
|
||||
var width = $(this).width();
|
||||
var position = $(this).position();
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
if (val) {
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params));
|
||||
}
|
||||
$('.autocomplete-panel').css({
|
||||
width: width + 12,
|
||||
top: position.top + 34,
|
||||
left: position.left + 5
|
||||
}).show();
|
||||
}).blur(function (e) {
|
||||
e.preventDefault();
|
||||
}).on('input', function (e) {
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params))
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<input type="text" class="form-control" name="type">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="name">新媒体名称</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="name">
|
||||
|
@ -69,12 +69,24 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{# <div class="controls">#}
|
||||
{# <select class="form-control" name="organization">#}
|
||||
{# {% for o in organization %}#}
|
||||
{# <option value="{{ o.id }}">{{ o.name }}</option>#}
|
||||
{# {% endfor %}#}
|
||||
{# </select>#}
|
||||
{# </div>#}
|
||||
<div class="input-group main-search">
|
||||
<input type="text" class="form-control" placeholder="请输入关键字"
|
||||
style="height: 40px;width: 550px;opacity: .9 "
|
||||
name="organization">
|
||||
<div class="input-group-btn" style="display: none">
|
||||
<button class="btn btn-default" type="button">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="autocomplete-panel" style="z-index: 9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -94,6 +106,24 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="identificationcode">新媒体标识码</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="identificationcode">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="function">功能</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="function">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="articleurl">文章url</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="articleurl">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">点击新建
|
||||
</button>
|
||||
</form>
|
||||
|
@ -108,4 +138,35 @@
|
|||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('.main-search input').focus(function (e) {
|
||||
e.preventDefault();
|
||||
$("#history_query").hide()
|
||||
var width = $(this).width();
|
||||
var position = $(this).position();
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
if (val) {
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params));
|
||||
}
|
||||
$('.autocomplete-panel').css({
|
||||
width: width + 12,
|
||||
top: position.top + 34,
|
||||
left: position.left + 5
|
||||
}).show();
|
||||
}).blur(function (e) {
|
||||
e.preventDefault();
|
||||
}).on('input', function (e) {
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params))
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
|
|
@ -63,12 +63,24 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{# <div class="controls">#}
|
||||
{# <select class="form-control" name="organization">#}
|
||||
{# {% for o in organization %}#}
|
||||
{# <option value="{{ o.id }}">{{ o.name }}</option>#}
|
||||
{# {% endfor %}#}
|
||||
{# </select>#}
|
||||
{# </div>#}
|
||||
<div class="input-group main-search">
|
||||
<input type="text" class="form-control" placeholder="请输入关键字"
|
||||
style="height: 40px;width: 550px;opacity: .9 "
|
||||
name="organization">
|
||||
<div class="input-group-btn" style="display: none">
|
||||
<button class="btn btn-default" type="button">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="autocomplete-panel" style="z-index: 9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -88,6 +100,24 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="identificationcode">新媒体标识码</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="identificationcode">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="function">功能</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="function">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="articleurl">文章url</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="articleurl">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">点击新建
|
||||
</button>
|
||||
</form>
|
||||
|
@ -102,4 +132,34 @@
|
|||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('.main-search input').focus(function (e) {
|
||||
e.preventDefault();
|
||||
$("#history_query").hide()
|
||||
var width = $(this).width();
|
||||
var position = $(this).position();
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
if (val) {
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params));
|
||||
}
|
||||
$('.autocomplete-panel').css({
|
||||
width: width + 12,
|
||||
top: position.top + 34,
|
||||
left: position.left + 5
|
||||
}).show();
|
||||
}).blur(function (e) {
|
||||
e.preventDefault();
|
||||
}).on('input', function (e) {
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params))
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="weiboid">ID</label>
|
||||
<label class="form-label" for="weiboid">BIZ</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="weiboid">
|
||||
</div>
|
||||
|
@ -63,12 +63,24 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{# <div class="controls">#}
|
||||
{# <select class="form-control" name="organization">#}
|
||||
{# {% for o in organization %}#}
|
||||
{# <option value="{{ o.id }}">{{ o.name }}</option>#}
|
||||
{# {% endfor %}#}
|
||||
{# </select>#}
|
||||
{# </div>#}
|
||||
<div class="input-group main-search">
|
||||
<input type="text" class="form-control" placeholder="请输入关键字"
|
||||
style="height: 40px;width: 550px;opacity: .9 "
|
||||
name="organization">
|
||||
<div class="input-group-btn" style="display: none">
|
||||
<button class="btn btn-default" type="button">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="autocomplete-panel" style="z-index: 9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -88,6 +100,24 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="identificationcode">新媒体标识码</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="identificationcode">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="function">功能</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="function">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="articleurl">文章url</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="articleurl">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">点击新建
|
||||
</button>
|
||||
</form>
|
||||
|
@ -102,4 +132,35 @@
|
|||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('.main-search input').focus(function (e) {
|
||||
e.preventDefault();
|
||||
$("#history_query").hide()
|
||||
var width = $(this).width();
|
||||
var position = $(this).position();
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
if (val) {
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params));
|
||||
}
|
||||
$('.autocomplete-panel').css({
|
||||
width: width + 12,
|
||||
top: position.top + 34,
|
||||
left: position.left + 5
|
||||
}).show();
|
||||
}).blur(function (e) {
|
||||
e.preventDefault();
|
||||
}).on('input', function (e) {
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params))
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="weixinid">ID</label>
|
||||
<label class="form-label" for="weixinid">BIZ</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="weixinid">
|
||||
</div>
|
||||
|
@ -63,12 +63,24 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{# <div class="controls">#}
|
||||
{# <select class="form-control" name="organization">#}
|
||||
{# {% for o in organization %}#}
|
||||
{# <option value="{{ o.id }}">{{ o.name }}</option>#}
|
||||
{# {% endfor %}#}
|
||||
{# </select>#}
|
||||
{# </div>#}
|
||||
<div class="input-group main-search">
|
||||
<input type="text" class="form-control" placeholder="请输入关键字"
|
||||
style="height: 40px;width: 550px;opacity: .9 "
|
||||
name="organization">
|
||||
<div class="input-group-btn" style="display: none">
|
||||
<button class="btn btn-default" type="button">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="autocomplete-panel" style="z-index: 9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -88,6 +100,24 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="identificationcode">新媒体标识码</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="identificationcode">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="function">功能</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="function">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="articleurl">文章url</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="articleurl">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">点击新建
|
||||
</button>
|
||||
</form>
|
||||
|
@ -102,4 +132,34 @@
|
|||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('.main-search input').focus(function (e) {
|
||||
e.preventDefault();
|
||||
$("#history_query").hide()
|
||||
var width = $(this).width();
|
||||
var position = $(this).position();
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
if (val) {
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params));
|
||||
}
|
||||
$('.autocomplete-panel').css({
|
||||
width: width + 12,
|
||||
top: position.top + 34,
|
||||
left: position.left + 5
|
||||
}).show();
|
||||
}).blur(function (e) {
|
||||
e.preventDefault();
|
||||
}).on('input', function (e) {
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params))
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
<th style="text-align: center">新媒体名称</th>
|
||||
<th style="text-align: center">新媒体ID</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>
|
||||
|
@ -48,7 +47,6 @@
|
|||
<td style="vertical-align: middle;text-align: center">{{ w.code }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.douyinid }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.organization }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.organization_type }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.administrativedivision }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.status }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
<th style="text-align: center">新媒体名称</th>
|
||||
<th style="text-align: center">新媒体ID</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>
|
||||
|
@ -50,7 +49,6 @@
|
|||
<td style="vertical-align: middle;text-align: center">{{ w.name }}</td>
|
||||
<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.organization_type }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.administrativedivision }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.status }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
<th style="text-align: center">新媒体名称</th>
|
||||
<th style="text-align: center">新媒体ID</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>
|
||||
|
@ -48,7 +47,6 @@
|
|||
<td style="vertical-align: middle;text-align: center">{{ w.code }}</td>
|
||||
<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.organization_type }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.administrativedivision }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.status }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
<th style="text-align: center">新媒体名称</th>
|
||||
<th style="text-align: center">新媒体ID</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>
|
||||
|
@ -48,7 +47,6 @@
|
|||
<td style="vertical-align: middle;text-align: center">{{ w.code }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.weiboid }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.organization }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.organization_type }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.administrativedivision }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.status }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
<th style="text-align: center">新媒体名称</th>
|
||||
<th style="text-align: center">新媒体ID</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>
|
||||
|
@ -48,7 +47,6 @@
|
|||
<td style="vertical-align: middle;text-align: center">{{ w.code }}</td>
|
||||
<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.organization_type }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.administrativedivision }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ w.status }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">
|
||||
|
|
|
@ -66,13 +66,25 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
<option value="{{ douyin.organization.id }}">{{ douyin.organization.name }}</option>
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{# <div class="controls">#}
|
||||
{# <select class="form-control" name="organization">#}
|
||||
{# <option value="{{ douyin.organization.id }}">{{ douyin.organization.name }}</option>#}
|
||||
{# {% for o in organization %}#}
|
||||
{# <option value="{{ o.id }}">{{ o.name }}</option>#}
|
||||
{# {% endfor %}#}
|
||||
{# </select>#}
|
||||
{# </div>#}
|
||||
<div class="input-group main-search">
|
||||
<input type="text" class="form-control" placeholder="请输入关键字"
|
||||
style="height: 40px;width: 550px;opacity: .9 "
|
||||
name="organization" value="{{ douyin.organization.name }}">
|
||||
<div class="input-group-btn" style="display: none">
|
||||
<button class="btn btn-default" type="button">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="autocomplete-panel" style="z-index: 9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -96,7 +108,28 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">点击新建
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="identificationcode">新媒体标识码</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="identificationcode"
|
||||
value="{{ douyin.identificationcode }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="function">功能</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="function"
|
||||
value="{{ douyin.function }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="articleurl">文章url</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="articleurl"
|
||||
value="{{ douyin.articleurl }}">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">提交修改
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -110,4 +143,34 @@
|
|||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('.main-search input').focus(function (e) {
|
||||
e.preventDefault();
|
||||
$("#history_query").hide()
|
||||
var width = $(this).width();
|
||||
var position = $(this).position();
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
if (val) {
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params));
|
||||
}
|
||||
$('.autocomplete-panel').css({
|
||||
width: width + 12,
|
||||
top: position.top + 34,
|
||||
left: position.left + 5
|
||||
}).show();
|
||||
}).blur(function (e) {
|
||||
e.preventDefault();
|
||||
}).on('input', function (e) {
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params))
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<label class="form-label" for="name">新媒体名称</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="name"
|
||||
value="{{ qita.name }}">
|
||||
value="{{ qita.code }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -73,13 +73,25 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
<option value="{{ qita.organization.id }}">{{ qita.organization.name }}</option>
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{# <div class="controls">#}
|
||||
{# <select class="form-control" name="organization">#}
|
||||
{# <option value="{{ qita.organization.id }}">{{ qita.organization.name }}</option>#}
|
||||
{# {% for o in organization %}#}
|
||||
{# <option value="{{ o.id }}">{{ o.name }}</option>#}
|
||||
{# {% endfor %}#}
|
||||
{# </select>#}
|
||||
{# </div>#}
|
||||
<div class="input-group main-search">
|
||||
<input type="text" class="form-control" placeholder="请输入关键字"
|
||||
style="height: 40px;width: 550px;opacity: .9 "
|
||||
name="organization" value="{{ qita.organization.name }}">
|
||||
<div class="input-group-btn" style="display: none">
|
||||
<button class="btn btn-default" type="button">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="autocomplete-panel" style="z-index: 9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -103,6 +115,27 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="identificationcode">新媒体标识码</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="identificationcode"
|
||||
value="{{ qita.identificationcode }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="function">功能</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="function"
|
||||
value="{{ qita.function }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="articleurl">文章url</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="articleurl"
|
||||
value="{{ qita.articleurl }}">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">点击新建
|
||||
</button>
|
||||
</form>
|
||||
|
@ -117,4 +150,34 @@
|
|||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('.main-search input').focus(function (e) {
|
||||
e.preventDefault();
|
||||
$("#history_query").hide()
|
||||
var width = $(this).width();
|
||||
var position = $(this).position();
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
if (val) {
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params));
|
||||
}
|
||||
$('.autocomplete-panel').css({
|
||||
width: width + 12,
|
||||
top: position.top + 34,
|
||||
left: position.left + 5
|
||||
}).show();
|
||||
}).blur(function (e) {
|
||||
e.preventDefault();
|
||||
}).on('input', function (e) {
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params))
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -66,13 +66,25 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
<option value="{{ toutiao.organization.id }}">{{ toutiao.organization.name }}</option>
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{# <div class="controls">#}
|
||||
{# <select class="form-control" name="organization">#}
|
||||
{# <option value="{{ toutiao.organization.id }}">{{ toutiao.organization.name }}</option>#}
|
||||
{# {% for o in organization %}#}
|
||||
{# <option value="{{ o.id }}">{{ o.name }}</option>#}
|
||||
{# {% endfor %}#}
|
||||
{# </select>#}
|
||||
{# </div>#}
|
||||
<div class="input-group main-search">
|
||||
<input type="text" class="form-control" placeholder="请输入关键字"
|
||||
style="height: 40px;width: 550px;opacity: .9 "
|
||||
name="organization" value="{{ toutiao.organization.name }}">
|
||||
<div class="input-group-btn" style="display: none">
|
||||
<button class="btn btn-default" type="button">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="autocomplete-panel" style="z-index: 9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -96,7 +108,28 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">点击新建
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="identificationcode">新媒体标识码</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="identificationcode"
|
||||
value="{{ toutiao.identificationcode }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="function">功能</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="function"
|
||||
value="{{ toutiao.function }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="articleurl">文章url</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="articleurl"
|
||||
value="{{ toutiao.articleurl }}">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">提交修改
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -110,4 +143,34 @@
|
|||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('.main-search input').focus(function (e) {
|
||||
e.preventDefault();
|
||||
$("#history_query").hide()
|
||||
var width = $(this).width();
|
||||
var position = $(this).position();
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
if (val) {
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params));
|
||||
}
|
||||
$('.autocomplete-panel').css({
|
||||
width: width + 12,
|
||||
top: position.top + 34,
|
||||
left: position.left + 5
|
||||
}).show();
|
||||
}).blur(function (e) {
|
||||
e.preventDefault();
|
||||
}).on('input', function (e) {
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params))
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -66,13 +66,25 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
<option value="{{ weibo.organization.id }}">{{ weibo.organization.name }}</option>
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{# <div class="controls">#}
|
||||
{# <select class="form-control" name="organization">#}
|
||||
{# <option value="{{ weibo.organization.id }}">{{ weibo.organization.name }}</option>#}
|
||||
{# {% for o in organization %}#}
|
||||
{# <option value="{{ o.id }}">{{ o.name }}</option>#}
|
||||
{# {% endfor %}#}
|
||||
{# </select>#}
|
||||
{# </div>#}
|
||||
<div class="input-group main-search">
|
||||
<input type="text" class="form-control" placeholder="请输入关键字"
|
||||
style="height: 40px;width: 550px;opacity: .9 "
|
||||
name="organization" value="{{ weibo.organization.name }}">
|
||||
<div class="input-group-btn" style="display: none">
|
||||
<button class="btn btn-default" type="button">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="autocomplete-panel" style="z-index: 9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -96,7 +108,28 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">点击新建
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="identificationcode">新媒体标识码</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="identificationcode"
|
||||
value="{{ weibo.identificationcode }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="function">功能</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="function"
|
||||
value="{{ weibo.function }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="articleurl">文章url</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="articleurl"
|
||||
value="{{ weibo.articleurl }}">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success" style="margin-top: 50px">提交修改
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -110,4 +143,34 @@
|
|||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('.main-search input').focus(function (e) {
|
||||
e.preventDefault();
|
||||
$("#history_query").hide()
|
||||
var width = $(this).width();
|
||||
var position = $(this).position();
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
if (val) {
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params));
|
||||
}
|
||||
$('.autocomplete-panel').css({
|
||||
width: width + 12,
|
||||
top: position.top + 34,
|
||||
left: position.left + 5
|
||||
}).show();
|
||||
}).blur(function (e) {
|
||||
e.preventDefault();
|
||||
}).on('input', function (e) {
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params))
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -66,13 +66,25 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
<option value="{{ weixin.organization.id }}">{{ weixin.organization.name }}</option>
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{# <div class="controls">#}
|
||||
{# <select class="form-control" name="organization">#}
|
||||
{# <option value="{{ weixin.organization.id }}">{{ weixin.organization.name }}</option>#}
|
||||
{# {% for o in organization %}#}
|
||||
{# <option value="{{ o.id }}">{{ o.name }}</option>#}
|
||||
{# {% endfor %}#}
|
||||
{# </select>#}
|
||||
{# </div>#}
|
||||
<div class="input-group main-search">
|
||||
<input type="text" class="form-control" placeholder="请输入关键字"
|
||||
style="height: 40px;width: 550px;opacity: .9 "
|
||||
name="organization" value="{{ weixin.organization.name }}">
|
||||
<div class="input-group-btn" style="display: none">
|
||||
<button class="btn btn-default" type="button">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="autocomplete-panel" style="z-index: 9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -96,6 +108,27 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="identificationcode">新媒体标识码</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="identificationcode"
|
||||
value="{{ weixin.identificationcode }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="function">功能</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="function"
|
||||
value="{{ weixin.function }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="articleurl">文章url</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="articleurl"
|
||||
value="{{ weixin.articleurl }}">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" style="margin-top: 50px">提交修改
|
||||
</button>
|
||||
</form>
|
||||
|
@ -110,4 +143,34 @@
|
|||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('.main-search input').focus(function (e) {
|
||||
e.preventDefault();
|
||||
$("#history_query").hide()
|
||||
var width = $(this).width();
|
||||
var position = $(this).position();
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
if (val) {
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params));
|
||||
}
|
||||
$('.autocomplete-panel').css({
|
||||
width: width + 12,
|
||||
top: position.top + 34,
|
||||
left: position.left + 5
|
||||
}).show();
|
||||
}).blur(function (e) {
|
||||
e.preventDefault();
|
||||
}).on('input', function (e) {
|
||||
var val = $(this).val();
|
||||
var params = {keyword: val}
|
||||
$('.autocomplete-panel').load('/get/organization/' + '?' + $.param(params))
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
</div>
|
||||
<div class="panel-body col-md-12">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="title">新闻作者</label>
|
||||
<label for="title">新闻发布者</label>
|
||||
<input type="text" class="form-control" id="author" placeholder="请填写新闻作者"
|
||||
name="author" value="系统管理员">
|
||||
</div>
|
||||
|
@ -71,7 +71,7 @@
|
|||
name="source">
|
||||
</div>
|
||||
<div class="form-group col-md-12" >
|
||||
<label class="form-label" for="image">图片
|
||||
<label class="form-label" for="image">缩略图
|
||||
<div class="controls">
|
||||
<input type="file" name="image">
|
||||
</div>
|
||||
|
|
|
@ -39,9 +39,10 @@
|
|||
<div class="panel-body">
|
||||
{# <div class="panel panel-info">#}
|
||||
<div class="panel-heading">
|
||||
<div class="col-md-4">新闻类型:{{ news.type }}</div>
|
||||
<div class="col-md-4">作者:{{ news.author }}</div>
|
||||
<div class="col-md-4">发布时间:{{ news.date }}</div>
|
||||
<div class="col-md-3">新闻类型:{% if news.type == '0' %}政策依据{% elif news.type == '1' %}基层动态{% elif news.type == '2' %}外省动态{% elif news.type == '3' %}监测通报{% elif news.type == '4' %}舆情热点{% elif news.type == '5' %}通知{% elif news.type == '6' %}重点新闻{% endif %}</div>
|
||||
<div class="col-md-3">发布者:{{ news.author }}</div>
|
||||
<div class="col-md-3">来源:{{ news.source }}</div>
|
||||
<div class="col-md-3">发布时间:{{ news.date }}</div>
|
||||
</div>
|
||||
<div class="panel-body" style="margin-top: 20px">
|
||||
{{ news.content|safe }}
|
||||
|
|
|
@ -65,34 +65,34 @@
|
|||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organizationtype">单位类型</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organizationtype">
|
||||
<option value="{{ organization.organizationtype.id }}">{{ organization.organizationtype.organizationtype }}</option>
|
||||
{% for o in organizationtype %}
|
||||
<option value="{{ o.id }}">{{ o.organizationtype }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{# <div class="form-group">#}
|
||||
{# <label class="form-label" for="organizationtype">单位类型</label>#}
|
||||
{# <div class="controls">#}
|
||||
{# <select class="form-control" name="organizationtype">#}
|
||||
{# <option value="{{ organization.organizationtype.id }}">{{ organization.organizationtype.organizationtype }}</option>#}
|
||||
{# {% for o in organizationtype %}#}
|
||||
{# <option value="{{ o.id }}">{{ o.organizationtype }}</option>#}
|
||||
{# {% endfor %}#}
|
||||
{# </select>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="administrativedivision">行政区划</label>
|
||||
<div class="controls">
|
||||
<select id="province" name="province">
|
||||
<option value="{{ organization.province }}">{{ organization.province }}</option>
|
||||
<option value="{{ p }}">{{ p }}</option>
|
||||
</select>
|
||||
<select id="city" name="city" style="margin-left: 20px">
|
||||
<option value="{{ organization.province }}">{{ organization.cities }}</option>
|
||||
<option value="{{ c }}">{{ c }}</option>
|
||||
</select>
|
||||
<select id="district" name="district" style="margin-left: 20px">
|
||||
<option value="{{ organization.province }}">{{ organization.district }}</option>
|
||||
<option value="{{ d }}">{{ d }}</option>
|
||||
</select>
|
||||
<select id="town" name="town" style="margin-left: 20px">
|
||||
<option value="{{ organization.province }}">{{ organization.town }}</option>
|
||||
<option value="{{ t }}">{{ t }}</option>
|
||||
</select>
|
||||
<select id="village" name="village" style="margin-left: 20px">
|
||||
<option value="{{ organization.province }}">{{ organization.village }}</option>
|
||||
<option value="{{ v }}">{{ v }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -126,7 +126,7 @@
|
|||
$(function () {
|
||||
$.get('/get/province/', function (data) {
|
||||
for (var i = 0, len = data.province.length; i < len; i++) {
|
||||
$new = $("<option value=" + data.province[i][0] + ">" + data.province[i][1] + "</option>");
|
||||
$new = $("<option value=" + data.province[i][1] + ">" + data.province[i][1] + "</option>");
|
||||
$("#province").append($new);
|
||||
}
|
||||
})
|
||||
|
@ -142,7 +142,7 @@
|
|||
data: {"code": $(this).val()}
|
||||
}).done(function (data) {
|
||||
for (var i = 0, len = data.city.length; i < len; i++) {
|
||||
$new = $("<option value=" + data.city[i][0] + ">" + data.city[i][1] + "</option>");
|
||||
$new = $("<option value=" + data.city[i][1] + ">" + data.city[i][1] + "</option>");
|
||||
$("#city").append($new);
|
||||
}
|
||||
})
|
||||
|
@ -158,7 +158,7 @@
|
|||
data: {"code": $(this).val()}
|
||||
}).done(function (data) {
|
||||
for (var i = 0, len = data.district.length; i < len; i++) {
|
||||
$new = $("<option value=" + data.district[i][0] + ">" + data.district[i][1] + "</option>");
|
||||
$new = $("<option value=" + data.district[i][1] + ">" + data.district[i][1] + "</option>");
|
||||
$("#district").append($new);
|
||||
}
|
||||
})
|
||||
|
@ -173,7 +173,7 @@
|
|||
data: {"code": $(this).val()}
|
||||
}).done(function (data) {
|
||||
for (var i = 0, len = data.town.length; i < len; i++) {
|
||||
$new = $("<option value=" + data.town[i][0] + ">" + data.town[i][1] + "</option>");
|
||||
$new = $("<option value=" + data.town[i][1] + ">" + data.town[i][1] + "</option>");
|
||||
$("#town").append($new);
|
||||
}
|
||||
})
|
||||
|
@ -187,7 +187,7 @@
|
|||
data: {"code": $(this).val()}
|
||||
}).done(function (data) {
|
||||
for (var i = 0, len = data.village.length; i < len; i++) {
|
||||
$new = $("<option value=" + data.village[i][0] + ">" + data.village[i][1] + "</option>");
|
||||
$new = $("<option value=" + data.village[i][1] + ">" + data.village[i][1] + "</option>");
|
||||
$("#village").append($new);
|
||||
}
|
||||
})
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<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>
|
||||
|
@ -72,7 +72,7 @@
|
|||
src="{{ r.image }}" style="width: 80px;height: 80px;"
|
||||
class="img-circle"></td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.name }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.organizationtype }}</td>
|
||||
{# <td style="vertical-align: middle;text-align: center">{{ r.organizationtype }}</td>#}
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.administrativedivision }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.usercount }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.mediacount }}</td>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<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>
|
||||
|
@ -47,7 +47,7 @@
|
|||
<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.type }}</td>#}
|
||||
<td style="vertical-align: middle;text-align: center">{{ u.administrativedivision }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">
|
||||
<a href="{% url 'user-management-delete' u.id %}"
|
||||
|
|
|
@ -50,11 +50,43 @@ def user_management(request):
|
|||
o['organization'] = u.userprofile_set.get(user_id=u.id).organization.name
|
||||
organization_id = Userprofile.objects.get(user_id=u.id).organization_id
|
||||
print(organization_id)
|
||||
o['administrativedivision'] = str(str(Organization.objects.get(id=organization_id).province) + '-' + str(
|
||||
Organization.objects.get(id=organization_id).cities) + '-' + str(
|
||||
Organization.objects.get(id=organization_id).district) + '-' + str(
|
||||
Organization.objects.get(id=organization_id).town) + '-' + str(
|
||||
Organization.objects.get(id=organization_id).village)).replace('None', '')
|
||||
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)
|
||||
print(userallinfo)
|
||||
return render(request, 'management/user-management.html',
|
||||
|
@ -522,7 +554,22 @@ def organization_delete(request, pk):
|
|||
@login_required
|
||||
def organization_update(request, pk):
|
||||
organization = Organization.objects.get(id=pk)
|
||||
organizationtype = Organizationtype.objects.all()
|
||||
p = ''
|
||||
c = ''
|
||||
d = ''
|
||||
t = ''
|
||||
v = ''
|
||||
if organization.province:
|
||||
p = Area_code_2020.objects.get(code=organization.province).name
|
||||
if organization.cities:
|
||||
c = Area_code_2020.objects.get(code=organization.cities).name
|
||||
if organization.district:
|
||||
d = Area_code_2020.objects.get(code=organization.district).name
|
||||
if organization.town:
|
||||
t = Area_code_2020.objects.get(code=organization.town).name
|
||||
if organization.village:
|
||||
v = Area_code_2020.objects.get(code=organization.village).name
|
||||
|
||||
level = Level.objects.all()
|
||||
if request.method == 'POST':
|
||||
name = request.POST.get('name')
|
||||
|
@ -530,35 +577,26 @@ def organization_update(request, pk):
|
|||
# organizationtype = request.POST.get('organizationtype')
|
||||
province = request.POST.get('province')
|
||||
level_id = request.POST.get('level')
|
||||
if province != '' and province.isdigit():
|
||||
province_r = province
|
||||
else:
|
||||
province_r = Area_code_2020.objects.get(name=province).code
|
||||
if province:
|
||||
province = Area_code_2020.objects.get(name=province).code
|
||||
city = request.POST.get('city')
|
||||
if city != '' and city.isdigit():
|
||||
city_r = city
|
||||
else:
|
||||
city_r = Area_code_2020.objects.get(name=city).code
|
||||
print(str(city) + "99999999999999999")
|
||||
if city:
|
||||
city = Area_code_2020.objects.get(name=city).code
|
||||
district = request.POST.get('district')
|
||||
if district != '' and district.isdigit():
|
||||
district_r = district
|
||||
else:
|
||||
district_r = Area_code_2020.objects.get(name=district).code
|
||||
if district:
|
||||
district = Area_code_2020.objects.get(name=district).code
|
||||
town = request.POST.get('town')
|
||||
if town != '' and town.isdigit():
|
||||
town_r = town
|
||||
else:
|
||||
town_r = Area_code_2020.objects.get(name=town).code
|
||||
if town:
|
||||
town = Area_code_2020.objects.get(name=town).code
|
||||
village = request.POST.get('village')
|
||||
if village != '' and village.isdigit():
|
||||
village_r = village
|
||||
else:
|
||||
village_r = Area_code_2020.objects.get(name=village).code
|
||||
if village:
|
||||
village = Area_code_2020.objects.get(name=village).code
|
||||
if name is not None:
|
||||
if image is not None:
|
||||
Organization.objects.filter(id=pk).update(name=name,
|
||||
province=province_r, cities=city_r, district=district_r,
|
||||
town=town_r, village=village_r, level_id=level_id)
|
||||
province=province, cities=city, district=district,
|
||||
town=town, village=village, level_id=level_id)
|
||||
o = Organization.objects.get(id=pk)
|
||||
o.image = image
|
||||
o.save()
|
||||
|
@ -566,12 +604,12 @@ def organization_update(request, pk):
|
|||
return HttpResponseRedirect('/management/organization/management/')
|
||||
else:
|
||||
Organization.objects.filter(id=pk).update(name=name,
|
||||
province=province_r, cities=city_r, district=district_r,
|
||||
town=town_r, village=village_r, level_id=level_id)
|
||||
province=province, cities=city, district=district,
|
||||
town=town, village=village, level_id=level_id)
|
||||
messages.success(request, '修改成功')
|
||||
return HttpResponseRedirect('/management/organization/management/')
|
||||
return render(request, 'management/organization-management-update.html',
|
||||
{'organization': organization, 'organizationtype': organizationtype, 'level': level})
|
||||
{'organization': organization, 'level': level, 'p': p, 'c': c, 'd': d, 't': t, 'v': v})
|
||||
|
||||
|
||||
def organization_create(request):
|
||||
|
@ -607,7 +645,7 @@ def organization_create(request):
|
|||
village=village, level_id=level_id, status='0')
|
||||
organization.save()
|
||||
messages.success(request, '添加成功')
|
||||
return HttpResponseRedirect('/management/organization/management/')
|
||||
return HttpResponseRedirect('/management/organization/create/')
|
||||
else:
|
||||
messages.error(request, '单位名不能为空')
|
||||
return HttpResponseRedirect('/management/organization/create/')
|
||||
|
@ -631,19 +669,25 @@ def newmedia_management_create_weixin(request):
|
|||
weixinid = request.POST.get('weixinid')
|
||||
alias = request.POST.get('alias')
|
||||
image = request.FILES.get('image')
|
||||
organization = request.POST.get('organization')
|
||||
o = request.POST.get('organization')
|
||||
o_id = Organization.objects.get(name=o).id
|
||||
status = request.POST.get('status')
|
||||
identificationcode = request.POST.get('identificationcode')
|
||||
function = request.POST.get('function')
|
||||
articleurl = request.POST.get('articleurl')
|
||||
if code is not None:
|
||||
if organization is not None:
|
||||
if image is not None:
|
||||
weixin = Weixin(code=code, weixinid=weixinid, alias=alias, image=image,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status, identificationcode=identificationcode,
|
||||
function=function, articleurl=articleurl)
|
||||
weixin.save()
|
||||
messages.success(request, '创建成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/create/weixin/')
|
||||
else:
|
||||
weixin = Weixin(code=code, weixinid=weixinid, alias=alias, image='weixin.png',
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status, identificationcode=identificationcode,
|
||||
function=function, articleurl=articleurl)
|
||||
weixin.save()
|
||||
messages.success(request, '创建成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/create/weixin/')
|
||||
|
@ -671,19 +715,25 @@ def newmedia_management_create_weibo(request):
|
|||
print(str(weiboid) + "11111111111111111111111111111111111111")
|
||||
alias = request.POST.get('alias')
|
||||
image = request.FILES.get('image')
|
||||
organization = request.POST.get('organization')
|
||||
o = request.POST.get('organization')
|
||||
o_id = Organization.objects.get(name=o).id
|
||||
status = request.POST.get('status')
|
||||
identificationcode = request.POST.get('identificationcode')
|
||||
function = request.POST.get('function')
|
||||
articleurl = request.POST.get('articleurl')
|
||||
if code is not None:
|
||||
if organization is not None:
|
||||
if image is not None:
|
||||
weibo = Weibo(code=code, weiboid=weiboid, alias=alias, image=image,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status, identificationcode=identificationcode,
|
||||
function=function, articleurl=articleurl)
|
||||
weibo.save()
|
||||
messages.success(request, '创建成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/create/weibo/')
|
||||
else:
|
||||
weibo = Weibo(code=code, weiboid=weiboid, alias=alias, image='weibo.png',
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status, identificationcode=identificationcode,
|
||||
function=function, articleurl=articleurl)
|
||||
weibo.save()
|
||||
messages.success(request, '创建成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/create/weibo/')
|
||||
|
@ -710,19 +760,25 @@ def newmedia_management_create_toutiao(request):
|
|||
toutiaoid = request.POST.get('toutiaoid')
|
||||
alias = request.POST.get('alias')
|
||||
image = request.FILES.get('image')
|
||||
organization = request.POST.get('organization')
|
||||
o = request.POST.get('organization')
|
||||
o_id = Organization.objects.get(name=o).id
|
||||
status = request.POST.get('status')
|
||||
identificationcode = request.POST.get('identificationcode')
|
||||
function = request.POST.get('function')
|
||||
articleurl = request.POST.get('articleurl')
|
||||
if code is not None:
|
||||
if organization is not None:
|
||||
if image is not None:
|
||||
toutiao = Toutiao(code=code, toutiaoid=toutiaoid, alias=alias, image=image,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function, articleurl=articleurl)
|
||||
toutiao.save()
|
||||
messages.success(request, '创建成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/create/toutiao/')
|
||||
else:
|
||||
toutiao = Toutiao(code=code, toutiaoid=toutiaoid, alias=alias, image='toutiao.png',
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function, articleurl=articleurl)
|
||||
toutiao.save()
|
||||
messages.success(request, '创建成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/create/toutiao/')
|
||||
|
@ -751,19 +807,25 @@ def newmedia_management_create_douyin(request):
|
|||
douyinid = request.POST.get('douyinid')
|
||||
alias = request.POST.get('alias')
|
||||
image = request.FILES.get('image')
|
||||
organization = request.POST.get('organization')
|
||||
o = request.POST.get('organization')
|
||||
o_id = Organization.objects.get(name=o).id
|
||||
status = request.POST.get('status')
|
||||
identificationcode = request.POST.get('identificationcode')
|
||||
function = request.POST.get('function')
|
||||
articleurl = request.POST.get('articleurl')
|
||||
if code is not None:
|
||||
if organization is not None:
|
||||
if image is not None:
|
||||
douyin = Douyin(code=code, douyinid=douyinid, alias=alias, image=image,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status, identificationcode=identificationcode,
|
||||
function=function, articleurl=articleurl)
|
||||
douyin.save()
|
||||
messages.success(request, '创建成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/create/douyin/')
|
||||
else:
|
||||
douyin = Douyin(code=code, douyinid=douyinid, alias=alias, image='douyin.png',
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status, identificationcode=identificationcode,
|
||||
function=function, articleurl=articleurl)
|
||||
douyin.save()
|
||||
messages.success(request, '创建成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/create/douyin/')
|
||||
|
@ -792,19 +854,25 @@ def newmedia_management_create_qita(request):
|
|||
qitaid = request.POST.get('qitaid')
|
||||
alias = request.POST.get('alias')
|
||||
image = request.FILES.get('image')
|
||||
organization = request.POST.get('organization')
|
||||
o = request.POST.get('organization')
|
||||
o_id = Organization.objects.get(name=o).id
|
||||
status = request.POST.get('status')
|
||||
identificationcode = request.POST.get('identificationcode')
|
||||
function = request.POST.get('function')
|
||||
articleurl = request.POST.get('articleurl')
|
||||
if name is not None:
|
||||
if organization is not None:
|
||||
if image is not None:
|
||||
qita = Qita(type=type, name=name, qitaid=qitaid, alias=alias, image=image,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status, identificationcode=identificationcode,
|
||||
function=function, articleurl=articleurl)
|
||||
qita.save()
|
||||
messages.success(request, '创建成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/create/qita/')
|
||||
else:
|
||||
qita = Qita(type=type, name=name, qitaid=qitaid, alias=alias, image='qita.png',
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status, identificationcode=identificationcode,
|
||||
function=function, articleurl=articleurl)
|
||||
qita.save()
|
||||
messages.success(request, '创建成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/create/qita/')
|
||||
|
@ -1128,7 +1196,7 @@ def newmedia_management_edit_qita(request):
|
|||
o['id'] = str(w.id)
|
||||
o['image'] = w.image
|
||||
o['type'] = w.type
|
||||
o['name'] = w.name
|
||||
o['name'] = w.code
|
||||
o['qitaid'] = w.qitaid
|
||||
o['organization'] = w.organization.name
|
||||
# o['organization_type'] = w.organization.organizationtype.organizationtype
|
||||
|
@ -1176,20 +1244,28 @@ def newmedia_management_update_weixin(request, pk):
|
|||
weixinid = request.POST.get('weixinid')
|
||||
alias = request.POST.get('alias')
|
||||
image = request.FILES.get('image')
|
||||
organization = request.POST.get('organization')
|
||||
o = request.POST.get('organization')
|
||||
o_id = Organization.objects.get(name=o).id
|
||||
status = request.POST.get('status')
|
||||
identificationcode = request.POST.get('identificationcode')
|
||||
function = request.POST.get('function')
|
||||
articleurl = request.POST.get('articleurl')
|
||||
if code is not None:
|
||||
if organization is not None:
|
||||
if image is not None:
|
||||
Weixin.objects.filter(id=pk).update(code=code, weixinid=weixinid, alias=alias,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function,
|
||||
articleurl=articleurl)
|
||||
weixin.image = image
|
||||
weixin.save()
|
||||
messages.success(request, '修改成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/edit/weixin/')
|
||||
else:
|
||||
Weixin.objects.filter(id=pk).update(code=code, weixinid=weixinid, alias=alias,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function,
|
||||
articleurl=articleurl)
|
||||
messages.success(request, '修改成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/edit/weixin/')
|
||||
else:
|
||||
|
@ -1219,20 +1295,28 @@ def newmedia_management_update_weibo(request, pk):
|
|||
weiboid = request.POST.get('weiboid')
|
||||
alias = request.POST.get('alias')
|
||||
image = request.FILES.get('image')
|
||||
organization = request.POST.get('organization')
|
||||
o = request.POST.get('organization')
|
||||
o_id = Organization.objects.get(name=o).id
|
||||
status = request.POST.get('status')
|
||||
identificationcode = request.POST.get('identificationcode')
|
||||
function = request.POST.get('function')
|
||||
articleurl = request.POST.get('articleurl')
|
||||
if code is not None:
|
||||
if organization is not None:
|
||||
if image is not None:
|
||||
Weibo.objects.filter(id=pk).update(code=code, weiboid=weiboid, alias=alias,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function,
|
||||
articleurl=articleurl)
|
||||
weibo.image = image
|
||||
weibo.save()
|
||||
messages.success(request, '修改成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/edit/weibo/')
|
||||
else:
|
||||
Weibo.objects.filter(id=pk).update(code=code, weiboid=weiboid, alias=alias,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function,
|
||||
articleurl=articleurl)
|
||||
messages.success(request, '修改成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/edit/weibo/')
|
||||
else:
|
||||
|
@ -1262,20 +1346,28 @@ def newmedia_management_update_toutiao(request, pk):
|
|||
toutiaoid = request.POST.get('toutiaoid')
|
||||
alias = request.POST.get('alias')
|
||||
image = request.FILES.get('image')
|
||||
organization = request.POST.get('organization')
|
||||
o = request.POST.get('organization')
|
||||
o_id = Organization.objects.get(name=o).id
|
||||
status = request.POST.get('status')
|
||||
identificationcode = request.POST.get('identificationcode')
|
||||
function = request.POST.get('function')
|
||||
articleurl = request.POST.get('articleurl')
|
||||
if code is not None:
|
||||
if organization is not None:
|
||||
if image is not None:
|
||||
Toutiao.objects.filter(id=pk).update(code=code, toutiaoid=toutiaoid, alias=alias,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function,
|
||||
articleurl=articleurl)
|
||||
toutiao.image = image
|
||||
toutiao.save()
|
||||
messages.success(request, '修改成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/edit/toutiao/')
|
||||
else:
|
||||
Toutiao.objects.filter(id=pk).update(code=code, toutiaoid=toutiaoid, alias=alias,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function,
|
||||
articleurl=articleurl)
|
||||
messages.success(request, '修改成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/edit/toutiao/')
|
||||
else:
|
||||
|
@ -1305,20 +1397,28 @@ def newmedia_management_update_douyin(request, pk):
|
|||
douyinid = request.POST.get('douyinid')
|
||||
alias = request.POST.get('alias')
|
||||
image = request.FILES.get('image')
|
||||
organization = request.POST.get('organization')
|
||||
o = request.POST.get('organization')
|
||||
o_id = Organization.objects.get(name=o).id
|
||||
status = request.POST.get('status')
|
||||
identificationcode = request.POST.get('identificationcode')
|
||||
function = request.POST.get('function')
|
||||
articleurl = request.POST.get('articleurl')
|
||||
if code is not None:
|
||||
if organization is not None:
|
||||
if image is not None:
|
||||
Douyin.objects.filter(id=pk).update(code=code, douyinid=douyinid, alias=alias,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function,
|
||||
articleurl=articleurl)
|
||||
douyin.image = image
|
||||
douyin.save()
|
||||
messages.success(request, '修改成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/edit/douyin/')
|
||||
else:
|
||||
Douyin.objects.filter(id=pk).update(code=code, douyinid=douyinid, alias=alias,
|
||||
organization_id=organization, status=status)
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function,
|
||||
articleurl=articleurl)
|
||||
messages.success(request, '修改成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/edit/douyin/')
|
||||
else:
|
||||
|
@ -1349,20 +1449,28 @@ def newmedia_management_update_qita(request, pk):
|
|||
qitaid = request.POST.get('qitaid')
|
||||
alias = request.POST.get('alias')
|
||||
image = request.FILES.get('image')
|
||||
organization = request.POST.get('organization')
|
||||
o = request.POST.get('organization')
|
||||
o_id = Organization.objects.get(name=o).id
|
||||
status = request.POST.get('status')
|
||||
identificationcode = request.POST.get('identificationcode')
|
||||
function = request.POST.get('function')
|
||||
articleurl = request.POST.get('articleurl')
|
||||
if name is not None:
|
||||
if organization is not None:
|
||||
if image is not None:
|
||||
Qita.objects.filter(id=pk).update(type=type, name=name, qitaid=qitaid, alias=alias,
|
||||
organization_id=organization, status=status)
|
||||
Qita.objects.filter(id=pk).update(type=type, code=name, qitaid=qitaid, alias=alias,
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function,
|
||||
articleurl=articleurl)
|
||||
qita.image = image
|
||||
qita.save()
|
||||
messages.success(request, '修改成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/edit/qita/')
|
||||
else:
|
||||
Qita.objects.filter(id=pk).update(type=type, name=name, qitaid=qitaid, alias=alias,
|
||||
organization_id=organization, status=status)
|
||||
Qita.objects.filter(id=pk).update(type=type, code=name, qitaid=qitaid, alias=alias,
|
||||
organization_id=o_id, status=status,
|
||||
identificationcode=identificationcode, function=function,
|
||||
articleurl=articleurl)
|
||||
messages.success(request, '修改成功')
|
||||
return HttpResponseRedirect('/management/newmedia/management/edit/qita/')
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue