|
|
@@ -0,0 +1,357 @@
|
|
|
+<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
|
|
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
|
|
+<%@ taglib uri="/WEB-INF/SpaceCoreApp.tld" prefix="app"%>
|
|
|
+<% pageContext.setAttribute(space.core.apps.common.ConstVars.MODULE_DM_KEY, "sys"); %>
|
|
|
+<%-- sys.sys_msg.msg_list --%>
|
|
|
+<!DOCTYPE html >
|
|
|
+<html>
|
|
|
+
|
|
|
+ <head> <!-- HEAD -->
|
|
|
+ <link rel="stylesheet" type="text/css" href="/css/reset.css">
|
|
|
+ <link rel="stylesheet" type="text/css" href="/apps/space/plug-in/element-ui@2.15.8/index.css">
|
|
|
+ <link rel="stylesheet" type="text/css" href="/apps/space/plug-in/layui/dist/css/layui.css">
|
|
|
+ <link rel="stylesheet" type="text/css" href="/apps/space/css/SpaceIcon/iconfont.css">
|
|
|
+ <link rel="stylesheet" type="text/css" href="/css/components.css">
|
|
|
+ <link rel="stylesheet" href="/css/ckeditor.css">
|
|
|
+ <script>var space = { vars: {} };</script>
|
|
|
+ <script src="/js/jquery1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
|
|
|
+ <script src="/apps/space/plug-in/element-resize-detector/element-resize-detector.min.js"></script>
|
|
|
+ <script src="/apps/space/plug-in/vue/vue.min.js" type="text/javascript" charset="utf-8"></script>
|
|
|
+ <script src="/apps/space/plug-in/element-ui@2.15.8/index.js" type="text/javascript" charset="utf-8"></script>
|
|
|
+ <script src="/js/space.vue.pc.subassembly.js?v=20261111-image-center-source-v3"></script>
|
|
|
+ <script src="/apps/space/plug-in/layui/dist/layui.all.js" type="text/javascript" charset="utf-8"></script>
|
|
|
+ <script src="/js/space.recycle.js" type="text/javascript" charset="utf-8"></script>
|
|
|
+ <script src="/js/space.display.js" type="text/javascript" charset="utf-8"></script> <c:if test="${isDevEnvironment == 'true'}">
|
|
|
+ <script>var spaceDevSubassemblyCodePath = 'sys.sys_msg.msg_list';</script>
|
|
|
+ <link rel="stylesheet" href="/css/space.dev.css">
|
|
|
+ <script src="/js/space.dev.js" type="text/javascript" charset="utf-8"></script>
|
|
|
+ </c:if> <!-- 手写插件 -->
|
|
|
+ <script src="/apps/space/plug-in/jSignature/libs/modernizr.js"></script> <!--[if lt IE 9]>
|
|
|
+ <script type="text/javascript" src="/apps/space/plug-in/jSignature/libs/flashcanvas.js"></script>
|
|
|
+ <![endif]-->
|
|
|
+ <script src="/apps/space/plug-in/jSignature/libs/jSignature.min.noconflict.js"></script>
|
|
|
+ <style>
|
|
|
+ .gray-bg {
|
|
|
+ background-color: #f5f6fa !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list {
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 100%;
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list dl {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 6px;
|
|
|
+ overflow: hidden;
|
|
|
+ transition: all .5s;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list dl:hover {
|
|
|
+ box-shadow: 5px 3px 3px #eee;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list dl:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list dt,
|
|
|
+ .msg-list dt img {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list dt {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list dd {
|
|
|
+ padding: 0 20px;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list-title,
|
|
|
+ .msg-list-desc {
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list .msg-list-title {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #000;
|
|
|
+ line-height: 24px;
|
|
|
+ margin: 12px 0 6px;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list-title i {
|
|
|
+ display: inline-block;
|
|
|
+ width: 6px;
|
|
|
+ height: 6px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background-color: #f56c6c;
|
|
|
+ position: absolute;
|
|
|
+ top: 10px;
|
|
|
+ left: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list .msg-list-desc {
|
|
|
+ -webkit-line-clamp: 3;
|
|
|
+ line-height: 20px;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list .msg-list-time {
|
|
|
+ margin-top: 10px;
|
|
|
+ font-size: 14px;
|
|
|
+ padding-top: 10px;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list .msg-list-time::before {
|
|
|
+ content: "";
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 15px;
|
|
|
+ width: calc(100% - 30px);
|
|
|
+ height: 1px;
|
|
|
+ background-color: #eee;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list-time i {
|
|
|
+ font-style: normal;
|
|
|
+ float: right;
|
|
|
+ margin-top: 1px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-list-time .el-icon-arrow-right {
|
|
|
+ font-size: 16px;
|
|
|
+ margin-left: 3px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .layui-laypage a,
|
|
|
+ .layui-laypage span,
|
|
|
+ .layui-laypage input,
|
|
|
+ .layui-laypage button {
|
|
|
+ background-color: transparent;
|
|
|
+ }
|
|
|
+
|
|
|
+ .image-slot {
|
|
|
+ color: #ccc;
|
|
|
+ }
|
|
|
+
|
|
|
+ .image-slot i {
|
|
|
+ font-size: 36px;
|
|
|
+ padding-top: 20px;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-form {
|
|
|
+ height: calc(100% - 50px - 55px);
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .space-tbs .tab-right .el-button {
|
|
|
+ padding-top: 6px;
|
|
|
+ padding-bottom: 6px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .space-tbs .tab-right .el-button i,
|
|
|
+ .space-tbs .tab-right .el-button span {
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <title>消息列表</title>
|
|
|
+</head>
|
|
|
+
|
|
|
+ <body>
|
|
|
+ <c:if test="${empty sysMsgList}">
|
|
|
+ <div v-cloak id="space-content">
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${not empty sysMsgList}">
|
|
|
+ <div id="space-content" class="gray-bg">
|
|
|
+ </c:if>
|
|
|
+
|
|
|
+ <div class="space-tbs">
|
|
|
+
|
|
|
+ <el-tabs v-model="obj.viewCode" @tab-click="space.forms.submit();">
|
|
|
+ <el-tab-pane label="全部" name=""></el-tab-pane>
|
|
|
+ <el-tab-pane label="已读" name="10000"></el-tab-pane>
|
|
|
+ <el-tab-pane label="未读" name="10010"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+
|
|
|
+ <div class="tab-right">
|
|
|
+ <div class="tabs-right-search">
|
|
|
+ <el-input placeholder="搜索关键字" v-model="obj.title" size="small" clearable>
|
|
|
+ <i slot="suffix" class="el-input__icon el-icon-search space-search-icon"
|
|
|
+ onclick="space.forms.submit();"></i>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <div class="tabs-right-btns">
|
|
|
+ <el-button type="primary" icon="spaceicon icon-quanbuyidu"
|
|
|
+ plain
|
|
|
+ size="small"
|
|
|
+ @click="confirmAll">
|
|
|
+ 全部已读
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-form action="<app:token name='sys.system_message_list' page='10583' />" method="post" ref="obj" :model="obj">
|
|
|
+
|
|
|
+ <!-- 列表 -->
|
|
|
+ <div id="msgList" class="msg-list">
|
|
|
+ <c:forEach items="${sysMsgList }" var="item">
|
|
|
+ <c:if test="${item.token != '' && item.token != null}">
|
|
|
+ <dl id="${item.smid}" style="cursor: pointer;" data-view="${item.isView}" @click="clickFun('${item.destinationTitle}', '${item.width}', '${item.height}', '${item.token}')">
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${item.token == '' || item.token == null}">
|
|
|
+ <dl id="${item.smid}" data-view="${item.isView}">
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${item.thumbnail != null}">
|
|
|
+ <dt>
|
|
|
+ <el-image src="${item.thumbnail}" >
|
|
|
+ <div slot="error" class="image-slot">
|
|
|
+ <i class="el-icon-picture-outline"></i>
|
|
|
+ <p>图片加载失败</p>
|
|
|
+ </div>
|
|
|
+ </el-image>
|
|
|
+ </dt>
|
|
|
+ </c:if>
|
|
|
+ <dd class="msg-list-title">
|
|
|
+ <!-- 未读有i,已读没有i -->
|
|
|
+ <i id="i_${item.smid}" v-if="!${item.isView}"></i>
|
|
|
+ ${item.title}
|
|
|
+ </dd>
|
|
|
+ <dd class="msg-list-desc">
|
|
|
+ ${item.desc}
|
|
|
+ </dd>
|
|
|
+ <dd class="msg-list-time">
|
|
|
+ <span>${item.source}</span>
|
|
|
+ <i class="el-icon-arrow-right" v-show="${item.token != '' && item.token != null}"></i>
|
|
|
+ <i>${item.create_time}</i>
|
|
|
+ </dd>
|
|
|
+ </dl>
|
|
|
+ </c:forEach>
|
|
|
+
|
|
|
+ <c:if test="${empty sysMsgList}">
|
|
|
+ <div class="no-data"></div>
|
|
|
+ </c:if>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ <app:appPage />
|
|
|
+ </div>
|
|
|
+ </body>
|
|
|
+ <script>
|
|
|
+ $(function() {
|
|
|
+ var len = $("#appPageDiv").children().length;
|
|
|
+ if(len > 0) {
|
|
|
+ $(".el-form").css({
|
|
|
+ 'height': 'calc(100% - 50px - 55px)'
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ $(".el-form").css({
|
|
|
+ 'height': 'calc(100% - 70px)'
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ </script>
|
|
|
+
|
|
|
+ <script type="text/javascript">
|
|
|
+ space.vue = new Vue({
|
|
|
+ el: space.appContent,
|
|
|
+ data: function() {
|
|
|
+ return {
|
|
|
+ obj: {
|
|
|
+ title: '${title}',
|
|
|
+ viewCode: '${viewCode}',
|
|
|
+ rowCountPerPage: "20"
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ clickFun: function(title, width, height, token) {
|
|
|
+ space.plugins.layer.openPage({
|
|
|
+ open: true,
|
|
|
+ title: title,
|
|
|
+ width: width,
|
|
|
+ height: height,
|
|
|
+ url: token,
|
|
|
+ refresh: false
|
|
|
+ });
|
|
|
+ },
|
|
|
+ confirmAll:function () {
|
|
|
+ var index = top.layer.confirm("标记所有消息为已读, 是否继续?", {
|
|
|
+ anim: 5,
|
|
|
+ isOutAnim: false,
|
|
|
+ title: "提示",
|
|
|
+ btn: ['确定', '取消'] //按钮
|
|
|
+ }, function () {
|
|
|
+ space.utils.ajax({
|
|
|
+ url: '<app:token name='sys.system_message_all_have_read' />',
|
|
|
+ dataType: 'json',
|
|
|
+ callback: function(data) {
|
|
|
+ if(data.code == "success") {
|
|
|
+ top.layer.close(index);
|
|
|
+ space.forms.submit();
|
|
|
+ }else{
|
|
|
+ space.message.error(data.msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, function () {
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted: function() {
|
|
|
+
|
|
|
+ $("#msgList").find("dl").on("click", function() {
|
|
|
+
|
|
|
+ var view = $(this).attr("data-view");
|
|
|
+ if(view == "true") {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ var that = this;
|
|
|
+ var id = $(this).attr("id");
|
|
|
+ if(space.utils.isNull(id)) {
|
|
|
+ console.error("未获取到消息ID")
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ space.utils.ajax({
|
|
|
+ url: '<app:token name='sys.system_message_have_read' />',
|
|
|
+ data: {
|
|
|
+ smid: id
|
|
|
+ },
|
|
|
+ dataType: 'json',
|
|
|
+ callback: function(data) {
|
|
|
+ if(data.code == "success") {
|
|
|
+ $(that).attr("data-view", "true");
|
|
|
+ $("#i_" + id).remove();
|
|
|
+ }else{
|
|
|
+ space.message.error(data.msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#appPageDiv").show();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ </script>
|
|
|
+
|
|
|
+
|
|
|
+<script type="text/javascript">space.vars.pageTypeCode = "10005";</script>
|
|
|
+<script type="text/javascript">space.vars.pageHashCode = "8XozhAs+UglJ02sk661/sA==";</script>
|
|
|
+<script type="text/javascript">removeTokens("<app:token name='sys.removeToken' />", '<%= pageContext.getAttribute(space.core.apps.common.ConstVars.TOKEN_SESSION_LIST_KEY) %>')</script>
|
|
|
+</html>
|
|
|
+
|