环保最后修改
This commit is contained in:
parent
2a0a069d38
commit
bf004376de
|
@ -2,64 +2,59 @@
|
|||
|
||||
|
||||
<div data-options="region:'center',split:true,border:false" style="height:100%;">
|
||||
<div id="waterequipmentTableBar">
|
||||
<div id="gastestequipTableBar">
|
||||
<a onclick="addwaterequipment()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
|
||||
<a onclick="ediwaterequipment()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
|
||||
<a onclick="delwaterequipment()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
|
||||
</div>
|
||||
<table id="waterequipmentTable" style="height:100%"></table>
|
||||
<table id="gastestequipTable" style="height:100%"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="waterequipmentDialog" class="easyui-dialog" style="width:700px;height:600px;padding:20px 25px;"
|
||||
<div id="gastestequipDialog" class="easyui-dialog" style="width:700px;height:600px;padding:20px 25px;"
|
||||
data-options="resizable:true,modal:true,closed:true,border:false">
|
||||
<form method="post" id="waterequipmentForm">
|
||||
<form method="post" id="gastestequipForm">
|
||||
<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>
|
||||
<input name="drain" 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>
|
||||
<input name="contaminant" 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>
|
||||
<input name="model" data-options="label:'仪器型号',labelWidth:100" 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>
|
||||
|
||||
<select name='state' data-options="label:'设备状态',labelWidth:100" class="easyui-combobox" style="width:600px;"
|
||||
editable=false>
|
||||
<option value="">请选择</option>
|
||||
<option value="1">正常</option>
|
||||
<option value="0">异常</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="margin-bottom:10px">
|
||||
<input name="identification" data-options="label:'鉴定方法',labelWidth:100" class="easyui-textbox" style="width:600px;" ></input>
|
||||
<input name="remark" 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>
|
||||
<a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="savegastestequip()">保存</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var waterequipment_action_url = '/api/enp/gastestequipment/create/';
|
||||
var gastestequip_action_url = '/api/enp/gastestequipment/create/';
|
||||
|
||||
$('#waterequipmentTable').datagrid({
|
||||
$('#gastestequipTable').datagrid({
|
||||
url: '/api/enp/gastestequipment/list/',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
method: 'get',
|
||||
toolbar: '#waterequipmentTableBar',
|
||||
toolbar: '#gastestequipTableBar',
|
||||
border: false,
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
|
@ -76,44 +71,44 @@
|
|||
|
||||
//新增
|
||||
function addwaterequipment() {
|
||||
$('#waterequipmentDialog').dialog('open').dialog('setTitle', '新增').window('center');
|
||||
$('#waterequipmentForm').form('clear');
|
||||
waterequipment_action_url = '/api/enp/gastestequipment/create/'
|
||||
$('#gastestequipDialog').dialog('open').dialog('setTitle', '新增').window('center');
|
||||
$('#gastestequipForm').form('clear');
|
||||
gastestequip_action_url = '/api/enp/gastestequipment/create/'
|
||||
}
|
||||
//保存数据
|
||||
function savewaterequipment() {
|
||||
var data = $('#waterequipmentForm').serializeJSON();
|
||||
function savegastestequip() {
|
||||
var data = $('#gastestequipForm').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: waterequipment_action_url,
|
||||
url: gastestequip_action_url,
|
||||
data: JSON.stringify(data),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
return $('#waterequipmentForm').form('validate')
|
||||
return $('#gastestequipForm').form('validate')
|
||||
},
|
||||
success: function (data) {
|
||||
$("#waterequipmentTable").datagrid('reload');
|
||||
$("#waterequipmentDialog").dialog("close");
|
||||
$("#gastestequipTable").datagrid('reload');
|
||||
$("#gastestequipDialog").dialog("close");
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
//编辑数据
|
||||
function ediwaterequipment(){
|
||||
var row = $('#waterequipmentTable').datagrid('getSelected');
|
||||
var row = $('#gastestequipTable').datagrid('getSelected');
|
||||
if(row){
|
||||
$('#waterequipmentDialog').dialog('open').dialog('setTitle', '编辑').window('center');
|
||||
$('#waterequipmentForm').form('load', row);
|
||||
waterequipment_action_url = '/api/enp/gastestequipment/update/'}
|
||||
$('#gastestequipDialog').dialog('open').dialog('setTitle', '编辑').window('center');
|
||||
$('#gastestequipForm').form('load', row);
|
||||
gastestequip_action_url = '/api/enp/gastestequipment/update/'}
|
||||
else{
|
||||
$.messager.alert('提示', '请选择一条数据!');
|
||||
}
|
||||
}
|
||||
//删除数据
|
||||
function delwaterequipment(){
|
||||
var row = $('#waterequipmentTable').datagrid('getSelected');
|
||||
var row = $('#gastestequipTable').datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
|
@ -126,8 +121,8 @@
|
|||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#waterequipmentTable").datagrid('reload');
|
||||
$("#waterequipmentTable").datagrid('reload');
|
||||
$("#gastestequipTable").datagrid('reload');
|
||||
$("#gastestequipTable").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '操作失败!');
|
||||
|
|
|
@ -181,11 +181,9 @@ def yjjs_yl(companyid):
|
|||
obj.save()
|
||||
|
||||
@shared_task
|
||||
def ycjs():
|
||||
def ycjs(nowyear=datetime.datetime.now().year, nowmonth=datetime.datetime.now().month):
|
||||
#print('正在执行预测计算。。。')
|
||||
companys = Partment.objects.filter(iscompany=1)
|
||||
nowyear = datetime.datetime.now().year
|
||||
nowmonth = datetime.datetime.now().month
|
||||
objs = Yjyc.objects.exclude(yjz=0,year=nowyear,month=nowmonth)
|
||||
for x in companys:
|
||||
obj = objs.filter(usecomp=x).order_by('-yjycid')
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
required=true />
|
||||
</div>
|
||||
<div style="margin-bottom:5px">
|
||||
<input id="aqcs" class="easyui-textbox" name="aqcs" style="width:480px;height:100px" data-options="label:'安全措施',multiline:true"
|
||||
<input id="aqcs" class="easyui-textbox" name="aqcs" style="width:480px;height:100px" data-options="label:'环保措施',multiline:true"
|
||||
required=true />
|
||||
</div>
|
||||
<div style="margin-bottom:5px">
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
required=true />
|
||||
</div>
|
||||
<div style="margin-bottom:5px">
|
||||
<input id="aqcs" class="easyui-textbox" name="aqcs" style="width:480px;height:100px" data-options="label:'安全措施',multiline:true"
|
||||
<input id="aqcs" class="easyui-textbox" name="aqcs" style="width:480px;height:100px" data-options="label:'环保措施',multiline:true"
|
||||
required=true />
|
||||
</div>
|
||||
<div style="margin-bottom:5px">
|
||||
|
|
|
@ -112,12 +112,12 @@
|
|||
<ul id="addImage" class="imgul"></ul>
|
||||
<HR width="480px" color='blue' SIZE=1 align='left'>
|
||||
</div>
|
||||
<div class='labeldiv'>请确认以下风险分析和安全措施是否就绪</div>
|
||||
<div class='labeldiv'>请确认以下风险分析和环保措施是否就绪</div>
|
||||
<div>
|
||||
<input type="checkbox" name="fxcs" value={{x.id}}><input>
|
||||
<div>
|
||||
<p>风险分析:{{x.fxfx}}</p>
|
||||
<p>安全措施:{{x.aqcs}}</p>
|
||||
<p>环保措施:{{x.aqcs}}</p>
|
||||
<p>措施类型:{{x.cslx}}</p>
|
||||
</div>
|
||||
</div> -->
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
</tr>
|
||||
{{/each}}
|
||||
</table>
|
||||
<div class="labeldiv">风险分析和安全措施</div>
|
||||
<div class="labeldiv">风险分析和环保措施</div>
|
||||
<table class='detailtable'>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</div>
|
||||
<div data-options="region:'center',border:false" style="height:100%;">
|
||||
<div style="height:50%">
|
||||
<table id="fxcstable" style="width:auto;height:100%;" title='风险分析和安全措施'></table>
|
||||
<table id="fxcstable" style="width:auto;height:100%;" title='风险分析和环保措施'></table>
|
||||
<div id="fxcsbar" style="padding:6px;height:auto">
|
||||
|
||||
{% load myfilter %}
|
||||
|
@ -83,7 +83,7 @@
|
|||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'fxfx', title: '风险分析', width: 40 },
|
||||
{ field: 'aqcs', title: '安全措施', width: 120 },
|
||||
{ field: 'aqcs', title: '环保措施', width: 120 },
|
||||
{ field: 'cslx', title: '措施类型', width: 80 },
|
||||
]]
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue