<!DOCTYPE html>
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
<head>
|
<th:block th:include="include :: header('修改评价计划')" />
|
<th:block th:include="include :: datetimepicker-css" />
|
</head>
|
<body class="white-bg">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
|
|
<form class="form-horizontal m" id="form-riskEvaluationPlan-edit" th:object="${riskEvaluationPlan}">
|
<input id="planId" name="planId" th:field="*{planId}" type="hidden">
|
|
|
|
<div class="form-group">
|
<label class="col-sm-3 control-label">风险评价计划名称:</label>
|
<div class="col-sm-8">
|
<input th:field="*{evaluationPlanName}" class="form-control" type="text" readonly>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-3 control-label">评价类型:</label>
|
<div class="col-sm-8">
|
<select class="form-control" disabled ="true" th:with="type=${@dict.getType('tr_evaluation_type')}" >
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{evaluationType}"></option>
|
</select>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-3 control-label">评价开始时间:</label>
|
<div class="col-sm-8">
|
<div class="input-group date">
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<input th:value="${#dates.format(riskEvaluationPlan.evaluationBeginTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="form-group">
|
<label class="col-sm-3 control-label">评价结束时间:</label>
|
<div class="col-sm-8">
|
<div class="input-group date">
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<input th:value="${#dates.format(riskEvaluationPlan.evaluationEndTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly>
|
</div>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-3 control-label">评价风险单元:</label>
|
<div class="col-sm-8">
|
<input th:field="*{risk.riskListName}" class="form-control" type="text" readonly>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-3 control-label">辨识方法:</label>
|
<div class="col-sm-8">
|
<select id="riskIdentifyMethod" class="form-control" disabled="true" th:with="type=${@dict.getType('tr_Identify_method')}" readonly>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{riskIdentifyMethod}"></option>
|
</select>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-3 control-label">辨识状态:</label>
|
<div class="col-sm-8">
|
<select id="identifyStatus" name="identifyStatus" class="form-control" th:with="type=${@dict.getType('tr_identify_status')}" >
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{identifyStatus}"></option>
|
</select>
|
</div>
|
</div>
|
|
</form>
|
|
<div class="row">
|
|
<div class="btn-group-sm" id="toolbar" role="group">
|
<a class="btn btn-success" onclick="$.operate.add()" >
|
<i class="fa fa-plus"></i> 添加
|
</a>
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" >
|
<i class="fa fa-edit"></i> 修改
|
</a>
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" >
|
<i class="fa fa-remove"></i> 删除
|
</a>
|
</div>
|
<div class="col-sm-12 select-table table-striped">
|
<table id="bootstrap-table-identify"></table>
|
</div>
|
</div>
|
|
</div>
|
<th:block th:include="include :: footer" />
|
<th:block th:include="include :: datetimepicker-js" />
|
<script type="text/javascript">
|
var prefix = ctx + "tr/riskEvaluationPlan";
|
$("#form-riskEvaluationPlan-edit").validate({
|
focusCleanup: true
|
});
|
|
function submitHandler() {
|
if ($.validate.form()) {
|
$.operate.save(prefix + "/edit", $('#form-riskEvaluationPlan-edit').serialize());
|
}
|
}
|
</script>
|
|
<script th:inline="javascript">
|
$(function() {
|
//方法不同初始化的内容不一样
|
var riskIdentifyMethod = $('#riskIdentifyMethod').val();
|
|
var planId = $('#planId').val();
|
|
if(riskIdentifyMethod==1){
|
var options = {
|
id:"bootstrap-table-identify",
|
url: ctx + "tr/riskCheckPoint/list",
|
createUrl: ctx + "tr/riskCheckPoint/addIdentify/BySCL/"+planId,
|
updateUrl: ctx + "tr/riskCheckPoint/editIdentify/BySCL/{id}",
|
removeUrl: ctx + "tr/riskCheckPoint/remove",
|
modalName: "SCL辨识",
|
columns: [{
|
checkbox: true
|
},
|
{
|
field: 'checkPointId',
|
title: 'id',
|
visible: false
|
},
|
{
|
field: 'sclJianchaXiangmu',
|
title: 'SCL_检查项目'
|
},
|
{
|
field: 'sclJianchaMubiao',
|
title: 'SCL_检查标准'
|
},
|
{
|
field: 'sclQingkuang',
|
title: 'SCL_不符合标准情况'
|
},
|
{
|
field: 'sclZhuyaoHouguo',
|
title: 'SCL_主要后果'
|
},
|
{
|
field: 'evaluationUser.userName',
|
title: '评价人'
|
},
|
|
{
|
title: '操作',
|
align: 'center',
|
formatter: function(value, row, index) {
|
var actions = [];
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(\'' + row.checkPointId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="$.operate.remove(\'' + row.checkPointId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
return actions.join('');
|
}
|
}]
|
};
|
$.table.init(options);
|
}else if(riskIdentifyMethod==2){
|
var options = {
|
id:"bootstrap-table-identify",
|
url: ctx + "tr/riskCheckPoint/list",
|
createUrl: ctx + "tr/riskCheckPoint/addIdentify/ByJHA/"+planId,
|
updateUrl: ctx + "tr/riskCheckPoint/editIdentify/ByJHA/{id}",
|
removeUrl: ctx + "tr/riskCheckPoint/remove",
|
modalName: "JHA辨识",
|
columns: [{
|
checkbox: true
|
},
|
{
|
field: 'checkPointId',
|
title: 'id',
|
visible: false
|
},
|
|
{
|
field: 'jhaZuoyeBuzhou',
|
title: 'JHA_作业步骤'
|
},
|
{
|
field: 'jhaWeixianyuan',
|
title: 'JHA_危险源或潜在事件'
|
},
|
{
|
field: 'jhaShiguLeixing',
|
title: 'JHA_可能发生的事故类型及后果'
|
},
|
{
|
field: 'evaluationUser.userName',
|
title: '评价人'
|
},
|
{
|
title: '操作',
|
align: 'center',
|
formatter: function(value, row, index) {
|
var actions = [];
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(\'' + row.checkPointId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="$.operate.remove(\'' + row.checkPointId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
return actions.join('');
|
}
|
}]
|
};
|
$.table.init(options);
|
}else if(riskIdentifyMethod==3){
|
var options = {
|
id:"bootstrap-table-identify",
|
url: ctx + "tr/riskCheckPoint/list",
|
createUrl: ctx + "tr/riskCheckPoint/addIdentify/ByHAZOP/"+planId,
|
updateUrl: ctx + "tr/riskCheckPoint/editIdentify/ByHAZOP/{id}",
|
removeUrl: ctx + "tr/riskCheckPoint/remove",
|
modalName: "HAZOP辨识",
|
columns: [{
|
checkbox: true
|
},
|
{
|
field: 'checkPointId',
|
title: 'id',
|
visible: false
|
},
|
|
{
|
field: 'hazopJiedian',
|
title: 'HAZOP_节点'
|
},
|
{
|
field: 'hazopCanshu',
|
title: 'HAZOP_参数'
|
},
|
{
|
field: 'hazopCanshuMiaoshu',
|
title: 'HAZOP_参数描述'
|
},
|
{
|
field: 'hazopYindaoci',
|
title: 'HAZOP_引导词'
|
},
|
{
|
field: 'hazopPiancha',
|
title: 'HAZOP_偏差'
|
},
|
{
|
field: 'hazopYuanyin',
|
title: 'HAZOP_可能原因'
|
},
|
{
|
field: 'hazopHouguo',
|
title: 'HAZOP_主要后果'
|
},
|
{
|
field: 'evaluationUser.userName',
|
title: '评价人'
|
},
|
|
{
|
title: '操作',
|
align: 'center',
|
formatter: function(value, row, index) {
|
var actions = [];
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(\'' + row.checkPointId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="$.operate.remove(\'' + row.checkPointId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
return actions.join('');
|
}
|
}]
|
};
|
$.table.init(options);
|
}
|
|
});
|
</script>
|
</body>
|
</html>
|