ZhiYeJianKang/职业健康平台后端/target/dzzyb/webpage/modules/sys/policyForm.jsp
2025-02-20 15:25:59 +08:00

134 lines
5.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
<title>政策法规管理</title>
<meta name="decorator" content="default"/>
<link href="${ctxStatic}/summernote/summernote.css" rel="stylesheet">
<link href="${ctxStatic}/summernote/summernote-bs3.css" rel="stylesheet">
<script src="${ctxStatic}/summernote/summernote.min.js"></script>
<script src="${ctxStatic}/summernote/summernote-zh-CN.js"></script>
<script type="text/javascript">
var validateForm;
function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
if(validateForm.form()){
$("#contentStr").val($("#rich_contents").next().find(".note-editable").html());//取富文本的值
$("#inputForm").submit();
return true;
}
return false;
}
$(document).ready(function() {
$("#filesFilePath").attr("value","${filesPath}");
$("#filesFileName").attr("value","${filesNm}");
$("#filesFileNm").attr("value","${filesPath}"+"${filesNm}");
validateForm = $("#inputForm").validate({
submitHandler: function(form){
loading('正在提交,请稍等...');
form.submit();
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
laydate({
elem: '#issueDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
event: 'focus' //响应事件。如果没有传入event,则按照默认的click
});
//富文本初始化
$('#rich_contents').summernote({
lang: 'zh-CN',
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['fontname', ['fontname']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link']],
['view', ['fullscreen', 'codeview', 'help']]
],
height:300,
maxHeight:300,
minHeight:300
});
$("#rich_contents").next().find(".note-editable").html( $("#contentStr").val());
$("#rich_contents").next().find(".note-editable").html( $("#rich_contents").next().find(".note-editable").text());
});
</script>
</head>
<body>
<form:form id="inputForm" modelAttribute="policy" action="${ctx}/sys/policy/save" method="post" class="form-horizontal">
<form:hidden path="id"/>
<sys:message content="${message}"/>
<table class="table table-bordered table-condensed dataTables-example dataTable no-footer">
<tbody>
<tr>
<td class="width-15 active"><label class="pull-right"><font color="red">*</font>标题:</label></td>
<td class="width-35">
<form:input path="title" htmlEscape="false" maxlength="100" class="form-control required"/>
</td>
<td class="width-15 active"><label class="pull-right"><font color="red">*</font>发布人:</label></td>
<td class="width-35">
<form:input path="issuer" readonly="true" htmlEscape="false" maxlength="64" class="form-control required"/>
</td>
</tr>
<tr>
<td class="width-15 active"><label class="pull-right"><font color="red">*</font>发布时间:</label></td>
<td class="width-35">
<input id="issueDate" name="issueDate" type="text" maxlength="20" class="laydate-icon form-control layer-date required"
value="<fmt:formatDate value="${policy.issueDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
</td>
<td class="width-15 active"><label class="pull-right"><font color="red">*</font>类型:</label></td>
<td class="width-35">
<form:select path="type" class="form-control required">
<form:option value="" label=""/>
<form:options items="${fns:getDictList('type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
</td>
</tr>
<tr>
<td class="width-15 active"><label class="pull-right">内容:</label></td>
<td colspan="3" class="width-35">
<form:hidden path="contentStr"/>
<div id="rich_contents">
</div>
</td>
</tr>
<tr>
<td class="width-15 active"><label class="pull-right">备注:</label></td>
<td colspan="3" class="width-35">
<form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="510" class="form-control "/>
</td>
</tr>
<tr>
<td class="width-15 active"><label class="pull-right">附件:</label></td>
<td colspan="3" class="width-35">
<form:hidden id="files" path="files" htmlEscape="false" maxlength="2000" class="form-control" />
<c:if test="${viewType eq 'none'}">
<sys:webuploader prefixid = "files" inputwidth = "65%" inputDisabled = "" btnUpDisplay = "none" btnDelDisplay = "none" ftpfilepath="policy/"/>
</c:if>
<c:if test="${viewType eq 'block'}">
<sys:webuploader prefixid = "files" inputwidth = "65%" inputDisabled = "" btnUpDisplay = "block" btnDelDisplay = "block" ftpfilepath="policy/"/>
</c:if>
</td>
</tr>
</tbody>
</table>
</form:form>
</body>
</html>