123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <div class="panel-content">
- <div class="panel-title fluid">
- <div class="title-main"><h2>消息通知</h2></div>
- </div>
- <div class="content-wrap">
- <div class="sjs-height-0">
- <div class="container py-5">
- <div class="row">
- <div class="col-3 bd-toc">
- <div class="card">
- <div class="card-header">
- <div class="btn-group btn-group-sm" role="group" aria-label="Basic example">
- <a href="/sp/<%- ctx.subProject.id %>/dashboard/msg" <% if (type === 1 || (msgInfo && msgInfo.type === 1)) { %>class="btn btn-primary"<% } else { %>class="btn btn-outline-primary"<% } %>>项目通知</a>
- <a href="/sp/<%- ctx.subProject.id %>/dashboard/msg?type=2" <% if (type === 2 || (msgInfo && msgInfo.type === 2)) { %>class="btn btn-primary"<% } else { %>class="btn btn-outline-primary"<% } %>>系统消息</a>
- </div>
- </div>
- <ul class="list-group list-group-flush msg-height-list">
- <% for (const msg of msgList) { %>
- <li class="list-group-item <% if (msgInfo && msg.id === msgInfo.id) { %>list-waring<% } %>"><a href="javascript:void(0);" msg-id="<%= msg.id %>" <% if (msg.istop !== '0') { %>class="text-danger"><i class="fa fa-exclamation-triangle" ></i><% } else { %>><% } %> <%= msg.title %></a><br><%= moment(msg.release_time*1000).format('YYYY-MM-DD') %></li>
- <% } %>
- <li class="list-group-item pt-2">
- <% include ../layout/page.ejs %>
- </li>
- </ul>
- </div>
- </div>
- <div class="card col-9">
- <div class="card-body">
- <div>
- <% if (msgInfo) { %>
- <h4 class="text-center" id="title"><%= msgInfo.title %></h4>
- <p class="text-center text-muted">
- <span id="creator"><%- (type === 1 ? msgInfo.creator : '') %></span> 发布于 <span id="release_time"><%= moment(msgInfo.release_time*1000).format('YYYY-MM-DD') %></span>
- <span id="user_permission">
- <% if (uid === msgInfo.create_uid) { %>
- <!--有编辑权用户-->
- <a href="/sp/<%- ctx.subProject.id %>/dashboard/msg/add/<%- msgInfo.id %>" class="btn btn-sm btn-outline-primary">编辑</a>
- <% } %>
- </span>
- </p>
- <!--内容开始-->
- <div class="msg-content border-top-1 pt-3" id="content">
- <%- msgInfo.content %>
- </div>
- <div class="mt-3" id="files-list">
- <% if (msgInfo.files && msgInfo.files.length > 0) { %>
- <h5>附件</h5>
- <% for (const file of msgInfo.files) { %>
- <a href="<% if (file.viewpath) { %><%- file.viewpath %><% } else { %>/wap/message/download/file/<%- file.id %><% } %>" target="_blank">
- <div class="card my-1" style="cursor: pointer">
- <div class="card-body"><i class="fa fa-file"></i> <%- file.filename %><span class="pull-right text-secondary"><%- file.filesize %></span></div>
- </div>
- </a>
- <% } %>
- <% } %>
- </div>
- <% } %>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- autoFlashHeight();
- const msgList = JSON.parse('<%- JSON.stringify(msgList) %>');
- const uid = '<%- uid %>';
- const type = <%- type %>;
- const userMsgPermission = <%- userMsgPermission %>;
- </script>
- <script src="/public/js/moment/moment.min.js"></script>
- <script src="/public/js/dashboard.js"></script>
|