Преглед на файлове

首页公告 添加 已读未读状态

user5 преди 4 години
родител
ревизия
df1c649650

+ 9 - 0
src/main/java/com/jeeplus/modules/oa/entity/OaNotify.java

@@ -46,6 +46,7 @@ public class OaNotify extends ActEntity<OaNotify> {
 	private boolean isSelf;		// 是否只查询自己的通知
 
     private String readFlag;	// 本人阅读状态
+    private String readFlagStr;	// 本人阅读状态
     private String state;//是否富文本 1是 2不是
 	private List<Workattachment> workAttachments;//附件
 	private Date createStartDate;
@@ -367,6 +368,14 @@ public class OaNotify extends ActEntity<OaNotify> {
 	public void setReferenceNumber(String referenceNumber) {
 		this.referenceNumber = referenceNumber;
 	}
+
+	public String getReadFlagStr() {
+		return readFlagStr;
+	}
+
+	public void setReadFlagStr(String readFlagStr) {
+		this.readFlagStr = readFlagStr;
+	}
 	/*	@Override
 	public String toString() {
 		return "OaNotify [type=" + type + ", title=" + title + ", content=" + content + ", files=" + files + ", status="

+ 5 - 0
src/main/java/com/jeeplus/modules/oa/service/OaNotifyService.java

@@ -170,6 +170,11 @@ public class OaNotifyService extends CrudService<OaNotifyDao, OaNotify> {
                     notify.setCandel("yes");
                 }
             }
+            if(StringUtils.isNotBlank(notify.getReadFlag()) && "0".equals(notify.getReadFlag())){
+                notify.setReadFlagStr("未读");
+            }else{
+                notify.setReadFlagStr("已读");
+            }
         }
         //只查询当前公司下发送给自己的通告
         page.setList(oaNotifyList);

+ 13 - 0
src/main/webapp/static/common/css/style.css

@@ -8771,6 +8771,10 @@ th .layui-table-cell{
 .bord-right > .bord-contents > ul > li > a:hover .bord-record-type{
     color: #3ca0ec;
 }
+.bord-right > .bord-contents > .slimScrollDiv > ul > li > a:hover .bord-record-flag,
+.bord-right > .bord-contents > ul > li > a:hover .bord-record-flag{
+    color: #3ca0ec;
+}
 
 .bord-right > .bord-contents > .slimScrollDiv > ul > li > a:hover .bord-record,
 .bord-right > .bord-contents > ul > li > a:hover .bord-record{
@@ -8804,6 +8808,15 @@ th .layui-table-cell{
     white-space:nowrap;
     text-overflow:ellipsis;
 }
+.bord-right > .bord-contents > .slimScrollDiv > ul > li > a > .bord-record-flag,
+.bord-right > .bord-contents > ul > li > a > .bord-record-flag{
+    width: 44px;
+    display: inline-block;
+    float: left;
+    overflow: hidden;
+    white-space:nowrap;
+    text-overflow:ellipsis;
+}
 .bord-right > .bord-contents > .slimScrollDiv > ul > li > a > .bord-record-time,
 .bord-right > .bord-contents > ul > li > a > .bord-record-time{
     position: absolute;

+ 1 - 1
src/main/webapp/webpage/modules/sys/sysHome.jsp

@@ -941,7 +941,7 @@
         <c:if test="${index.index < 8}">
             xml ="<a href=\"javascript:void(0)\" onclick=\"openDialogView('查看公告', '${ctx}/oa/oaNotify/view?id=${oaNotify.id}&readAttr=disabled','95%','95%')\"  >";
 
-            elem.append('<li>' + xml + "<span class=\"bord-record-type\" title=\"${fns:getMainDictLabel(oaNotify.type, 'oa_notify_type', '')}\">${fns:getMainDictLabel(oaNotify.type, 'oa_notify_type', '')}</span><span class=\"bord-record\" title=\"${oaNotify.title}\">${oaNotify.title}</span>" +
+            elem.append('<li>' + xml + "<span class=\"bord-record-type\" title=\"${fns:getMainDictLabel(oaNotify.type, 'oa_notify_type', '')}\">${fns:getMainDictLabel(oaNotify.type, 'oa_notify_type', '')}</span><span class=\"bord-record-flag\"  title=\"${oaNotify.readFlagStr}\">${oaNotify.readFlagStr}</span><span class=\"bord-record\" title=\"${oaNotify.title}\">${oaNotify.title}</span>" +
                 '<span class="bord-record-time">' + '<fmt:formatDate value="${oaNotify.updateDate}" pattern="yyyy-MM-dd"/>' + '</span></a></li>');
         </c:if>
         </c:forEach>