Browse Source

监督端-通知修改

v6
zouyx 2 years ago
parent
commit
0e386f3614
  1. 140
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/notice/domain/Notice.java
  2. 47
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/NoticeMapper.xml
  3. 22
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/notice/add.html
  4. 158
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/notice/detail.html
  5. 22
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/notice/edit.html
  6. 225
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/notice/notice.html

140
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/notice/domain/Notice.java

@ -6,6 +6,9 @@ import com.zdxt.common.BaseDomain;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
import java.util.List;
/** /**
* 通知公告表 sys_notice * 通知公告表 sys_notice
* *
@ -15,20 +18,39 @@ public class Notice extends BaseDomain
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 公告ID */ /** 通知ID */
private String noticeId; private String noticeId;
/** 公告标题 */ /** 通知标题 */
private String noticeTitle; private String noticeTitle;
/** 公告类型(1通知 2公告) */ /** 发布对象(0全部 1监督端 2执法端 3 企业端) */
private String noticeType; private String objectType;
/** 公告内容 */ /** 通知内容 */
private String noticeContent; private String noticeContent;
/** 公告状态(0正常 1关闭) */ /** 公告状态(0正常 1关闭) */
private String status; private String status;
/** 创建者id */
private String createBy;
/** 创建时间 */
private Date createTime;
/** 更新时间 */
private Date updateTime;
/** 更新者 */
private String updateBy;
/** 发布部门多个 */
private String bureauDeptIds;
/** 发布部门名称多个 */
private String bureauDeptNames;
/** 备注 */
private String remark;
/** 发布部门名称列表 */
private List<String> bureauDeptNameList;
private String beginTime;
private String endTime;
public String getNoticeId() public String getNoticeId()
{ {
@ -52,14 +74,12 @@ public class Notice extends BaseDomain
return noticeTitle; return noticeTitle;
} }
public void setNoticeType(String noticeType) public String getObjectType() {
{ return objectType;
this.noticeType = noticeType;
} }
public String getNoticeType() public void setObjectType(String objectType) {
{ this.objectType = objectType;
return noticeType;
} }
public void setNoticeContent(String noticeContent) public void setNoticeContent(String noticeContent)
@ -82,19 +102,115 @@ public class Notice extends BaseDomain
return status; return status;
} }
@Override
public String getCreateBy() {
return createBy;
}
@Override
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
@Override
public Date getCreateTime() {
return createTime;
}
@Override
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public Date getUpdateTime() {
return updateTime;
}
@Override
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String getUpdateBy() {
return updateBy;
}
@Override
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public String getBureauDeptIds() {
return bureauDeptIds;
}
public void setBureauDeptIds(String bureauDeptIds) {
this.bureauDeptIds = bureauDeptIds;
}
public String getBureauDeptNames() {
return bureauDeptNames;
}
public void setBureauDeptNames(String bureauDeptNames) {
this.bureauDeptNames = bureauDeptNames;
}
@Override
public String getRemark() {
return remark;
}
@Override
public void setRemark(String remark) {
this.remark = remark;
}
public List<String> getBureauDeptNameList() {
return bureauDeptNameList;
}
public void setBureauDeptNameList(List<String> bureauDeptNameList) {
this.bureauDeptNameList = bureauDeptNameList;
}
public String getBeginTime() {
return beginTime;
}
public void setBeginTime(String beginTime) {
this.beginTime = beginTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("noticeId", getNoticeId()) .append("noticeId", getNoticeId())
.append("noticeTitle", getNoticeTitle()) .append("noticeTitle", getNoticeTitle())
.append("noticeType", getNoticeType()) .append("objectType", getObjectType())
.append("noticeContent", getNoticeContent()) .append("noticeContent", getNoticeContent())
.append("status", getStatus()) .append("status", getStatus())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("bureauDeptIds",getBureauDeptIds())
.append("bureauDeptNames",getBureauDeptNames())
.append("remark", getRemark()) .append("remark", getRemark())
.append("bureauDeptNameList",getBureauDeptNameList())
.append("beginTime",getBeginTime())
.append("endTime",getEndTime())
.toString(); .toString();
} }
} }

47
lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/NoticeMapper.xml

@ -7,18 +7,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="Notice" id="NoticeResult"> <resultMap type="Notice" id="NoticeResult">
<result property="noticeId" column="notice_id" /> <result property="noticeId" column="notice_id" />
<result property="noticeTitle" column="notice_title" /> <result property="noticeTitle" column="notice_title" />
<result property="noticeType" column="notice_type" /> <result property="objectType" column="object_type" />
<result property="noticeContent" column="notice_content" /> <result property="noticeContent" column="notice_content" />
<result property="status" column="status" /> <result property="status" column="status" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="bureauDeptIds" column="bureau_dept_ids" />
<result property="bureauDeptNames" column="bureau_dept_names" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
</resultMap> </resultMap>
<sql id="selectNoticeVo"> <sql id="selectNoticeVo">
select notice_id, notice_title, notice_type, notice_content, status, create_by, create_time, update_by, update_time, remark select notice_id, notice_title, object_type, notice_content, status, create_by, create_time, update_by, update_time,bureau_dept_ids,bureau_dept_names,remark
from sys_notice from sys_notice
</sql> </sql>
@ -33,46 +35,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="noticeTitle != null and noticeTitle != ''"> <if test="noticeTitle != null and noticeTitle != ''">
AND notice_title like concat('%', #{noticeTitle}, '%') AND notice_title like concat('%', #{noticeTitle}, '%')
</if> </if>
<if test="noticeType != null and noticeType != ''"> <if test="objectType != null and objectType != ''">
AND notice_type = #{noticeType} AND object_type = #{objectType}
</if> </if>
<if test="createBy != null and createBy != ''"> <if test="bureauDeptNames != null and bureauDeptNames != ''">
AND create_by like concat('%', #{createBy}, '%') AND bureau_dept_names like concat('%', #{bureauDeptNames}, '%')
</if> </if>
<if test="beginTime != null and beginTime != ''">
AND DATE_FORMAT(create_time,'%Y-%m-%d')>=#{beginTime}
</if>
<if test="endTime != null and endTime != ''">
AND #{endTime}>=DATE_FORMAT(create_time,'%Y-%m-%d')
</if>
</where> </where>
</select> </select>
<insert id="insertNotice" parameterType="Notice"> <insert id="insertNotice" parameterType="Notice">
insert into sys_notice ( insert into sys_notice
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="noticeId != null and noticeId != '' ">notice_id, </if> <if test="noticeId != null and noticeId != '' ">notice_id, </if>
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if> <if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
<if test="noticeType != null and noticeType != '' ">notice_type, </if> <if test="objectType != null and objectType != '' ">object_type, </if>
<if test="noticeContent != null and noticeContent != '' ">notice_content, </if> <if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
<if test="status != null and status != '' ">status, </if> <if test="status != null and status != '' ">status, </if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
create_time create_time,
)values( <if test="bureauDeptIds != null and bureauDeptIds != ''">bureau_dept_ids,</if>
<if test="bureauDeptNames != null and bureauDeptNames != ''">bureau_dept_names,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="noticeId != null and noticeId != '' ">#{noticeId}, </if> <if test="noticeId != null and noticeId != '' ">#{noticeId}, </if>
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if> <if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
<if test="noticeType != null and noticeType != ''">#{noticeType}, </if> <if test="objectType != null and objectType != ''">#{objectType}, </if>
<if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if> <if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if>
<if test="status != null and status != ''">#{status}, </if> <if test="status != null and status != ''">#{status}, </if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate() sysdate(),
) <if test="bureauDeptIds != null and bureauDeptIds != ''">#{bureauDeptIds},</if>
<if test="bureauDeptNames != null and bureauDeptNames != ''">#{bureauDeptNames},</if>
</trim>
</insert> </insert>
<update id="updateNotice" parameterType="Notice"> <update id="updateNotice" parameterType="Notice">
update sys_notice update sys_notice
<set> <set>
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if> <if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
<if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if> <if test="objectType != null and objectType != ''">object_type = #{objectType}, </if>
<if test="noticeContent != null">notice_content = #{noticeContent}, </if> <if test="noticeContent != null">notice_content = #{noticeContent}, </if>
<if test="status != null and status != ''">status = #{status}, </if> <if test="status != null and status != ''">status = #{status}, </if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate() <if test="remark != null and remark != ''">remark = #{remark},</if>
update_time = sysdate(),
<if test="bureauDeptIds != null and bureauDeptIds != ''">bureau_dept_ids = #{bureauDeptIds},</if>
<if test="bureauDeptNames != null and bureauDeptNames != ''">bureau_dept_names = #{bureauDeptNames},</if>
</set> </set>
where notice_id = #{noticeId} where notice_id = #{noticeId}
</update> </update>

22
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/notice/add.html

@ -9,21 +9,29 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-notice-add"> <form class="form-horizontal m" id="form-notice-add">
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label is-required">公告标题:</label> <label class="col-sm-2 control-label is-required">通知标题:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="noticeTitle" name="noticeTitle" class="form-control" type="text" required> <input id="noticeTitle" name="noticeTitle" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">公告类型:</label> <label class="col-sm-2 control-label is-required">发布部门:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<select name="noticeType" class="form-control m-b" th:with="type=${@dict.getType('sys_notice_type')}"> <input id="bureauDeptNames" name="bureauDeptNames" class="form-control" type="text">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> </div>
</select> <label class="col-sm-2 control-label"></label>
<div class="col-sm-10">注:多部门请用,分隔</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">发布对象:</label>
<div class="col-sm-10">
<select name="objectType" class="form-control m-b" th:with="type=${@dict.getType('object')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">公告内容:</label> <label class="col-sm-2 control-label">通知内容:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="noticeContent" name="noticeContent" type="hidden"> <input id="noticeContent" name="noticeContent" type="hidden">
<div class="summernote"></div> <div class="summernote"></div>
@ -36,7 +44,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">公告状态:</label> <label class="col-sm-2 control-label">发布状态:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_notice_status')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_notice_status')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}"> <input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">

158
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/notice/detail.html

@ -2,36 +2,73 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('修改通知公告')" /> <th:block th:include="include :: header('修改通知公告')" />
<th:block th:include="include :: summernote-css" /> <th:block th:include="include :: summernote-css" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
<style>
.kv-file-remove.btn.btn-sm.btn-kv.btn-default.btn-outline-secondary {
display: none !important;
}
.kv-file-zoom.btn.btn-sm.btn-kv.btn-default.btn-outline-secondary {
display: none !important;
}
</style>
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-notice-edit" th:object="${notice}"> <form class="form-horizontal m" id="form-notice-edit" th:object="${notice}">
<input id="noticeId" name="noticeId" th:field="*{noticeId}" type="hidden"> <input id="noticeId" name="noticeId" th:field="*{noticeId}" type="hidden">
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label is-required">公告标题:</label> <label class="col-sm-2 control-label is-required">通知标题:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="noticeTitle" name="noticeTitle" th:field="*{noticeTitle}" class="form-control" type="text" readonly> <input id="noticeTitle" name="noticeTitle" th:field="*{noticeTitle}" class="form-control" type="text" disabled>
</div> </div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label is-required">发布时间:</label>
<div class="col-sm-10">
<input id="createTime" name="createTime" th:field="*{createTime}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label is-required">发布部门:</label>
<div class="col-sm-10">
<input id="bureauDeptNames" name="bureauDeptNames" th:field="*{bureauDeptNames}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">发布对象:</label>
<div class="col-sm-10">
<select name="noticeType" class="form-control m-b" th:with="type=${@dict.getType('object')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{objectType}"></option>
</select>
</div> </div>
<div class="form-group"> </div>
<label class="col-sm-2 control-label">公告类型:</label> <div class="form-group">
<div class="col-sm-10"> <label class="col-sm-2 control-label">通知内容:</label>
<select name="noticeType" class="form-control m-b" th:with="type=${@dict.getType('sys_notice_type')}" disabled> <div class="col-sm-10">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{noticeType}"></option> <input id="noticeContent" name="noticeContent" th:field="*{noticeContent}" type="hidden" disabled>
</select> <div id="editor" class="summernote"></div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">公告内容:</label> <label class="col-sm-2 control-label">附件:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="noticeContent" name="noticeContent" th:field="*{noticeContent}" type="hidden"> <input id="fileinput" type="file" name="files" class="file-loading" multiple readonly/>
<div id="editor" class="summernote"></div> </div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">发布状态:</label>
<div class="col-sm-10">
<div class="radio-box" th:each="dict : ${@dict.getType('notice_status_type')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}" disabled>
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
</form> </div>
</div> </form>
</div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<th:block th:include="include :: summernote-js" /> <th:block th:include="include :: summernote-js" />
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "system/notice"; var prefix = ctx + "system/notice";
@ -52,7 +89,80 @@
$('#editor').summernote('code', content); $('#editor').summernote('code', content);
$('#editor').summernote('disable'); $('#editor').summernote('disable');
}); });
$(function (){
initFile();
document.getElementsByClassName("kv-file-remove btn btn-sm btn-kv btn-default btn-outline-secondary")
})
function initFile() {
$.ajax({
type: "POST",
url: prefix + "/queryFiles",
data: {"noticeId": $('#noticeId').val()},
dataType: 'json',
success: function (result) {
if (result.success == true) {
var filePreview = result.data.filePreview;
var preview = filePreview.previewRespDTOS;
if (preview != null) {
for (var i = 0; i < preview.length; i++) {
// 图片删除的地址
preview[i].url = prefix + "/removeFile"
}
}
$("#fileinput").fileinput({
'theme': 'explorer',
initialPreviewAsData: true,
dropZoneEnabled: true,
dropZoneTitle: "上传附件",
uploadUrl: prefix + "/editNoticeFile",
uploadAsync: false,//异步上传
enctype: 'multipart/form-data',
showClose: false,
showPreview: true,
showUpload: false,
// showBrowse: false,
previewFileIcon: '<i class="fas fa-file"></i>',
preferIconicPreview: true,
uploadExtraData: function () {
var sHTML = $('.summernote').summernote('code');
$("#noticeContent").val(sHTML);
var formData = $("#form-notice-edit").serialize();
formData = decodeURIComponent(formData, true);
var arr = formData.split("&");
var data = {};
for (var i=0; i<arr.length; i++) {
var item = arr[i].split('=');
var value = item[1].replace("+", " ");
data[item[0]] = value;
}
return data;
},
layoutTemplates: {
// actionDelete: ''//去掉删除按钮
// actionUpload: '' // 去掉上传按钮
},
initialPreview: filePreview.fileList == null ? [] : filePreview.fileList,
initialPreviewConfig: preview == null ? [] : preview
});
// 此事件仅在ajax上传且文件批量上传成功之后触发
$("#fileinput").on("filebatchuploadsuccess", function (event, data, previewId, index) {
if (data.response.code === 0) {
$.modal.close();
var parent = window.parent;
parent.$.modal.msgSuccess(data.response.message);
parent.$.table.refresh();
} else {
// 清理文件输入控件
$('#fileinput').fileinput('clear');
$.modal.msgError(data.message);
}
});
}
}
})
}
</script> </script>
</body> </body>
</html> </html>

22
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/notice/edit.html

@ -10,21 +10,29 @@
<form class="form-horizontal m" id="form-notice-edit" th:object="${notice}"> <form class="form-horizontal m" id="form-notice-edit" th:object="${notice}">
<input id="noticeId" name="noticeId" th:field="*{noticeId}" type="hidden"> <input id="noticeId" name="noticeId" th:field="*{noticeId}" type="hidden">
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label is-required">公告标题:</label> <label class="col-sm-2 control-label is-required">通知标题:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="noticeTitle" name="noticeTitle" th:field="*{noticeTitle}" class="form-control" type="text" required> <input id="noticeTitle" name="noticeTitle" th:field="*{noticeTitle}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">公告类型:</label> <label class="col-sm-2 control-label is-required">发布部门:</label>
<div class="col-sm-10">
<input id="bureauDeptNames" name="bureauDeptNames" th:field="*{bureauDeptNames}" class="form-control" type="text">
</div>
<label class="col-sm-2 control-label"></label>
<div class="col-sm-10">注:多部门请用,分隔</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">发布对象:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<select name="noticeType" class="form-control m-b" th:with="type=${@dict.getType('sys_notice_type')}"> <select name="noticeType" class="form-control m-b" th:with="type=${@dict.getType('object')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{noticeType}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{objectType}"></option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">公告内容:</label> <label class="col-sm-2 control-label">通知内容:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="noticeContent" name="noticeContent" th:field="*{noticeContent}" type="hidden"> <input id="noticeContent" name="noticeContent" th:field="*{noticeContent}" type="hidden">
<div id="editor" class="summernote"></div> <div id="editor" class="summernote"></div>
@ -37,9 +45,9 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">公告状态:</label> <label class="col-sm-2 control-label">发布状态:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_notice_status')}"> <div class="radio-box" th:each="dict : ${@dict.getType('notice_status_type')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}"> <input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>

225
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/notice/notice.html

@ -1,117 +1,126 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('通知公告列表')" /> <th:block th:include="include :: header('通知公告列表')"/>
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
<div class="row"> <div class="row">
<div class="col-sm-12 search-collapse"> <div class="col-sm-12 search-collapse">
<form id="notice-form"> <form id="notice-form">
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
公告标题:<input type="text" name="noticeTitle"/> 通知标题:<input type="text" name="noticeTitle"/>
</li> </li>
<li> <li id="day" class="day" style="display: flex;">
操作人员:<input type="text" name="createBy"/> <p>发布时间:</p>
</li> <input type="text" class="time-input" id="beginTime" placeholder="开始时间" name="beginTime"
<li> style="width: 100px"/>
公告类型:<select name="noticeType" th:with="type=${@dict.getType('sys_notice_type')}"> <span>-</span>
<option value="">所有</option> <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> style="width: 100px"/>
</select> </li>
</li> <li>
<li> 发布部门:<input type="text" name="bureauDeptNames"/>
<a class="btn btn-success btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> </li>
<a class="btn btn-reset btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <li>
</li> 发布对象:<select name="objectType" th:with="type=${@dict.getType('object')}" style="width: 100px">
</ul> <option value=""></option>
</div> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
</form> th:value="${dict.dictValue}"></option>
</div> </select>
</li>
<div class="btn-group-sm" id="toolbar" role="group"> <li>
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:notice:add"> <a class="btn btn-success btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<i class="fa fa-plus"></i> 新增 <a class="btn btn-reset btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</a> </li>
<a class="btn btn-primary single disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:notice:edit"> </ul>
<i class="fa fa-edit"></i> 修改 </div>
</a> </form>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:notice:remove"> </div>
<i class="fa fa-remove"></i> 删除
</a> <div class="btn-group-sm" id="toolbar" role="group">
</div> <a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:notice:add">
<i class="fa fa-plus"></i> 新增
<div class="col-sm-12 select-table table-bordered"> </a>
<table id="bootstrap-table"></table> <a class="btn btn-primary single disabled" onclick="$.operate.editFull()"
</div> shiro:hasPermission="system:notice:edit">
</div> <i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="system:notice:remove">
<i class="fa fa-remove"></i> 删除
</a>
</div>
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table>
</div>
</div> </div>
<th:block th:include="include :: footer" /> </div>
<script th:inline="javascript"> <th:block th:include="zdxtInclude :: footer"/>
var editFlag = [[${@permission.hasPermi('system:notice:edit')}]]; <script th:inline="javascript">
var removeFlag = [[${@permission.hasPermi('system:notice:remove')}]]; var editFlag = [[${@permission.hasPermi('system:notice:edit')}]];
var types = [[${@dict.getType('sys_notice_type')}]]; var removeFlag = [[${@permission.hasPermi('system:notice:remove')}]];
var datas = [[${@dict.getType('sys_notice_status')}]]; var types = [[${@dict.getType('object')}]];
var prefix = ctx + "system/notice"; var datas = [[${@dict.getType('notice_status_type')}]];
var prefix = ctx + "system/notice";
$(function() { $(function () {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
createUrl: prefix + "/add", createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}", updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove", removeUrl: prefix + "/remove",
modalName: "公告", modalName: "通知",
columns: [{ uniqueId:"noticeId",
checkbox: true columns: [{
}, checkbox: true
{ },
field : 'noticeId', {
title : '序号' field: 'noticeTitle',
}, title: '通知标题'
{ },
field : 'noticeTitle', {
title : '公告标题' field: 'createTime',
}, title: '发布时间',
{ // sortable: true
field: 'noticeType', },
title: '公告类型', {
align: 'center', field: 'bureauDeptNames',
formatter: function(value, row, index) { title: '发布部门',
return $.table.selectDictLabel(types, value); },
} {
}, field: 'objectType',
{ title: '发布对象',
field: 'status', align: 'center',
title: '状态', formatter: function (value, row, index) {
align: 'center', return $.table.selectDictLabel(types, value);
formatter: function(value, row, index) { }
return $.table.selectDictLabel(datas, value); },
} {
}, field: 'status',
{ title: '发布状态',
field : 'createBy', align: 'center',
title : '创建者' formatter: function (value, row, index) {
}, return $.table.selectDictLabel(datas, value);
{ }
field: 'createTime', },
title: '创建时间', {
sortable: true title: '操作',
}, align: 'center',
{ formatter: function (value, row, index) {
title: '操作', return '<span style="cursor: pointer;color: blue;" ONCLICK="openNoticeDetails(\'' + row.noticeId + '\')">' + '详情' + '</span>';
align: 'center', }
formatter: function(value, row, index) { }]
var actions = []; };
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editFull(\'' + row.noticeId + '\')"><i class="fa fa-edit"></i> 编辑</a> '); $.table.init(options);
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.noticeId + '\')"><i class="fa fa-remove"></i> 删除</a>'); });
return actions.join(''); function openNoticeDetails(noticeId){
} console.log(noticeId);
}] $.modal.openClose("通知公告详情", prefix + "/detail/" + noticeId);
}; }
$.table.init(options); </script>
});
</script>
</body> </body>
</html> </html>
Loading…
Cancel
Save