环保功能修改
This commit is contained in:
parent
165156aff1
commit
d6c9ee2580
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 2.2.8 on 2022-10-31 16:13
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('enp', '0027_auto_20220902_1005'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='drain',
|
||||||
|
name='need_predict',
|
||||||
|
field=models.BooleanField(default=True, verbose_name='是否需要预测'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 2.2.8 on 2022-10-31 17:07
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('enp', '0028_drain_need_predict'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='drain',
|
||||||
|
name='need_predict',
|
||||||
|
field=models.IntegerField(default=1, verbose_name='是否需要预测'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -106,6 +106,7 @@ class Drain(CommonModel):
|
||||||
number = models.CharField('编号', max_length=100,null=True, blank=True)
|
number = models.CharField('编号', max_length=100,null=True, blank=True)
|
||||||
name = models.CharField('名称', max_length=100,null=True, blank=True)
|
name = models.CharField('名称', max_length=100,null=True, blank=True)
|
||||||
location = JSONField('点位坐标', null=True, blank=True)
|
location = JSONField('点位坐标', null=True, blank=True)
|
||||||
|
need_predict = models.IntegerField('是否需要预测', default=1)
|
||||||
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
|
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
|
||||||
|
|
||||||
class GasEmit(CommonModel):
|
class GasEmit(CommonModel):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div style="padding: 10px;" id="fulldiv">
|
<div style="padding: 10px;" id="fulldiv">
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$.get('/api/enp/drain/combobox/', function (res) {
|
$.get('/api/enp/drain/combobox/?need_predict=1', function (res) {
|
||||||
for (var i = 0; i < res.length; i++) {
|
for (var i = 0; i < res.length; i++) {
|
||||||
var drain = res[i]
|
var drain = res[i]
|
||||||
var panelId = 'panel' + res[i]['id']
|
var panelId = 'panel' + res[i]['id']
|
||||||
|
@ -11,17 +11,17 @@
|
||||||
height: 360,
|
height: 360,
|
||||||
title: panelTitle,
|
title: panelTitle,
|
||||||
});
|
});
|
||||||
var div1 = panelId + 'out_smoke';
|
// var div1 = panelId + 'out_smoke';
|
||||||
var div2 = panelId + 'out_so2';
|
var div2 = panelId + 'out_so2';
|
||||||
var div3 = panelId + 'out_particle';
|
var div3 = panelId + 'out_particle';
|
||||||
var div4 = panelId + 'out_nox';
|
var div4 = panelId + 'out_nox';
|
||||||
$('#' + panelId).append(
|
$('#' + panelId).append(
|
||||||
'<div style="float:left;width:25%;height:100%" id="' + div1 + '"></div>' +
|
// '<div style="float:left;width:25%;height:100%" id="' + div1 + '"></div>' +
|
||||||
'<div style="float:left;width:25%;height:100%" id="' + div2 + '"></div>' +
|
'<div style="float:left;width:33%;height:100%" id="' + div2 + '"></div>' +
|
||||||
'<div style="float:left;width:25%;height:100%" id="' + div3 + '"></div>' +
|
'<div style="float:left;width:33%;height:100%" id="' + div3 + '"></div>' +
|
||||||
'<div style="float:left;width:25%;height:100%" id="' + div4 + '"></div>'
|
'<div style="float:left;width:33%;height:100%" id="' + div4 + '"></div>'
|
||||||
)
|
)
|
||||||
initMap(div1, 'out_smoke', res[i]['id'], '标态干烟气量', 'Nm3/h');
|
// initMap(div1, 'out_smoke', res[i]['id'], '标态干烟气量', 'Nm3/h');
|
||||||
initMap(div2, 'out_so2', res[i]['id'], '二氧化硫', 'mg/m3');
|
initMap(div2, 'out_so2', res[i]['id'], '二氧化硫', 'mg/m3');
|
||||||
initMap(div3, 'out_particle', res[i]['id'], '颗粒物', 'mg/m3');
|
initMap(div3, 'out_particle', res[i]['id'], '颗粒物', 'mg/m3');
|
||||||
initMap(div4, 'out_nox', res[i]['id'], '氮氧化物', 'mg/m3');
|
initMap(div4, 'out_nox', res[i]['id'], '氮氧化物', 'mg/m3');
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
option.series[0].data = ydata
|
option.series[0].data = ydata
|
||||||
option.series[0].markArea.data = [ [{
|
option.series[0].markArea.data = [ [{
|
||||||
name: '预测区',
|
name: '预测区',
|
||||||
xAxis: leng-3
|
xAxis: leng-2
|
||||||
}, {
|
}, {
|
||||||
xAxis: leng-1
|
xAxis: leng-1
|
||||||
}] ]
|
}] ]
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
}, {
|
}, {
|
||||||
gt: leng-3,
|
gt: leng-3,
|
||||||
lte: leng-2,
|
lte: leng-2,
|
||||||
color: 'red'
|
color: 'green'
|
||||||
}, {
|
}, {
|
||||||
gt: leng-2,
|
gt: leng-2,
|
||||||
color: 'red'
|
color: 'red'
|
||||||
|
|
|
@ -29,6 +29,12 @@
|
||||||
<input name="name" data-options="label:'排放口名称'" class="easyui-textbox" style="width:300px;"
|
<input name="name" data-options="label:'排放口名称'" class="easyui-textbox" style="width:300px;"
|
||||||
required></input>
|
required></input>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-bottom:10px">
|
||||||
|
<select class="easyui-combobox" name="need_predict" label="是否预测" style="width:300px;">
|
||||||
|
<option value=1>是</option>
|
||||||
|
<option value=0>否</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="saveDrain()">保存</a>
|
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="saveDrain()">保存</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -117,6 +123,7 @@
|
||||||
{ field: 'id', title: 'ID', hidden: true },
|
{ field: 'id', title: 'ID', hidden: true },
|
||||||
{ field: 'number', title: '排放口编号', width: 100 },
|
{ field: 'number', title: '排放口编号', width: 100 },
|
||||||
{ field: 'name', title: '排放口名称', width: 100 },
|
{ field: 'name', title: '排放口名称', width: 100 },
|
||||||
|
{ field: 'need_predict', title: '是否预测', width: 80 },
|
||||||
]],
|
]],
|
||||||
onClickRow: function (index, row) {
|
onClickRow: function (index, row) {
|
||||||
$('#gasEmitTable').datagrid({
|
$('#gasEmitTable').datagrid({
|
||||||
|
@ -170,7 +177,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
function editDrain(){
|
function editDrain(){
|
||||||
var row = $('#draineTable').datagrid('getSelected');
|
var row = $('#drainTable').datagrid('getSelected');
|
||||||
if(row){
|
if(row){
|
||||||
$('#drainDialog').dialog('open').dialog('setTitle', '编辑排放口').window('center');
|
$('#drainDialog').dialog('open').dialog('setTitle', '编辑排放口').window('center');
|
||||||
$('#drainForm').form('load', row);
|
$('#drainForm').form('load', row);
|
||||||
|
|
13
enp/views.py
13
enp/views.py
|
@ -757,11 +757,14 @@ def ApiDrainq(request, action):
|
||||||
objs = Drain.objects.filter(usecomp=user.usecomp, is_deleted=False,type=20)
|
objs = Drain.objects.filter(usecomp=user.usecomp, is_deleted=False,type=20)
|
||||||
total = objs.count()
|
total = objs.count()
|
||||||
startnum, endnum = fenye(request)
|
startnum, endnum = fenye(request)
|
||||||
objs = objs.order_by('id')[startnum:endnum].values('id', 'number', 'name')
|
objs = objs.order_by('id')[startnum:endnum].values('id', 'number', 'name', 'need_predict')
|
||||||
return HttpResponse(transjson(total, objs), content_type="application/json")
|
return HttpResponse(transjson(total, objs), content_type="application/json")
|
||||||
elif action == 'combobox':
|
elif action == 'combobox':
|
||||||
objs = Drain.objects.filter(usecomp=user.usecomp, is_deleted=False).order_by('id')
|
objs = Drain.objects.filter(usecomp=user.usecomp, is_deleted=False, type=20).order_by('id')
|
||||||
data = objs.values('id', 'number', 'name')
|
need_predict = request.GET.get('need_predict', False)
|
||||||
|
if need_predict:
|
||||||
|
objs = objs.filter(need_predict=need_predict)
|
||||||
|
data = objs.values('id', 'number', 'name', 'need_predict')
|
||||||
return JsonResponse(list(data), safe=False)
|
return JsonResponse(list(data), safe=False)
|
||||||
elif action == 'create':
|
elif action == 'create':
|
||||||
data = json.loads(request.body.decode('utf-8'))
|
data = json.loads(request.body.decode('utf-8'))
|
||||||
|
@ -769,6 +772,7 @@ def ApiDrainq(request, action):
|
||||||
obj.number = data['number']
|
obj.number = data['number']
|
||||||
obj.type = 20
|
obj.type = 20
|
||||||
obj.name = data['name']
|
obj.name = data['name']
|
||||||
|
obj.need_predict = data['need_predict']
|
||||||
obj.create_by = user
|
obj.create_by = user
|
||||||
obj.update_by = user
|
obj.update_by = user
|
||||||
obj.usecomp = user.usecomp
|
obj.usecomp = user.usecomp
|
||||||
|
@ -785,6 +789,7 @@ def ApiDrainq(request, action):
|
||||||
obj.number = data['number']
|
obj.number = data['number']
|
||||||
obj.type = 20
|
obj.type = 20
|
||||||
obj.name = data['name']
|
obj.name = data['name']
|
||||||
|
obj.need_predict = data['need_predict']
|
||||||
obj.update_by=user
|
obj.update_by=user
|
||||||
obj.save()
|
obj.save()
|
||||||
return JsonResponse({"code":1})
|
return JsonResponse({"code":1})
|
||||||
|
@ -964,7 +969,7 @@ def ApiGasPredict(request, element, drainId):
|
||||||
.order_by('-create_time')[0:5].values_list(element, flat=True))
|
.order_by('-create_time')[0:5].values_list(element, flat=True))
|
||||||
element_list.reverse()
|
element_list.reverse()
|
||||||
if len(element_list)>=3:
|
if len(element_list)>=3:
|
||||||
result = GM11(np.array(element_list), 3)
|
result = GM11(np.array(element_list), 1)
|
||||||
element_list.extend(result['predict']['value'])
|
element_list.extend(result['predict']['value'])
|
||||||
ret = {"code":1, "data":[round(i,2) for i in element_list]}
|
ret = {"code":1, "data":[round(i,2) for i in element_list]}
|
||||||
return JsonResponse(ret)
|
return JsonResponse(ret)
|
||||||
|
|
|
@ -233,7 +233,7 @@ desired effect
|
||||||
<footer class="main-footer">
|
<footer class="main-footer">
|
||||||
<!-- To the right -->
|
<!-- To the right -->
|
||||||
<div class="pull-right hidden-xs">
|
<div class="pull-right hidden-xs">
|
||||||
企业安全生产管理系统集团后台
|
企业环保管理系统集团后台
|
||||||
</div>
|
</div>
|
||||||
<!-- Default to the left -->
|
<!-- Default to the left -->
|
||||||
<strong>Copyright © 2019 <a href="https://ctc.ac.cn">国检集团</a>.</strong> 版权所有.
|
<strong>Copyright © 2019 <a href="https://ctc.ac.cn">国检集团</a>.</strong> 版权所有.
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- /.login-logo -->
|
<!-- /.login-logo -->
|
||||||
<div class="login-box-body">
|
<div class="login-box-body">
|
||||||
<p class="login-box-msg">企业安全生产管理系统</p>
|
<p class="login-box-msg">企业环保管理系统</p>
|
||||||
|
|
||||||
<form action="{% url 'groups_login' %}" method="post">
|
<form action="{% url 'groups_login' %}" method="post">
|
||||||
{% if groups_form.captcha.errors %}
|
{% if groups_form.captcha.errors %}
|
||||||
|
|
|
@ -1466,7 +1466,7 @@ function bindmap9(x) {
|
||||||
myChart9 = echarts.init(document.getElementById(x));
|
myChart9 = echarts.init(document.getElementById(x));
|
||||||
myChart9.setOption(option = {
|
myChart9.setOption(option = {
|
||||||
legend: {
|
legend: {
|
||||||
data: ['隐患', '培训', '演练', '观察', '事件']
|
data: ['隐患', '培训', '演练']
|
||||||
},
|
},
|
||||||
toolbox: {
|
toolbox: {
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -1516,17 +1516,7 @@ function bindmap9(x) {
|
||||||
name: '演练',
|
name: '演练',
|
||||||
type:'bar',
|
type:'bar',
|
||||||
data: data.演练
|
data: data.演练
|
||||||
},
|
}
|
||||||
{
|
|
||||||
name: '观察',
|
|
||||||
type:'bar',
|
|
||||||
data: data.观察
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '事件',
|
|
||||||
type:'bar',
|
|
||||||
data: data.事件
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
|
@ -596,49 +596,49 @@ function jsonSort(jsonObj) {
|
||||||
function mapupdate() {
|
function mapupdate() {
|
||||||
if ($('#mapshowinput').length) {
|
if ($('#mapshowinput').length) {
|
||||||
source.clear()
|
source.clear()
|
||||||
$.get('/api/mapshow?a=risk', function (res) {
|
// $.get('/api/mapshow?a=risk', function (res) {
|
||||||
for (let i = 0, len = res.length; i < len; i++) {
|
// for (let i = 0, len = res.length; i < len; i++) {
|
||||||
setPolygon(res[i])
|
// setPolygon(res[i])
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
$.get('/api/mapshow?a=trouble', function (res) {
|
// $.get('/api/mapshow?a=trouble', function (res) {
|
||||||
|
|
||||||
for (let i = 0, len = res.length; i < len; i++) {
|
// for (let i = 0, len = res.length; i < len; i++) {
|
||||||
var data = res[i]
|
// var data = res[i]
|
||||||
data.id = data.yhqy__id
|
// data.id = data.yhqy__id
|
||||||
data.num = data.num
|
// data.num = data.num
|
||||||
data.polygon = data.yhqy__polygon
|
// data.polygon = data.yhqy__polygon
|
||||||
data.name = data.yhqy__name
|
// data.name = data.yhqy__name
|
||||||
data.type = 'yh'
|
// data.type = 'yh'
|
||||||
setPoint(data)
|
// setPoint(data)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
$.get('/api/mapshow?a=miss', function (res) {
|
// $.get('/api/mapshow?a=miss', function (res) {
|
||||||
for (let i = 0, len = res.length; i < len; i++) {
|
// for (let i = 0, len = res.length; i < len; i++) {
|
||||||
var data = res[i]
|
// var data = res[i]
|
||||||
data.id = data.missqy__id
|
// data.id = data.missqy__id
|
||||||
data.num = data.num
|
// data.num = data.num
|
||||||
data.polygon = data.missqy__polygon
|
// data.polygon = data.missqy__polygon
|
||||||
data.name = data.missqy__name
|
// data.name = data.missqy__name
|
||||||
data.type = 'ws'
|
// data.type = 'ws'
|
||||||
setPoint(data)
|
// setPoint(data)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
$.get('/api/mapshow?a=operation', function (res) {
|
// $.get('/api/mapshow?a=operation', function (res) {
|
||||||
for (let i = 0, len = res.length; i < len; i++) {
|
// for (let i = 0, len = res.length; i < len; i++) {
|
||||||
var data = res[i]
|
// var data = res[i]
|
||||||
data.id = data.zyqy__id
|
// data.id = data.zyqy__id
|
||||||
data.num = data.num
|
// data.num = data.num
|
||||||
data.polygon = data.zyqy__polygon
|
// data.polygon = data.zyqy__polygon
|
||||||
data.name = data.zyqy__name
|
// data.name = data.zyqy__name
|
||||||
data.type = 'zy'
|
// data.type = 'zy'
|
||||||
data.list = data.zylist
|
// data.list = data.zylist
|
||||||
setPoint(data)
|
// setPoint(data)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
//监测地图,排口获取
|
//监测地图,排口获取
|
||||||
$.get('/api/enp/draindt/allmap', function (res) {
|
$.get('/api/enp/draindt/allmap', function (res) {
|
||||||
console.log(res);
|
console.log(res)
|
||||||
for (let i = 0; i < res.length; i++) {
|
for (let i = 0; i < res.length; i++) {
|
||||||
|
|
||||||
var data = res[i]
|
var data = res[i]
|
||||||
|
@ -646,8 +646,8 @@ function mapupdate() {
|
||||||
data.number = data.number
|
data.number = data.number
|
||||||
data.location = data.location
|
data.location = data.location
|
||||||
data.name = data.name
|
data.name = data.name
|
||||||
data.type = 'pk'
|
data.type2 = 'pk'
|
||||||
setPoint(data)
|
setPointOnly(data)
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -485,6 +485,7 @@
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
src = '/static/safesite/mystatic/images/icon1.png'
|
src = '/static/safesite/mystatic/images/icon1.png'
|
||||||
|
anchor = [0.9, 50]
|
||||||
}
|
}
|
||||||
return new ol.style.Style({
|
return new ol.style.Style({
|
||||||
/**{olx.style.IconOptions}类型*/
|
/**{olx.style.IconOptions}类型*/
|
||||||
|
@ -527,6 +528,17 @@
|
||||||
pointFeature.setStyle(createPointStyle(pointFeature));
|
pointFeature.setStyle(createPointStyle(pointFeature));
|
||||||
source.addFeature(pointFeature)
|
source.addFeature(pointFeature)
|
||||||
}
|
}
|
||||||
|
function setPointOnly(i) {
|
||||||
|
var pointFeature = new ol.Feature({
|
||||||
|
geometry: new ol.geom.Point(i.location),
|
||||||
|
id: i.id,
|
||||||
|
name: i.name,
|
||||||
|
type: i.type2,
|
||||||
|
num: i.number
|
||||||
|
});
|
||||||
|
pointFeature.setStyle(createPointStyle(pointFeature));
|
||||||
|
source.addFeature(pointFeature)
|
||||||
|
}
|
||||||
function setPolygon(i) {
|
function setPolygon(i) {
|
||||||
var polygonFeature = new ol.Feature({
|
var polygonFeature = new ol.Feature({
|
||||||
geometry: new ol.geom.Polygon(i.polygon),
|
geometry: new ol.geom.Polygon(i.polygon),
|
||||||
|
|
|
@ -386,46 +386,46 @@
|
||||||
function updatepo() {
|
function updatepo() {
|
||||||
if ($('#mapshowinput').length) {
|
if ($('#mapshowinput').length) {
|
||||||
source.clear()
|
source.clear()
|
||||||
$.get('/api/mapshow?a=risk', function (res) {
|
// $.get('/api/mapshow?a=risk', function (res) {
|
||||||
for (let i = 0, len = res.length; i < len; i++) {
|
// for (let i = 0, len = res.length; i < len; i++) {
|
||||||
setPolygon(res[i])
|
// setPolygon(res[i])
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
$.get('/api/mapshow?a=trouble', function (res) {
|
// $.get('/api/mapshow?a=trouble', function (res) {
|
||||||
for (let i = 0, len = res.length; i < len; i++) {
|
// for (let i = 0, len = res.length; i < len; i++) {
|
||||||
var data = res[i]
|
// var data = res[i]
|
||||||
data.id = data.yhqy__id
|
// data.id = data.yhqy__id
|
||||||
data.num = data.num
|
// data.num = data.num
|
||||||
data.polygon = data.yhqy__polygon
|
// data.polygon = data.yhqy__polygon
|
||||||
data.name = data.yhqy__name
|
// data.name = data.yhqy__name
|
||||||
data.type = 'yh'
|
// data.type = 'yh'
|
||||||
setPoint(data)
|
// setPoint(data)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
$.get('/api/mapshow?a=miss', function (res) {
|
// $.get('/api/mapshow?a=miss', function (res) {
|
||||||
for (let i = 0, len = res.length; i < len; i++) {
|
// for (let i = 0, len = res.length; i < len; i++) {
|
||||||
var data = res[i]
|
// var data = res[i]
|
||||||
data.id = data.missqy__id
|
// data.id = data.missqy__id
|
||||||
data.num = data.num
|
// data.num = data.num
|
||||||
data.polygon = data.missqy__polygon
|
// data.polygon = data.missqy__polygon
|
||||||
data.name = data.missqy__name
|
// data.name = data.missqy__name
|
||||||
data.type = 'ws'
|
// data.type = 'ws'
|
||||||
setPoint(data)
|
// setPoint(data)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
$.get('/api/mapshow?a=operation', function (res) {
|
// $.get('/api/mapshow?a=operation', function (res) {
|
||||||
for (let i = 0, len = res.length; i < len; i++) {
|
// for (let i = 0, len = res.length; i < len; i++) {
|
||||||
var data = res[i]
|
// var data = res[i]
|
||||||
data.id = data.zyqy__id
|
// data.id = data.zyqy__id
|
||||||
data.num = data.num
|
// data.num = data.num
|
||||||
data.polygon = data.zyqy__polygon
|
// data.polygon = data.zyqy__polygon
|
||||||
data.name = data.zyqy__name
|
// data.name = data.zyqy__name
|
||||||
data.type = 'zy'
|
// data.type = 'zy'
|
||||||
data.list = data.zylist
|
// data.list = data.zylist
|
||||||
popuplist.push(data)
|
// popuplist.push(data)
|
||||||
setPoint(data)
|
// setPoint(data)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Updatepoint = setInterval(updatepo, 1000 * 60 * 5)
|
Updatepoint = setInterval(updatepo, 1000 * 60 * 5)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<title>ctc安全生产管理系统</title>
|
<title>ctc环保管理系统</title>
|
||||||
<link rel="icon" href="/media/favicon.ico" type="image/x-icon" />
|
<link rel="icon" href="/media/favicon.ico" type="image/x-icon" />
|
||||||
<link rel="stylesheet" type="text/css" href="/static/safesite/mystatic/css/loading.css">
|
<link rel="stylesheet" type="text/css" href="/static/safesite/mystatic/css/loading.css">
|
||||||
<link rel="stylesheet" type="text/css" href="/static/safesite/easyui/themes/default/easyui.css">
|
<link rel="stylesheet" type="text/css" href="/static/safesite/easyui/themes/default/easyui.css">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<title>ctc安全生产管理系统</title>
|
<title>ctc环保管理系统</title>
|
||||||
<link rel="icon" href="/static/safesite/favicon.ico" type="image/x-icon" />
|
<link rel="icon" href="/static/safesite/favicon.ico" type="image/x-icon" />
|
||||||
<link rel="stylesheet" type="text/css" href="/static/safesite/mystatic/css/loading.css">
|
<link rel="stylesheet" type="text/css" href="/static/safesite/mystatic/css/loading.css">
|
||||||
<link rel="stylesheet" type="text/css" href="/static/safesite/easyui/themes/default/easyui.css">
|
<link rel="stylesheet" type="text/css" href="/static/safesite/easyui/themes/default/easyui.css">
|
||||||
|
@ -116,12 +116,12 @@
|
||||||
<button style="margin: 15px;background-color: transparent;border: 0;color: white;cursor: pointer;"
|
<button style="margin: 15px;background-color: transparent;border: 0;color: white;cursor: pointer;"
|
||||||
onclick="javascript:$('#tt').tabs('select',0)"><span
|
onclick="javascript:$('#tt').tabs('select',0)"><span
|
||||||
style="font-size:24px">{{companyname}}</span><br /><span
|
style="font-size:24px">{{companyname}}</span><br /><span
|
||||||
style="font-size:20px">安全生产管理系统</span></button>
|
style="font-size:20px">环保管理系统</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="menuTreediv" data-options="region:'west'" style="width: 150px; background-color: #ffffff;">
|
<div id="menuTreediv" data-options="region:'west'" style="width: 180px; background-color: #ffffff;">
|
||||||
<!-- <div class="divMune">
|
<!-- <div class="divMune">
|
||||||
<img src="/static/safesite/mystatic/images/fanhuiBut.png"
|
<img src="/static/safesite/mystatic/images/fanhuiBut.png"
|
||||||
style="float: right;width:20px;height:20px;text-align: center;margin-top: 10px;margin-right: 10px;"
|
style="float: right;width:20px;height:20px;text-align: center;margin-top: 10px;margin-right: 10px;"
|
||||||
|
@ -334,7 +334,7 @@
|
||||||
}
|
}
|
||||||
$.get('menutree', function (data) {
|
$.get('menutree', function (data) {
|
||||||
var data = convertmenu(data)
|
var data = convertmenu(data)
|
||||||
data[0]['state'] = 'open'
|
// data[0]['state'] = 'open'
|
||||||
$('#menuTree').sidemenu({
|
$('#menuTree').sidemenu({
|
||||||
data: data,
|
data: data,
|
||||||
border: false,
|
border: false,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>安全生产管理系统</title>
|
<title>环保管理系统</title>
|
||||||
<link rel="icon" href="/static/safesite/favicon.ico" type="image/x-icon" />
|
<link rel="icon" href="/static/safesite/favicon.ico" type="image/x-icon" />
|
||||||
<meta name="description" content="particles.js is a lightweight JavaScript library for creating particles.">
|
<meta name="description" content="particles.js is a lightweight JavaScript library for creating particles.">
|
||||||
<meta name="author" content="Vincent Garreau" />
|
<meta name="author" content="Vincent Garreau" />
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
|
|
||||||
<div class="login" style="right:10%">
|
<div class="login" style="right:10%">
|
||||||
<div class="login-top">
|
<div class="login-top">
|
||||||
企业安全生产管理系统
|
企业环保管理系统
|
||||||
</div>
|
</div>
|
||||||
<form id="dlform" action="{% url 'login' %}" method="post">
|
<form id="dlform" action="{% url 'login' %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<div style="margin-left: 10px;margin-right:10px;overflow: hidden;">
|
<div style="margin-left: 10px;margin-right:10px;overflow: hidden;">
|
||||||
<div style="width:100%;height:300px;padding: 20px;">
|
<!-- <div style="width:100%;height:300px;padding: 20px;">
|
||||||
<div id="map1div" style="width: 33%; height:100%;float:left;"></div>
|
<div id="map1div" style="width: 33%; height:100%;float:left;"></div>
|
||||||
<div id="map2div" style="width: 66%; height:100%;float:left;"></div>
|
<div id="map2div" style="width: 66%; height:100%;float:left;"></div>
|
||||||
</div>
|
</div> -->
|
||||||
<div style="width:100%">
|
<div style="width:100%">
|
||||||
|
|
||||||
<div style="width:100%;height:160px;">
|
<div style="width:100%;height:140px;">
|
||||||
<div style="width: 19.5%;
|
<div style="width: 30%;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 0.5%;
|
margin-left: 0.5%;
|
||||||
float: left;">
|
float: left;">
|
||||||
|
@ -56,7 +56,7 @@ float: left;">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 19.5%;
|
<div style="width: 30%;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 0.5%;
|
margin-left: 0.5%;
|
||||||
float: left;">
|
float: left;">
|
||||||
|
@ -105,7 +105,7 @@ float: left;">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 19.5%;
|
<div style="width: 30%;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 0.5%;
|
margin-left: 0.5%;
|
||||||
float: left;">
|
float: left;">
|
||||||
|
@ -155,113 +155,12 @@ float: left;">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 19.5%;
|
|
||||||
position: relative;
|
|
||||||
margin-left: 0.5%;
|
|
||||||
float: left;">
|
|
||||||
<div style="border-radius: 5px; display: block; margin: 10px; overflow:hidden;color: #FFFFFF; background-color: #ffb848;">
|
|
||||||
<div style="width: 80px;
|
|
||||||
height: 50px;
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
padding-top: 10px;
|
|
||||||
padding-left: 5px;
|
|
||||||
margin-bottom: 18px;
|
|
||||||
font-size: 35px;
|
|
||||||
line-height: 35px;">
|
|
||||||
<img src="/static/safesite/mystatic/images/xwgc.png" style="width:80%;text-align: center;height:90%"
|
|
||||||
id="headimg" />
|
|
||||||
</div>
|
|
||||||
<div style=" position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
padding-right: 15px;">
|
|
||||||
<div style="padding-top: 10px;
|
|
||||||
text-align: right;
|
|
||||||
font-size: 32px;
|
|
||||||
line-height: 36px;
|
|
||||||
letter-spacing: -1px;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
font-weight: 300;" id="xwData">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right;
|
|
||||||
font-size: 15px;
|
|
||||||
padding-top: 5px;">
|
|
||||||
本月行为观察
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a url="observehtml" value="listall" style="background-color: #cb871b; clear: both;
|
|
||||||
display: block;
|
|
||||||
padding: 5px 10px 5px 10px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: 300;
|
|
||||||
font-size: 11px;
|
|
||||||
color: #fff;
|
|
||||||
opacity: 0.7;height: 20px;cursor: pointer;" title="行为观察" onclick="changehref(this)">
|
|
||||||
点击查看全部
|
|
||||||
<i style="background-position: -27px -10px;width: 14px;
|
|
||||||
height: 14px; vertical-align: top;background-repeat: no-repeat;margin-top: 4px;
|
|
||||||
float: right;background-image: url(/static/safesite/mystatic/images/syncfusion-icons-white.png);"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div style="width: 19.5%;
|
|
||||||
position: relative;
|
|
||||||
margin-left: 0.5%;
|
|
||||||
float: left;">
|
|
||||||
<div style="border-radius: 5px; display: block; margin: 10px; overflow:hidden;color: #FFFFFF; background-color: #ec2a3b;">
|
|
||||||
<div style="width: 80px;
|
|
||||||
height: 50px;
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
padding-top: 10px;
|
|
||||||
padding-left: 10px;
|
|
||||||
margin-bottom: 18px;
|
|
||||||
font-size: 35px;
|
|
||||||
line-height: 35px;">
|
|
||||||
<img src="/static/safesite/mystatic/images/wssj.png" style="width:80%;text-align: center;height:90%"
|
|
||||||
id="headimg" />
|
|
||||||
</div>
|
|
||||||
<div style=" position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
padding-right: 15px;">
|
|
||||||
<div style="padding-top: 10px;
|
|
||||||
text-align: right;
|
|
||||||
font-size: 32px;
|
|
||||||
line-height: 36px;
|
|
||||||
letter-spacing: -1px;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
font-weight: 300;" id="wsData">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right;
|
|
||||||
font-size: 15px;
|
|
||||||
padding-top: 5px;">
|
|
||||||
本月未遂事件
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a url="misshtml" value="listall" style="background-color: #cb1b1b; clear: both;
|
|
||||||
display: block;
|
|
||||||
padding: 5px 10px 5px 10px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: 300;
|
|
||||||
font-size: 11px;
|
|
||||||
color: #fff;
|
|
||||||
opacity: 0.7;height: 20px;" title="未遂事件" onclick="changehref(this)">
|
|
||||||
点击查看全部
|
|
||||||
<i style="background-position: -27px -10px;width: 14px;
|
|
||||||
height: 14px; vertical-align: top;background-repeat: no-repeat;margin-top: 4px;
|
|
||||||
float: right;background-image: url(/static/safesite/mystatic/images/syncfusion-icons-white.png);"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id = 'panelxdiv' style="width:98%;margin-left:1%;height:800px;" hidden=true>
|
||||||
|
<div id="panelx" class="easyui-panel" data-options="iconCls:'fa-bar-chart'" >
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="width:100%;height:600px">
|
<div style="width:100%;height:600px">
|
||||||
|
|
||||||
|
@ -330,11 +229,8 @@ float: left;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id = 'panelxdiv' style="width:98%;margin-left:1%;height:800px;" hidden=true>
|
|
||||||
<div id="panelx" class="easyui-panel" data-options="iconCls:'fa-bar-chart'" >
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -350,8 +246,8 @@ float: left;">
|
||||||
document.getElementById("yhData").innerHTML = data.yhnum;
|
document.getElementById("yhData").innerHTML = data.yhnum;
|
||||||
document.getElementById("pxData").innerHTML = data.monthpx;
|
document.getElementById("pxData").innerHTML = data.monthpx;
|
||||||
document.getElementById("ylData").innerHTML = data.ylnum;
|
document.getElementById("ylData").innerHTML = data.ylnum;
|
||||||
document.getElementById("xwData").innerHTML = data.xwnum;
|
// document.getElementById("xwData").innerHTML = data.xwnum;
|
||||||
document.getElementById("wsData").innerHTML = data.wsnum;
|
// document.getElementById("wsData").innerHTML = data.wsnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -363,22 +259,22 @@ float: left;">
|
||||||
});
|
});
|
||||||
|
|
||||||
//获取相关参数并绘图
|
//获取相关参数并绘图
|
||||||
$.ajax({
|
// $.ajax({
|
||||||
type: "GET",
|
// type: "GET",
|
||||||
url: 'setup?a=setup',
|
// url: 'setup?a=setup',
|
||||||
datatype: 'json',
|
// datatype: 'json',
|
||||||
processData: false,
|
// processData: false,
|
||||||
contentType: false,
|
// contentType: false,
|
||||||
beforeSend: function () { },
|
// beforeSend: function () { },
|
||||||
success: function (data) {
|
// success: function (data) {
|
||||||
$.get('api/tool?a=servertime',function(res){
|
// $.get('api/tool?a=servertime',function(res){
|
||||||
if(res.code==1){
|
// if(res.code==1){
|
||||||
bindmap1('map1div', data,res.year,res.month);
|
// bindmap1('map1div', data,res.year,res.month);
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
bindmap2('map2div', data);
|
// bindmap2('map2div', data);
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% load myfilter %}
|
{% load myfilter %}
|
||||||
|
|
|
@ -130,6 +130,9 @@
|
||||||
else if (data.type == 'zy') {
|
else if (data.type == 'zy') {
|
||||||
html = html + "<p>危险作业数量:" + data.num.toString() + "</p>" + "<p><a href='#' onclick='opendetail(" + data.id.toString() + ")'>查看详情</a></p>"
|
html = html + "<p>危险作业数量:" + data.num.toString() + "</p>" + "<p><a href='#' onclick='opendetail(" + data.id.toString() + ")'>查看详情</a></p>"
|
||||||
}
|
}
|
||||||
|
else if (data.type == 'pk') {
|
||||||
|
html = html + "<p>排口编号:" + data.number+ "</p>" + "<p><a href='#' onclick='opendetail(" + data.id.toString() + ")'>查看详情</a></p>"
|
||||||
|
}
|
||||||
content.innerHTML = html;
|
content.innerHTML = html;
|
||||||
//设置overlay的显示位置
|
//设置overlay的显示位置
|
||||||
overlay.setPosition(e.coordinate);
|
overlay.setPosition(e.coordinate);
|
||||||
|
@ -208,6 +211,7 @@
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
src = '/static/safesite/mystatic/images/icon1.png'
|
src = '/static/safesite/mystatic/images/icon1.png'
|
||||||
|
anchor = [0.9, 50]
|
||||||
}
|
}
|
||||||
return new ol.style.Style({
|
return new ol.style.Style({
|
||||||
/**{olx.style.IconOptions}类型*/
|
/**{olx.style.IconOptions}类型*/
|
||||||
|
@ -249,6 +253,17 @@
|
||||||
pointFeature.setStyle(createPointStyle(pointFeature));
|
pointFeature.setStyle(createPointStyle(pointFeature));
|
||||||
source.addFeature(pointFeature)
|
source.addFeature(pointFeature)
|
||||||
}
|
}
|
||||||
|
function setPointOnly(i) {
|
||||||
|
var pointFeature = new ol.Feature({
|
||||||
|
geometry: new ol.geom.Point(i.location),
|
||||||
|
id: i.id,
|
||||||
|
name: i.name,
|
||||||
|
type: i.type2,
|
||||||
|
number: i.number
|
||||||
|
});
|
||||||
|
pointFeature.setStyle(createPointStyle(pointFeature));
|
||||||
|
source.addFeature(pointFeature)
|
||||||
|
}
|
||||||
function setPolygon(i) {
|
function setPolygon(i) {
|
||||||
var polygonFeature = new ol.Feature({
|
var polygonFeature = new ol.Feature({
|
||||||
geometry: new ol.geom.Polygon(i.polygon),
|
geometry: new ol.geom.Polygon(i.polygon),
|
||||||
|
|
Loading…
Reference in New Issue