first commit
This commit is contained in:
120
WebRoot/jsp/command/emergencyConfigureInfoEdit4Memo.jsp
Normal file
120
WebRoot/jsp/command/emergencyConfigureInfoEdit4Memo.jsp
Normal file
@ -0,0 +1,120 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<!--编辑器-->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/ckeditor5-build-balloon/ckeditor.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/ckeditor5-build-balloon/translations/zh-cn.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function () {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {
|
||||
formId: "subForm_func",
|
||||
hiddenId: "pid",
|
||||
textId: "_pname"
|
||||
}, function (data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
var saveEditor = function () {
|
||||
console.log(myEditor.getData());
|
||||
var modelid = $("#id").val();
|
||||
var editorText = myEditor.getData();
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/saveEditor.do', {
|
||||
modelid: modelid,
|
||||
editorText: editorText
|
||||
}, function (data) {
|
||||
if (data == '1') {
|
||||
//swal("保存成功!");
|
||||
closeModal('powerModal');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm_func").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("${menu.active }").trigger("change");
|
||||
});
|
||||
|
||||
//启动编辑器
|
||||
var myEditor = null;
|
||||
|
||||
BalloonEditor
|
||||
.create(document.querySelector('#editor'), {
|
||||
ckfinder: {
|
||||
uploadUrl: ext.contextPath + "/process/processtype/uploadImage.do"
|
||||
}
|
||||
})
|
||||
.then(editor => {
|
||||
console.log('Editor was initialized', editor);
|
||||
myEditor = editor;
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err.stack);
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal">
|
||||
<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_func">
|
||||
<input id="id" name="id" type="hidden" value="${emergencyConfigureInfo.id}"/>
|
||||
<input id="pid" name="pid" type="hidden" value="${emergencyConfigureInfo.pid}"/>
|
||||
<input id="bizid" name="bizid" type="hidden" value="${emergencyConfigureInfo.bizid}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<%--div id="alertDiv_func"></div>--%>
|
||||
|
||||
<div class="box box-solid">
|
||||
<%--<div class="box-header with-border">
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="saveEditor()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i
|
||||
class="glyphicon glyphicon-floppy-disk"></i></a>
|
||||
</div>
|
||||
</div>--%>
|
||||
<div class="box-body ">
|
||||
<div>
|
||||
<div id="alertDiv_power"></div>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<!-- <button type="button" class="btn btn-default" onclick="addPowerFun();"><i class="fa fa-plus"></i> 新增</button> -->
|
||||
<!-- <button type="button" class="btn btn-default" onclick="saveDefault();"><i class="fa fa-plus-square"></i> 默认</button> -->
|
||||
|
||||
</div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
<br>
|
||||
<div namen="content" id="editor" style="margin-top: -36px;">
|
||||
${emergencyConfigureInfo.memo}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="saveEditor()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user