From 264a19fd89b414d2635405102edcf99cddf01fcc Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期二, 11 七月 2023 13:32:50 +0800
Subject: [PATCH] 修改表单输入变下拉
---
src/main/resources/templates/tr/riskList/selectRiskList.html | 5 +-
src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReportWholeProcess.html | 56 +++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReportWholeProcess.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReportWholeProcess.html
index 7d8b47f..02224a2 100644
--- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReportWholeProcess.html
+++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReportWholeProcess.html
@@ -233,6 +233,56 @@
</div>
</div>
</div>
+<!-- <div class="form-group showByDangerLevelChange">-->
+<!-- <label class="col-sm-3 control-label is-required">风险对象分析编码:</label>-->
+<!-- <div class="col-sm-8">-->
+<!-- <textarea name="hazardCode" maxlength="500" class="form-control" rows="3" required></textarea>-->
+<!-- </div>-->
+<!-- </div>-->
+ <div class="form-group showByDangerLevelChange">
+ <label class="col-sm-3 control-label is-required">风险单元:</label>
+ <div class="col-sm-8">
+ <input id="checkPointName" placeholder="选择风险单元" class="form-control" type="text" onclick="selectRiskPoint()" maxlength="30" readonly="true" required>
+ <input id="checkPointNum" name="hazardCode" type="hidden">
+ </div>
+ </div>
+
+ <div class="form-group showByDangerLevelChange">
+ <label class="col-sm-3 control-label is-required">隐患来源:</label>
+ <div class="col-sm-8">
+ <select name="dangerSrc" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" required>
+ <option value="">--请选择隐患来源--</option>
+ <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group showByDangerLevelChange">
+ <label class="col-sm-3 control-label is-required">隐患类型:</label>
+ <div class="col-sm-8">
+ <select name="hazardDangerType" class="form-control m-b" th:with="type=${@dict.getType('danger_type')}" required>
+ <option value="">--请选择隐患类型--</option>
+ <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group showByDangerLevelChange">
+ <label class="col-sm-3 control-label is-required">隐患造成后果:</label>
+ <div class="col-sm-8">
+ <select name="dangerResult" class="form-control m-b" th:with="type=${@dict.getType('danger_result')}" required>
+ <option value="">--请选择隐患造成后果--</option>
+ <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group showByDangerLevelChange">
+ <label class="col-sm-3 control-label is-required">隐患原因:</label>
+ <div class="col-sm-8">
+ <textarea name="dangerReason" maxlength="500" class="form-control" rows="3" required></textarea>
+ </div>
+ </div>
+
</fieldset>
<h1>隐患整改</h1>
@@ -418,7 +468,11 @@
}
/*核查人 选择 end*/
-
+ // 选择风险单元
+ function selectRiskPoint() {
+ var url = "/tr/riskList/selectRiskList/1"
+ $.modal.openNoConfirm("风险单元", url, '700', '500');
+ }
/*整改人 选择 start*/
function selectRectifyUser() {
diff --git a/src/main/resources/templates/tr/riskList/selectRiskList.html b/src/main/resources/templates/tr/riskList/selectRiskList.html
index 87320c9..687b2ab 100644
--- a/src/main/resources/templates/tr/riskList/selectRiskList.html
+++ b/src/main/resources/templates/tr/riskList/selectRiskList.html
@@ -42,7 +42,7 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
- var value ="'"+row.riskListId+"','"+row.riskListName+"'";
+ var value ="'"+row.riskListId+"','"+row.riskListName+"','"+row.riskListNum+"'";
actions.push('<a class="btn btn-danger " onclick="loadObj('+value+')"></i>选择</a>');
return actions.join('');
}
@@ -51,9 +51,10 @@
$.table.init(options);
});
- function loadObj(id,name){
+ function loadObj(id,name,num){
parent.$("#checkPointId").val(id);
parent.$("#checkPointName").val(name);
+ parent.$("#checkPointNum").val(num);
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
parent.layer.close(index);
}
--
Gitblit v1.9.2