Compare commits

...

10 Commits

Author SHA1 Message Date
caoqianming 3a10d48c4d Merge branch 'huanbao' of https://e.coding.net/ctcdevteam/safesite into huanbao 2024-01-25 14:33:26 +08:00
caoqianming 9a36033ac3 feat: 增加recal_yjjs 2024-01-25 14:33:24 +08:00
Li xia 940c85a06d xial1226 2023-12-26 10:05:42 +08:00
caoqianming 81684ffcef fix: 去除隐患分布图 2023-12-23 20:08:33 +08:00
Li xia 81910ee3f4 12/221 2023-12-22 13:39:30 +08:00
Li xia a888509aab 12/22 2023-12-22 11:14:42 +08:00
caoqianming e1ba5ff491 首页修改 2022-11-22 11:19:49 +08:00
caoqianming bf004376de 环保最后修改 2022-11-11 10:03:25 +08:00
caoqianming 2a0a069d38 修改提交 2022-11-02 10:40:38 +08:00
caoqianming d6c9ee2580 环保功能修改 2022-10-31 17:55:12 +08:00
35 changed files with 1396 additions and 618 deletions

View File

@ -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='是否需要预测'),
),
]

View File

@ -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='是否需要预测'),
),
]

View File

@ -0,0 +1,36 @@
# Generated by Django 2.2.8 on 2022-11-01 12:51
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('safesite', '0396_auto_20220304_1648'),
('enp', '0029_auto_20221031_1707'),
]
operations = [
migrations.CreateModel(
name='GasTestEquipment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
('contaminant', models.CharField(max_length=100, verbose_name='污染物')),
('model', models.CharField(max_length=100, verbose_name='仪器型号')),
('state', models.CharField(default='正常', max_length=100, verbose_name='设备状态')),
('remark', models.CharField(max_length=200, verbose_name='备注')),
('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='gastestequipment_create_by', to='safesite.User', verbose_name='创建人')),
('drain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='enp.Drain', verbose_name='关联排放口')),
('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='gastestequipment_update_by', to='safesite.User', verbose_name='最后编辑人')),
('usecomp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='safesite.Partment', verbose_name='所属公司')),
],
options={
'abstract': False,
},
),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.8 on 2023-12-26 08:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('enp', '0030_gastestequipment'),
]
operations = [
migrations.AlterField(
model_name='prevention',
name='preventiontype',
field=models.IntegerField(blank=True, choices=[(1, '废水'), (2, '废气'), (3, '噪声'), (4, '废水治理')], default=1, null=True, verbose_name='防治类型'),
),
]

View File

@ -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):
@ -166,7 +167,8 @@ class Prevention(CommonModel):
type_choices = ( type_choices = (
(1, '废水'), (1, '废水'),
(2, '废气'), (2, '废气'),
(3, '噪声') (3, '噪声'),
(4, '废水治理'),
) )
clfs_choices = ( clfs_choices = (
('1', '自行利用'), ('1', '自行利用'),
@ -265,6 +267,18 @@ class Waterequipment(CommonModel):
jcyqmodel = models.CharField('监测仪器型号', max_length=100, null=True, blank=True) jcyqmodel = models.CharField('监测仪器型号', max_length=100, null=True, blank=True)
note = models.CharField('备注', max_length=500, null=True, blank=True) note = models.CharField('备注', max_length=500, null=True, blank=True)
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司') usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
class GasTestEquipment(CommonModel):
"""
废气检测仪器
"""
drain = models.ForeignKey(Drain, verbose_name='关联排放口', on_delete=models.CASCADE)
contaminant = models.CharField('污染物', max_length=100)
model = models.CharField('仪器型号', max_length=100)
state = models.CharField('设备状态', default='正常', max_length=100)
remark = models.CharField('备注', max_length=200)
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
class Archives(CommonModel): class Archives(CommonModel):
""" """
档案管理 档案管理
@ -279,3 +293,4 @@ class Archives(CommonModel):
note = models.CharField('备注', max_length=500, null=True, blank=True) note = models.CharField('备注', max_length=500, null=True, blank=True)
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, null=True, blank=True,verbose_name='所属公司') usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, null=True, blank=True,verbose_name='所属公司')

View File

@ -331,6 +331,8 @@
function saveArchives(){ function saveArchives(){
var data = $('#arechivesForm').serializeJSON(); var data = $('#arechivesForm').serializeJSON();
data['filepath'] = document.getElementById('url').innerHTML; data['filepath'] = document.getElementById('url').innerHTML;
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: waste_action_url, url: waste_action_url,

View File

@ -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'

View File

@ -0,0 +1,202 @@
<div class="easyui-layout" style="width:100%;height:100%;">
<div data-options="region:'center',title:'废气治理设备表',split:true,border:false" style="height:100%;">
<div id="wpreventionTableBar">
<a onclick="addwprevention()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
<a onclick="ediwprevention()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
<a onclick="delwprevention()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
</div>
<table id="wpreventionTable" style="height:100%"></table>
</div>
</div>
<div id="wpreventionDialog" class="easyui-dialog" style="width:800px;height:600px;padding:20px 25px;"
data-options="resizable:true,modal:true,closed:true,border:false">
<form method="post" id="wpreventionForm">
<input name="id" type="hidden">
<div style="margin-bottom:10px">
<input name="name" data-options="label:'治理设备名称', labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
<input name="number" data-options="label:'编码', labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="type" data-options="label:'设备型号',labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
<input name="cs_name" data-options="label:'参数名称', labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="desig_nnumber" data-options="label:'设计值',labelWidth:100" class="easyui-numberbox" style="width:300px;" ></input>
<input name="em_unit" data-options="label:'单位',labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="start_time" data-options="label:'运行开始时间', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" ></input>
<input name="end_time" data-options="label:'运行结束日期', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="state" data-options="label:'运行状态',labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
<input name="ckll" data-options="label:'出口流量', labelWidth:100" class="easyui-numberbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="wryz" data-options="label:'污染因子',labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
<input name="zlxl" data-options="label:'治理效率', labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="sjly" data-options="label:'数据来源',labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
<input name="pqfx" data-options="label:'排放去向',labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="wncsl" data-options="label:'污泥产生量', labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
<select class="easyui-combobox" data-options="label:'处理方式' " name="clfs" style="width:300px;">
<option value="1">自行利用</option>
<option value="2">委托处置</option>
<option value="3">自行处置</option>
</select>
</div>
<div style="margin-bottom:10px">
<input name="hdl" data-options="label:'耗电量kWh', labelWidth:100" class="easyui-numberbox" style="width:300px;" ></input>
<input name="yjname" data-options="label:'药剂名称',labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="tjtime" data-options="label:'添加时间', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" ></input>
<input name="tjl" data-options="label:'添加量',labelWidth:100" class="easyui-numberbox" style="width:300px;" ></input>
</div>
<div style="text-align: center;">
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="savewprevention()">保存</a>
</div>
</form>
</div>
<script>
var wprevention_action_url = '/api/enp/wtequipment/create/';
$('#wpreventionTable').datagrid({
url: '/api/enp/wtequipment/list/',
rownumbers: true,
singleSelect: true,
striped: true,
method: 'get',
toolbar: '#wpreventionTableBar',
border: false,
columns: [[
{ field: 'id', title: 'ID', hidden: true },
{ field: 'name', title: '治理设备名称', width: 200 },
{ field: 'number', title: '编码', width: 200 },
{ field: 'type', title: '治理设备型号', width: 200 },
{ field: 'cs_name', title: '参数名', width: 200 },
{ field: 'desig_nnumber', title: '设计值', width: 200 },
{ field: 'em_unit', title: '单位', width: 200 },
{ field: 'start_time', title: '运行开始时间', width: 200 },
{ field: 'end_time', title: '运行结束时间', width: 200 },
{ field: 'state', title: '运行状态', width: 200 },
{ field: 'ckll', title: '出口流量', width: 200 },
{ field: 'wryz', title: '污染因子', width: 200 },
{ field: 'zlxl', title: '治理效率', width: 200 },
{ field: 'sjly', title: '数据来源', width: 200 },
{ field: 'pqfx', title: '排放去向', width: 200 },
{ field: 'wncsl', title: '污泥产生量', width: 200 },
{field:'clfs',title:'处理方式', width:200,
formatter: function(value,row,index){
if (value=='1'){
return '自行利用';
}
else if (value=='2') {
return '委托处置';
}
else{
return '自行处置';
}
}
},
{ field: 'hdl', title: '耗电量kWh', width: 200 },
{ field: 'yjname', title: '药剂名称', width: 200 },
{ field: 'tjtime', title: '添加时间', width: 200 },
{ field: 'tjl', title: '添加量', width: 200 },
]],
onClickRow: function (index, row) {
}
});
//新增
function addwprevention() {
$('#wpreventionDialog').dialog('open').dialog('setTitle', '新增治理设备表').window('center');
$('#wpreventionForm').form('clear');
wprevention_action_url = '/api/enp/wtequipment/create/'
}
//保存数据
function savewprevention() {
var data = $('#wpreventionForm').serializeJSON();
$.ajax({
type: "POST",
url: wprevention_action_url,
data: JSON.stringify(data),
datatype: "json",
processData: false,
contentType: "application/json;charset=utf-8",
beforeSend: function () {
return $('#wpreventionForm').form('validate')
},
success: function (data) {
$("#wpreventionTable").datagrid('reload');
$("#wpreventionDialog").dialog("close");
},
});
}
//编辑数据
function ediwprevention(){
var row = $('#wpreventionTable').datagrid('getSelected');
if(row){
$('#wpreventionDialog').dialog('open').dialog('setTitle', '编辑治理设备表').window('center');
$('#wpreventionForm').form('load', row);
wprevention_action_url = '/api/enp/wtequipment/update/'}
else{
$.messager.alert('提示', '请选择一条数据!');
}
}
//删除数据
function delwprevention(){
var row = $('#wpreventionTable').datagrid('getSelected');
if (row) {
$.messager.confirm('提示', '确定删除吗?', function (r) {
if (r) {
var data = { id: row.id }
$.ajax({
type: "POST",
url: '/api/enp/wtequipment/delete/',
data: JSON.stringify(data),
datatype: "json",
beforeSend: function () { },
success: function (data) {
if (data.code == 1) {
$("#wpreventionTable").datagrid('reload');
$("#wpreventionTable").datagrid('reload');
}
else {
$.messager.alert('提示', '操作失败!');
}
},
});
}
});
}
else { $.messager.alert('提示', '请选择一条数据!'); }
}
</script>

View File

@ -0,0 +1,138 @@
<div class="easyui-layout" style="width:100%;height:100%;">
<div data-options="region:'center',split:true,border:false" style="height:100%;">
<div id="gastestequipTableBar">
<a onclick="addwaterequipment()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
<a onclick="ediwaterequipment()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
<a onclick="delwaterequipment()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
</div>
<table id="gastestequipTable" style="height:100%"></table>
</div>
</div>
<div id="gastestequipDialog" class="easyui-dialog" style="width:700px;height:600px;padding:20px 25px;"
data-options="resizable:true,modal:true,closed:true,border:false">
<form method="post" id="gastestequipForm">
<input name="id" type="hidden">
<div style="margin-bottom:10px">
<input name="drain" data-options="label:'排放口', labelWidth:100" class="easyui-textbox" style="width:600px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="contaminant" data-options="label:'污染物',labelWidth:100" class="easyui-textbox" style="width:600px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="model" data-options="label:'仪器型号',labelWidth:100" class="easyui-textbox" style="width:600px;" ></input>
</div>
<div style="margin-bottom:10px">
<select name='state' data-options="label:'设备状态',labelWidth:100" class="easyui-combobox" style="width:600px;"
editable=false>
<option value="">请选择</option>
<option value="1">正常</option>
<option value="0">异常</option>
</select>
</div>
<div style="margin-bottom:10px">
<input name="remark" data-options="label:'备注',labelWidth:100" class="easyui-textbox" style="width:600px;" ></input>
</div>
<div style="text-align: center;">
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="savegastestequip()">保存</a>
</div>
</form>
</div>
<script>
var gastestequip_action_url = '/api/enp/gastestequipment/create/';
$('#gastestequipTable').datagrid({
url: '/api/enp/gastestequipment/list/',
rownumbers: true,
singleSelect: true,
striped: true,
method: 'get',
toolbar: '#gastestequipTableBar',
border: false,
columns: [[
{ field: 'id', title: 'ID', hidden: true },
{ field: 'drain__name', title: '排放口', width: 200 },
{ field: 'contaminant', title: '污染物', width: 200 },
{ field: 'model', title: '仪器型号', width: 200 },
{ field: 'state', title: '设备状态', width: 200 },
{ field: 'remark', title: '备注', width: 200 },
]],
onClickRow: function (index, row) {
}
});
//新增
function addwaterequipment() {
$('#gastestequipDialog').dialog('open').dialog('setTitle', '新增').window('center');
$('#gastestequipForm').form('clear');
gastestequip_action_url = '/api/enp/gastestequipment/create/'
}
//保存数据
function savegastestequip() {
var data = $('#gastestequipForm').serializeJSON();
$.ajax({
type: "POST",
url: gastestequip_action_url,
data: JSON.stringify(data),
datatype: "json",
processData: false,
contentType: "application/json;charset=utf-8",
beforeSend: function () {
return $('#gastestequipForm').form('validate')
},
success: function (data) {
$("#gastestequipTable").datagrid('reload');
$("#gastestequipDialog").dialog("close");
},
});
}
//编辑数据
function ediwaterequipment(){
var row = $('#gastestequipTable').datagrid('getSelected');
if(row){
$('#gastestequipDialog').dialog('open').dialog('setTitle', '编辑').window('center');
$('#gastestequipForm').form('load', row);
gastestequip_action_url = '/api/enp/gastestequipment/update/'}
else{
$.messager.alert('提示', '请选择一条数据!');
}
}
//删除数据
function delwaterequipment(){
var row = $('#gastestequipTable').datagrid('getSelected');
if (row) {
$.messager.confirm('提示', '确定删除吗?', function (r) {
if (r) {
var data = { id: row.id }
$.ajax({
type: "POST",
url: '/api/enp/gastestequipment/delete/',
data: JSON.stringify(data),
datatype: "json",
beforeSend: function () { },
success: function (data) {
if (data.code == 1) {
$("#gastestequipTable").datagrid('reload');
$("#gastestequipTable").datagrid('reload');
}
else {
$.messager.alert('提示', '操作失败!');
}
},
});
}
});
}
else { $.messager.alert('提示', '请选择一条数据!'); }
}
</script>

View File

@ -29,63 +29,73 @@
<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>
</form> </form>
</div> </div>
<div id="gasEmitDialog" class="easyui-dialog" style="width:400px;height:800px;padding:5px 15px;" <div id="gasEmitDialog" class="easyui-dialog" style="width:700px;height:500px;padding:5px 15px;"
data-options="resizable:true,modal:true,closed:true,border:false"> data-options="resizable:true,modal:true,closed:true,border:false">
<form method="post" id="gasEmitForm"> <form method="post" id="gasEmitForm">
<input name="id" type="hidden"> <input name="id" type="hidden">
<input name="drain" type="hidden" id="gasEmitForm_drain"> <input name="drain" type="hidden" id="gasEmitForm_drain">
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<input name="watch_time" data-options="label:'监测时间', editable:false, labelWidth:120" class="easyui-datetimebox" style="width:300px;" ></input> <input name="watch_time" data-options="label:'监测时间', editable:false, labelWidth:120" class="easyui-datetimebox" style="width:300px;float:left" ></input>
<input name="out_smoke" data-options="label:'出:标态干烟气量', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:right" ></input>
</div> </div>
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<input name="out_smoke" data-options="label:'出:标态干烟气量', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input> <input name="out_o2" data-options="label:'出:氧含量', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:left" ></input>
<input name="out_so2" data-options="label:'出:二氧化硫', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:right" ></input>
</div> </div>
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<input name="out_o2" data-options="label:'出:氧含量', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input> <input name="out_so2_s" data-options="label:'出:二氧化硫:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:left" ></input>
<input name="out_particle" data-options="label:'出:颗粒物', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:right" ></input>
</div> </div>
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<input name="out_so2" data-options="label:'出:二氧化硫', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input> <input name="out_particle_s" data-options="label:'出:颗粒物:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:left" ></input>
<input name="out_nox" data-options="label:'出:氮氧化物', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:right" ></input>
</div> </div>
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<input name="out_so2_s" data-options="label:'出:二氧化硫:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input> <input name="out_nox_s" data-options="label:'出:氮氧化物:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:left" ></input>
<input name="in_smoke" data-options="label:'入:标态干烟气量', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:right" ></input>
</div> </div>
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<input name="out_particle" data-options="label:'出:颗粒物', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input> <input name="in_o2" data-options="label:'入:氧含量', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:left" ></input>
<input name="in_so2" data-options="label:'入:二氧化硫', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:right" ></input>
</div> </div>
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<input name="out_particle_s" data-options="label:'出:颗粒物:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input> <input name="in_so2_s" data-options="label:'入:二氧化硫:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:left" ></input>
<input name="in_particle" data-options="label:'入:颗粒物', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:right" ></input>
</div> </div>
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<input name="out_nox" data-options="label:'出:氮氧化物', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input> <input name="in_particle_s" data-options="label:'入:颗粒物:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:left" ></input>
</div>
<div style="margin-bottom:10px"> <input name="in_nox" data-options="label:'入:氮氧化物', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;float:right" ></input>
<input name="out_nox_s" data-options="label:'出:氮氧化物:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="in_smoke" data-options="label:'入:标态干烟气量', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="in_o2" data-options="label:'入:氧含量', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="in_so2" data-options="label:'入:二氧化硫', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="in_so2_s" data-options="label:'入:二氧化硫:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="in_particle" data-options="label:'入:颗粒物', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="in_particle_s" data-options="label:'入:颗粒物:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input>
</div>
<div style="margin-bottom:10px">
<input name="in_nox" data-options="label:'入:氮氧化物', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input>
</div> </div>
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<input name="in_nox_s" data-options="label:'入:氮氧化物:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input> <input name="in_nox_s" data-options="label:'入:氮氧化物:折标', labelWidth:120, min:0,precision:2" class="easyui-numberbox" style="width:300px;" ></input>
@ -117,6 +127,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 +181,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);

View File

@ -13,8 +13,11 @@ urlpatterns = [
path('detection/', views.HtmlDetection), path('detection/', views.HtmlDetection),
path('fuel/', views.HtmlFuel), path('fuel/', views.HtmlFuel),
path('waterequipment/', views.HtmlWaterequipment), path('waterequipment/', views.HtmlWaterequipment),
path('gastestequipment/', views.HtmlGasTestEquipment),
path('archives/', views.HtmlArchives), path('archives/', views.HtmlArchives),
path('zprevention/', views.HtmlZprevention), path('zprevention/', views.HtmlZprevention),
path('gastequipment/', views.Htmlgastequipment),
] ]

View File

@ -17,15 +17,13 @@ urlpatterns = [
path('facilities/<str:action>/', views.ApiFacilities),#环境设施,生产设施 path('facilities/<str:action>/', views.ApiFacilities),#环境设施,生产设施
path('wprevention/<str:action>/', views.ApiWprevention),#废水防治设施 path('wprevention/<str:action>/', views.ApiWprevention),#废水防治设施
path('gprevention/<str:action>/', views.ApiGprevention),#废水防治设施 path('gprevention/<str:action>/', views.ApiGprevention),#废水防治设施
path('wtequipment/<str:action>/', views.ApiWpreventionequipment),#废气治理设备
path('abnormal/<str:action>/', views.ApiAbnormal),#防治设施异常 path('abnormal/<str:action>/', views.ApiAbnormal),#防治设施异常
path('detection/<str:action>/', views.ApiDetection),#废水污染物检测 path('detection/<str:action>/', views.ApiDetection),#废水污染物检测
path('fuel/<str:action>/', views.ApiFuel),#燃料信息表 path('fuel/<str:action>/', views.ApiFuel),#燃料信息表
path('waterequipment/<str:action>/', views.ApiWaterequipment),#废水监测仪器信息表 path('waterequipment/<str:action>/', views.ApiWaterequipment),#废水监测仪器信息表
path('gastestequipment/<str:action>/', views.ApiGasTestEquipment),#废气监测仪器信息表
path('archives/<str:action>/', views.ApiArchives),#档案管理表 path('archives/<str:action>/', views.ApiArchives),#档案管理表
path('zprevention/<str:action>/', views.ApiZprevention),#噪声防治设施 path('zprevention/<str:action>/', views.ApiZprevention),#噪声防治设施
] ]

View File

@ -5,7 +5,7 @@ from rest_framework.views import APIView
from rest_framework.authentication import BaseAuthentication from rest_framework.authentication import BaseAuthentication
from safesite.models import User,Dickey,Partment from safesite.models import User,Dickey,Partment
from rest_framework.exceptions import AuthenticationFailed from rest_framework.exceptions import AuthenticationFailed
from .models import DWasteHandleRecord, DWasteKeepRecord, DWasteMakeList, DWasteMakeRecord, Drain, GasEmit, NormalWasteRecord, Waste, Facilities,Prevention,abnormal,Detection,Fuel,Waterequipment,Archives from .models import DWasteHandleRecord, DWasteKeepRecord, DWasteMakeList, DWasteMakeRecord, Drain, GasEmit, GasTestEquipment, NormalWasteRecord, Waste, Facilities,Prevention,abnormal,Detection,Fuel,Waterequipment,Archives
from safesite.views import transjson, fenye, MyEncoder from safesite.views import transjson, fenye, MyEncoder
from django.http import HttpResponse, JsonResponse from django.http import HttpResponse, JsonResponse
import json import json
@ -44,12 +44,18 @@ def HtmlFuel(request):
return render(request, 'fuel.html') return render(request, 'fuel.html')
def HtmlWaterequipment(request): def HtmlWaterequipment(request):
return render(request, 'waterequipment.html') return render(request, 'waterequipment.html')
def HtmlGasTestEquipment(request):
return render(request, 'gastestequipment.html')
def HtmlGprevention(request): def HtmlGprevention(request):
return render(request, 'gprevention.html') return render(request, 'gprevention.html')
def HtmlArchives(request): def HtmlArchives(request):
return render(request, 'archives.html') return render(request, 'archives.html')
def HtmlZprevention(request): def HtmlZprevention(request):
return render(request, 'zprevention.html') return render(request, 'zprevention.html')
def Htmlgastequipment(request):
return render(request, 'gastequipment.html')
# 转换为combobox所用string # 转换为combobox所用string
@ -296,6 +302,9 @@ def ApiGprevention(request, action):
obj = Prevention.objects.get(id=data['id']) obj = Prevention.objects.get(id=data['id'])
obj.delete() obj.delete()
return JsonResponse({"code":1}) return JsonResponse({"code":1})
#废水防治设施 #废水防治设施
def ApiWprevention(request, action): def ApiWprevention(request, action):
user = User.objects.get(userid=request.session['userid']) user = User.objects.get(userid=request.session['userid'])
@ -370,6 +379,80 @@ def ApiWprevention(request, action):
obj = Prevention.objects.get(id=data['id']) obj = Prevention.objects.get(id=data['id'])
obj.delete() obj.delete()
return JsonResponse({"code":1}) return JsonResponse({"code":1})
def ApiWpreventionequipment(request, action):
user = User.objects.get(userid=request.session['userid'])
if action == 'list':
objs = Prevention.objects.filter(usecomp=user.usecomp, is_deleted=False,preventiontype=4)
total = objs.count()
startnum, endnum = fenye(request)
objs = objs.order_by('-create_time')[startnum:endnum].values('id', 'name', 'number', 'type', 'preventiontype', 'cs_name',
'desig_nnumber', 'em_unit', 'start_time', 'end_time', 'state', 'ckll', 'wryz', 'zlxl',
'sjly', 'pqfx', 'wncsl', 'clfs','hdl','yjname', 'tjtime', 'tjl')
return HttpResponse(transjson(total, objs), content_type="application/json")
elif action == 'create':
data = json.loads(request.body.decode('utf-8'))
obj = Prevention()
obj.create_by = user
obj.update_by = user
obj.usecomp = user.usecomp
obj.name = data['name']
obj.number = data['number']
obj.preventiontype=4
obj.type = data['type']
obj.cs_name = data['cs_name']
obj.desig_nnumber = data['desig_nnumber']
obj.em_unit = data['em_unit']
obj.start_time = data['start_time']
obj.end_time = data['end_time']
obj.state = data['state']
obj.ckll = data['ckll']
obj.wryz = data['wryz']
obj.zlxl = data['zlxl']
obj.sjly = data['sjly']
obj.pqfx = data['pqfx']
obj.wncsl = data['wncsl']
obj.clfs = data['clfs']
obj.hdl = data['hdl']
obj.yjname = data['yjname']
obj.tjtime = data['tjtime']
obj.tjl = data['tjl']
obj.save()
return JsonResponse({"code":1})
elif action == 'update':
data = json.loads(request.body.decode('utf-8'))
obj = Prevention.objects.get(id=data['id'])
obj.create_by = user
obj.update_by = user
obj.usecomp = user.usecomp
obj.name = data['name']
obj.number = data['number']
obj.preventiontype=4
obj.type = data['type']
obj.cs_name = data['cs_name']
obj.desig_nnumber = data['desig_nnumber']
obj.em_unit = data['em_unit']
obj.start_time = data['start_time']
obj.end_time = data['end_time']
obj.state = data['state']
obj.ckll = data['ckll']
obj.wryz = data['wryz']
obj.zlxl = data['zlxl']
obj.sjly = data['sjly']
obj.pqfx = data['pqfx']
obj.wncsl = data['wncsl']
obj.clfs = data['clfs']
obj.hdl = data['hdl']
obj.yjname = data['yjname']
obj.tjtime = data['tjtime']
obj.tjl = data['tjl']
obj.save()
return JsonResponse({"code":1})
elif action == 'delete':
data = json.loads(request.body.decode('utf-8'))
obj = Prevention.objects.get(id=data['id'])
obj.delete()
return JsonResponse({"code":1})
#防治设施异常 #防治设施异常
def ApiAbnormal(request, action): def ApiAbnormal(request, action):
user = User.objects.get(userid=request.session['userid']) user = User.objects.get(userid=request.session['userid'])
@ -757,11 +840,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 +855,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 +872,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,10 +1052,48 @@ 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)
else: else:
return JsonResponse({"code":0, "msg":'至少需要三条记录'}) return JsonResponse({"code":0, "msg":'至少需要三条记录'})
def ApiGasTestEquipment(request, action):
user = User.objects.get(userid=request.session['userid'])
if action == 'list':
objs = GasTestEquipment.objects.filter(usecomp=user.usecomp, is_deleted=False)
total = objs.count()
startnum, endnum = fenye(request)
objs = objs.order_by('id')[startnum:endnum].values('id', 'drain', 'drain__name', 'contaminant', 'model', 'state', 'remark')
return HttpResponse(transjson(total, objs), content_type="application/json")
elif action == 'create':
data = json.loads(request.body.decode('utf-8'))
obj= GasTestEquipment()
obj.drain = Drain.objects.get(id=data['drain'])
obj.contaminant = data['contaminant']
obj.model = data['model']
obj.state = data['state']
obj.remark = data['remark']
obj.create_by = user
obj.update_by = user
obj.usecomp = user.usecomp
obj.save()
return JsonResponse({"code":1})
elif action == 'delete':
data = json.loads(request.body.decode('utf-8'))
obj = GasTestEquipment.objects.get(id=data['id'])
obj.delete()
return JsonResponse({"code":1})
elif action == 'update':
data = json.loads(request.body.decode('utf-8'))
obj = GasTestEquipment.objects.get(id=data['id'])
obj.contaminant = data['contaminant']
obj.model = data['model']
obj.state = data['state']
obj.remark = data['remark']
obj.update_by=user
obj.save()
return JsonResponse({"code":1})

View File

@ -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 &copy; 2019 <a href="https://ctc.ac.cn">国检集团</a>.</strong> 版权所有. <strong>Copyright &copy; 2019 <a href="https://ctc.ac.cn">国检集团</a>.</strong> 版权所有.

View File

@ -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 %}

View File

@ -37,7 +37,7 @@ ul { margin: 0; padding: 0;}
*zoom: 1; *zoom: 1;
} }
header{width:100%; height: 90px; background: url(../../images/bigdata/bg_top.png) center no-repeat ; text-align: center; font-size: 36px; color: #00f6ff; line-height: 90px; margin: 0 auto;} header{width:100%; height: 90px; background: url(../../images/bigdata/bg_top.png) center no-repeat ; text-align: center; font-size: 36px; color: #00f6ff; line-height: 90px; margin: 0 auto;}
#content{width: 1860px; height: 100%; margin: 20px auto 0 auto;} #content{width: 1460px; height: 100%; margin: 20px auto 0 auto;}
#content .content_left{width: 385px; height: 100%; float: left;} #content .content_left{width: 385px; height: 100%; float: left;}
.content_left .dtuplc{width: 355px; height: 180px; padding: 15px 15px 0 15px; background: url(../../images/bigdata/zuoyi.png) top no-repeat;} .content_left .dtuplc{width: 355px; height: 180px; padding: 15px 15px 0 15px; background: url(../../images/bigdata/zuoyi.png) top no-repeat;}
.dtu{width: 177px; height: 180px; float: left;} .dtu{width: 177px; height: 180px; float: left;}

View File

@ -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.事件
},
] ]
}); });

View File

@ -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)
} }
}) })

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@
</head> </head>
<body> <body>
<header> <header>
企业安全管理数据统计 企业环保管理数据统计
<span id=localtime style=" font-size:14px; position: absolute; right: 30px; top:-20px; "></span> <span id=localtime style=" font-size:14px; position: absolute; right: 30px; top:-20px; "></span>
</header> </header>
<div id="content"> <div id="content">
@ -99,27 +99,7 @@
</table> </table>
</div> </div>
</div> </div>
<div class="content_right">
<div class="report">
<div class="report1">
<p>线下培训</p>
<small>{{px}}条</small>
</div>
<div class="report2">
<p>行为观察</p>
<small>{{xw}} 条</small>
</div>
</div>
<div class="news_report">
<div class="title"><img src="/static/safesite/mystatic/images/bigdata/icon05.png" /> 本月安全状态</div>
<div id="map1div" style="width: 100%; height:100%;float:left;"></div>
</div>
<div class="data_box">
<div class="title"><img src="/static/safesite/mystatic/images/bigdata/icon06.png" /> 预警预测趋势图</div>
<div id="map2div" style="width:100%; height:80%;float:left;"></div>
</div>
</div>
</div>
<!--遮罩层--> <!--遮罩层-->
<div class="bgPop"></div> <div class="bgPop"></div>
<!--弹出框--> <!--弹出框-->
@ -485,6 +465,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 +508,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),

View File

@ -16,7 +16,7 @@
<body> <body>
<header> <header>
企业安全数据显示大屏 企业环保数据显示大屏
</header> </header>
<div class="center_top"> <div class="center_top">
<div id="map" class="map" style="width:100%;height:100%;outline: #4A74A8 solid 0.15em;"> <div id="map" class="map" style="width:100%;height:100%;outline: #4A74A8 solid 0.15em;">
@ -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)

View File

@ -9,7 +9,7 @@
required=true /> required=true />
</div> </div>
<div style="margin-bottom:5px"> <div style="margin-bottom:5px">
<input id="aqcs" class="easyui-textbox" name="aqcs" style="width:480px;height:100px" data-options="label:'安全措施',multiline:true" <input id="aqcs" class="easyui-textbox" name="aqcs" style="width:480px;height:100px" data-options="label:'环保措施',multiline:true"
required=true /> required=true />
</div> </div>
<div style="margin-bottom:5px"> <div style="margin-bottom:5px">

View File

@ -9,7 +9,7 @@
required=true /> required=true />
</div> </div>
<div style="margin-bottom:5px"> <div style="margin-bottom:5px">
<input id="aqcs" class="easyui-textbox" name="aqcs" style="width:480px;height:100px" data-options="label:'安全措施',multiline:true" <input id="aqcs" class="easyui-textbox" name="aqcs" style="width:480px;height:100px" data-options="label:'环保措施',multiline:true"
required=true /> required=true />
</div> </div>
<div style="margin-bottom:5px"> <div style="margin-bottom:5px">

View File

@ -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">

View File

@ -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;"
@ -249,7 +249,9 @@
var headimgurl = $('#userindex').attr('headimgurl'); var headimgurl = $('#userindex').attr('headimgurl');
var issuper = {{ issuper }}; var issuper = {{ issuper }};
if (issuper == 1) { $('#setupb').show(); $('#bindwx').hide() } if (issuper == 1) { $('#setupb').show(); $('#bindwx').hide() }
if ((openid == 0 || openid == 'None') && issuper != 1) { $('#wxdg').dialog(); } else { $('#bindwx').text('解绑微信'); }; if ((openid == 0 || openid == 'None') && issuper != 1) {
//$('#wxdg').dialog();
} else { $('#bindwx').text('解绑微信'); };
if (headimgurl != 0 && headimgurl != 'None' && issuper != 1) { $('#headimg').attr('src', headimgurl); } if (headimgurl != 0 && headimgurl != 'None' && issuper != 1) { $('#headimg').attr('src', headimgurl); }
function logout() { function logout() {
$.messager.confirm('系统提示', '您确定要退出本次登录吗?', function (r) { $.messager.confirm('系统提示', '您确定要退出本次登录吗?', function (r) {
@ -334,7 +336,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,

View File

@ -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 %}

View File

@ -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,10 +229,7 @@ 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>
@ -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 %}

View File

@ -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),
@ -261,9 +276,9 @@
source.addFeature(polygonFeature) source.addFeature(polygonFeature)
} }
function opendetail(id) { function opendetail(id) {
closepopup() //closepopup()
var myw = screen.availWidth * 0.5; //var myw = screen.availWidth * 0.5;
opendg('区域详情', 'html/areadetail?id=' + id, myw) //opendg('区域详情', 'html/areadetail?id=' + id, myw)
} }

View File

@ -112,12 +112,12 @@
<ul id="addImage" class="imgul"></ul> <ul id="addImage" class="imgul"></ul>
<HR width="480px" color='blue' SIZE=1 align='left'> <HR width="480px" color='blue' SIZE=1 align='left'>
</div> </div>
<div class='labeldiv'>请确认以下风险分析和安全措施是否就绪</div> <div class='labeldiv'>请确认以下风险分析和环保措施是否就绪</div>
<div> <div>
<input type="checkbox" name="fxcs" value={{x.id}}><input> <input type="checkbox" name="fxcs" value={{x.id}}><input>
<div> <div>
<p>风险分析:{{x.fxfx}}</p> <p>风险分析:{{x.fxfx}}</p>
<p>安全措施:{{x.aqcs}}</p> <p>环保措施:{{x.aqcs}}</p>
<p>措施类型:{{x.cslx}}</p> <p>措施类型:{{x.cslx}}</p>
</div> </div>
</div> --> </div> -->

View File

@ -50,7 +50,7 @@
</tr> </tr>
{{/each}} {{/each}}
</table> </table>
<div class="labeldiv">风险分析和安全措施</div> <div class="labeldiv">风险分析和环保措施</div>
<table class='detailtable'> <table class='detailtable'>
<thead> <thead>
<tr> <tr>

View File

@ -41,7 +41,7 @@
</table> </table>
</td> </td>
<td> <td>
<table name="" id="partaqytable" class='easyui-datagrid' title="安全员" data-options=" <table name="" id="partaqytable" class='easyui-datagrid' title="环保员" data-options="
rownumbers:true, rownumbers:true,
singleSelect:true, singleSelect:true,
method:'get', method:'get',

View File

@ -206,7 +206,7 @@
var now = new Date(); var now = new Date();
var _year; var _year;
var _month; var _month;
var part=''; var part = '';
var table1v; var table1v;
var table2v; var table2v;
var table3v; var table3v;
@ -239,19 +239,19 @@
$('#month').combobox().combobox('setValue', res.month); $('#month').combobox().combobox('setValue', res.month);
BindZt(); BindZt();
}) })
});
function getDetail(year,month,part){
$.get('api/report?a=detail&year='+year+'&month='+month+'&part='+part,function(res){
if(res.code==1){
$('#yyfxdiv').html(res.data.cause)
$('#jydiv').html(res.data.suggest)
}else{
$('#yyfxdiv').empty()
$('#jydiv').empty()
}
}) });
function getDetail(year, month, part) {
$.get('api/report?a=detail&year=' + year + '&month=' + month + '&part=' + part, function (res) {
if (res.code == 1) {
$('#yyfxdiv').html(res.data.cause)
$('#jydiv').html(res.data.suggest)
} else {
$('#yyfxdiv').empty()
$('#jydiv').empty()
}
})
} }
//编辑分析报告 //编辑分析报告
function reportEdit() { function reportEdit() {
@ -281,7 +281,7 @@
//bindmap3('map3', _year, _month); //bindmap3('map3', _year, _month);
bindmap3_o('map3', { 'year': _year, 'month': _month, 'part': part }) bindmap3_o('map3', { 'year': _year, 'month': _month, 'part': part })
//bindmap4('map4', _year, _month); //bindmap4('map4', _year, _month);
bindmap4_o('map4', { 'year': _year, 'month': _month, 'part': part }) // bindmap4_o('map4', { 'year': _year, 'month': _month, 'part': part })
bindmap5('map5', { 'year': _year, 'month': _month, 'part': part }); bindmap5('map5', { 'year': _year, 'month': _month, 'part': part });
bindmap6('map6', { 'year': _year, 'month': _month, 'part': part }); bindmap6('map6', { 'year': _year, 'month': _month, 'part': part });
bindmapgclx('map7', { 'year': _year, 'month': _month, 'part': part }); bindmapgclx('map7', { 'year': _year, 'month': _month, 'part': part });
@ -293,7 +293,7 @@
bindTable5(part); // 下一级部门应急演练次数 bindTable5(part); // 下一级部门应急演练次数
bindTable6(part); // 下一级部门行为观察次数 bindTable6(part); // 下一级部门行为观察次数
bindTable7(part); // 下一级部门未遂事件次数 bindTable7(part); // 下一级部门未遂事件次数
getDetail(_year,_month,part) getDetail(_year, _month, part)
$('#createdate').html('报告生成时间:' + now.getFullYear() + '年' + (now.getMonth() + 1) + '月' + now.getDate() + '日'); $('#createdate').html('报告生成时间:' + now.getFullYear() + '年' + (now.getMonth() + 1) + '月' + now.getDate() + '日');
} }
// function getDates() { // function getDates() {

View File

@ -4,7 +4,8 @@
<label>起始时间</label><input id="sqssj" name="qssj" class="easyui-datebox" style="width:110px;height:22px" /> <label>起始时间</label><input id="sqssj" name="qssj" class="easyui-datebox" style="width:110px;height:22px" />
<label>结束时间</label><input id="sjssj" name="jssj" class="easyui-datebox" style="width:110px;height:22px" /> <label>结束时间</label><input id="sjssj" name="jssj" class="easyui-datebox" style="width:110px;height:22px" />
<label>发现部门</label><input id="sfxbm" name="fxbm" style="width:200px;height:22px" /> <label>发现部门</label><input id="sfxbm" name="fxbm" style="width:200px;height:22px" />
<a onclick="yhbztsearch()" class='easyui-linkbutton' iconCls='fa-search' plain=true>查询</a></form> <a onclick="yhbztsearch()" class='easyui-linkbutton' iconCls='fa-search' plain=true>查询</a>
</form>
</div> </div>
</div> </div>
<div style="width:100%;height:500px;padding: 20px"> <div style="width:100%;height:500px;padding: 20px">
@ -26,69 +27,74 @@
<div id="yhqst" style="width:100%;height:400px;padding: 20px"> <div id="yhqst" style="width:100%;height:400px;padding: 20px">
</div> </div>
<div style="width: 60%; margin: 0px auto; "> <div style="width: 60%; margin: 0px auto; ">
<table name="" id="fxrpmtable" class='easyui-datagrid' title="隐患发现人排名" data-options=" <table name="" id="fxrpmtable" class='easyui-datagrid' title="隐患发现人排名" data-options="
rownumbers:true, rownumbers:true,
singleSelect:true, singleSelect:true,
striped: true, striped: true,
method:'get', method:'get',
url: 'fxhandle?a=yhfxpm', url: 'fxhandle?a=yhfxpm',
toolbar:'#fxrpmbar'" style="height:400px"> toolbar:'#fxrpmbar'" style="height:400px">
<thead> <thead>
<tr> <tr>
<th data-options="field:'fxr__userid',hidden:true">用户ID</th> <th data-options="field:'fxr__userid',hidden:true">用户ID</th>
<th data-options="field:'fxr__name',align:'right'" width="30%">姓名</th> <th data-options="field:'fxr__name',align:'right'" width="30%">姓名</th>
<th data-options="field:'fxbm__partname',align:'right'" width="40%">所属部门</th> <th data-options="field:'fxbm__partname',align:'right'" width="40%">所属部门</th>
<th data-options="field:'number',align:'right'" width="20%">填报隐患数</th> <th data-options="field:'number',align:'right'" width="20%">填报隐患数</th>
</tr> </tr>
</thead> </thead>
</table> </table>
<div id='fxrpmbar'> <div id='fxrpmbar'>
<form id="fxrpms"> <form id="fxrpms">
<a onclick="fxrpmsearch()" class='easyui-linkbutton' iconCls='fa-search' plain=true>查询</a> <a onclick="fxrpmsearch()" class='easyui-linkbutton' iconCls='fa-search' plain=true>查询</a>
<a onclick="fxrpmexport()" class='easyui-linkbutton' iconCls='fa-upload' plain=true>导出</a> <a onclick="fxrpmexport()" class='easyui-linkbutton' iconCls='fa-upload' plain=true>导出</a>
<div> <div>
<label>发现部门</label><input id="sfxbm2" name="fxbm" style="width:180px;height:22px" /> <label>发现部门</label><input id="sfxbm2" name="fxbm" style="width:180px;height:22px" />
<label>起始时间</label><input id="sqssj" name="qssj" class="easyui-datebox" style="width:80px;height:22px" /> <label>起始时间</label><input id="sqssj" name="qssj" class="easyui-datebox"
<label>结束时间</label><input id="sjssj" name="jssj" class="easyui-datebox" style="width:80px;height:22px" /> style="width:80px;height:22px" />
<label>检查类型</label><input id="sjclx" name="jclx" class="easyui-combobox" style="width:100px;height:22px" data-options=" <label>结束时间</label><input id="sjssj" name="jssj" class="easyui-datebox"
style="width:80px;height:22px" />
<label>检查类型</label><input id="sjclx" name="jclx" class="easyui-combobox" style="width:100px;height:22px"
data-options="
method: 'get', method: 'get',
valueField:'value', valueField:'value',
textField:'text', textField:'text',
url:'getdickey?dicclass=14&a=combobox' url:'getdickey?dicclass=14&a=combobox'
"/> " />
</div> </div>
</form> </form>
</div> </div>
<div style="height:20px"></div> <div style="height:20px"></div>
<table name="" id="zgrpmtable" class='easyui-datagrid' title="隐患整改人排名" data-options=" <table name="" id="zgrpmtable" class='easyui-datagrid' title="隐患整改人排名" data-options="
rownumbers:true, rownumbers:true,
singleSelect:true, singleSelect:true,
striped: true, striped: true,
method:'get', method:'get',
url: 'fxhandle?a=yhzgpm', url: 'fxhandle?a=yhzgpm',
toolbar:'#zgrpmbar'" style="height:400px"> toolbar:'#zgrpmbar'" style="height:400px">
<thead> <thead>
<tr> <tr>
<th data-options="field:'zgr__userid',hidden:true">用户ID</th> <th data-options="field:'zgr__userid',hidden:true">用户ID</th>
<th data-options="field:'zgr__name',align:'right'" width="30%">姓名</th> <th data-options="field:'zgr__name',align:'right'" width="30%">姓名</th>
<th data-options="field:'zgbm__partname',align:'right'" width="40%">所属部门</th> <th data-options="field:'zgbm__partname',align:'right'" width="40%">所属部门</th>
<th data-options="field:'number',align:'right'" width="20%">整改隐患数</th> <th data-options="field:'number',align:'right'" width="20%">整改隐患数</th>
</tr> </tr>
</thead> </thead>
</table> </table>
<div id='zgrpmbar'> <div id='zgrpmbar'>
<form id="zgrpms"> <form id="zgrpms">
<a onclick="zgrpmsearch()" class='easyui-linkbutton' iconCls='fa-search' plain=true>查询</a> <a onclick="zgrpmsearch()" class='easyui-linkbutton' iconCls='fa-search' plain=true>查询</a>
<a onclick="zgrpmexport()" class='easyui-linkbutton' iconCls='fa-upload' plain=true>导出</a> <a onclick="zgrpmexport()" class='easyui-linkbutton' iconCls='fa-upload' plain=true>导出</a>
<div> <div>
<label>整改人</label><input class="easyui-textbox" name="zgr" style="width:80px;height:22px" /> <label>整改人</label><input class="easyui-textbox" name="zgr" style="width:80px;height:22px" />
<label>起始时间</label><input id="sqssj" name="qssj" class="easyui-datebox" style="width:80px;height:22px" /> <label>起始时间</label><input id="sqssj" name="qssj" class="easyui-datebox"
<label>结束时间</label><input id="sjssj" name="jssj" class="easyui-datebox" style="width:80px;height:22px" /> style="width:80px;height:22px" />
</div> <label>结束时间</label><input id="sjssj" name="jssj" class="easyui-datebox"
</form> style="width:80px;height:22px" />
</div> </div>
</form>
</div>
</div> </div>
@ -125,15 +131,15 @@
function yhbztsearch() { function yhbztsearch() {
var querydata = $('#yhbztf').serializeJSON(); var querydata = $('#yhbztf').serializeJSON();
bindmap3_o('yhlbt', querydata) bindmap3_o('yhlbt', querydata)
bindmap4_o('yhpgt', querydata) // bindmap4_o('yhpgt', querydata)
bindmap8('yhztt', querydata) bindmap8('yhztt', querydata)
bindmap7('yhqst',querydata); bindmap7('yhqst', querydata);
} }
var now = new Date(); var now = new Date();
var year = now.getFullYear(); var year = now.getFullYear();
var month = now.getMonth() + 1; var month = now.getMonth() + 1;
bindmap3_o('yhlbt', { 'year': year, 'month': month }); bindmap3_o('yhlbt', { 'year': year, 'month': month });
bindmap4_o('yhpgt', { 'year': year, 'month': month }); // bindmap4_o('yhpgt', { 'year': year, 'month': month });
bindmap7('yhqst'); bindmap7('yhqst');
bindmap8('yhztt'); bindmap8('yhztt');
function fxrpmexport() { function fxrpmexport() {

View File

@ -4,7 +4,7 @@
</div> </div>
<div data-options="region:'center',border:false" style="height:100%;"> <div data-options="region:'center',border:false" style="height:100%;">
<div style="height:50%"> <div style="height:50%">
<table id="fxcstable" style="width:auto;height:100%;" title='风险分析和安全措施'></table> <table id="fxcstable" style="width:auto;height:100%;" title='风险分析和环保措施'></table>
<div id="fxcsbar" style="padding:6px;height:auto"> <div id="fxcsbar" style="padding:6px;height:auto">
{% load myfilter %} {% load myfilter %}
@ -83,7 +83,7 @@
columns: [[ columns: [[
{ field: 'id', title: 'ID', hidden: true }, { field: 'id', title: 'ID', hidden: true },
{ field: 'fxfx', title: '风险分析', width: 40 }, { field: 'fxfx', title: '风险分析', width: 40 },
{ field: 'aqcs', title: '安全措施', width: 120 }, { field: 'aqcs', title: '环保措施', width: 120 },
{ field: 'cslx', title: '措施类型', width: 80 }, { field: 'cslx', title: '措施类型', width: 80 },
]] ]]
}); });