环保最后修改

This commit is contained in:
caoqianming 2022-11-11 10:03:25 +08:00
parent 2a0a069d38
commit bf004376de
7 changed files with 44 additions and 51 deletions

View File

@ -2,64 +2,59 @@
<div data-options="region:'center',split:true,border:false" style="height:100%;"> <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="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="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> <a onclick="delwaterequipment()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
</div> </div>
<table id="waterequipmentTable" style="height:100%"></table> <table id="gastestequipTable" style="height:100%"></table>
</div> </div>
</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"> 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"> <input name="id" type="hidden">
<div style="margin-bottom:10px"> <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>
<div style="margin-bottom:10px"> <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>
<div style="margin-bottom:10px"> <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>
<div style="margin-bottom:10px"> <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="remark" data-options="label:'备注',labelWidth:100" class="easyui-textbox" style="width:600px;" ></input>
</div> </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;"> <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> </div>
</form> </form>
</div> </div>
<script> <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/', url: '/api/enp/gastestequipment/list/',
rownumbers: true, rownumbers: true,
singleSelect: true, singleSelect: true,
striped: true, striped: true,
method: 'get', method: 'get',
toolbar: '#waterequipmentTableBar', toolbar: '#gastestequipTableBar',
border: false, border: false,
columns: [[ columns: [[
{ field: 'id', title: 'ID', hidden: true }, { field: 'id', title: 'ID', hidden: true },
@ -76,44 +71,44 @@
//新增 //新增
function addwaterequipment() { function addwaterequipment() {
$('#waterequipmentDialog').dialog('open').dialog('setTitle', '新增').window('center'); $('#gastestequipDialog').dialog('open').dialog('setTitle', '新增').window('center');
$('#waterequipmentForm').form('clear'); $('#gastestequipForm').form('clear');
waterequipment_action_url = '/api/enp/gastestequipment/create/' gastestequip_action_url = '/api/enp/gastestequipment/create/'
} }
//保存数据 //保存数据
function savewaterequipment() { function savegastestequip() {
var data = $('#waterequipmentForm').serializeJSON(); var data = $('#gastestequipForm').serializeJSON();
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: waterequipment_action_url, url: gastestequip_action_url,
data: JSON.stringify(data), data: JSON.stringify(data),
datatype: "json", datatype: "json",
processData: false, processData: false,
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
beforeSend: function () { beforeSend: function () {
return $('#waterequipmentForm').form('validate') return $('#gastestequipForm').form('validate')
}, },
success: function (data) { success: function (data) {
$("#waterequipmentTable").datagrid('reload'); $("#gastestequipTable").datagrid('reload');
$("#waterequipmentDialog").dialog("close"); $("#gastestequipDialog").dialog("close");
}, },
}); });
} }
//编辑数据 //编辑数据
function ediwaterequipment(){ function ediwaterequipment(){
var row = $('#waterequipmentTable').datagrid('getSelected'); var row = $('#gastestequipTable').datagrid('getSelected');
if(row){ if(row){
$('#waterequipmentDialog').dialog('open').dialog('setTitle', '编辑').window('center'); $('#gastestequipDialog').dialog('open').dialog('setTitle', '编辑').window('center');
$('#waterequipmentForm').form('load', row); $('#gastestequipForm').form('load', row);
waterequipment_action_url = '/api/enp/gastestequipment/update/'} gastestequip_action_url = '/api/enp/gastestequipment/update/'}
else{ else{
$.messager.alert('提示', '请选择一条数据!'); $.messager.alert('提示', '请选择一条数据!');
} }
} }
//删除数据 //删除数据
function delwaterequipment(){ function delwaterequipment(){
var row = $('#waterequipmentTable').datagrid('getSelected'); var row = $('#gastestequipTable').datagrid('getSelected');
if (row) { if (row) {
$.messager.confirm('提示', '确定删除吗?', function (r) { $.messager.confirm('提示', '确定删除吗?', function (r) {
if (r) { if (r) {
@ -126,8 +121,8 @@
beforeSend: function () { }, beforeSend: function () { },
success: function (data) { success: function (data) {
if (data.code == 1) { if (data.code == 1) {
$("#waterequipmentTable").datagrid('reload'); $("#gastestequipTable").datagrid('reload');
$("#waterequipmentTable").datagrid('reload'); $("#gastestequipTable").datagrid('reload');
} }
else { else {
$.messager.alert('提示', '操作失败!'); $.messager.alert('提示', '操作失败!');

View File

@ -181,11 +181,9 @@ def yjjs_yl(companyid):
obj.save() obj.save()
@shared_task @shared_task
def ycjs(): def ycjs(nowyear=datetime.datetime.now().year, nowmonth=datetime.datetime.now().month):
#print('正在执行预测计算。。。') #print('正在执行预测计算。。。')
companys = Partment.objects.filter(iscompany=1) 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) objs = Yjyc.objects.exclude(yjz=0,year=nowyear,month=nowmonth)
for x in companys: for x in companys:
obj = objs.filter(usecomp=x).order_by('-yjycid') obj = objs.filter(usecomp=x).order_by('-yjycid')

View File

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

View File

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

View File

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

View File

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

View File

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