123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/webpage/include/taglib.jsp" %>
- <html>
- <head>
- <title>栏目内容管理</title>
- <meta name="decorator" content="ani"/>
- <%@include file="/webpage/include/summernote.jsp" %>
- <script type="text/javascript">
- $(document).ready(function () {
- <c:if test="${appBaseNews.oprType !=null && appBaseNews.oprType!=''}">
- $(".table.table-bordered").find("input,textarea,select").attr("disabled", "disabled");
- $("#coverButton").hide();
- $('#content').summernote({
- height: 300
- })
- $('#content').summernote('disable');
- </c:if>
- //富文本初始化
- $('#content').summernote({
- height: 300,
- lang: 'zh-CN',
- callbacks: {
- onChange: function (contents, $editable) {
- $("input[name='content']").val($('#content').summernote('code'));//取富文本的值
- }
- }
- });
- // 部门栏目二级联动
- $("#deptName").blur(function () {
- var deptId = $("#deptId").val();
- if (deptId != '') {
- $.ajax({
- type: "POST",
- url: "${ctx}/app/base/appBaseNav/getNav",
- data: {
- deptId: deptId
- },
- dataType: "json",
- success: function (data) {
- console.log(data);
- $("#navId").empty();
- $.each(data.rows, function (index, item) {
- $("#navId").append("<option value='" + item.id + "'>" + item.title + "</option>");
- });
- }
- });
- }
- });
- });
- function save() {
- var isValidate = jp.validateForm('#inputForm');//校验表单
- if (!isValidate) {
- return false;
- } else {
- jp.loading();
- jp.post("${ctx}/app/base/appBaseNews/saveFixedColumn", $('#inputForm').serialize(), function (data) {
- if (data.success) {
- jp.getParent().refresh();
- var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
- parent.layer.close(dialogIndex);
- jp.success(data.msg)
- } else {
- jp.error(data.msg);
- }
- })
- }
- }
- </script>
- </head>
- <body class="bg-white">
- <form:form id="inputForm" modelAttribute="appBaseNews" class="form-horizontal">
- <form:hidden path="id"/>
- <form:hidden path="typeId"/>
- <table class="table table-bordered">
- <tbody>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>标题:</label></td>
- <td class="width-35" colspan="3">
- <form:input path="title" htmlEscape="false" maxlength="100" 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">
- <c:choose>
- <c:when test="${admin}">
- <sys:treeselect id="dept" name="dept.id" value="${appBaseNews.dept.id}" labelName="dept.name"
- labelValue="${appBaseNews.dept.name}"
- title="所属党支部" url="/leader/org/leaderOrgNo/treeData" extId="${appBaseNews.id}"
- cssClass="form-control required" allowClear="true"/>
- </c:when>
- <c:otherwise>
- <input id="deptId" name="dept.id" type="hidden" value="${appBaseNews.dept.id}"/>
- <input id="dept" name="dept.name" class="form-control required" value="${appBaseNews.dept.name}"
- readonly>
- </c:otherwise>
- </c:choose>
- </td>
- <td class="width-15 active" rowspan="3"><label class="pull-right">图片:</label></td>
- <td class="width-35" rowspan="3">
- <c:choose>
- <c:when test="${appBaseNews.cover =='' ||appBaseNews.cover ==undefined}">
- </c:when>
- <c:otherwise>
- <img alt="image" src="${appBaseNews.cover}" height="150" width="250"/>
- </c:otherwise>
- </c:choose>
- <sys:fileUpload path="cover" value="${appBaseNews.cover}" uploadPath="/app/base/appBaseNews"
- type="image" fileNumLimit="1" fileSizeLimit="2048"/>
- </td>
- </tr>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>栏目:</label></td>
- <td class="width-35">
- <c:if test="${appBaseNews.typeName =='支部负责人'}">
- <input id="navId" name="navId" type="hidden" value="100010001"/>
- </c:if>
- <c:if test="${appBaseNews.typeName =='支部党员'}">
- <input id="navId" name="navId" type="hidden" value="100010002"/>
- </c:if>
- <c:if test="${appBaseNews.typeName =='支部概况'}">
- <input id="navId" name="navId" type="hidden" value="100010003"/>
- </c:if>
- <c:if test="${appBaseNews.typeName =='支部历史'}">
- <input id="navId" name="navId" type="hidden" value="100010004"/>
- </c:if>
- <input id="typeName" name="typeName" class="form-control required" value="${appBaseNews.typeName}" readonly>
- <%--<form:select path="navId" cssClass="form-control m-b required">
- <form:options items="${navList}" itemLabel="title" itemValue="id" htmlEscape="false"/>
- </form:select>--%>
- </td>
- </tr>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>是否在首页中显示:</label></td>
- <td class="width-35">
- <form:radiobuttons path="display" items="${fns:getDictList('yes_no')}" itemLabel="label"
- itemValue="value" htmlEscape="false" class="i-checks required"/>
- </td>
- </tr>
- <tr>
- <td class="width-15 active"><label class="pull-right">内容:</label></td>
- <td class="width-35" colspan="3">
- <input type="hidden" name="content" value=" ${appBaseNews.content}"/>
- <div id="content">
- ${fns:unescapeHtml(appBaseNews.content)}
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form:form>
- </body>
- </html>
|