This commit is contained in:
parent
558ac98b2d
commit
b2d079ca7e
|
@ -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='单位'),
|
||||
),
|
||||
]
|
127
enp/models.py
127
enp/models.py
|
@ -116,4 +116,129 @@ 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):
|
||||
"""
|
||||
废水污染物检测结果表
|
||||
"""
|
||||
number = models.CharField('排放口编号', max_length=100)
|
||||
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):
|
||||
"""
|
||||
废水监测仪器信息表
|
||||
"""
|
||||
number = models.CharField('排放口编号', max_length=100)
|
||||
type = models.CharField('污染物种类', max_length=100, null=True, blank=True)
|
||||
methods = models.CharField('监测采样方法及个数', max_length=300, null=True, blank=True)
|
||||
count = models.IntegerField('监测次数', max_length=100, 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>
|
|
@ -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>
|
|
@ -6,4 +6,13 @@ 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),
|
||||
|
||||
|
||||
]
|
|
@ -10,5 +10,16 @@ urlpatterns = [
|
|||
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),#废水监测仪器信息表
|
||||
|
||||
|
||||
|
||||
|
||||
]
|
458
enp/views.py
458
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,447 @@ 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)
|
||||
total = objs.count()
|
||||
startnum, endnum = fenye(request)
|
||||
objs = objs.order_by('-create_time')[startnum:endnum].values('id', '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.number = data['number']
|
||||
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 == 'update':
|
||||
data = json.loads(request.body.decode('utf-8'))
|
||||
obj = Detection.objects.get(id=data['id'])
|
||||
obj.create_by = user
|
||||
obj.update_by = user
|
||||
obj.usecomp = user.usecomp
|
||||
obj.number = data['number']
|
||||
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'])
|
||||
|
|
|
@ -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)
|
||||
# 法律法规分类表
|
||||
|
|
|
@ -8502,6 +8502,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