This commit is contained in:
parent
ac6b5a4ff6
commit
134e17c0bf
|
@ -1,14 +1,8 @@
|
|||
from django.forms import forms
|
||||
|
||||
from dashboard.models import Country, Spi, Hydro, Landuse, Finance, Popu, Crop, Admdiv
|
||||
from dashboard.models import Spi, Hydro, Landuse, Finance
|
||||
|
||||
|
||||
class CountryForm(forms.Model):
|
||||
class Meta:
|
||||
model = Country
|
||||
fields = ['name', 'parent_name', 'level', 'datetime', 'area', 'arable_land_area', 'population',
|
||||
'agricultural_population', 'gross_national_product', 'total_agricultural_output',
|
||||
'arable_land_per_capita']
|
||||
|
||||
|
||||
class SpiForm(forms.Model):
|
||||
|
@ -38,19 +32,3 @@ class FinanceForm(forms.Model):
|
|||
'arable_land_occupancy_tax', 'deed_tax', 'tobacco_tax', 'non_tax_revenue']
|
||||
|
||||
|
||||
class PopuForm(forms.Model):
|
||||
class Meta:
|
||||
model = Popu
|
||||
fields = ['region', 'date', 'permanent_population', 'households', 'census_register_population', 'male', 'female_sex','birth_rate','mortality','growth_rate','urbanization_rate']
|
||||
|
||||
|
||||
class CropForm(forms.Model):
|
||||
class Meta:
|
||||
model = Crop
|
||||
fields = ['county_area', 'date', 'seeded_area', 'growth_rate1', 'yield1', 'growth_rate2', 'seeded_area','growth_rate3','yield2','growth_rate4']
|
||||
|
||||
|
||||
class AdmdivForm(forms.Model):
|
||||
class Meta:
|
||||
model = Admdiv
|
||||
fields = ['county_area', 'date', 'government', 'villager_committee', 'street_office', 'residents_committee', 'land_area','proportion']
|
|
@ -8,7 +8,7 @@
|
|||
<li class="nav-header">
|
||||
<div class="profile-element">
|
||||
<img alt="image" class="img-circle" src="{% static 'dashboard/img/bjwl.png' %}">
|
||||
<span class="font-bold m-t-xs">
|
||||
<span class="font-bold m-t-xs" style="color: white">
|
||||
{{ request.user.username }}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -74,15 +74,15 @@
|
|||
<span class="fa arrow"></span>
|
||||
</a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li {% if url_name == 'disaster-index' %}class="active"{% endif %}>
|
||||
<a href="{% url 'disaster-index' %}">干旱预测</a>
|
||||
</li>
|
||||
<li {% if url_name == '' %}class="active"{% endif %}>
|
||||
<a href="#">暴雨风险预测</a>
|
||||
</li>
|
||||
<li {% if url_name == 'disaster-hail' %}class="active"{% endif %}>
|
||||
<a href="{% url 'disaster-hail' %}">冰雹风险预测</a>
|
||||
</li>
|
||||
<li {% if url_name == 'disaster-index' %}class="active"{% endif %}>
|
||||
<a href="{% url 'disaster-index' %}">干旱预测</a>
|
||||
</li>
|
||||
<li {% if url_name == '' %}class="active"{% endif %}>
|
||||
<a href="#">暴雨风险预测</a>
|
||||
</li>
|
||||
<li {% if url_name == 'disaster-hail' %}class="active"{% endif %}>
|
||||
<a href="{% url 'disaster-hail' %}">冰雹风险预测</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
@ -107,29 +107,31 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{% if request.user.is_superuser == 1 %}
|
||||
<li {% if url_name|startswith:'auth' %}class=""{% endif %}>
|
||||
<a href="#">
|
||||
<i class="fa fa-th-large"></i>
|
||||
<span class="nav-label">系统管理</span>
|
||||
<span class="fa arrow"></span>
|
||||
</a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li {% if url_name == 'http://{{ request.get_host }}/admin/auth/user/' %}class="active"{% endif %}>
|
||||
<a href="http://{{ request.get_host }}/admin/auth/user/"> 用户管理</a>
|
||||
</li>
|
||||
<li {% if url_name == 'http://{{ request.get_host }}/admin/auth/group/' %}class="active"{% endif %}>
|
||||
<a href="http://{{ request.get_host }}/admin/auth/group/">权限管理</a>
|
||||
</li>
|
||||
<li {% if url_name == '' %}class="active"{% endif %}>
|
||||
<a href="#">服务器状态</a>
|
||||
</li>
|
||||
<li {% if url_name == '' %}class="active"{% endif %}>
|
||||
<a href="#">数据备份</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
|
||||
<li {% if url_name|startswith:'auth' %}class=""{% endif %}>
|
||||
<a href="#">
|
||||
<i class="fa fa-th-large"></i>
|
||||
<span class="nav-label">系统管理</span>
|
||||
<span class="fa arrow"></span>
|
||||
</a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li {% if url_name == '' %}class="active"{% endif %}>
|
||||
<a href="#"> 用户管理</a>
|
||||
</li>
|
||||
<li {% if url_name == '' %}class="active"{% endif %}>
|
||||
<a href="#">权限管理</a>
|
||||
</li>
|
||||
<li {% if url_name == '' %}class="active"{% endif %}>
|
||||
<a href="#">服务器状态</a>
|
||||
</li>
|
||||
<li {% if url_name == '' %}class="active"{% endif %}>
|
||||
<a href="#">数据备份</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
{% endwith %}
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
</div>
|
||||
<div class="ibox-content" style="padding: 0;">
|
||||
<div id="map" style="width: 100%;height: 800px;">
|
||||
<div class="legend">
|
||||
<img src="http://210.77.68.250:8080/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=40&HEIGHT=30&LAYER=baoji:bj_boundary_and_station_group&STYLES=baoji:county_boundary,baoji:county_boundary,baoji:station_point,grid">
|
||||
</div>
|
||||
{# <div class="legend">#}
|
||||
{# <img src="http://210.77.68.250:8080/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=40&HEIGHT=30&LAYER=baoji:bj_boundary_and_station_group&STYLES=baoji:county_boundary,baoji:county_boundary,baoji:station_point,grid">#}
|
||||
{# </div>#}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue