This commit is contained in:
commit
9533bfa535
|
|
@ -0,0 +1,54 @@
|
|||
# Generated by Django 2.2.8 on 2022-03-07 10:52
|
||||
|
||||
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', '0010_gasemit'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Facilities',
|
||||
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='删除标记')),
|
||||
('name', models.CharField(max_length=100, verbose_name='生产设施设备名称')),
|
||||
('number', models.CharField(max_length=100, verbose_name='编码')),
|
||||
('type', models.CharField(max_length=100, verbose_name='生产设施型号')),
|
||||
('cs_name', models.CharField(max_length=100, verbose_name='设备参数名')),
|
||||
('desig_nnumber', models.FloatField(max_length=100, verbose_name='设备设计值')),
|
||||
('actual_number', models.FloatField(blank=True, max_length=100, null=True, verbose_name='设备实际值')),
|
||||
('em_unit', models.CharField(max_length=50, verbose_name='设备单位')),
|
||||
('ability', models.CharField(max_length=200, verbose_name='生产能力')),
|
||||
('al_unit', models.CharField(max_length=50, verbose_name='生产能力单位')),
|
||||
('start_time', models.DateTimeField(verbose_name='运行开始时间')),
|
||||
('end_time', models.DateTimeField(verbose_name='运行结束时间')),
|
||||
('pdc_Load', models.CharField(max_length=200, verbose_name='生产负荷')),
|
||||
('zj_product', models.CharField(blank=True, max_length=200, null=True, verbose_name='中间产品')),
|
||||
('zj_unit', models.CharField(blank=True, max_length=50, null=True, verbose_name='中间产品单位')),
|
||||
('zz_product', models.CharField(max_length=200, verbose_name='最终产品')),
|
||||
('zz_unit', models.CharField(max_length=50, verbose_name='最终产品单位')),
|
||||
('material_name', models.CharField(max_length=200, verbose_name='原辅料名称')),
|
||||
('material_type', models.CharField(max_length=200, verbose_name='原辅料种类')),
|
||||
('material_unit', models.CharField(max_length=50, verbose_name='原辅料单位')),
|
||||
('material_count', models.CharField(max_length=200, verbose_name='原辅料用量')),
|
||||
('material_composition', models.CharField(max_length=50, verbose_name='有害有毒元素成分')),
|
||||
('material_account', models.CharField(max_length=200, verbose_name='有害有毒元素占比')),
|
||||
('material_address', models.CharField(max_length=50, verbose_name='原料来源地')),
|
||||
('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='facilities_create_by', to='safesite.User', verbose_name='创建人')),
|
||||
('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='facilities_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,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,158 @@
|
|||
# Generated by Django 2.2.8 on 2022-05-12 10:24
|
||||
|
||||
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', '0011_facilities'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Waterequipment',
|
||||
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='删除标记')),
|
||||
('number', models.CharField(max_length=100, verbose_name='排放口编号')),
|
||||
('type', models.CharField(max_length=100, verbose_name='污染物种类')),
|
||||
('methods', models.CharField(max_length=300, verbose_name='监测采样方法及个数')),
|
||||
('count', models.IntegerField(max_length=100, verbose_name='监测次数')),
|
||||
('identification', models.CharField(max_length=200, verbose_name='鉴定方法')),
|
||||
('jcyqmodel', models.CharField(max_length=100, verbose_name='监测仪器型号')),
|
||||
('note', models.CharField(max_length=500, verbose_name='备注')),
|
||||
('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='waterequipment_create_by', to='safesite.User', verbose_name='创建人')),
|
||||
('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='waterequipment_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,
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Prevention',
|
||||
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='删除标记')),
|
||||
('name', models.CharField(max_length=100, verbose_name='防治设施名称')),
|
||||
('number', models.CharField(max_length=100, verbose_name='编码')),
|
||||
('type', models.CharField(max_length=100, verbose_name='防治设施型号')),
|
||||
('cs_name', models.CharField(max_length=100, verbose_name='参数名')),
|
||||
('desig_nnumber', models.FloatField(max_length=100, verbose_name='设计值')),
|
||||
('em_unit', models.CharField(max_length=50, verbose_name='单位')),
|
||||
('start_time', models.DateTimeField(verbose_name='运行开始时间')),
|
||||
('end_time', models.DateTimeField(verbose_name='运行结束时间')),
|
||||
('state', models.CharField(max_length=100, verbose_name='运行状态')),
|
||||
('pfyql', models.FloatField(max_length=200, verbose_name='排放烟气量(m3/h)')),
|
||||
('wryz', models.CharField(max_length=100, verbose_name='污染因子')),
|
||||
('zlxl', models.FloatField(max_length=200, verbose_name='治理效率')),
|
||||
('sjly', models.CharField(max_length=100, verbose_name='数据来源')),
|
||||
('pqtgd', models.FloatField(max_length=200, verbose_name='排气筒高度m')),
|
||||
('pkwd', models.FloatField(max_length=200, verbose_name='排口温度℃')),
|
||||
('yl', models.FloatField(max_length=100, verbose_name='压力kPa')),
|
||||
('pfsj', models.FloatField(max_length=100, verbose_name='排放时间h')),
|
||||
('hdl', models.FloatField(max_length=100, verbose_name='耗电率kWh')),
|
||||
('fcpname', models.CharField(max_length=100, verbose_name='副产品名称')),
|
||||
('fcwcl', models.FloatField(max_length=100, verbose_name='副产物产生量t')),
|
||||
('yjname', models.CharField(max_length=100, verbose_name='药剂名称')),
|
||||
('tjtime', models.DateTimeField(verbose_name='添加时间')),
|
||||
('tjl', models.FloatField(max_length=100, verbose_name='添加量')),
|
||||
('ckll', models.FloatField(max_length=100, verbose_name='出口流量')),
|
||||
('pqfx', models.CharField(max_length=50, verbose_name='排放去向')),
|
||||
('wncsl', models.CharField(max_length=50, verbose_name='污泥产生量')),
|
||||
('clfs', models.CharField(max_length=100, verbose_name='处理方式')),
|
||||
('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='prevention_create_by', to='safesite.User', verbose_name='创建人')),
|
||||
('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='prevention_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,
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Fuel',
|
||||
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='删除标记')),
|
||||
('name', models.CharField(max_length=100, verbose_name='燃料名称')),
|
||||
('count', models.CharField(max_length=100, verbose_name='用量')),
|
||||
('dwcount', models.CharField(max_length=100, verbose_name='低位热值')),
|
||||
('unit', models.FloatField(max_length=200, verbose_name='单位')),
|
||||
('rmhll', models.FloatField(max_length=200, verbose_name='燃煤含硫量(%)')),
|
||||
('rmhff', models.FloatField(max_length=200, verbose_name='燃煤挥发分(%)')),
|
||||
('rmqt', models.CharField(max_length=100, verbose_name='燃煤其他')),
|
||||
('ryhll', models.FloatField(max_length=200, verbose_name='燃油含硫量(%)')),
|
||||
('ryqt', models.CharField(max_length=100, verbose_name='燃油其他')),
|
||||
('rqlhqhl', models.FloatField(max_length=200, verbose_name='燃气硫化氢含量(%)')),
|
||||
('rqqt', models.CharField(max_length=100, verbose_name='燃气其他')),
|
||||
('qtrlxgwzhl', models.CharField(max_length=400, verbose_name='其他燃料相关物质含量')),
|
||||
('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='fuel_create_by', to='safesite.User', verbose_name='创建人')),
|
||||
('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='fuel_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,
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Detection',
|
||||
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='删除标记')),
|
||||
('number', models.CharField(max_length=100, verbose_name='排放口编号')),
|
||||
('jcDate', models.DateTimeField(verbose_name='监测日期')),
|
||||
('jctime', models.DateTimeField(verbose_name='监测时间')),
|
||||
('ckhxxyl', models.FloatField(max_length=200, verbose_name='出口化学需氧量(mg/L)')),
|
||||
('ckshxll', models.FloatField(max_length=200, verbose_name='出口生化需氧量(mg/L)')),
|
||||
('ckad', models.FloatField(max_length=200, verbose_name='出口氨氮(mg/L)')),
|
||||
('ckxfw', models.FloatField(max_length=200, verbose_name='出口悬浮物(mg/L)')),
|
||||
('jkhxxyl', models.FloatField(max_length=200, verbose_name='进口化学需氧量(mg/L)')),
|
||||
('jkshxll', models.FloatField(max_length=200, verbose_name='进口生化需氧量(mg/L)')),
|
||||
('jkad', models.FloatField(max_length=200, verbose_name='进口氨氮(mg/L)')),
|
||||
('jkxfw', models.FloatField(max_length=200, verbose_name='进口悬浮物(mg/L)')),
|
||||
('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detection_create_by', to='safesite.User', verbose_name='创建人')),
|
||||
('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='detection_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,
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='abnormal',
|
||||
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='删除标记')),
|
||||
('name', models.CharField(max_length=100, verbose_name='防治设施名称')),
|
||||
('number', models.CharField(max_length=100, verbose_name='编码')),
|
||||
('start_time', models.DateTimeField(verbose_name='异常情况起始时刻')),
|
||||
('end_time', models.DateTimeField(verbose_name='异常情况终止时刻')),
|
||||
('type', models.CharField(max_length=100, verbose_name='污染物种类')),
|
||||
('pfnd', models.CharField(max_length=100, verbose_name='排放浓度')),
|
||||
('pffx', models.FloatField(max_length=200, verbose_name='排放方向')),
|
||||
('sjyy', models.CharField(max_length=100, verbose_name='事件原因')),
|
||||
('sfbg', models.FloatField(max_length=200, verbose_name='是否报告')),
|
||||
('ydcs', models.FloatField(max_length=200, verbose_name='应对措施')),
|
||||
('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='abnormal_create_by', to='safesite.User', verbose_name='创建人')),
|
||||
('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='abnormal_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,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 2.2.8 on 2022-05-12 14:12
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('enp', '0012_abnormal_detection_fuel_prevention_waterequipment'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='prevention',
|
||||
name='preventiontype',
|
||||
field=models.IntegerField(choices=[(1, '废水'), (2, '废气')], default=1, verbose_name='防治类型'),
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 2.2.8 on 2022-05-12 15:57
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('enp', '0013_prevention_preventiontype'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='zlxl',
|
||||
field=models.CharField(max_length=200, verbose_name='治理效率'),
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,308 @@
|
|||
# Generated by Django 2.2.8 on 2022-05-13 09:22
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('enp', '0014_auto_20220512_1557'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='abnormal',
|
||||
name='end_time',
|
||||
field=models.DateTimeField(blank=True, null=True, verbose_name='异常情况终止时刻'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='abnormal',
|
||||
name='pffx',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='排放方向'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='abnormal',
|
||||
name='pfnd',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='排放浓度'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='abnormal',
|
||||
name='sfbg',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='是否报告'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='abnormal',
|
||||
name='sjyy',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='事件原因'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='abnormal',
|
||||
name='start_time',
|
||||
field=models.DateTimeField(blank=True, null=True, verbose_name='异常情况起始时刻'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='abnormal',
|
||||
name='type',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='污染物种类'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='abnormal',
|
||||
name='ydcs',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='应对措施'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='detection',
|
||||
name='ckad',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='出口氨氮(mg/L)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='detection',
|
||||
name='ckhxxyl',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='出口化学需氧量(mg/L)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='detection',
|
||||
name='ckshxll',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='出口生化需氧量(mg/L)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='detection',
|
||||
name='ckxfw',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='出口悬浮物(mg/L)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='detection',
|
||||
name='jcDate',
|
||||
field=models.DateTimeField(blank=True, null=True, verbose_name='监测日期'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='detection',
|
||||
name='jctime',
|
||||
field=models.DateTimeField(blank=True, null=True, verbose_name='监测时间'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='detection',
|
||||
name='jkad',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='进口氨氮(mg/L)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='detection',
|
||||
name='jkhxxyl',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='进口化学需氧量(mg/L)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='detection',
|
||||
name='jkshxll',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='进口生化需氧量(mg/L)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='detection',
|
||||
name='jkxfw',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='进口悬浮物(mg/L)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='count',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='用量'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='dwcount',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='低位热值'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='qtrlxgwzhl',
|
||||
field=models.CharField(blank=True, max_length=400, null=True, verbose_name='其他燃料相关物质含量'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='rmhff',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='燃煤挥发分(%)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='rmhll',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='燃煤含硫量(%)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='rmqt',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='燃煤其他'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='rqlhqhl',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='燃气硫化氢含量(%)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='rqqt',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='燃气其他'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='ryhll',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='燃油含硫量(%)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='ryqt',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='燃油其他'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='unit',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='单位'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='ckll',
|
||||
field=models.FloatField(blank=True, max_length=100, null=True, verbose_name='出口流量'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='clfs',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='处理方式'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='cs_name',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='参数名'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='desig_nnumber',
|
||||
field=models.FloatField(blank=True, max_length=100, null=True, verbose_name='设计值'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='em_unit',
|
||||
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='单位'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='end_time',
|
||||
field=models.DateTimeField(blank=True, null=True, verbose_name='运行结束时间'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='fcpname',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='副产品名称'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='fcwcl',
|
||||
field=models.FloatField(blank=True, max_length=100, null=True, verbose_name='副产物产生量t'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='pfsj',
|
||||
field=models.FloatField(blank=True, max_length=100, null=True, verbose_name='排放时间h'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='pfyql',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='排放烟气量(m3/h)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='pkwd',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='排口温度℃'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='pqfx',
|
||||
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='排放去向'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='pqtgd',
|
||||
field=models.FloatField(blank=True, max_length=200, null=True, verbose_name='排气筒高度m'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='preventiontype',
|
||||
field=models.IntegerField(blank=True, choices=[(1, '废水'), (2, '废气')], default=1, null=True, verbose_name='防治类型'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='sjly',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='数据来源'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='start_time',
|
||||
field=models.DateTimeField(blank=True, null=True, verbose_name='运行开始时间'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='state',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='运行状态'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='tjl',
|
||||
field=models.FloatField(blank=True, max_length=100, null=True, verbose_name='添加量'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='tjtime',
|
||||
field=models.DateTimeField(blank=True, null=True, verbose_name='添加时间'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='wncsl',
|
||||
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='污泥产生量'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='wryz',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='污染因子'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='yjname',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='药剂名称'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='yl',
|
||||
field=models.FloatField(blank=True, max_length=100, null=True, verbose_name='压力kPa'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='prevention',
|
||||
name='zlxl',
|
||||
field=models.CharField(blank=True, max_length=200, null=True, verbose_name='治理效率'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='waterequipment',
|
||||
name='count',
|
||||
field=models.IntegerField(blank=True, max_length=100, null=True, verbose_name='监测次数'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='waterequipment',
|
||||
name='identification',
|
||||
field=models.CharField(blank=True, max_length=200, null=True, verbose_name='鉴定方法'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='waterequipment',
|
||||
name='jcyqmodel',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='监测仪器型号'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='waterequipment',
|
||||
name='methods',
|
||||
field=models.CharField(blank=True, max_length=300, null=True, verbose_name='监测采样方法及个数'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='waterequipment',
|
||||
name='note',
|
||||
field=models.CharField(blank=True, max_length=500, null=True, verbose_name='备注'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='waterequipment',
|
||||
name='type',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='污染物种类'),
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# Generated by Django 2.2.8 on 2022-05-13 11:57
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('enp', '0015_auto_20220513_0922'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='abnormal',
|
||||
name='pffx',
|
||||
field=models.CharField(blank=True, max_length=200, null=True, verbose_name='排放方向'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='abnormal',
|
||||
name='sfbg',
|
||||
field=models.CharField(blank=True, max_length=200, null=True, verbose_name='是否报告'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='abnormal',
|
||||
name='ydcs',
|
||||
field=models.CharField(blank=True, max_length=200, null=True, verbose_name='应对措施'),
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# Generated by Django 2.2.8 on 2022-05-16 08:58
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('enp', '0016_auto_20220513_1157'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='count',
|
||||
field=models.FloatField(blank=True, max_length=100, null=True, verbose_name='用量'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='dwcount',
|
||||
field=models.FloatField(blank=True, max_length=100, null=True, verbose_name='低位热值'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fuel',
|
||||
name='unit',
|
||||
field=models.CharField(blank=True, max_length=200, null=True, verbose_name='单位'),
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# Generated by Django 2.2.8 on 2022-05-17 16:54
|
||||
|
||||
import django.contrib.postgres.fields.jsonb
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('enp', '0017_auto_20220516_0858'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='detection',
|
||||
name='number',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='detection',
|
||||
name='drain',
|
||||
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='enp.Drain', verbose_name='关联排放口'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='drain',
|
||||
name='polygon',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True, verbose_name='点位坐标'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='drain',
|
||||
name='type',
|
||||
field=models.PositiveSmallIntegerField(choices=[(10, '排水'), (20, '排气')], default=10, verbose_name='排污口类型'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='waterequipment',
|
||||
name='count',
|
||||
field=models.IntegerField(blank=True, null=True, verbose_name='监测次数'),
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# Generated by Django 2.2.8 on 2022-05-17 17:17
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('enp', '0018_auto_20220517_1654'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='drain',
|
||||
old_name='polygon',
|
||||
new_name='location',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='waterequipment',
|
||||
name='number',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='waterequipment',
|
||||
name='drain',
|
||||
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='enp.Drain', verbose_name='关联排放口'),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
137
enp/models.py
137
enp/models.py
|
|
@ -1,6 +1,7 @@
|
|||
from django.db import models
|
||||
from safesite.models import User, Partment
|
||||
from utils.models import CommonModel
|
||||
from django.contrib.postgres.fields import JSONField
|
||||
# Create your models here.
|
||||
|
||||
class Waste(CommonModel):
|
||||
|
|
@ -90,8 +91,14 @@ class Drain(CommonModel):
|
|||
"""
|
||||
排放口
|
||||
"""
|
||||
DRAIN_TYPE_CHOICES = (
|
||||
(10, '排水'),
|
||||
(20, '排气')
|
||||
)
|
||||
type = models.PositiveSmallIntegerField('排污口类型', default=10, choices=DRAIN_TYPE_CHOICES)
|
||||
number = models.CharField('编号', max_length=100)
|
||||
name = models.CharField('名称', max_length=100)
|
||||
location = JSONField('点位坐标', null=True, blank=True)
|
||||
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
|
||||
|
||||
class GasEmit(CommonModel):
|
||||
|
|
@ -116,4 +123,132 @@ class GasEmit(CommonModel):
|
|||
in_particle_s = models.FloatField("颗粒物s")
|
||||
in_nox = models.FloatField("氮氧化物")
|
||||
in_nox_s = models.FloatField("氮氧化物s")
|
||||
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
|
||||
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
|
||||
class Facilities(CommonModel):
|
||||
"""
|
||||
生产设施信息表
|
||||
"""
|
||||
name = models.CharField('生产设施设备名称', max_length=100)
|
||||
number = models.CharField('编码', max_length=100)
|
||||
type = models.CharField('生产设施型号', max_length=100)
|
||||
cs_name = models.CharField('设备参数名', max_length=100)
|
||||
desig_nnumber = models.FloatField('设备设计值', max_length=100)
|
||||
actual_number = models.FloatField('设备实际值',null=True, blank=True, max_length=100)
|
||||
em_unit = models.CharField('设备单位', max_length=50)
|
||||
ability = models.CharField('生产能力', max_length=200)
|
||||
al_unit = models.CharField('生产能力单位', max_length=50)
|
||||
start_time = models.DateTimeField('运行开始时间')
|
||||
end_time = models.DateTimeField('运行结束时间')
|
||||
pdc_Load = models.CharField('生产负荷', max_length=200)
|
||||
zj_product = models.CharField('中间产品',null=True, blank=True, max_length=200)
|
||||
zj_unit = models.CharField('中间产品单位',null=True, blank=True, max_length=50)
|
||||
zz_product = models.CharField('最终产品', max_length=200)
|
||||
zz_unit = models.CharField('最终产品单位', max_length=50)
|
||||
material_name = models.CharField('原辅料名称', max_length=200)
|
||||
material_type = models.CharField('原辅料种类', max_length=200)
|
||||
material_unit = models.CharField('原辅料单位', max_length=50)
|
||||
material_count = models.CharField('原辅料用量', max_length=200)
|
||||
material_composition = models.CharField('有害有毒元素成分', max_length=50)
|
||||
material_account = models.CharField('有害有毒元素占比', max_length=200)
|
||||
material_address = models.CharField('原料来源地', max_length=50)
|
||||
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
|
||||
class Prevention(CommonModel):
|
||||
"""
|
||||
废气,废水防治设施
|
||||
"""
|
||||
type_choices = (
|
||||
(1, '废水'),
|
||||
(2, '废气')
|
||||
)
|
||||
name = models.CharField('防治设施名称', max_length=100)
|
||||
number = models.CharField('编码', max_length=100)
|
||||
type = models.CharField('防治设施型号', max_length=100)
|
||||
preventiontype = models.IntegerField('防治类型', choices=type_choices, default=1, null=True, blank=True)
|
||||
cs_name = models.CharField('参数名', max_length=100, null=True, blank=True)
|
||||
desig_nnumber = models.FloatField('设计值', max_length=100, null=True, blank=True)
|
||||
em_unit = models.CharField('单位', max_length=50, null=True, blank=True)
|
||||
start_time = models.DateTimeField('运行开始时间', null=True, blank=True)
|
||||
end_time = models.DateTimeField('运行结束时间', null=True, blank=True)
|
||||
state = models.CharField('运行状态', max_length=100, null=True, blank=True)
|
||||
pfyql = models.FloatField('排放烟气量(m3/h)', max_length=200, null=True, blank=True)
|
||||
wryz = models.CharField('污染因子', max_length=100, null=True, blank=True)
|
||||
zlxl = models.CharField('治理效率', max_length=200, null=True, blank=True)
|
||||
sjly = models.CharField('数据来源', max_length=100, null=True, blank=True)
|
||||
pqtgd = models.FloatField('排气筒高度m', max_length=200, null=True, blank=True)
|
||||
pkwd = models.FloatField('排口温度℃', max_length=200, null=True, blank=True)
|
||||
yl = models.FloatField('压力kPa', max_length=100, null=True, blank=True)
|
||||
pfsj = models.FloatField('排放时间h', max_length=100, null=True, blank=True)
|
||||
hdl = models.FloatField('耗电率kWh', max_length=100)
|
||||
fcpname = models.CharField('副产品名称', max_length=100, null=True, blank=True)
|
||||
fcwcl = models.FloatField('副产物产生量t', max_length=100, null=True, blank=True)
|
||||
yjname = models.CharField('药剂名称', max_length=100, null=True, blank=True)
|
||||
tjtime = models.DateTimeField('添加时间', null=True, blank=True)
|
||||
tjl = models.FloatField('添加量', max_length=100, null=True, blank=True)
|
||||
ckll = models.FloatField('出口流量', max_length=100, null=True, blank=True)
|
||||
pqfx = models.CharField('排放去向', max_length=50, null=True, blank=True)
|
||||
wncsl = models.CharField('污泥产生量', max_length=50, null=True, blank=True)
|
||||
clfs = models.CharField('处理方式', max_length=100, null=True, blank=True)
|
||||
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
|
||||
class abnormal(CommonModel):
|
||||
"""
|
||||
防治设施异常情况信息表
|
||||
"""
|
||||
name = models.CharField('防治设施名称', max_length=100)
|
||||
number = models.CharField('编码', max_length=100)
|
||||
start_time = models.DateTimeField('异常情况起始时刻', null=True, blank=True)
|
||||
end_time = models.DateTimeField('异常情况终止时刻', null=True, blank=True)
|
||||
type = models.CharField('污染物种类', max_length=100, null=True, blank=True)
|
||||
pfnd = models.CharField('排放浓度', max_length=100, null=True, blank=True)
|
||||
pffx = models.CharField('排放方向', max_length=200, null=True, blank=True)
|
||||
sjyy = models.CharField('事件原因', max_length=100, null=True, blank=True)
|
||||
sfbg = models.CharField('是否报告', max_length=200, null=True, blank=True)
|
||||
ydcs = models.CharField('应对措施', max_length=200, null=True, blank=True)
|
||||
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
|
||||
|
||||
class Detection(CommonModel):
|
||||
"""
|
||||
废水污染物检测结果表
|
||||
"""
|
||||
drain = models.ForeignKey(Drain, verbose_name='关联排放口', on_delete=models.CASCADE)
|
||||
jcDate = models.DateTimeField('监测日期', null=True, blank=True)
|
||||
jctime = models.DateTimeField('监测时间', null=True, blank=True)
|
||||
ckhxxyl = models.FloatField('出口化学需氧量(mg/L)', max_length=200, null=True, blank=True)
|
||||
ckshxll = models.FloatField('出口生化需氧量(mg/L)', max_length=200, null=True, blank=True)
|
||||
ckad = models.FloatField('出口氨氮(mg/L)', max_length=200, null=True, blank=True)
|
||||
ckxfw = models.FloatField('出口悬浮物(mg/L)', max_length=200, null=True, blank=True)
|
||||
jkhxxyl = models.FloatField('进口化学需氧量(mg/L)', max_length=200, null=True, blank=True)
|
||||
jkshxll = models.FloatField('进口生化需氧量(mg/L)', max_length=200, null=True, blank=True)
|
||||
jkad = models.FloatField('进口氨氮(mg/L)', max_length=200, null=True, blank=True)
|
||||
jkxfw = models.FloatField('进口悬浮物(mg/L)', max_length=200, null=True, blank=True)
|
||||
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
|
||||
|
||||
class Fuel(CommonModel):
|
||||
"""
|
||||
燃料信息表
|
||||
"""
|
||||
name = models.CharField('燃料名称', max_length=100)
|
||||
count = models.FloatField('用量', max_length=100, null=True, blank=True)
|
||||
dwcount = models.FloatField('低位热值', max_length=100, null=True, blank=True)
|
||||
unit = models.CharField('单位', max_length=200, null=True, blank=True)
|
||||
rmhll = models.FloatField('燃煤含硫量(%)', max_length=200, null=True, blank=True)
|
||||
rmhff = models.FloatField('燃煤挥发分(%)', max_length=200, null=True, blank=True)
|
||||
rmqt = models.CharField('燃煤其他', max_length=100, null=True, blank=True)
|
||||
ryhll = models.FloatField('燃油含硫量(%)', max_length=200, null=True, blank=True)
|
||||
ryqt = models.CharField('燃油其他', max_length=100, null=True, blank=True)
|
||||
rqlhqhl = models.FloatField('燃气硫化氢含量(%)', max_length=200, null=True, blank=True)
|
||||
rqqt = models.CharField('燃气其他', max_length=100, null=True, blank=True)
|
||||
qtrlxgwzhl = models.CharField('其他燃料相关物质含量', max_length=400, null=True, blank=True)
|
||||
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
|
||||
|
||||
class Waterequipment(CommonModel):
|
||||
"""
|
||||
废水监测仪器信息表
|
||||
"""
|
||||
drain = models.ForeignKey(Drain, verbose_name='关联排放口', on_delete=models.CASCADE)
|
||||
type = models.CharField('污染物种类', max_length=100, null=True, blank=True)
|
||||
methods = models.CharField('监测采样方法及个数', max_length=300, null=True, blank=True)
|
||||
count = models.IntegerField('监测次数', null=True, blank=True)
|
||||
identification = models.CharField('鉴定方法', max_length=200, null=True, blank=True)
|
||||
jcyqmodel = models.CharField('监测仪器型号', max_length=100, null=True, blank=True)
|
||||
note = models.CharField('备注', max_length=500, null=True, blank=True)
|
||||
usecomp = models.ForeignKey(Partment, on_delete=models.CASCADE, verbose_name='所属公司')
|
||||
|
|
|
|||
|
|
@ -0,0 +1,146 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
||||
|
||||
<div data-options="region:'center',title:'防治设施异常表',split:true,border:false" style="height:100%;">
|
||||
<div id="abnormalTableBar">
|
||||
<a onclick="addabnormal()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
<a onclick="ediabnormal()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
|
||||
<a onclick="delabnormal()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
|
||||
</div>
|
||||
<table id="abnormalTable" style="height:100%"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="abnormalDialog" 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="abnormalForm">
|
||||
<input name="id" type="hidden">
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="name" data-options="label:'设施异常名称', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="number" data-options="label:'编码', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="start_time" data-options="label:'异常起始时刻', editable:false, labelWidth:100" class="easyui-datetimespinner" style="width:300px;" required ></input>
|
||||
|
||||
<input name="end_time" data-options="label:'异常终止时刻', editable:false, labelWidth:100" class="easyui-datetimespinner" style="width:300px;" required ></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="type" data-options="label:'污染物种类',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="pfnd" data-options="label:'排放浓度', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="pffx" data-options="label:'排放方向',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="sjyy" data-options="label:'事件原因', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="sfbg" data-options="label:'是否报告',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="ydcs" data-options="label:'应对措施', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="saveabnormal()">保存</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var abnormal_action_url = '/api/enp/abnormal/create/';
|
||||
|
||||
$('#abnormalTable').datagrid({
|
||||
url: '/api/enp/abnormal/list/',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
method: 'get',
|
||||
toolbar: '#abnormalTableBar',
|
||||
border: false,
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'name', title: '设施异常名称', width: 200 },
|
||||
{ field: 'number', title: '编码', width: 200 },
|
||||
{ field: 'start_time', title: '异常起始时刻', width: 200 },
|
||||
{ field: 'end_time', title: '异常终止时刻', width: 200 },
|
||||
{ field: 'type', title: '排放浓度', width: 200 },
|
||||
{ field: 'pfnd', title: '中间产品', width: 200 },
|
||||
{ field: 'pffx', title: '排放方向', width: 200 },
|
||||
{ field: 'sjyy', title: '事件原因', width: 200 },
|
||||
{ field: 'sfbg', title: '是否报告', width: 200 },
|
||||
{ field: 'ydcs', title: '应对措施', width: 200 },
|
||||
]],
|
||||
onClickRow: function (index, row) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//新增
|
||||
function addabnormal() {
|
||||
$('#abnormalDialog').dialog('open').dialog('setTitle', '新增设施异常名称').window('center');
|
||||
$('#abnormalForm').form('clear');
|
||||
abnormal_action_url = '/api/enp/abnormal/create/'
|
||||
}
|
||||
//保存数据
|
||||
function saveabnormal() {
|
||||
var data = $('#abnormalForm').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: abnormal_action_url,
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
return $('#abnormalForm').form('validate')
|
||||
},
|
||||
success: function (data) {
|
||||
$("#abnormalTable").datagrid('reload');
|
||||
$("#abnormalDialog").dialog("close");
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
//编辑数据
|
||||
function ediabnormal(){
|
||||
var row = $('#abnormalTable').datagrid('getSelected');
|
||||
if(row){
|
||||
$('#abnormalDialog').dialog('open').dialog('setTitle', '编辑设施异常名称').window('center');
|
||||
$('#abnormalForm').form('load', row);
|
||||
abnormal_action_url = '/api/enp/abnormal/update/'}
|
||||
else{
|
||||
$.messager.alert('提示', '请选择一条数据!');
|
||||
}
|
||||
}
|
||||
//删除数据
|
||||
function delabnormal(){
|
||||
var row = $('#abnormalTable').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
var data = { id: row.id }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/api/enp/abnormal/delete/',
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#abnormalTable").datagrid('reload');
|
||||
$("#abnormalTable").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '操作失败!');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else { $.messager.alert('提示', '请选择一条数据!'); }
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
||||
|
||||
<div data-options="region:'center',title:'废水污染物检测表',split:true,border:false" style="height:100%;">
|
||||
<div id="detectionTableBar">
|
||||
<a onclick="adddetection()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
<a onclick="edidetection()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
|
||||
<a onclick="deldetection()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
|
||||
</div>
|
||||
<table id="detectionTable" style="height:100%"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="detectionDialog" 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="detectionForm">
|
||||
<input name="id" type="hidden">
|
||||
<div style="margin-bottom:10px">
|
||||
|
||||
<input name="number" data-options="label:'排放口编码', labelWidth:100" class="easyui-textbox" style="width:600px;" required></input>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="jcDate" data-options="label:'监测日期', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
|
||||
<input name="jctime" data-options="label:'监测时间', editable:false, labelWidth:100" class="easyui-datetimespinner" style="width:300px;" required ></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="ckhxxyl" data-options="label:'出口化学需氧量(mg/L)',labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="ckshxll" data-options="label:'出口生化需氧量(mg/L)', labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="ckad" data-options="label:'出口氨氮(mg/L)',labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="ckxfw" data-options="label:'出口悬浮物(mg/L)', labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="jkhxxyl" data-options="label:'进口化学需氧量(mg/L)',labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="jkshxll" data-options="label:'进口生化需氧量(mg/L)', labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="jkad" data-options="label:'进口氨氮(mg/L)',labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="jkxfw" data-options="label:'进口悬浮物(mg/L)', labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="savedetection()">保存</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var detection_action_url = '/api/enp/detection/create/';
|
||||
|
||||
$('#detectionTable').datagrid({
|
||||
url: '/api/enp/detection/list/',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
method: 'get',
|
||||
toolbar: '#detectionTableBar',
|
||||
border: false,
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'number', title: '排放口编号', width: 200 },
|
||||
{ field: 'jcDate', title: '监测日期', width: 200 },
|
||||
{ field: 'jctime', title: '监测时间', width: 200 },
|
||||
{ field: 'ckhxxyl', title: '出口化学需氧量(mg/L)', width: 200 },
|
||||
{ field: 'ckshxll', title: '出口生化需氧量(mg/L)', width: 200 },
|
||||
{ field: 'ckad', title: '出口氨氮(mg/L)', width: 200 },
|
||||
{ field: 'ckxfw', title: '出口悬浮物(mg/L)', width: 200 },
|
||||
{ field: 'jkhxxyl', title: '进口化学需氧量(mg/L)', width: 200 },
|
||||
{ field: 'jkshxll', title: '进口生化需氧量(mg/L)', width: 200 },
|
||||
{ field: 'jkad', title: '进口氨氮(mg/L)', width: 200 },
|
||||
{ field: 'jkxfw', title: '进口悬浮物(mg/L)', width: 200 },
|
||||
]],
|
||||
onClickRow: function (index, row) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//新增
|
||||
function adddetection() {
|
||||
$('#detectionDialog').dialog('open').dialog('setTitle', '新增废水污染物检测').window('center');
|
||||
$('#detectionForm').form('clear');
|
||||
detection_action_url = '/api/enp/detection/create/'
|
||||
}
|
||||
//保存数据
|
||||
function savedetection() {
|
||||
var data = $('#detectionForm').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: detection_action_url,
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
return $('#detectionForm').form('validate')
|
||||
},
|
||||
success: function (data) {
|
||||
$("#detectionTable").datagrid('reload');
|
||||
$("#detectionDialog").dialog("close");
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
//编辑数据
|
||||
function edidetection(){
|
||||
var row = $('#detectionTable').datagrid('getSelected');
|
||||
if(row){
|
||||
$('#detectionDialog').dialog('open').dialog('setTitle', '编辑废水污染物检测结').window('center');
|
||||
$('#detectionForm').form('load', row);
|
||||
detection_action_url = '/api/enp/detection/update/'}
|
||||
else{
|
||||
$.messager.alert('提示', '请选择一条数据!');
|
||||
}
|
||||
}
|
||||
//删除数据
|
||||
function deldetection(){
|
||||
var row = $('#detectionTable').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
var data = { id: row.id }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/api/enp/detection/delete/',
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#detectionTable").datagrid('reload');
|
||||
$("#detectionTable").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '操作失败!');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else { $.messager.alert('提示', '请选择一条数据!'); }
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
||||
|
||||
<div data-options="region:'center',title:'正常工况表',split:true,border:false" style="height:100%;">
|
||||
<div id="facilitiesTableBar">
|
||||
<a onclick="addfacilities()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
<a onclick="edifacilities()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
|
||||
<a onclick="delfacilities()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
|
||||
</div>
|
||||
<table id="facilitiesTable" style="height:100%"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="facilitiesDialog" 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="facilitiesForm">
|
||||
<input name="id" type="hidden">
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="name" data-options="label:'生产设施名称', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="number" data-options="label:'编码', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="type" data-options="label:'生产设施型号',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="cs_name" data-options="label:'参数名称', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="desig_nnumber" data-options="label:'设计值',labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="actual_number" data-options="label:'实际值', labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="em_unit" data-options="label:'参数单位',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="ability" data-options="label:'生产能力', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="al_unit" data-options="label:'能力单位',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="pdc_Load" data-options="label:'生产负荷', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="start_time" data-options="label:'开始时间', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
|
||||
<input name="end_time" data-options="label:'结束日期', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="zj_product" data-options="label:'中间产品',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="zj_unit" data-options="label:'中间产品单位', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="zz_product" data-options="label:'最终产品',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="zz_unit" data-options="label:'最终产品单位', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="material_name" data-options="label:'原辅料名称',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="material_type" data-options="label:'原辅料种类', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="material_count" data-options="label:'原辅料用量',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="material_unit" data-options="label:'原辅料单位', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="material_composition" data-options="label:'有毒有害成分',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="material_account" data-options="label:'有毒有害占比', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="material_address" data-options="label:'来源地',labelWidth:100" class="easyui-textbox" style="width:600px;" required></input>
|
||||
|
||||
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="savefacilities()">保存</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var facilities_action_url = '/api/enp/facilities/create/';
|
||||
|
||||
$('#facilitiesTable').datagrid({
|
||||
url: '/api/enp/facilities/list/',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
method: 'get',
|
||||
toolbar: '#facilitiesTableBar',
|
||||
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: 'actual_number', title: '实际值', width: 200 },
|
||||
{ field: 'em_unit', title: '参数单位', width: 200 },
|
||||
{ field: 'ability', title: '生产能力', width: 200 },
|
||||
{ field: 'al_unit', title: '能力单位', width: 200 },
|
||||
{ field: 'start_time', title: '运行开始时间', width: 200 },
|
||||
{ field: 'end_time', title: '运行结束时间', width: 200 },
|
||||
{ field: 'pdc_Load', title: '生产负荷', width: 200 },
|
||||
{ field: 'zj_product', title: '中间产品', width: 200 },
|
||||
{ field: 'zj_unit', title: '单位', width: 200 },
|
||||
{ field: 'zz_product', title: '最终产品', width: 200 },
|
||||
{ field: 'zz_unit', title: '单位', width: 200 },
|
||||
{ field: 'material_name', title: '原辅料名称', width: 200 },
|
||||
{ field: 'material_type', title: '原辅料种类', width: 200 },
|
||||
{ field: 'material_count', title: '原辅料用量', width: 200 },
|
||||
{ field: 'material_unit', title: '原辅料单位', width: 200 },
|
||||
{ field: 'material_composition', title: '有毒有害成分', width: 200 },
|
||||
{ field: 'material_account', title: '有毒有害占比', width: 200 },
|
||||
{ field: 'material_address', title: '来源地', width: 200 }
|
||||
]],
|
||||
onClickRow: function (index, row) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//新增
|
||||
function addfacilities() {
|
||||
$('#facilitiesDialog').dialog('open').dialog('setTitle', '新增生产设施工况表').window('center');
|
||||
$('#facilitiesForm').form('clear');
|
||||
facilities_action_url = '/api/enp/facilities/create/'
|
||||
}
|
||||
//保存数据
|
||||
function savefacilities() {
|
||||
var data = $('#facilitiesForm').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: facilities_action_url,
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
return $('#facilitiesForm').form('validate')
|
||||
},
|
||||
success: function (data) {
|
||||
$("#facilitiesTable").datagrid('reload');
|
||||
$("#facilitiesDialog").dialog("close");
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
//编辑数据
|
||||
function edifacilities(){
|
||||
var row = $('#facilitiesTable').datagrid('getSelected');
|
||||
if(row){
|
||||
$('#facilitiesDialog').dialog('open').dialog('setTitle', '编辑生产设施工况表').window('center');
|
||||
$('#facilitiesForm').form('load', row);
|
||||
facilities_action_url = '/api/enp/facilities/update/'}
|
||||
else{
|
||||
$.messager.alert('提示', '请选择一条数据!');
|
||||
}
|
||||
}
|
||||
//删除数据
|
||||
function delfacilities(){
|
||||
var row = $('#facilitiesTable').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
var data = { id: row.id }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/api/enp/facilities/delete/',
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#facilitiesTable").datagrid('reload');
|
||||
$("#facilitiesTable").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '操作失败!');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else { $.messager.alert('提示', '请选择一条数据!'); }
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,164 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
||||
|
||||
<div data-options="region:'center',title:'燃料信息表',split:true,border:false" style="height:100%;">
|
||||
<div id="fuelTableBar">
|
||||
<a onclick="addfuel()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
<a onclick="edifuel()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
|
||||
<a onclick="delfuel()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
|
||||
</div>
|
||||
<table id="fuelTable" style="height:100%"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="fuelDialog" 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="fuelForm">
|
||||
<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="count" data-options="label:'用量', labelWidth:100" class="easyui-numberbox" style="width:300px;"></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="dwcount" data-options="label:'低位热值',labelWidth:100" class="easyui-numberbox" style="width:300px;" ></input>
|
||||
|
||||
<input name="unit" data-options="label:'单位', labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="rmhll" data-options="label:'燃煤含硫量(%)',labelWidth:150" class="easyui-numberbox" style="width:300px;" ></input>
|
||||
|
||||
<input name="rmhff" data-options="label:'燃煤挥发分(%)', labelWidth:150" class="easyui-numberbox" style="width:300px;" ></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="rmqt" data-options="label:'燃煤其他',labelWidth:150" class="easyui-textbox" style="width:600px;" ></input>
|
||||
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
|
||||
<input name="ryhll" data-options="label:'燃油含硫量(%)', labelWidth:150" class="easyui-numberbox" style="width:600px;" ></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="ryqt" data-options="label:'燃油其他',labelWidth:150" class="easyui-textbox" style="width:600px;" ></input>
|
||||
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
|
||||
|
||||
<input name="rqlhqhl" data-options="label:'燃气硫化氢含量(%)', labelWidth:150" class="easyui-numberbox" style="width:600px;" ></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="rqqt" data-options="label:'燃气其他', labelWidth:150" class="easyui-textbox" style="width:600px;" ></input>
|
||||
|
||||
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
|
||||
|
||||
<input name="qtrlxgwzhl" data-options="label:'其他燃料相关物质含量', labelWidth:150" class="easyui-textbox" style="width:300px;" ></input>
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="savefuel()">保存</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var fuel_action_url = '/api/enp/fuel/create/';
|
||||
|
||||
$('#fuelTable').datagrid({
|
||||
url: '/api/enp/fuel/list/',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
method: 'get',
|
||||
toolbar: '#fuelTableBar',
|
||||
border: false,
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'name', title: '燃料名称', width: 200 },
|
||||
{ field: 'count', title: '用量', width: 200 },
|
||||
{ field: 'dwcount', title: '低位热值', width: 200 },
|
||||
{ field: 'unit', title: '单位', width: 200 },
|
||||
{ field: 'rmhll', title: '燃煤含硫量(%)', width: 200 },
|
||||
{ field: 'rmhff', title: '燃煤挥发分(%)', width: 200 },
|
||||
{ field: 'rmqt', title: '燃煤其他', width: 200 },
|
||||
{ field: 'ryhll', title: '燃油含硫量(%)', width: 200 },
|
||||
{ field: 'ryqt', title: '燃油其他', width: 200 },
|
||||
{ field: 'rqlhqhl', title: '燃气硫化氢含量(%)', width: 200 },
|
||||
{ field: 'rqqt', title: '燃气其他', width: 200 },
|
||||
{ field: 'qtrlxgwzhl', title: '其他燃料相关物质含量', width: 200 },
|
||||
|
||||
]],
|
||||
onClickRow: function (index, row) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//新增
|
||||
function addfuel() {
|
||||
$('#fuelDialog').dialog('open').dialog('setTitle', '新增燃料信息').window('center');
|
||||
$('#fuelForm').form('clear');
|
||||
fuel_action_url = '/api/enp/fuel/create/'
|
||||
}
|
||||
//保存数据
|
||||
function savefuel() {
|
||||
var data = $('#fuelForm').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: fuel_action_url,
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
return $('#fuelForm').form('validate')
|
||||
},
|
||||
success: function (data) {
|
||||
$("#fuelTable").datagrid('reload');
|
||||
$("#fuelDialog").dialog("close");
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
//编辑数据
|
||||
function edifuel(){
|
||||
var row = $('#fuelTable').datagrid('getSelected');
|
||||
if(row){
|
||||
$('#fuelDialog').dialog('open').dialog('setTitle', '编辑燃料信息表').window('center');
|
||||
$('#fuelForm').form('load', row);
|
||||
fuel_action_url = '/api/enp/fuel/update/'}
|
||||
else{
|
||||
$.messager.alert('提示', '请选择一条数据!');
|
||||
}
|
||||
}
|
||||
//删除数据
|
||||
function delfuel(){
|
||||
var row = $('#fuelTable').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
var data = { id: row.id }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/api/enp/fuel/delete/',
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#fuelTable").datagrid('reload');
|
||||
$("#fuelTable").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '操作失败!');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else { $.messager.alert('提示', '请选择一条数据!'); }
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
||||
|
||||
<div data-options="region:'center',title:'废气防治设施表',split:true,border:false" style="height:100%;">
|
||||
<div id="gpreventionTableBar">
|
||||
<a onclick="addgprevention()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
<a onclick="edigprevention()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
|
||||
<a onclick="delgprevention()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
|
||||
</div>
|
||||
<table id="gpreventionTable" style="height:100%"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="gpreventionDialog" 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="gpreventionForm">
|
||||
<input name="id" type="hidden">
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="name" data-options="label:'设施名称', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="number" data-options="label:'编码', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="type" data-options="label:'设施型号',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="cs_name" data-options="label:'参数名称', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="desig_nnumber" data-options="label:'设计值',labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
<input name="em_unit" data-options="label:'单位',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="start_time" data-options="label:'运行开始时间', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
|
||||
<input name="end_time" data-options="label:'运行结束日期', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="state" data-options="label:'运行状态',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="pfyql" data-options="label:'排放烟气量(m3/h)', labelWidth:130" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="wryz" data-options="label:'污染因子',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="zlxl" data-options="label:'治理效率', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="sjly" data-options="label:'数据来源',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="pqtgd" data-options="label:'排气筒高度m', labelWidth:110" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="pkwd" data-options="label:'排口温度℃',labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="yl" data-options="label:'压力kPa', labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="pfsj" data-options="label:'排放时间h',labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="hdl" data-options="label:'耗电率kWh', labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="fcpname" data-options="label:'副产品名称',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="fcwcl" data-options="label:'副产物产生量(t)', labelWidth:110" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="yjname" data-options="label:'药剂名称',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="tjtime" data-options="label:'添加时间', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="tjl" data-options="label:'添加量',labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="savegprevention()">保存</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var gprevention_action_url = '/api/enp/gprevention/create/';
|
||||
|
||||
$('#gpreventionTable').datagrid({
|
||||
url: '/api/enp/gprevention/list/',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
method: 'get',
|
||||
toolbar: '#gpreventionTableBar',
|
||||
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: 'pfyql', title: '排放烟气量(m3/h)', width: 200 },
|
||||
{ field: 'wryz', title: '污染因子', width: 200 },
|
||||
{ field: 'zlxl', title: '治理效率', width: 200 },
|
||||
{ field: 'sjly', title: '数据来源', width: 200 },
|
||||
{ field: 'pqtgd', title: '排气筒高度m', width: 200 },
|
||||
{ field: 'pkwd', title: '排口温度℃', width: 200 },
|
||||
{ field: 'yl', title: '压力kPa', width: 200 },
|
||||
{ field: 'pfsj', title: '排放时间h', width: 200 },
|
||||
{ field: 'hdl', title: '耗电率kWh', width: 200 },
|
||||
{ field: 'fcpname ', title: '副产品名称', width: 200 },
|
||||
{ field: 'fcwcl', title: '副产物产生量t', width: 200 },
|
||||
{ field: 'yjname', title: '药剂名称', width: 200 },
|
||||
{ field: 'tjtime', title: '添加时间', width: 200 },
|
||||
{ field: 'tjl', title: '添加量', width: 200 },
|
||||
|
||||
]],
|
||||
onClickRow: function (index, row) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//新增
|
||||
function addgprevention() {
|
||||
$('#gpreventionDialog').dialog('open').dialog('setTitle', '新增废气防治设施').window('center');
|
||||
$('#gpreventionForm').form('clear');
|
||||
gprevention_action_url = '/api/enp/gprevention/create/'
|
||||
}
|
||||
//保存数据
|
||||
function savegprevention() {
|
||||
var data = $('#gpreventionForm').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: gprevention_action_url,
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
return $('#gpreventionForm').form('validate')
|
||||
},
|
||||
success: function (data) {
|
||||
$("#gpreventionTable").datagrid('reload');
|
||||
$("#gpreventionDialog").dialog("close");
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
//编辑数据
|
||||
function edigprevention(){
|
||||
var row = $('#gpreventionTable').datagrid('getSelected');
|
||||
if(row){
|
||||
$('#gpreventionDialog').dialog('open').dialog('setTitle', '编辑废气防治设施').window('center');
|
||||
$('#gpreventionForm').form('load', row);
|
||||
gprevention_action_url = '/api/enp/gprevention/update/'}
|
||||
else{
|
||||
$.messager.alert('提示', '请选择一条数据!');
|
||||
}
|
||||
}
|
||||
//删除数据
|
||||
function delgprevention(){
|
||||
var row = $('#gpreventionTable').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
var data = { id: row.id }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/api/enp/gprevention/delete/',
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#gpreventionTable").datagrid('reload');
|
||||
$("#gpreventionTable").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '操作失败!');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else { $.messager.alert('提示', '请选择一条数据!'); }
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
||||
|
||||
<div data-options="region:'center',title:'废水监测仪器信息表',split:true,border:false" style="height:100%;">
|
||||
<div id="waterequipmentTableBar">
|
||||
<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="waterequipmentTable" style="height:100%"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="waterequipmentDialog" 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="waterequipmentForm">
|
||||
<input name="id" type="hidden">
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="number" data-options="label:'排放口编号', labelWidth:100" class="easyui-textbox" style="width:600px;" ></input>
|
||||
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="type" data-options="label:'污染物种类',labelWidth:100" class="easyui-textbox" style="width:600px;" ></input>
|
||||
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="methods" data-options="label:'监测采样方法及个数',labelWidth:150" class="easyui-textbox" style="width:600px;" ></input>
|
||||
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="count" data-options="label:'监测次数',labelWidth:100" class="easyui-numberbox" style="width:600px;" ></input>
|
||||
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="identification" data-options="label:'鉴定方法',labelWidth:100" class="easyui-textbox" style="width:600px;" ></input>
|
||||
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="jcyqmodel" data-options="label:'监测仪器型号', labelWidth:100" class="easyui-textbox" style="width:600px;" ></input>
|
||||
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="note" 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="savewaterequipment()">保存</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var waterequipment_action_url = '/api/enp/waterequipment/create/';
|
||||
|
||||
$('#waterequipmentTable').datagrid({
|
||||
url: '/api/enp/waterequipment/list/',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
method: 'get',
|
||||
toolbar: '#waterequipmentTableBar',
|
||||
border: false,
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'number', title: '排放口编号', width: 200 },
|
||||
{ field: 'type', title: '污染物种类', width: 200 },
|
||||
{ field: 'methods', title: '监测采样方法及个数', width: 200 },
|
||||
{ field: 'count', title: '监测次数', width: 200 },
|
||||
{ field: 'identification', title: '鉴定方法', width: 200 },
|
||||
{ field: 'jcyqmodel', title: '监测仪器型号', width: 200 },
|
||||
{ field: 'note', title: '备注', width: 300 },
|
||||
|
||||
]],
|
||||
onClickRow: function (index, row) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//新增
|
||||
function addwaterequipment() {
|
||||
$('#waterequipmentDialog').dialog('open').dialog('setTitle', '新增废水监测仪器信息表').window('center');
|
||||
$('#waterequipmentForm').form('clear');
|
||||
waterequipment_action_url = '/api/enp/waterequipment/create/'
|
||||
}
|
||||
//保存数据
|
||||
function savewaterequipment() {
|
||||
var data = $('#waterequipmentForm').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: waterequipment_action_url,
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
return $('#waterequipmentForm').form('validate')
|
||||
},
|
||||
success: function (data) {
|
||||
$("#waterequipmentTable").datagrid('reload');
|
||||
$("#waterequipmentDialog").dialog("close");
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
//编辑数据
|
||||
function ediwaterequipment(){
|
||||
var row = $('#waterequipmentTable').datagrid('getSelected');
|
||||
if(row){
|
||||
$('#waterequipmentDialog').dialog('open').dialog('setTitle', '编辑废水监测仪器信息表').window('center');
|
||||
$('#waterequipmentForm').form('load', row);
|
||||
waterequipment_action_url = '/api/enp/waterequipment/update/'}
|
||||
else{
|
||||
$.messager.alert('提示', '请选择一条数据!');
|
||||
}
|
||||
}
|
||||
//删除数据
|
||||
function delwaterequipment(){
|
||||
var row = $('#waterequipmentTable').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
var data = { id: row.id }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/api/enp/waterequipment/delete/',
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#waterequipmentTable").datagrid('reload');
|
||||
$("#waterequipmentTable").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '操作失败!');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else { $.messager.alert('提示', '请选择一条数据!'); }
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
||||
<div data-options="region:'west', title:'排放口', split:true, border:false" style="width: 300px;height:100%;">
|
||||
<div data-options="region:'west', title:'废气排放口', split:true, border:false" style="width: 300px;height:100%;">
|
||||
<div id="drainTableBar">
|
||||
<a onclick="addDrain()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
<a onclick="editDrain()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<table id="drainTable" style="height:100%"></table>
|
||||
</div>
|
||||
<div data-options="region:'center',title:'监测记录',split:true,border:false" style="height:100%;">
|
||||
<div data-options="region:'center',title:'废气监测记录',split:true,border:false" style="height:100%;">
|
||||
<div id="gasEmitTableBar">
|
||||
<a onclick="addGasEmitRecord()" class="easyui-linkbutton"
|
||||
data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,185 @@
|
|||
<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;" required></input>
|
||||
|
||||
<input name="number" data-options="label:'编码', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="type" data-options="label:'设施型号',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="cs_name" data-options="label:'参数名称', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="desig_nnumber" data-options="label:'设计值',labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
<input name="em_unit" data-options="label:'单位',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="start_time" data-options="label:'运行开始时间', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
|
||||
<input name="end_time" data-options="label:'运行结束日期', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="state" data-options="label:'运行状态',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
<input name="ckll" data-options="label:'出口流量', labelWidth:100" class="easyui-numberbox" style="width:300px;" required ></input>
|
||||
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="wryz" data-options="label:'污染因子',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="zlxl" data-options="label:'治理效率', labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="sjly" data-options="label:'数据来源',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="pqfx" data-options="label:'排放去向',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="wncsl" data-options="label:'污泥产生量', labelWidth:100" class="easyui-textbox" style="width:300px;" required ></input>
|
||||
<input name="clfs" data-options="label:'处理方式',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="hdl" data-options="label:'耗电量kWh', labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
<input name="yjname" data-options="label:'药剂名称',labelWidth:100" class="easyui-textbox" style="width:300px;" required></input>
|
||||
|
||||
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="tjtime" data-options="label:'添加时间', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
<input name="tjl" data-options="label:'添加量',labelWidth:100" class="easyui-numberbox" style="width:300px;" required></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/wprevention/create/';
|
||||
|
||||
$('#wpreventionTable').datagrid({
|
||||
url: '/api/enp/wprevention/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 },
|
||||
{ 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/wprevention/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/wprevention/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/wprevention/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>
|
||||
|
|
@ -1,68 +1,76 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
|
||||
<div data-options="region:'west', title:'一般固废名称', split:true, border:false" style="width: 300px;height:100%;">
|
||||
<div id="wasteTableBar">
|
||||
<a onclick="addWaste()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
<a onclick="editWaste()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
|
||||
<a onclick="delWaste()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
|
||||
<div data-options="region:'west', title:'废水排放口', split:true, border:false" style="width: 300px;height:100%;">
|
||||
<div id="drainTableBar">
|
||||
<a onclick="addDrain()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
<a onclick="editDrain()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
|
||||
<a onclick="delDrain()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
|
||||
</div>
|
||||
<table id="wasteTable" style="height:100%"></table>
|
||||
<table id="drainTable" style="height:100%"></table>
|
||||
</div>
|
||||
<div data-options="region:'center',title:'一般固废台账',split:true,border:false" style="height:100%;">
|
||||
<div id="normalWasteRecordTableBar">
|
||||
<a onclick="addNormalWasteRecord()" class="easyui-linkbutton"
|
||||
data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
<a onclick="delNormalWasteRecord()" class="easyui-linkbutton"
|
||||
data-options="iconCls: 'fa-trash',plain: true">删除</a>
|
||||
<div data-options="region:'center',title:'废水监测记录',split:true,border:false" style="height:100%;">
|
||||
<div id="detectionTableBar">
|
||||
<a onclick="adddetection()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
<a onclick="deldetection()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
|
||||
</div>
|
||||
<table id="normalWasteRecordTable" style="height:100%"></table>
|
||||
<table id="detectionTable" style="height:100%"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="wasteDialog" class="easyui-dialog" style="width:400px;height:200px;padding:5px 15px;"
|
||||
<div id="drainDialog" class="easyui-dialog" style="width:400px;height:200px;padding:5px 15px;"
|
||||
data-options="resizable:true,modal:true,closed:true,border:false">
|
||||
<form method="post" id="wasteForm">
|
||||
<form method="post" id="drainForm">
|
||||
<input name="id" type="hidden">
|
||||
<input name="type" type="hidden" id="typeFormItem">
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="number" data-options="label:'废物编号'" class="easyui-textbox" style="width:300px;" required></input>
|
||||
<input name="number" data-options="label:'排放口编号'" class="easyui-textbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<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>
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="saveWaste()">保存</a>
|
||||
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="saveDrain()">保存</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="normalWasteRecordDialog" class="easyui-dialog" style="width:400px;height:600px;padding:5px 15px;"
|
||||
<div id="detectionDialog" 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="normalWasteRecordForm">
|
||||
<form method="post" id="detectionForm">
|
||||
<input name="id" type="hidden">
|
||||
<input name="waste" type="hidden" id="wasteFormItem">
|
||||
<input name="operator" type="hidden" id="operatorFormItem">
|
||||
<input name="drain" type="hidden" id="gasEmitForm_drain">
|
||||
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="gen_date" data-options="label:'产生日期', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
|
||||
<input name="number" data-options="label:'排放口编码', labelWidth:100" class="easyui-textbox" style="width:600px;" required></input>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="jcDate" data-options="label:'监测日期', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
|
||||
<input name="jctime" data-options="label:'监测时间', editable:false, labelWidth:100" class="easyui-datetimespinner" style="width:300px;" required ></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="gen_count" data-options="label:'产生数量(吨)', labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
<input name="ckhxxyl" data-options="label:'出口化学需氧量(mg/L)',labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="ckshxll" data-options="label:'出口生化需氧量(mg/L)', labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="dis_date" data-options="label:'处置日期', editable:false, labelWidth:100" class="easyui-datebox" style="width:300px;" required ></input>
|
||||
<input name="ckad" data-options="label:'出口氨氮(mg/L)',labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="ckxfw" data-options="label:'出口悬浮物(mg/L)', labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="dis_count" data-options="label:'委托处置量(吨)', labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
<input name="jkhxxyl" data-options="label:'进口化学需氧量(mg/L)',labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="jkshxll" data-options="label:'进口生化需氧量(mg/L)', labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="inv_count" data-options="label:'库存(吨)', labelWidth:100" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="operator__name" data-options="label:'经办人', labelWidth:100" class="easyui-textbox" style="width:300px;" id="operator__nameFormItem"
|
||||
required readonly></input>
|
||||
<a class='easyui-linkbutton' onclick="choseuser('operator')" style="width:auto">选择</a>
|
||||
<input name="jkad" data-options="label:'进口氨氮(mg/L)',labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
|
||||
<input name="jkxfw" data-options="label:'进口悬浮物(mg/L)', labelWidth:180" class="easyui-numberbox" style="width:300px;" required></input>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="saveNormalWasteRecord()">保存</a>
|
||||
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="savedetection()">保存</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -73,134 +81,106 @@
|
|||
$('#operator__nameFormItem').textbox('setValue', top.$('#in').attr('show'));
|
||||
}
|
||||
}
|
||||
var waste_action_url = '/api/enp/waste/create/';
|
||||
var record_action_url = '/api/enp/normalwasterecord/create/';
|
||||
$('#wasteTable').datagrid({
|
||||
url: '/api/enp/waste/list/?type=1',
|
||||
var drain_action_url = '/api/enp/drains/create/';
|
||||
var record_action_url = '/api/enp/gasemit/create/';
|
||||
$('#drainTable').datagrid({
|
||||
url: '/api/enp/drains/list/',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
method: 'get',
|
||||
toolbar: '#wasteTableBar',
|
||||
toolbar: '#drainTableBar',
|
||||
border: false,
|
||||
fitColumns: true,
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'number', title: '废物编号', width: 100 },
|
||||
{ field: 'name', title: '废物名称', width: 100 },
|
||||
{ field: 'number', title: '排放口编号', width: 100 },
|
||||
{ field: 'name', title: '排放口名称', width: 100 },
|
||||
]],
|
||||
onClickRow: function (index, row) {
|
||||
$('#normalWasteRecordTable').datagrid({
|
||||
url: '/api/enp/normalwasterecord/list/?waste=' + row.id
|
||||
$('#detectionTable').datagrid({
|
||||
url: '/api/enp/detection/list/?drain=' + row.id
|
||||
})
|
||||
}
|
||||
});
|
||||
$('#normalWasteRecordTable').datagrid({
|
||||
url: '/api/enp/normalwasterecord/list/',
|
||||
$('#detectionTable').datagrid({
|
||||
url: '/api/enp/detection/list/',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
method: 'get',
|
||||
toolbar: '#normalWasteRecordTableBar',
|
||||
toolbar: '#detectionTableBar',
|
||||
border: false,
|
||||
fitColumns: true,
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'operator', title: 'operator', hidden: true },
|
||||
{ field: 'waste', title: 'waste', hidden: true },
|
||||
{ field: 'waste__name', title: '废物名称', width: 100 },
|
||||
{ field: 'gen_date', title: '产生日期', width: 100 },
|
||||
{ field: 'gen_count', title: '产生数量(吨)', width: 100 },
|
||||
{ field: 'dis_date', title: '处置日期', width: 100 },
|
||||
{ field: 'dis_count', title: '委托处置量(吨)', width: 100 },
|
||||
{ field: 'inv_count', title: '库存量(吨)', width: 100 },
|
||||
{ field: 'operator__name', title: '经办人', width: 100 },
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'drain', title: 'drain', hidden: true },
|
||||
{ field: 'drain__name', title: '排放口 ', width: 200 },
|
||||
{ field: 'jcDate', title: '监测日期', width: 200 },
|
||||
{ field: 'jctime', title: '监测时间', width: 200 },
|
||||
{ field: 'ckhxxyl', title: '出:化学需氧量(mg/L)', width: 200 },
|
||||
{ field: 'ckshxll', title: '出:生化需氧量(mg/L)', width: 200 },
|
||||
{ field: 'ckad', title: '出:氨氮(mg/L)', width: 200 },
|
||||
{ field: 'ckxfw', title: '出:悬浮物(mg/L)', width: 200 },
|
||||
{ field: 'jkhxxyl', title: '进:化学需氧量(mg/L)', width: 200 },
|
||||
{ field: 'jkshxll', title: '进:生化需氧量(mg/L)', width: 200 },
|
||||
{ field: 'jkad', title: '进:氨氮(mg/L)', width: 200 },
|
||||
{ field: 'jkxfw', title: '进:悬浮物(mg/L)', width: 200 },
|
||||
]],
|
||||
onClickRow: function (index, row) {
|
||||
|
||||
}
|
||||
});
|
||||
function addWaste() {
|
||||
$('#wasteDialog').dialog('open').dialog('setTitle', '新增一般固废名').window('center');
|
||||
$('#wasteForm').form('clear');
|
||||
$('#typeFormItem').attr('value',1);
|
||||
waste_action_url = '/api/enp/waste/create/'
|
||||
function addDrain() {
|
||||
$('#drainDialog').dialog('open').dialog('setTitle', '新增排放口').window('center');
|
||||
$('#drainForm').form('clear');
|
||||
drain_action_url = '/api/enp/drains/create/'
|
||||
}
|
||||
function addNormalWasteRecord() {
|
||||
|
||||
var row = $('#wasteTable').datagrid('getSelected');
|
||||
|
||||
function editDrain(){
|
||||
var row = $('#draineTable').datagrid('getSelected');
|
||||
if(row){
|
||||
$('#normalWasteRecordDialog').dialog('open').dialog('setTitle', '新增记录').window('center');
|
||||
$('#normalWasteRecordForm').form('clear');
|
||||
$('#wasteFormItem').attr('value', row.id);
|
||||
record_action_url = '/api/enp/normalwasterecord/create/';
|
||||
}else{
|
||||
$.messager.alert('提示', '请先选择左侧废物!');
|
||||
}
|
||||
|
||||
}
|
||||
function editWaste(){
|
||||
var row = $('#wasteTable').datagrid('getSelected');
|
||||
if(row){
|
||||
$('#wasteDialog').dialog('open').dialog('setTitle', '编辑一般固废名').window('center');
|
||||
$('#wasteForm').form('load', row);
|
||||
waste_action_url = '/api/enp/waste/update/'}
|
||||
$('#drainDialog').dialog('open').dialog('setTitle', '编辑排放口').window('center');
|
||||
$('#drainForm').form('load', row);
|
||||
drain_action_url = '/api/enp/drains/update/'}
|
||||
else{
|
||||
$.messager.alert('提示', '请选择一条数据!');
|
||||
}
|
||||
}
|
||||
function saveWaste() {
|
||||
var data = $('#wasteForm').serializeJSON();
|
||||
function saveDrain() {
|
||||
var data = $('#drainForm').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: waste_action_url,
|
||||
url: drain_action_url,
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
return $('#wasteForm').form('validate')
|
||||
return $('#drainForm').form('validate')
|
||||
},
|
||||
success: function (data) {
|
||||
$("#wasteTable").datagrid('reload');
|
||||
$("#wasteDialog").dialog("close");
|
||||
$("#drainTable").datagrid('reload');
|
||||
$("#drainDialog").dialog("close");
|
||||
},
|
||||
});
|
||||
}
|
||||
function saveNormalWasteRecord() {
|
||||
var data = $('#normalWasteRecordForm').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: record_action_url,
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
return $('#normalWasteRecordForm').form('validate')
|
||||
},
|
||||
success: function (data) {
|
||||
$("#normalWasteRecordTable").datagrid('reload');
|
||||
$("#normalWasteRecordDialog").dialog("close");
|
||||
},
|
||||
});
|
||||
}
|
||||
function delWaste() {
|
||||
var row = $('#wasteTable').datagrid('getSelected');
|
||||
|
||||
function delDrain() {
|
||||
var row = $('#drainTable').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
var data = { id: row.id }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/api/enp/waste/delete/',
|
||||
url: '/api/enp/drains/delete/',
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#wasteTable").datagrid('reload');
|
||||
$("#normalWasteRecordTable").datagrid('reload');
|
||||
$("#drainTable").datagrid('reload');
|
||||
// $("#gasEmitTable").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '操作失败!');
|
||||
|
|
@ -212,4 +192,80 @@
|
|||
}
|
||||
else { $.messager.alert('提示', '请选择一条数据!'); }
|
||||
}
|
||||
//新增
|
||||
function adddetection() {
|
||||
var row = $('#drainTable').datagrid('getSelected');
|
||||
if(row){
|
||||
$('#detectionDialog').dialog('open').dialog('setTitle', '新增记录').window('center');
|
||||
$('#detectionForm').form('clear');
|
||||
$('#gasEmitForm_drain').attr('value', row.id);
|
||||
record_action_url = '/api/enp/detection/create/';
|
||||
}else{
|
||||
$.messager.alert('提示', '请先选择左侧排放口!');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
var detection_action_url = '/api/enp/detection/create/';
|
||||
//保存数据
|
||||
function savedetection() {
|
||||
var data = $('#detectionForm').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: detection_action_url,
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
return $('#detectionForm').form('validate')
|
||||
},
|
||||
success: function (data) {
|
||||
$("#detectionTable").datagrid('reload');
|
||||
$("#detectionDialog").dialog("close");
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
//编辑数据
|
||||
function edidetection(){
|
||||
var row = $('#detectionTable').datagrid('getSelected');
|
||||
if(row){
|
||||
$('#detectionDialog').dialog('open').dialog('setTitle', '编辑废水污染物检测结').window('center');
|
||||
$('#detectionForm').form('load', row);
|
||||
detection_action_url = '/api/enp/detection/update/'}
|
||||
else{
|
||||
$.messager.alert('提示', '请选择一条数据!');
|
||||
}
|
||||
}
|
||||
//删除数据
|
||||
function deldetection(){
|
||||
var row = $('#detectionTable').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
var data = { id: row.id }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/api/enp/detection/delete/',
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#detectionTable").datagrid('reload');
|
||||
$("#detectionTable").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '操作失败!');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else { $.messager.alert('提示', '请选择一条数据!'); }
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -6,4 +6,11 @@ urlpatterns = [
|
|||
path('wgas/', views.HtmlWgas),
|
||||
path('wwater/', views.HtmlWwater),
|
||||
path('gaspredict/', views.HtmlGasPredict),
|
||||
path('facilities/', views.HtmlFacilities),
|
||||
path('wprevention/', views.HtmlWprevention),#废水防治设施
|
||||
path('gprevention/', views.HtmlGprevention),#废气防治设施
|
||||
path('abnormal/', views.HtmlAbnormal),
|
||||
path('detection/', views.HtmlDetection),
|
||||
path('fuel/', views.HtmlFuel),
|
||||
path('waterequipment/', views.HtmlWaterequipment),
|
||||
]
|
||||
|
|
@ -3,12 +3,26 @@ from . import views
|
|||
|
||||
urlpatterns = [
|
||||
path('waste/<str:action>/', views.ApiWaste),
|
||||
path('drain/<str:action>/', views.ApiDrain),
|
||||
path('drain/<str:action>/', views.ApiDrainq),#排气口
|
||||
path('drains/<str:action>/', views.ApiDrains),#排水口
|
||||
path('draindt/<str:action>/', views.ApiDraindt),#排口地图
|
||||
|
||||
path('normalwasterecord/<str:action>/', views.ApiNormalWasteRecord),
|
||||
path('dwastemakelist/<str:action>/', views.ApiDWasteMakeList),
|
||||
path('dwastemakerecord/<str:action>/', views.ApiDWasteMakeRecord),
|
||||
path('dwastekeeprecord/<str:action>/', views.ApiDWasteKeepRecord),
|
||||
path('dwastehandlerecord/<str:action>/', views.ApiDWasteHandleRecord),
|
||||
path('gasemit/<str:action>/', views.ApiGasEmit),
|
||||
path('gaspredict/<str:element>/<int:drainId>/', views.ApiGasPredict)
|
||||
path('gaspredict/<str:element>/<int:drainId>/', views.ApiGasPredict),
|
||||
path('facilities/<str:action>/', views.ApiFacilities),#环境设施,生产设施
|
||||
path('wprevention/<str:action>/', views.ApiWprevention),#废水防治设施
|
||||
path('gprevention/<str:action>/', views.ApiGprevention),#废水防治设施
|
||||
path('abnormal/<str:action>/', views.ApiAbnormal),#防治设施异常
|
||||
path('detection/<str:action>/', views.ApiDetection),#废水污染物检测
|
||||
path('fuel/<str:action>/', views.ApiFuel),#燃料信息表
|
||||
path('waterequipment/<str:action>/', views.ApiWaterequipment),#废水监测仪器信息表
|
||||
|
||||
|
||||
|
||||
|
||||
]
|
||||
507
enp/views.py
507
enp/views.py
|
|
@ -3,7 +3,7 @@ from rest_framework.views import APIView
|
|||
from rest_framework.authentication import BaseAuthentication
|
||||
from safesite.models import User
|
||||
from rest_framework.exceptions import AuthenticationFailed
|
||||
from .models import DWasteHandleRecord, DWasteKeepRecord, DWasteMakeList, DWasteMakeRecord, Drain, GasEmit, NormalWasteRecord, Waste
|
||||
from .models import DWasteHandleRecord, DWasteKeepRecord, DWasteMakeList, DWasteMakeRecord, Drain, GasEmit, NormalWasteRecord, Waste, Facilities,Prevention,abnormal,Detection,Fuel,Waterequipment
|
||||
from safesite.views import transjson, fenye, MyEncoder
|
||||
from django.http import HttpResponse, JsonResponse
|
||||
import json
|
||||
|
|
@ -30,7 +30,22 @@ def HtmlWwater(request):
|
|||
|
||||
def HtmlGasPredict(request):
|
||||
return render(request, 'gaspredict.html')
|
||||
def HtmlFacilities(request):
|
||||
return render(request, 'facilities.html')
|
||||
def HtmlWprevention(request):
|
||||
return render(request, 'wprevention.html')
|
||||
def HtmlAbnormal(request):
|
||||
return render(request, 'abnormal.html')
|
||||
def HtmlDetection(request):
|
||||
return render(request, 'detection.html')
|
||||
def HtmlFuel(request):
|
||||
return render(request, 'fuel.html')
|
||||
def HtmlWaterequipment(request):
|
||||
return render(request, 'waterequipment.html')
|
||||
def HtmlGprevention(request):
|
||||
return render(request, 'gprevention.html')
|
||||
|
||||
|
||||
def ApiWaste(request, action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
if action == 'list':
|
||||
|
|
@ -100,6 +115,431 @@ def ApiNormalWasteRecord(request, action):
|
|||
obj = NormalWasteRecord.objects.get(id=data['id'])
|
||||
obj.delete()
|
||||
return JsonResponse({"code":1})
|
||||
#生产设施
|
||||
def ApiFacilities(request, action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
if action == 'list':
|
||||
objs = Facilities.objects.filter(usecomp=user.usecomp, is_deleted=False)
|
||||
total = objs.count()
|
||||
startnum, endnum = fenye(request)
|
||||
objs = objs.order_by('-create_time')[startnum:endnum].values('id', 'name', 'number', 'type', 'cs_name', 'desig_nnumber',
|
||||
'actual_number', 'em_unit', 'ability', 'al_unit','start_time', 'end_time', 'pdc_Load', 'zj_product', 'zj_unit', 'zz_product',
|
||||
'zz_unit', 'material_name', 'material_type', 'material_unit','material_count', 'material_composition', 'material_account',
|
||||
'material_address')
|
||||
return HttpResponse(transjson(total, objs), content_type="application/json")
|
||||
elif action == 'create':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Facilities()
|
||||
obj.create_by = user
|
||||
obj.update_by = user
|
||||
obj.usecomp = user.usecomp
|
||||
obj.name = data['name']
|
||||
obj.number = data['number']
|
||||
obj.type = data['type']
|
||||
obj.cs_name = data['cs_name']
|
||||
obj.desig_nnumber = data['desig_nnumber']
|
||||
obj.actual_number = data['actual_number']
|
||||
obj.em_unit = data['em_unit']
|
||||
obj.ability = data['ability']
|
||||
obj.al_unit = data['al_unit']
|
||||
obj.start_time = data['start_time']
|
||||
obj.end_time = data['end_time']
|
||||
obj.pdc_Load = data['pdc_Load']
|
||||
obj.zj_product = data['zj_product']
|
||||
obj.zj_unit = data['zj_unit']
|
||||
obj.zz_product = data['zz_product']
|
||||
obj.zz_unit = data['zz_unit']
|
||||
obj.material_name = data['material_name']
|
||||
obj.material_type = data['material_type']
|
||||
obj.material_unit = data['material_unit']
|
||||
obj.material_count = data['material_count']
|
||||
obj.material_composition = data['material_composition']
|
||||
obj.material_account = data['material_account']
|
||||
obj.material_address = data['material_address']
|
||||
obj.save()
|
||||
return JsonResponse({"code":1})
|
||||
elif action == 'update':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Facilities.objects.get(id=data['id'])
|
||||
obj.update_by = user
|
||||
obj.usecomp = user.usecomp
|
||||
obj.name = data['name']
|
||||
obj.number = data['number']
|
||||
obj.type = data['type']
|
||||
obj.cs_name = data['cs_name']
|
||||
obj.desig_nnumber = data['desig_nnumber']
|
||||
obj.actual_number = data['actual_number']
|
||||
obj.em_unit = data['em_unit']
|
||||
obj.ability = data['ability']
|
||||
obj.al_unit = data['al_unit']
|
||||
obj.start_time = data['start_time']
|
||||
obj.end_time = data['end_time']
|
||||
obj.pdc_Load = data['pdc_Load']
|
||||
obj.zj_product = data['zj_product']
|
||||
obj.zj_unit = data['zj_unit']
|
||||
obj.zz_product = data['zz_product']
|
||||
obj.zz_unit = data['zz_unit']
|
||||
obj.material_name = data['material_name']
|
||||
obj.material_type = data['material_type']
|
||||
obj.material_unit = data['material_unit']
|
||||
obj.material_count = data['material_count']
|
||||
obj.material_composition = data['material_composition']
|
||||
obj.material_account = data['material_account']
|
||||
obj.material_address = data['material_address']
|
||||
obj.save()
|
||||
return JsonResponse({"code":1})
|
||||
elif action == 'delete':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Facilities.objects.get(id=data['id'])
|
||||
obj.delete()
|
||||
return JsonResponse({"code":1})
|
||||
#废气防治设施
|
||||
def ApiGprevention(request, action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
if action == 'list':
|
||||
objs = Prevention.objects.filter(usecomp=user.usecomp, is_deleted=False,preventiontype=2)
|
||||
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', 'pfyql', 'wryz', 'zlxl',
|
||||
'sjly', 'pqtgd', 'pkwd', 'yl','pfsj', 'hdl', 'fcpname', 'fcwcl','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=2
|
||||
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.pfyql = data['pfyql']
|
||||
obj.wryz = data['wryz']
|
||||
obj.zlxl = data['zlxl']
|
||||
obj.sjly = data['sjly']
|
||||
obj.pqtgd = data['pqtgd']
|
||||
obj.pkwd = data['pkwd']
|
||||
obj.yl = data['yl']
|
||||
obj.pfsj = data['pfsj']
|
||||
obj.hdl = data['hdl']
|
||||
obj.fcpname = data['fcpname']
|
||||
obj.fcwcl = data['fcwcl']
|
||||
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=2
|
||||
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.pfyql = data['pfyql']
|
||||
obj.wryz = data['wryz']
|
||||
obj.zlxl = data['zlxl']
|
||||
obj.sjly = data['sjly']
|
||||
obj.pqtgd = data['pqtgd']
|
||||
obj.pkwd = data['pkwd']
|
||||
obj.yl = data['yl']
|
||||
obj.pfsj = data['pfsj']
|
||||
obj.hdl = data['hdl']
|
||||
obj.fcpname = data['fcpname']
|
||||
obj.fcwcl = data['fcwcl']
|
||||
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 ApiWprevention(request, action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
if action == 'list':
|
||||
objs = Prevention.objects.filter(usecomp=user.usecomp, is_deleted=False,preventiontype=1)
|
||||
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=1
|
||||
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=1
|
||||
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):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
if action == 'list':
|
||||
objs = abnormal.objects.filter(usecomp=user.usecomp, is_deleted=False)
|
||||
total = objs.count()
|
||||
startnum, endnum = fenye(request)
|
||||
objs = objs.order_by('-create_time')[startnum:endnum].values('id', 'name', 'number', 'start_time', 'end_time', 'type',
|
||||
'pfnd', 'pffx', 'sjyy', 'sfbg', 'ydcs')
|
||||
return HttpResponse(transjson(total, objs), content_type="application/json")
|
||||
elif action == 'create':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = abnormal()
|
||||
obj.create_by = user
|
||||
obj.update_by = user
|
||||
obj.usecomp = user.usecomp
|
||||
obj.name = data['name']
|
||||
obj.number = data['number']
|
||||
obj.start_time = data['start_time']
|
||||
obj.end_time = data['end_time']
|
||||
obj.type = data['type']
|
||||
obj.pfnd = data['pfnd']
|
||||
obj.pffx = data['pffx']
|
||||
obj.sjyy = data['sjyy']
|
||||
obj.sfbg = data['sfbg']
|
||||
obj.ydcs = data['ydcs']
|
||||
|
||||
obj.save()
|
||||
return JsonResponse({"code":1})
|
||||
elif action == 'update':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = abnormal.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.start_time = data['start_time']
|
||||
obj.end_time = data['end_time']
|
||||
obj.type = data['type']
|
||||
obj.pfnd = data['pfnd']
|
||||
obj.pffx = data['pffx']
|
||||
obj.sjyy = data['sjyy']
|
||||
obj.sfbg = data['sfbg']
|
||||
obj.ydcs = data['ydcs']
|
||||
obj.save()
|
||||
return JsonResponse({"code":1})
|
||||
elif action == 'delete':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = abnormal.objects.get(id=data['id'])
|
||||
obj.delete()
|
||||
return JsonResponse({"code":1})
|
||||
#废水污染物检测
|
||||
def ApiDetection(request, action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
if action == 'list':
|
||||
objs = Detection.objects.filter(usecomp=user.usecomp, is_deleted=False)
|
||||
if request.GET.get('drain', None):
|
||||
objs = objs.filter(drain=request.GET.get('drain'))
|
||||
total = objs.count()
|
||||
startnum, endnum = fenye(request)
|
||||
objs = objs.order_by('-create_time')[startnum:endnum].values('id', 'drain' , 'drain__name', 'drain__number','jcDate', 'jctime', 'ckhxxyl', 'ckshxll',
|
||||
'ckad', 'ckxfw', 'jkhxxyl', 'jkshxll', 'jkad', 'jkxfw')
|
||||
return HttpResponse(transjson(total, objs), content_type="application/json")
|
||||
elif action == 'create':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Detection()
|
||||
obj.create_by = user
|
||||
obj.update_by = user
|
||||
obj.usecomp = user.usecomp
|
||||
obj.drain = Drain.objects.get(id=data['drain'])
|
||||
obj.jcDate = data['jcDate']
|
||||
obj.jctime = data['jctime']
|
||||
obj.ckhxxyl = data['ckhxxyl']
|
||||
obj.ckshxll = data['ckshxll']
|
||||
obj.ckad = data['ckad']
|
||||
obj.ckxfw = data['ckxfw']
|
||||
obj.jkhxxyl = data['jkhxxyl']
|
||||
obj.jkshxll = data['jkshxll']
|
||||
obj.jkad = data['jkad']
|
||||
obj.jkxfw = data['jkxfw']
|
||||
|
||||
obj.save()
|
||||
return JsonResponse({"code":1})
|
||||
|
||||
elif action == 'delete':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Detection.objects.get(id=data['id'])
|
||||
obj.delete()
|
||||
return JsonResponse({"code":1})
|
||||
#燃料信息表
|
||||
def ApiFuel(request, action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
if action == 'list':
|
||||
objs = Fuel.objects.filter(usecomp=user.usecomp, is_deleted=False)
|
||||
total = objs.count()
|
||||
startnum, endnum = fenye(request)
|
||||
objs = objs.order_by('-create_time')[startnum:endnum].values('id', 'name', 'count', 'dwcount', 'unit', 'rmhll',
|
||||
'rmhff', 'rmqt', 'ryhll', 'ryqt', 'rqlhqhl', 'rqqt', 'qtrlxgwzhl')
|
||||
return HttpResponse(transjson(total, objs), content_type="application/json")
|
||||
elif action == 'create':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Fuel()
|
||||
obj.create_by = user
|
||||
obj.update_by = user
|
||||
obj.usecomp = user.usecomp
|
||||
obj.name = data['name']
|
||||
obj.count = data['count']
|
||||
obj.dwcount = data['dwcount']
|
||||
obj.unit = data['unit']
|
||||
obj.rmhll = data['rmhll']
|
||||
obj.rmhff = data['rmhff']
|
||||
obj.rmqt = data['rmqt']
|
||||
obj.ryhll = data['ryhll']
|
||||
obj.ryqt = data['ryqt']
|
||||
obj.rqlhqhl = data['rqlhqhl']
|
||||
obj.rqqt = data['rqqt']
|
||||
obj.qtrlxgwzhl = data['qtrlxgwzhl']
|
||||
|
||||
obj.save()
|
||||
return JsonResponse({"code":1})
|
||||
elif action == 'update':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Fuel.objects.get(id=data['id'])
|
||||
obj.create_by = user
|
||||
obj.update_by = user
|
||||
obj.usecomp = user.usecomp
|
||||
obj.name = data['name']
|
||||
obj.count = data['count']
|
||||
obj.dwcount = data['dwcount']
|
||||
obj.unit = data['unit']
|
||||
obj.rmhll = data['rmhll']
|
||||
obj.rmhff = data['rmhff']
|
||||
obj.rmqt = data['rmqt']
|
||||
obj.ryhll = data['ryhll']
|
||||
obj.ryqt = data['ryqt']
|
||||
obj.rqlhqhl = data['rqlhqhl']
|
||||
obj.rqqt = data['rqqt']
|
||||
obj.rqqt = data['qtrlxgwzhl']
|
||||
obj.save()
|
||||
return JsonResponse({"code":1})
|
||||
elif action == 'delete':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Fuel.objects.get(id=data['id'])
|
||||
obj.delete()
|
||||
return JsonResponse({"code":1})
|
||||
#废水监测仪器信息表
|
||||
def ApiWaterequipment(request, action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
if action == 'list':
|
||||
objs = Waterequipment.objects.filter(usecomp=user.usecomp, is_deleted=False)
|
||||
total = objs.count()
|
||||
startnum, endnum = fenye(request)
|
||||
objs = objs.order_by('-create_time')[startnum:endnum].values('id', 'number', 'type', 'methods', 'count', 'identification',
|
||||
'jcyqmodel', 'note')
|
||||
return HttpResponse(transjson(total, objs), content_type="application/json")
|
||||
elif action == 'create':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Waterequipment()
|
||||
obj.create_by = user
|
||||
obj.update_by = user
|
||||
obj.usecomp = user.usecomp
|
||||
obj.number = data['number']
|
||||
obj.type = data['type']
|
||||
obj.methods = data['methods']
|
||||
obj.count = data['count']
|
||||
obj.identification = data['identification']
|
||||
obj.jcyqmodel = data['jcyqmodel']
|
||||
obj.note = data['note']
|
||||
obj.save()
|
||||
return JsonResponse({"code":1})
|
||||
elif action == 'update':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Waterequipment.objects.get(id=data['id'])
|
||||
obj.create_by = user
|
||||
obj.update_by = user
|
||||
obj.usecomp = user.usecomp
|
||||
obj.number = data['number']
|
||||
obj.type = data['type']
|
||||
obj.methods = data['methods']
|
||||
obj.count = data['count']
|
||||
obj.identification = data['identification']
|
||||
obj.jcyqmodel = data['jcyqmodel']
|
||||
obj.note = data['note']
|
||||
obj.save()
|
||||
return JsonResponse({"code":1})
|
||||
elif action == 'delete':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Waterequipment.objects.get(id=data['id'])
|
||||
obj.delete()
|
||||
return JsonResponse({"code":1})
|
||||
|
||||
|
||||
|
||||
def ApiDWasteMakeList(request,action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
|
|
@ -229,11 +669,11 @@ def ApiDWasteHandleRecord(request,action):
|
|||
obj = DWasteHandleRecord.objects.get(id=data['id'])
|
||||
obj.delete()
|
||||
return JsonResponse({"code":1})
|
||||
|
||||
def ApiDrain(request, action):
|
||||
#排气排放口
|
||||
def ApiDrainq(request, action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
if action == 'list':
|
||||
objs = Drain.objects.filter(usecomp=user.usecomp, is_deleted=False)
|
||||
objs = Drain.objects.filter(usecomp=user.usecomp, is_deleted=False,type=20)
|
||||
total = objs.count()
|
||||
startnum, endnum = fenye(request)
|
||||
objs = objs.order_by('id')[startnum:endnum].values('id', 'number', 'name')
|
||||
|
|
@ -246,6 +686,7 @@ def ApiDrain(request, action):
|
|||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj= Drain()
|
||||
obj.number = data['number']
|
||||
obj.type = 20
|
||||
obj.name = data['name']
|
||||
obj.create_by = user
|
||||
obj.update_by = user
|
||||
|
|
@ -261,11 +702,69 @@ def ApiDrain(request, action):
|
|||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Drain.objects.get(id=data['id'])
|
||||
obj.number = data['number']
|
||||
obj.type = 20
|
||||
obj.name = data['name']
|
||||
obj.update_by=user
|
||||
obj.save()
|
||||
return JsonResponse({"code":1})
|
||||
#排水排放口
|
||||
def ApiDrains(request, action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
if action == 'list':
|
||||
objs = Drain.objects.filter(usecomp=user.usecomp, is_deleted=False,type=10)
|
||||
total = objs.count()
|
||||
startnum, endnum = fenye(request)
|
||||
objs = objs.order_by('id')[startnum:endnum].values('id', 'number', 'name')
|
||||
return HttpResponse(transjson(total, objs), content_type="application/json")
|
||||
elif action == 'combobox':
|
||||
objs = Drain.objects.filter(usecomp=user.usecomp, is_deleted=False).order_by('id')
|
||||
data = objs.values('id', 'number', 'name')
|
||||
return JsonResponse(list(data), safe=False)
|
||||
elif action == 'create':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj= Drain()
|
||||
obj.number = data['number']
|
||||
obj.name = data['name']
|
||||
obj.type = 10
|
||||
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 = Drain.objects.get(id=data['id'])
|
||||
obj.delete()
|
||||
return JsonResponse({"code":1})
|
||||
elif action == 'update':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Drain.objects.get(id=data['id'])
|
||||
obj.number = data['number']
|
||||
obj.type = 10
|
||||
obj.name = data['name']
|
||||
obj.update_by=user
|
||||
obj.save()
|
||||
return JsonResponse({"code":1})
|
||||
#排口用于地图
|
||||
def ApiDraindt(request, action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
|
||||
if action == 'list':
|
||||
objs = Drain.objects.filter(usecomp=user.usecomp, is_deleted=False)
|
||||
total = objs.count()
|
||||
startnum, endnum = fenye(request)
|
||||
objs = objs.order_by('id')[startnum:endnum].values('id', 'number', 'name','type','location')
|
||||
return HttpResponse(transjson(total, objs), content_type="application/json")
|
||||
#首页展示地图
|
||||
elif action == 'allmap':
|
||||
objs = Drain.objects.filter(usecomp=user.usecomp, is_deleted=False).values('id', 'number', 'name','type','location')
|
||||
return HttpResponse(json.dumps(list(objs)), content_type="application/json")
|
||||
elif action == 'bind':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
Drain.objects.filter(id=data['id']).update(location=data['polygon'])
|
||||
return JsonResponse({"code": 1})
|
||||
|
||||
#排气监测数据
|
||||
def ApiGasEmit(request,action):
|
||||
user = User.objects.get(userid=request.session['userid'])
|
||||
if action == 'list':
|
||||
|
|
|
|||
|
|
@ -23,5 +23,12 @@ class CompanyInfoForm(forms.Form):
|
|||
liaison_phone = forms.CharField(max_length=24, label='联系人电话', widget=forms.TextInput(attrs={'size': '50'}))
|
||||
enp_number = forms.CharField(max_length=24, label='环评批复文号', widget=forms.TextInput(attrs={'size': '50'}), required=False)
|
||||
waste_number = forms.CharField(max_length=24, label='排污许可证编号', widget=forms.TextInput(attrs={'size': '50'}), required=False)
|
||||
industry = forms.CharField(max_length=24, label='行业类别', widget=forms.TextInput(attrs={'size': '50'}), required=False)
|
||||
credit = forms.CharField(max_length=24, label='统一社会信用代码', widget=forms.TextInput(attrs={'size': '50'}), required=False)
|
||||
process = forms.CharField(max_length=24, label='生产工艺', widget=forms.TextInput(attrs={'size': '50'}), required=False)
|
||||
product = forms.CharField(max_length=24, label='产品名称', widget=forms.TextInput(attrs={'size': '50'}), required=False)
|
||||
size = forms.CharField(max_length=24, label='生产规模', widget=forms.TextInput(attrs={'size': '50'}), required=False)
|
||||
investment = forms.CharField(max_length=24, label='环保投资', widget=forms.TextInput(attrs={'size': '50'}), required=False)
|
||||
trading = forms.CharField(max_length=24, label='排污权交易文件', widget=forms.TextInput(attrs={'size': '50'}), required=False)
|
||||
introduce = forms.CharField(label='公司概况', widget=forms.Textarea)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
# Generated by Django 2.2.8 on 2022-03-04 16:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0395_partment_enabled'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='companyinfo',
|
||||
name='credit',
|
||||
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='统一社会信用代码'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='companyinfo',
|
||||
name='industry',
|
||||
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='行业类别'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='companyinfo',
|
||||
name='investment',
|
||||
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='环保投资'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='companyinfo',
|
||||
name='process',
|
||||
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='生产工艺'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='companyinfo',
|
||||
name='product',
|
||||
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='产品名称'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='companyinfo',
|
||||
name='size',
|
||||
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='生产规模'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='companyinfo',
|
||||
name='trading',
|
||||
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='排污权交易文件'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='mgtsystem',
|
||||
name='qrcode',
|
||||
field=models.CharField(blank=True, max_length=200, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='operproce',
|
||||
name='qrcode',
|
||||
field=models.CharField(blank=True, max_length=200, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='resbility',
|
||||
name='qrcode',
|
||||
field=models.CharField(blank=True, max_length=200, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='resbility',
|
||||
name='reads',
|
||||
field=models.IntegerField(default=0),
|
||||
),
|
||||
]
|
||||
|
|
@ -1246,6 +1246,13 @@ class CompanyInfo(models.Model):
|
|||
introduce = models.TextField(null=True, blank=True, verbose_name='公司概况')
|
||||
enp_number = models.CharField(max_length=50, verbose_name='环评批复文号', null=True, blank=True)
|
||||
waste_number = models.CharField(max_length=50, verbose_name='排污许可证编号', null=True, blank=True)
|
||||
industry = models.CharField(max_length=50, verbose_name='行业类别', null=True, blank=True)
|
||||
credit = models.CharField(max_length=50, verbose_name='统一社会信用代码', null=True, blank=True)
|
||||
process = models.CharField(max_length=50, verbose_name='生产工艺', null=True, blank=True)
|
||||
product = models.CharField(max_length=50, verbose_name='产品名称', null=True, blank=True)
|
||||
size = models.CharField(max_length=50, verbose_name='生产规模', null=True, blank=True)
|
||||
investment = models.CharField(max_length=50, verbose_name='环保投资', null=True, blank=True)
|
||||
trading = models.CharField(max_length=50, verbose_name='排污权交易文件', null=True, blank=True)
|
||||
createtime = models.DateTimeField(auto_now_add=True)
|
||||
modifytime = models.DateTimeField(auto_now=True)
|
||||
# 法律法规分类表
|
||||
|
|
|
|||
|
|
@ -602,6 +602,7 @@ function mapupdate() {
|
|||
}
|
||||
})
|
||||
$.get('/api/mapshow?a=trouble', function (res) {
|
||||
|
||||
for (let i = 0, len = res.length; i < len; i++) {
|
||||
var data = res[i]
|
||||
data.id = data.yhqy__id
|
||||
|
|
@ -635,6 +636,21 @@ function mapupdate() {
|
|||
setPoint(data)
|
||||
}
|
||||
})
|
||||
//监测地图,排口获取
|
||||
$.get('/api/enp/draindt/allmap', function (res) {
|
||||
console.log(res);
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
|
||||
var data = res[i]
|
||||
data.id = data.id
|
||||
data.number = data.number
|
||||
data.location = data.location
|
||||
data.name = data.name
|
||||
data.type = 'pk'
|
||||
setPoint(data)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
function checksession(){
|
||||
|
|
|
|||
|
|
@ -0,0 +1,289 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
<div data-options="region:'west',split:true,border:false" style="width:240px;height:100%;">
|
||||
<div id="dtlb" height="30%" title="监测地图列表">
|
||||
<ul id="dtlbtree" data-options="animate:true,"></ul>
|
||||
</div>
|
||||
<!-- <div id="gwfl" height="30%"></div> -->
|
||||
<div id="qylb" height="70%" title="排口列表">
|
||||
|
||||
<ul id="qylblist" data-options="animate:true,toolbar:'#qylbbar'" style="height:100%"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" id="file" name="" accept="image/gif,image/jpeg,image/jpg,image/png" style="display:none" />
|
||||
<div data-options="region:'center',title:'监测地图',split:true,border:false" style="height:100%;">
|
||||
|
||||
<div id="qybar" style="padding:5px;height:auto;">
|
||||
<a id="changedt" onclick="changedt()" class="easyui-linkbutton"
|
||||
data-options="iconCls:'fa-pencil',plain:true">更换地图</a>
|
||||
<a id="drawqy" onclick="drawqy()" class="easyui-linkbutton" data-options="iconCls:'fa-pencil',plain:true"
|
||||
style="display:none">标记点位</a>
|
||||
</div>
|
||||
<div id="map0" class="map" style="width:100%;height:auto;outline: #4A74A8 solid 0.15em;margin-bottom: 10px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var map, source, vector, draw, polygon;// global so we can remove it later
|
||||
$.get('api/map?a=default', function (res) {
|
||||
$('#map0').empty()
|
||||
map = initMap(res.pic)
|
||||
$('#qylblist').datagrid({ url: '/api/enp/draindt/list/' })
|
||||
})
|
||||
$('#dtlb').panel()
|
||||
$('#qylb').panel()
|
||||
$('#dtlbtree').tree({
|
||||
url: 'api/map?a=tree',
|
||||
animate: true,
|
||||
loadFilter: function (rows) {
|
||||
return convert(rows);
|
||||
},
|
||||
formatter: function (node) {
|
||||
var s = node.text;
|
||||
if (node.children) {
|
||||
s += ' <span style=\'color:blue\'>(' + node.children.length + ')</span>';
|
||||
}
|
||||
return s;
|
||||
},
|
||||
onSelect: function (row) {
|
||||
$('#qylblist').datagrid({ url: '/api/enp/draindt/list/' })
|
||||
$('#drawqy').hide()
|
||||
$('#changedt').show()
|
||||
$('#map').empty()
|
||||
map = initMap(row.pic)
|
||||
}
|
||||
});
|
||||
$('#qylblist').datagrid({
|
||||
url: '',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
method: 'get',
|
||||
border: false,
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'number', title: '排放口编号', width: 100 },
|
||||
{ field: 'name', title: '排放口名称', width: 100 },
|
||||
{ field: 'location', title: '坐标', width: 100 },
|
||||
{ field: 'type', title: '排口类型', width: 100, formatter: function (value, row, index) {
|
||||
switch (value) {
|
||||
case 10: return '排水'; break;
|
||||
case 20: return '排气'; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
]],
|
||||
onClickRow: function (index, row) {
|
||||
$('#drawqy').show()//绘制区域
|
||||
$('#changedt').hide()//更换地图
|
||||
showArea()
|
||||
}
|
||||
});
|
||||
function initMap(url) {
|
||||
var extent = [0, 0, 1920, 1080];
|
||||
var projection = new ol.proj.Projection({
|
||||
code: 'xkcd-image',
|
||||
units: 'pixels',
|
||||
extent: extent
|
||||
});
|
||||
map = new ol.Map({
|
||||
layers: [
|
||||
new ol.layer.Image({
|
||||
source: new ol.source.ImageStatic({
|
||||
url: url,
|
||||
projection: projection,
|
||||
imageExtent: extent
|
||||
})
|
||||
})
|
||||
],
|
||||
target: 'map0',
|
||||
view: new ol.View({
|
||||
projection: projection,
|
||||
center: ol.extent.getCenter(extent),
|
||||
zoom: 2.3,
|
||||
maxZoom: 8
|
||||
})
|
||||
});
|
||||
source = new ol.source.Vector({ wrapX: false });
|
||||
vector = new ol.layer.Vector({
|
||||
source: source
|
||||
});
|
||||
map.addLayer(vector);//加载图层
|
||||
return map
|
||||
}
|
||||
function drawqy() {
|
||||
var row = $('#qylblist').datagrid('getSelected');
|
||||
if (row) {
|
||||
if (row.type != null) {
|
||||
$.messager.confirm('提示', '该区域已绑定,是否重新绑定?', function (r) {
|
||||
if (r) {
|
||||
source.clear()
|
||||
drawarea()
|
||||
}
|
||||
});
|
||||
}else{
|
||||
drawarea()
|
||||
}
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '请先选择左侧区域!');
|
||||
}
|
||||
}
|
||||
function delqy(){
|
||||
var row = $('#qylblist').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
$.get('api/area?a=del&id='+row.id,function(res){
|
||||
if(res.code==1){
|
||||
$('#qylblist').datagrid('reload');
|
||||
}else{
|
||||
$.messager.alert('提示','您无权删除!');
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '请先选择区域!');
|
||||
}
|
||||
}
|
||||
function editqy(){
|
||||
var row = $('#qylblist').datagrid('getSelected');
|
||||
if (row) {
|
||||
opendg('编辑区域','html/area/edit/'+row.id.toString())
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '请先选择区域!');
|
||||
}
|
||||
}
|
||||
//标记点位
|
||||
function drawarea() {
|
||||
draw = new ol.interaction.Draw({
|
||||
source: source,
|
||||
type: 'Point'
|
||||
});
|
||||
map.addInteraction(draw);
|
||||
draw.on('drawend', function (e) {
|
||||
polygon = e.feature.getGeometry().getCoordinates();
|
||||
//polygon = coordinates_Point
|
||||
console.log(polygon)
|
||||
map.removeInteraction(draw);
|
||||
var pointFeature = new ol.Feature({
|
||||
geometry: new ol.geom.Point(polygon),
|
||||
});
|
||||
pointFeature.setStyle(createPointStyle(pointFeature));
|
||||
source.addFeature(pointFeature)
|
||||
saveqy()
|
||||
});
|
||||
}
|
||||
function saveqy() {
|
||||
var row = $('#qylblist').datagrid('getSelected');
|
||||
var data = { 'id': row.id, 'polygon': polygon}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/api/enp/draindt/bind/',
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () { },
|
||||
success: function (res) {
|
||||
$('#qylblist').datagrid('reload')
|
||||
},
|
||||
});
|
||||
}
|
||||
var createPointStyle = function (feature) {
|
||||
return new ol.style.Style({
|
||||
/**{olx.style.IconOptions}类型*/
|
||||
image: new ol.style.Icon(
|
||||
({
|
||||
anchor: [0.5, 60],
|
||||
anchorOrigin: 'top-right',
|
||||
anchorXUnits: 'fraction',
|
||||
anchorYUnits: 'pixels',
|
||||
offsetOrigin: 'top-right',
|
||||
// offset:[0,10],
|
||||
//图标缩放比例
|
||||
// scale:0.5,
|
||||
//透明度
|
||||
opacity: 0.75,
|
||||
//图标的url
|
||||
src: '/static/safesite/mystatic/images/icon4.png'
|
||||
})
|
||||
),
|
||||
text: new ol.style.Text({
|
||||
textAlign: 'center', //位置
|
||||
textBaseline: 'middle', //基准线
|
||||
font: 'normal 14px 微软雅黑', //文字样式
|
||||
text: feature.get('name'), //文本内容
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
var createPolygonStyle = function (feature) {
|
||||
return new ol.style.Style({
|
||||
fill:new ol.style.Fill({
|
||||
color: 'rgba(255,255,255, 0.5)'
|
||||
}),
|
||||
text: new ol.style.Text({
|
||||
textAlign: 'center', //位置
|
||||
textBaseline: 'middle', //基准线
|
||||
font: 'normal 14px 微软雅黑', //文字样式
|
||||
text: feature.get('name'), //文本内容
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
function changedt() {
|
||||
var row = $('#dtlbtree').tree('getSelected');
|
||||
if (row) {
|
||||
$('#file').click()
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '请先选择左侧地图!');
|
||||
}
|
||||
}
|
||||
document.getElementById('file').onchange = function () {
|
||||
var fileObj = this.files[0];
|
||||
var url = 'upfile'
|
||||
var form = new FormData();
|
||||
form.append("upfile", fileObj); // 文件对象
|
||||
xhr = new XMLHttpRequest(); // XMLHttpRequest 对象
|
||||
xhr.open("post", url, true); //post方式,url为服务器请求地址,true 该参数规定请求是否异步处理。
|
||||
xhr.onload = function (evt) { //服务断接收完文件返回的结果
|
||||
var data = JSON.parse(evt.target.responseText);
|
||||
if (data.code = 1) {
|
||||
$('#map').empty()
|
||||
map = initMap(data.filepath)
|
||||
var row = $('#dtlbtree').tree('getSelected');
|
||||
$.post('api/map?a=update', { 'id': row.id, 'name': row.name, 'pic': data.filepath }, function (res) {
|
||||
$('#dtlbtree').tree('reload');
|
||||
})
|
||||
} else { alert("上传失败!"); }
|
||||
}; //请求完成
|
||||
xhr.onerror = function (evt) { alert("上传失败!"); }; //请求失败
|
||||
xhr.send(form); //开始上传,发送form数据
|
||||
}
|
||||
function showArea() {
|
||||
map.removeInteraction(draw);
|
||||
source.clear()
|
||||
var row = $('#qylblist').datagrid('getSelected');
|
||||
if (row.location != null) {
|
||||
var polygonFeature = new ol.Feature({
|
||||
geometry: new ol.geom.Point(row.location),
|
||||
});
|
||||
|
||||
var pointFeature = new ol.Feature({
|
||||
geometry: new ol.geom.Point(row.location),
|
||||
});
|
||||
//newFeature1.setStyle(createPointStyle(newFeature1));
|
||||
pointFeature.setStyle(createPointStyle(pointFeature));
|
||||
polygonFeature.setStyle(createPolygonStyle(polygonFeature));
|
||||
source.addFeature(polygonFeature)
|
||||
source.addFeature(pointFeature)
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,209 @@
|
|||
<div id="map1" class="map" style="width:100%;height:auto;outline: #4A74A8 solid 0.15em;">
|
||||
</div>
|
||||
<div id='mapshowinput'></div>
|
||||
<div id="popup" class="ol-popup">
|
||||
<a href="#" id="popup-closer" class="ol-popup-closer"></a>
|
||||
<div id="popup-content"></div>
|
||||
</div>
|
||||
<style>
|
||||
.ol-popup {
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
|
||||
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #cccccc;
|
||||
bottom: 12px;
|
||||
left: -50px;
|
||||
min-width: 280px;
|
||||
}
|
||||
|
||||
.ol-popup:after,
|
||||
.ol-popup:before {
|
||||
top: 100%;
|
||||
border: solid transparent;
|
||||
content: " ";
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.ol-popup:after {
|
||||
border-top-color: white;
|
||||
border-width: 10px;
|
||||
left: 48px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
.ol-popup:before {
|
||||
border-top-color: #cccccc;
|
||||
border-width: 11px;
|
||||
left: 48px;
|
||||
margin-left: -11px;
|
||||
}
|
||||
|
||||
.ol-popup-closer {
|
||||
text-decoration: none;
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 8px;
|
||||
}
|
||||
|
||||
.ol-popup-closer:after {
|
||||
content: "✖";
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var map, source, vector;// global so we can remove it later
|
||||
var container = document.getElementById("popup");
|
||||
var content = document.getElementById("popup-content");
|
||||
var popupCloser = document.getElementById("popup-closer");
|
||||
var overlay = new ol.Overlay({
|
||||
//设置弹出框的容器
|
||||
element: container,
|
||||
//是否自动平移,即假如标记在屏幕边缘,弹出时自动平移地图使弹出框完全可见
|
||||
autoPan: true
|
||||
});
|
||||
$.get('api/map?a=default', function (res) {
|
||||
$('#map1').empty()
|
||||
map = initMap(res.pic)
|
||||
mapupdate()
|
||||
})
|
||||
|
||||
function initMap(url) {
|
||||
var extent = [0, 0, 1920, 1080];
|
||||
var projection = new ol.proj.Projection({
|
||||
code: 'xkcd-image',
|
||||
units: 'pixels',
|
||||
extent: extent
|
||||
});
|
||||
map = new ol.Map({
|
||||
layers: [
|
||||
new ol.layer.Image({
|
||||
source: new ol.source.ImageStatic({
|
||||
url: url,
|
||||
projection: projection,
|
||||
imageExtent: extent
|
||||
})
|
||||
})
|
||||
],
|
||||
target: 'map1',
|
||||
view: new ol.View({
|
||||
projection: projection,
|
||||
center: ol.extent.getCenter(extent),
|
||||
zoom: 2.3,
|
||||
maxZoom: 8
|
||||
}),
|
||||
controls: ol.control.defaults().extend([new ol.control.FullScreen()])
|
||||
});
|
||||
source = new ol.source.Vector({ wrapX: false });
|
||||
vector = new ol.layer.Vector({
|
||||
source: source
|
||||
});
|
||||
map.addLayer(vector);//加载图层
|
||||
map.on('pointermove', function (e) {
|
||||
|
||||
//在点击时获取像素区域
|
||||
var pixel = map.getEventPixel(e.originalEvent);
|
||||
var feature = map.forEachFeatureAtPixel(pixel, function (feature, layer) {
|
||||
//在视口中遍历所有具有像素颜色的图层,如果图层存在,则返回
|
||||
return feature;
|
||||
});
|
||||
|
||||
if (feature) {
|
||||
var data = feature.getProperties()
|
||||
console.log(data)
|
||||
//设置弹出框内容,可以HTML自定义
|
||||
var html = "";
|
||||
if (data.type == 'pk') {
|
||||
html = "<p>排口名称:" + data.name + "</p>" + "<p>排口编号:" + data.number + "</p>"
|
||||
}
|
||||
|
||||
content.innerHTML = html;
|
||||
|
||||
//设置overlay的显示位置
|
||||
overlay.setPosition(e.coordinate);
|
||||
//显示overlay
|
||||
map.addOverlay(overlay);
|
||||
}
|
||||
else {
|
||||
closepopup()
|
||||
}
|
||||
});
|
||||
map.on('click', function (e) {
|
||||
var coordinate = e.coordinate;
|
||||
var feature = map.forEachFeatureAtPixel(e.pixel, function (feature, layer) {
|
||||
return feature;
|
||||
});
|
||||
if (feature) {
|
||||
var data = feature.getProperties()
|
||||
opendetail(data.id)
|
||||
}
|
||||
});
|
||||
popupCloser.onclick = function () {
|
||||
closepopup()
|
||||
return false;
|
||||
};
|
||||
return map
|
||||
}
|
||||
function closepopup() {
|
||||
overlay.setPosition(undefined);
|
||||
popupCloser.blur();
|
||||
}
|
||||
var createPointStyle = function (feature) {
|
||||
var data = feature.getProperties()
|
||||
if (data.type == 'pk') {
|
||||
src = '/static/safesite/mystatic/images/icon1.png'
|
||||
|
||||
}
|
||||
|
||||
return new ol.style.Style({
|
||||
/**{olx.style.IconOptions}类型*/
|
||||
image: new ol.style.Icon(
|
||||
({
|
||||
|
||||
anchorOrigin: 'top-right',
|
||||
anchorXUnits: 'fraction',
|
||||
anchorYUnits: 'pixels',
|
||||
offsetOrigin: 'top-right',
|
||||
// offset:[0,10],
|
||||
//图标缩放比例
|
||||
// scale:0.5,
|
||||
//透明度
|
||||
opacity: 0.75,
|
||||
//图标的url
|
||||
src: src
|
||||
})
|
||||
),
|
||||
text: new ol.style.Text({
|
||||
textAlign: 'center', //位置
|
||||
textBaseline: 'middle', //基准线
|
||||
font: 'normal 14px 微软雅黑', //文字样式
|
||||
//text: feature.get('name'), //文本内容
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
function setPoint(i) {
|
||||
console.log("setpoint:"+i.location)
|
||||
|
||||
var pointFeature = new ol.Feature({
|
||||
geometry: new ol.geom.Point(i.location),
|
||||
id: i.id,
|
||||
name: i.name,
|
||||
type: i.type,
|
||||
location: i.location,
|
||||
number: i.number
|
||||
});
|
||||
pointFeature.setStyle(createPointStyle(pointFeature));
|
||||
|
||||
source.addFeature(pointFeature)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
|
@ -260,6 +260,13 @@ float: left;">
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id = 'panelxdiv2' style="width:98%;margin-left:1%;margin-right:1%;height:800px;" hidden=true>
|
||||
<div id="panelx2" class="easyui-panel" data-options="iconCls:'fa-bar-chart'" >
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width:100%;height:600px">
|
||||
|
||||
<div style="width:70%;float:left;height:100%;margin-top: 10px;" align=center>
|
||||
|
|
@ -333,6 +340,7 @@ float: left;">
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//首页总数统计
|
||||
$.ajax({
|
||||
|
|
@ -385,6 +393,21 @@ float: left;">
|
|||
href:'html/mapshow',
|
||||
title:'地图展示'
|
||||
})
|
||||
;
|
||||
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
|
||||
$('#panelxdiv2').show()
|
||||
$('#panelx2').panel({
|
||||
href:'html/jianceditu',
|
||||
title:'监测地图展示'
|
||||
})
|
||||
;
|
||||
|
||||
|
||||
</script>
|
||||
{% endif %}
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -75,8 +75,10 @@ urlpatterns = [
|
|||
path('html/safecert/add', views.safecertadd),
|
||||
path('html/safecert/edit/<int:id>/',views.safecertedit),
|
||||
path('html/area', views.area),
|
||||
path('html/areajiance', views.areajiance),#监测地图
|
||||
path('html/areadetail', views.areadetail),
|
||||
path('html/mapshow', views.mapshow),
|
||||
path('html/jianceditu', views.mapshow2),#监测地图
|
||||
path('html/area/add',views.areaadd),
|
||||
path('html/area/edit/<int:id>/',views.areaedit),
|
||||
path('html/equipment',views.equipment),
|
||||
|
|
|
|||
|
|
@ -300,12 +300,18 @@ def areadetail(req):
|
|||
|
||||
def mapshow(req):
|
||||
return render(req, 'mapshow.html')
|
||||
|
||||
#监测地图
|
||||
def mapshow2(req):
|
||||
return render(req, 'jianceditu.html')
|
||||
|
||||
def area(req):
|
||||
return render(req, 'area.html')
|
||||
|
||||
|
||||
#监测地图
|
||||
def areajiance(req):
|
||||
return render(req, 'areajiance.html')
|
||||
|
||||
def personaltrain(req):
|
||||
return render(req, 'personaltrain.html')
|
||||
|
||||
|
|
@ -7295,6 +7301,10 @@ def apimap(req):
|
|||
obj = Map.objects.filter(
|
||||
usecomp__partid=companyid, deletemark=1, default=1).values('id', 'name', 'pic')
|
||||
return JsonResponse(obj[0])
|
||||
elif a == 'defaults':
|
||||
obj = Map.objects.filter(
|
||||
usecomp__partid=companyid, deletemark=1, default=1).values('id', 'name', 'pic')
|
||||
return JsonResponse(obj[0])
|
||||
elif a == 'update':
|
||||
id = req.POST.get('id')
|
||||
Map.objects.filter(id=id).update(pic=req.POST.get('pic'))
|
||||
|
|
@ -8605,6 +8615,13 @@ def companyinfo(req):
|
|||
companyinfo.website = companyinfo_form.cleaned_data.get('website')
|
||||
companyinfo.enp_number = companyinfo_form.cleaned_data.get('enp_number', None)
|
||||
companyinfo.waste_number = companyinfo_form.cleaned_data.get('waste_number', None)
|
||||
companyinfo.industry = companyinfo_form.cleaned_data.get('industry', None)
|
||||
companyinfo.credit = companyinfo_form.cleaned_data.get('credit', None)
|
||||
companyinfo.process = companyinfo_form.cleaned_data.get('process', None)
|
||||
companyinfo.product = companyinfo_form.cleaned_data.get('product', None)
|
||||
companyinfo.size = companyinfo_form.cleaned_data.get('size', None)
|
||||
companyinfo.investment = companyinfo_form.cleaned_data.get('investment', None)
|
||||
companyinfo.trading = companyinfo_form.cleaned_data.get('trading', None)
|
||||
companyinfo.save()
|
||||
#html = 'companyinfo.html'
|
||||
# return redirect('/withmenu/', html="companyinfo.html")
|
||||
|
|
|
|||
Loading…
Reference in New Issue