86 lines
3.5 KiB
Plaintext
86 lines
3.5 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
||
|
|
|
||
|
|
<style type="text/css">
|
||
|
|
|
||
|
|
</style>
|
||
|
|
<script type="text/javascript">
|
||
|
|
|
||
|
|
$(function () {
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
function dosave() {
|
||
|
|
$("#subForm").bootstrapValidator('validate');//提交验证
|
||
|
|
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||
|
|
//获取验证结果,如果成功,执行下面代码
|
||
|
|
let id = $('#id').val();
|
||
|
|
if (id != '') {
|
||
|
|
$.post(ext.contextPath + "/process/decisionExpertBaseText/doupdate.do", $("#subForm").serialize(), function (data) {
|
||
|
|
if (data.code == 1) {
|
||
|
|
closeModal('subModal');
|
||
|
|
$("#table_Text").bootstrapTable('refresh');
|
||
|
|
// initTreeView();
|
||
|
|
} else if (data.code == 0) {
|
||
|
|
showAlert('d', data.msg);
|
||
|
|
} else {
|
||
|
|
showAlert('d', data.code);
|
||
|
|
}
|
||
|
|
}, 'json');
|
||
|
|
} else {
|
||
|
|
$.post(ext.contextPath + "/process/decisionExpertBaseText/dosave.do", $("#subForm").serialize()+"&pid=${param.pid}&type=${param.type}", function (data) {
|
||
|
|
if (data.code == 1) {
|
||
|
|
closeModal('subModal');
|
||
|
|
$("#table_Text").bootstrapTable('refresh');
|
||
|
|
// initTreeView();
|
||
|
|
} else if (data.code == 0) {
|
||
|
|
showAlert('d', data.msg);
|
||
|
|
} else {
|
||
|
|
showAlert('d', data.code);
|
||
|
|
}
|
||
|
|
}, 'json');
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
</script>
|
||
|
|
<div class="modal fade" id="subModal">
|
||
|
|
<div class="modal-dialog">
|
||
|
|
<div class="modal-content">
|
||
|
|
<div class="modal-header">
|
||
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
|
|
<span aria-hidden="true">×</span>
|
||
|
|
</button>
|
||
|
|
<h4 class="modal-title">修改</h4>
|
||
|
|
</div>
|
||
|
|
<div class="modal-body">
|
||
|
|
<!-- 新增界面formid强制为subForm -->
|
||
|
|
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
||
|
|
<div id="alertDiv"></div>
|
||
|
|
<input type="hidden" name="id" id="id" value="${decisionExpertBaseText.id}"/>
|
||
|
|
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">解决方案</label>
|
||
|
|
<div class="col-sm-10">
|
||
|
|
<textarea id="text" name="text" class="form-control" type="text"
|
||
|
|
style="width: 100%;height: 100%;">${decisionExpertBaseText.text}</textarea>
|
||
|
|
<%-- <input type="text" class="form-control" id="text" name="text" placeholder="名称"--%>
|
||
|
|
<%-- value="${decisionExpertBaseText.text}">--%>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="modal-footer">
|
||
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||
|
|
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<!-- /.modal-content -->
|
||
|
|
</div>
|
||
|
|
<!-- /.modal-dialog -->
|
||
|
|
</div>
|