mirror of https://gitee.com/stylefeng/guns
Merge branch 'master' of https://git.stylefeng.cn/guns-technology/guns-standalone-beetl into group1-dict
commit
6d46164a62
|
@ -9,53 +9,45 @@ import org.springframework.stereotype.Controller;
|
|||
/**
|
||||
* 字典类型视图控制器
|
||||
*
|
||||
* @Author: huangyao
|
||||
* @Date: 2021/1/6 20:53
|
||||
* @author huangyao
|
||||
* @date 2021/1/6 20:53
|
||||
**/
|
||||
@Controller
|
||||
@Slf4j
|
||||
@ApiResource(name = "字典类型管理相关的界面渲染")
|
||||
public class DictTypeViewController {
|
||||
|
||||
private String PREFIX = "/modular/system/dictType";
|
||||
|
||||
/**
|
||||
* 字典类型管理-字典类型-视图
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
* @author huangyao
|
||||
* @date 2021/1/6 21:08
|
||||
*/
|
||||
@GetResource(name = "字典类型管理-列表-视图", path = "/view/dictType")
|
||||
public String indexView() {
|
||||
return PREFIX + "/dictType.html";
|
||||
return "/modular/system/dictType/dictType.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典类型管理-添加-视图
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
* @author huangyao
|
||||
* @date 2021/1/6 21:25
|
||||
*/
|
||||
@GetResource(name = "字典类型管理-添加-视图", path = "/view/dictType/addView")
|
||||
public String addView() {
|
||||
return PREFIX + "/dictType_add.html";
|
||||
return "/modular/system/dictType/dictType_add.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典类型管理-编辑-视图
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
* @author huangyao
|
||||
* @date 2021/1/6 21:26
|
||||
*/
|
||||
@GetResource(name = "字典类型管理-编辑-视图", path = "/view/dictType/editView")
|
||||
public String editView() {
|
||||
return PREFIX + "/dictType_edit.html";
|
||||
return "/modular/system/dictType/dictType_edit.html";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package cn.stylefeng.guns.modular.file;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
/**
|
||||
* 文件管理界面
|
||||
*
|
||||
* @author lgq
|
||||
* @date 2021/1/9
|
||||
*/
|
||||
@Controller
|
||||
@Slf4j
|
||||
@ApiResource(name = "文件管理界面")
|
||||
public class FileViewController {
|
||||
|
||||
/**
|
||||
* 文件管理首页
|
||||
*
|
||||
* @author lgq
|
||||
* @date 2021/1/9
|
||||
*/
|
||||
@GetResource(name = "文件管理首页", path = "/view/file")
|
||||
public String fileIndex() {
|
||||
return "/modular/system/fileInfo/file_info.html";
|
||||
}
|
||||
|
||||
}
|
|
@ -7,6 +7,9 @@ import cn.stylefeng.roses.kernel.auth.api.pojo.login.LoginUser;
|
|||
import cn.stylefeng.roses.kernel.auth.api.pojo.login.basic.SimpleRoleInfo;
|
||||
import cn.stylefeng.roses.kernel.auth.api.pojo.login.basic.SimpleUserInfo;
|
||||
import cn.stylefeng.roses.kernel.menu.modular.service.SysMenuService;
|
||||
import cn.stylefeng.roses.kernel.message.api.MessageApi;
|
||||
import cn.stylefeng.roses.kernel.message.api.enums.MessageReadFlagEnum;
|
||||
import cn.stylefeng.roses.kernel.message.api.pojo.MessageParam;
|
||||
import cn.stylefeng.roses.kernel.system.modular.organization.entity.HrOrganization;
|
||||
import cn.stylefeng.roses.kernel.system.modular.organization.service.HrOrganizationService;
|
||||
import cn.stylefeng.roses.kernel.system.modular.user.service.SysUserService;
|
||||
|
@ -36,6 +39,8 @@ public class IndexService {
|
|||
@Resource
|
||||
private HrOrganizationService hrOrganizationService;
|
||||
|
||||
@Resource
|
||||
private MessageApi messageApi;
|
||||
/**
|
||||
* 获取首页需要渲染的参数
|
||||
*
|
||||
|
@ -59,6 +64,11 @@ public class IndexService {
|
|||
// 获取人员姓名
|
||||
renderMap.put("name", simpleUserInfo.getRealName());
|
||||
|
||||
// 未读消息数量
|
||||
MessageParam messageParam = new MessageParam();
|
||||
messageParam.setReadFlag(MessageReadFlagEnum.UNREAD.getCode());
|
||||
renderMap.put("msgUnReadCount", messageApi.queryCountCurrentUser(messageParam));
|
||||
|
||||
return renderMap;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
package cn.stylefeng.guns.modular.message.controller;
|
||||
|
||||
import cn.stylefeng.guns.modular.index.service.IndexService;
|
||||
import cn.stylefeng.roses.kernel.auth.api.context.LoginContext;
|
||||
import cn.stylefeng.roses.kernel.message.api.MessageApi;
|
||||
import cn.stylefeng.roses.kernel.message.api.enums.MessageReadFlagEnum;
|
||||
import cn.stylefeng.roses.kernel.message.api.pojo.MessageParam;
|
||||
import cn.stylefeng.roses.kernel.message.api.pojo.MessageResponse;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统消息相关的界面渲染
|
||||
*
|
||||
* @author liuhanqing
|
||||
* @date 2021/1/11 19:37
|
||||
*/
|
||||
@Controller
|
||||
@Slf4j
|
||||
@ApiResource(name = "系统消息相关的界面渲染")
|
||||
public class MessageViewController {
|
||||
|
||||
@Resource
|
||||
private MessageApi messageApi;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 系统消息界面
|
||||
*
|
||||
* @author liuhanqing
|
||||
* @date 2021/1/10 17:42
|
||||
*/
|
||||
@GetResource(name = "系统消息界面", path = "/view/message", requiredPermission = false)
|
||||
public String message(Model model) {
|
||||
MessageParam messageParam = new MessageParam();
|
||||
messageParam.setReadFlag(MessageReadFlagEnum.UNREAD.getCode());
|
||||
Integer messageCount = messageApi.queryCountCurrentUser(messageParam);
|
||||
List<MessageResponse> messageList = messageApi.queryListCurrentUser(messageParam);
|
||||
model.addAttribute("msgUnReadCount", messageCount);
|
||||
model.addAttribute("msgUnReadList", messageList);
|
||||
return "/modular/index/message.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的消息界面
|
||||
*
|
||||
* @author liuhanqing
|
||||
* @date 2021/1/12 20:22
|
||||
*/
|
||||
@GetResource(name = "操作日志管理列表", path = "/view/message_list")
|
||||
public String indexView() {
|
||||
return "/modular/system/message/message_list.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的消息界面
|
||||
*
|
||||
* @author liuhanqing
|
||||
* @date 2021/1/12 20:22
|
||||
*/
|
||||
@GetResource(name = "操作日志管理列表", path = "/view/message_view")
|
||||
public String view(Model model) {
|
||||
model.addAttribute("openType", "view");
|
||||
return "/modular/system/message/message_view.html";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,68 +1,82 @@
|
|||
/** 消息列表样式 */
|
||||
.message-list {
|
||||
position: absolute;
|
||||
top: 51px;
|
||||
bottom: 44px;
|
||||
top: 48px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 45px;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.message-list-item {
|
||||
padding: 10px 24px;
|
||||
display: block;
|
||||
padding: 10px 20px;
|
||||
line-height: 24px;
|
||||
position: relative;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
display: flex;
|
||||
-ms-flex: 1 1;
|
||||
flex: 1 1;
|
||||
}
|
||||
|
||||
.message-list-item:hover, .message-btn-clear:hover, .message-btn-more:hover {
|
||||
background: #F2F2F2;
|
||||
}
|
||||
|
||||
.message-item-icon {
|
||||
.message-list-item .message-item-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-right: 16px;
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
line-height: 40px;
|
||||
margin-top: -20px;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.message-item-right {
|
||||
display: block;
|
||||
flex: 1 0;
|
||||
line-height: 24px;
|
||||
.message-list-item .message-item-icon.layui-icon {
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
text-align: center;
|
||||
background-color: #FE5D58;
|
||||
}
|
||||
|
||||
.message-item-title {
|
||||
.message-list-item .message-item-icon + .message-item-right {
|
||||
margin-left: 55px;
|
||||
}
|
||||
|
||||
.message-list-item .message-item-title {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
color: rgba(0, 0, 0, .65);
|
||||
}
|
||||
|
||||
.message-item-text {
|
||||
color: rgba(0, 0, 0, .45);
|
||||
.message-list-item .message-item-text {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
float: right;
|
||||
.message-list-item > .layui-badge {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 12px;
|
||||
}
|
||||
|
||||
.message-list-item > .layui-badge + .message-item-right {
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
.message-btn-clear, .message-btn-more {
|
||||
color: #666;
|
||||
display: block;
|
||||
padding: 10px 5px;
|
||||
text-align: center;
|
||||
line-height: 24px;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.message-btn-clear {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: white;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
|
@ -71,13 +85,30 @@
|
|||
font-size: 13px;
|
||||
}
|
||||
|
||||
.message-list-empty {
|
||||
text-align: center;
|
||||
color: rgba(0, 0, 0, .45);
|
||||
padding: 73px 0 88px;
|
||||
.message-btn-more.ew-btn-loading > .ew-btn-loading-text {
|
||||
font-size: 13px !important;
|
||||
}
|
||||
|
||||
.message-list-empty img {
|
||||
height: 76px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.message-list-empty {
|
||||
color: #999;
|
||||
padding: 100px 0;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.message-list-empty > .layui-icon {
|
||||
color: #ccc;
|
||||
display: block;
|
||||
font-size: 45px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.show-empty .message-list-empty {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.show-empty .message-btn-clear, .show-empty .message-list {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/** //消息列表样式结束 */
|
|
@ -1,22 +1,44 @@
|
|||
layui.use(['element'], function () {
|
||||
var Message = {}
|
||||
layui.use(['element', 'admin', 'HttpRequest'], function () {
|
||||
var $ = layui.jquery;
|
||||
var element = layui.element;
|
||||
var admin = layui.admin;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
|
||||
// 加载更多按钮点击事件
|
||||
$('#btn-more1').click(function () {
|
||||
/* 加载更多按钮点击事件 */
|
||||
/*$('#messageMoreBtn2').click(function () {
|
||||
var $that = $(this);
|
||||
var str = $that.prev()[0].outerHTML;
|
||||
for (var i = 0; i < 5; i++) {
|
||||
$that.before(str);
|
||||
}
|
||||
admin.btnLoading($that);
|
||||
setTimeout(function () {
|
||||
admin.btnLoading($that, false);
|
||||
$that.before($that.prev()[0].outerHTML);
|
||||
}, 300);
|
||||
});*/
|
||||
/**
|
||||
* 全部标记为已读
|
||||
*/
|
||||
Message.allReadMessage = function () {
|
||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/sysMessage/allMessageReadFlag", 'get', function (data) {
|
||||
$('#messageClearBtn').parents('.layui-tab-item').addClass('show-empty');
|
||||
$('#msgCount').html(0);
|
||||
Feng.success("标记已读成功!");
|
||||
}, function (data) {
|
||||
Feng.error("标记已读失败!" + data.responseJSON.message);
|
||||
});
|
||||
httpRequest.setAsync(true)
|
||||
httpRequest.start();
|
||||
|
||||
/* var HttpRequest = new HttpRequest(Feng.ctxPath + "/sysMessage/allMessageReadFlag", 'get', function (data) {
|
||||
Feng.success("已读成功!");
|
||||
}, function (data) {
|
||||
Feng.error("标记已读失败!" + data.responseJSON.message + "!");
|
||||
});
|
||||
HttpRequest.setAsync(true)
|
||||
HttpRequest.start();*/
|
||||
};
|
||||
/* 清空消息点击事件 */
|
||||
$('#messageClearBtn').click(function () {
|
||||
|
||||
Message.allReadMessage()
|
||||
});
|
||||
|
||||
// 清空消息点击事件
|
||||
$('.message-btn-clear').click(function () {
|
||||
$(this).css('display', 'none');
|
||||
$(this).prev().find('.message-list-item').remove();
|
||||
$(this).prev().find('.message-btn-more').remove();
|
||||
$(this).prev().find('.message-list-empty').css('display', 'block');
|
||||
});
|
||||
|
||||
});
|
||||
});
|
|
@ -0,0 +1,392 @@
|
|||
var form = {};
|
||||
form.type = {};
|
||||
form.formSelects = null;
|
||||
formPriv = {};
|
||||
|
||||
var map = new Map();
|
||||
// var $ = layui.jquery
|
||||
|
||||
formPriv.initType = function () {
|
||||
map.put("1", "textinput");
|
||||
map.put("2", "textinput");
|
||||
map.put("3", "textinput");
|
||||
map.put("4", "radio");
|
||||
map.put("5", "checkbox");
|
||||
map.put("6", "select");
|
||||
map.put("7", "userSelect");
|
||||
map.put("8", "attach");
|
||||
map.put("9", "editor");
|
||||
map.put("10", "autoRow");
|
||||
map.put("11", "autoRow-Column");
|
||||
map.put("12", "suggest");
|
||||
map.put("13", "button");
|
||||
map.put("14", "container");
|
||||
map.put("-1", "textinput");
|
||||
}
|
||||
|
||||
formPriv.doView = function (){
|
||||
var jqueryForm = "form";
|
||||
var formObj = layui.jquery(jqueryForm);
|
||||
if (formObj.length == 0) {
|
||||
Feng.error("没有找到对应的表单")
|
||||
return;
|
||||
}
|
||||
formObj = layui.jquery(formObj[0]);
|
||||
formObj.find("[viewForm]").each(function () {
|
||||
var item = layui.jquery(this);
|
||||
var itemType = layui.jquery(this).attr("viewForm");
|
||||
formPriv.type[itemType].read(item);
|
||||
});
|
||||
layui.jquery("#closeBtn").html(" 关闭 ")
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//各个组件的状态判断
|
||||
formPriv.type = {};
|
||||
formPriv.type["hidden"] = {
|
||||
hide: function (obj) {
|
||||
},
|
||||
read: function (obj) {
|
||||
}
|
||||
}
|
||||
formPriv.type["textinput"] = {
|
||||
hide: function (obj) {
|
||||
formPriv.removeStar(obj);
|
||||
obj.remove();
|
||||
},
|
||||
read: function (obj) {
|
||||
formPriv.removeStar(obj);
|
||||
if (obj.is('input') || obj.is('textarea')) {
|
||||
/* var label = obj.val();
|
||||
label = label.replace(/\r\n/g, "<BR>");
|
||||
label = label.replace(/\n/g, "<BR>");
|
||||
|
||||
var ip = layui.jquery("<input type='text' readonly/>").addClass("layui-input layui-disabled").attr("value", obj.attr("name")).val( label );
|
||||
obj.parent().html(ip)*/
|
||||
// obj.attr("readonly", "readonly");
|
||||
var label = obj.val();
|
||||
var style = obj.attr("style");
|
||||
label = label.replace(/\r\n/g, "<BR>");
|
||||
label = label.replace(/\n/g, "<BR>");
|
||||
if(!label){
|
||||
label = " "
|
||||
}
|
||||
if(obj.is('input')){
|
||||
label = "<span class='form-read-input layui-empty-item layui-input' style='"+style+"'>"+label+"</span>";
|
||||
}else{
|
||||
label = "<span class='form-read-input layui-empty-item layui-textarea ' style='"+style+"'>"+label+"</span>"; //layui-disabled
|
||||
}
|
||||
|
||||
obj.parent().html(label);
|
||||
} else {
|
||||
var label = obj.find('input').val();
|
||||
var style = obj.find('input').attr("style");
|
||||
/* var ip = layui.jquery("<input type='text' readonly/>").addClass("layui-input layui-disabled").attr("value", obj.attr("name")).val( label );
|
||||
obj.html(ip);*/
|
||||
// label.attr("readonly", "readonly");
|
||||
if(!label){
|
||||
label = " "
|
||||
}
|
||||
label = "<span class='form-read-input layui-empty-item layui-input' style='"+style+"'>"+label+"</span>";
|
||||
obj.html(label);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
formPriv.type["input-url"] = {
|
||||
hide: function (obj) {
|
||||
formPriv.removeStar(obj);
|
||||
obj.remove();
|
||||
},
|
||||
read: function (obj) {
|
||||
formPriv.removeStar(obj);
|
||||
if (obj.is('input') || obj.is('textarea')) {
|
||||
var label = obj.val();
|
||||
if(!label){
|
||||
label = " "
|
||||
}else{
|
||||
label = "<a href='"+label+"' target='_blank' class='form-read-a'>"+label+"</a>";
|
||||
}
|
||||
if(obj.is('input')){
|
||||
label = "<span class='form-read-input layui-empty-item layui-input'>"+label+"</span>";
|
||||
}else{
|
||||
label = "<span class='form-read-input layui-empty-item layui-textarea '>"+label+"</span>"; //layui-disabled
|
||||
}
|
||||
|
||||
obj.parent().html(label);
|
||||
} else {
|
||||
var label = obj.find('input').val();
|
||||
if(!label){
|
||||
label = " "
|
||||
}else{
|
||||
label = "<a href='"+label+"' target='_blank'>"+label+"</a>";
|
||||
}
|
||||
label = "<span class='form-read-input layui-empty-item layui-input'>"+label+"</span>";
|
||||
obj.html(label);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
formPriv.type["radio"] = {
|
||||
hide: function (obj) {
|
||||
obj.remove();
|
||||
},
|
||||
read: function (obj) {
|
||||
formPriv.removeStar(obj);
|
||||
var checkedLabel = "";
|
||||
var checkEle = obj.find("input:radio:checked");
|
||||
if (checkEle.length == 1) {
|
||||
checkedLabel = checkEle.attr("label");
|
||||
if(checkedLabel==undefined){
|
||||
checkedLabel = checkEle.attr("title");
|
||||
}
|
||||
}
|
||||
checkedLabel = "<span class='form-read-input layui-empty-item layui-input'>"+checkedLabel+"</span>";
|
||||
obj.html(checkedLabel);
|
||||
}
|
||||
}
|
||||
|
||||
formPriv.type["xm-select"] = {
|
||||
hide: function (obj) {
|
||||
obj.remove();
|
||||
},
|
||||
read: function (obj) {
|
||||
var xm_select = obj.attr("xm-ele-id");
|
||||
obj.find("input.xm-input[placeholder='请选择']").removeAttr('placeholder')
|
||||
form.formSelects.disabled(xm_select)
|
||||
/*formPriv.removeStar(obj);
|
||||
var label = "";
|
||||
var xm_select = obj.find("dd.xm-select-this");
|
||||
debugger
|
||||
layui.jquery.each(xm_select, function (i, xm_span) {
|
||||
debugger
|
||||
var span = layui.jquery(xm_span).find("span").attr("name")
|
||||
label += span + ",";
|
||||
})
|
||||
if (label.length > 0) {
|
||||
label = label.substring(0, label.length - 1);
|
||||
}
|
||||
if(!label){
|
||||
label = " "
|
||||
}
|
||||
label = "<span class='form-read-input layui-empty-item'>"+label+"</span>";
|
||||
obj.html(label);*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
formPriv.type["tags-input"] = {
|
||||
hide: function (obj) {
|
||||
obj.remove();
|
||||
},
|
||||
read: function (obj) {
|
||||
obj.find("#tags_tagsinput").find("span.tag").find("a").remove();
|
||||
obj.find("#tags_tagsinput").find("#tags_addTag").remove();
|
||||
}
|
||||
}
|
||||
|
||||
formPriv.type["user-head"] = {
|
||||
hide: function (obj) {
|
||||
obj.remove();
|
||||
},
|
||||
read: function (obj) {
|
||||
obj.addClass("user-info-head-no-hover").removeClass("user-info-head")
|
||||
var img = obj.find("img").attr("src");
|
||||
obj.unbind("click");
|
||||
obj.bind("click",function(){
|
||||
var imgData = {
|
||||
"alt": "头像",
|
||||
"src": img, //原图地址
|
||||
"thumb": img //缩略图地址
|
||||
}
|
||||
var json = {
|
||||
photos: {
|
||||
title: "头像",
|
||||
data: [imgData]
|
||||
}
|
||||
,zIndex:99999999
|
||||
,anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
|
||||
,shade: .1
|
||||
,closeBtn: true
|
||||
}
|
||||
top.indexModule.photos(JSON.stringify(json));
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
formPriv.type["checkbox"] = {
|
||||
hide: function (obj) {
|
||||
obj.remove();
|
||||
},
|
||||
read: function (obj) {
|
||||
formPriv.removeStar(obj);
|
||||
var checkedLabel = "";
|
||||
var checkboxs = obj.find("input[type=checkbox]");
|
||||
layui.jquery.each(checkboxs, function (i, checkbox) {
|
||||
if(layui.jquery(checkbox).is(":checked")){
|
||||
checkedLabel += layui.jquery(checkbox).attr("title") + ",";
|
||||
}
|
||||
})
|
||||
if (checkedLabel.length > 0) {
|
||||
checkedLabel = checkedLabel.substring(0, checkedLabel.length - 1);
|
||||
}
|
||||
checkedLabel = "<span class='form-read-input layui-empty-item layui-input'>"+checkedLabel+"</span>";
|
||||
obj.html(checkedLabel);
|
||||
}
|
||||
}
|
||||
|
||||
formPriv.type["attach"] = {
|
||||
hide: function (obj) {
|
||||
obj.remove();
|
||||
},
|
||||
read: function (obj) {
|
||||
formPriv.removeStar(obj);
|
||||
if (obj.is('button')) {
|
||||
obj.remove();
|
||||
} else {
|
||||
var button = obj.find('button');
|
||||
obj.find('a').first().remove();
|
||||
layui.jquery(button).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
formPriv.type["select"] = {
|
||||
hide: function (obj) {
|
||||
obj.remove();
|
||||
},
|
||||
read: function (obj) {
|
||||
formPriv.removeStar(obj);
|
||||
var selectLabel = "";
|
||||
obj.find("select:not(.noneWorkflow) option:checked").each(function (index, item) {
|
||||
if (layui.jquery(item).val() == null || layui.jquery(item).val().length == 0) {
|
||||
selectLabel = "";
|
||||
} else {
|
||||
selectLabel = layui.jquery(item).html();
|
||||
}
|
||||
});
|
||||
if(!selectLabel){
|
||||
selectLabel = " "
|
||||
}
|
||||
selectLabel = "<span class='form-read-input layui-empty-item layui-input'>"+selectLabel+"</span>";
|
||||
obj.html(selectLabel);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
formPriv.type["button"] = {
|
||||
hide: function (obj) {
|
||||
obj.remove();
|
||||
},
|
||||
read: function (obj) {
|
||||
//暂时没有添加只读操作
|
||||
obj.hide();
|
||||
}
|
||||
}
|
||||
|
||||
//人员选择框
|
||||
formPriv.type["userSelect"] = {
|
||||
hide: function (obj) {
|
||||
obj.remove();
|
||||
},
|
||||
read: function (obj) {
|
||||
formPriv.removeStar(obj);
|
||||
|
||||
if (obj.is('input') || obj.is('textarea')) {
|
||||
obj.unbind("click"); //移除click事件
|
||||
var label = obj.val();
|
||||
label = label.replace(/\r\n/g, "<BR>");
|
||||
label = label.replace(/\n/g, "<BR>");
|
||||
if(!label){
|
||||
label = " "
|
||||
}
|
||||
label = "<span class='form-read-input layui-empty-item layui-input'>"+label+"</span>";
|
||||
obj.parent().html(label);
|
||||
} else {
|
||||
obj.find('input').unbind("click"); //移除click事件
|
||||
var label = obj.find('input').val();
|
||||
if(!label){
|
||||
label = " "
|
||||
}
|
||||
label = "<span class='form-read-input layui-empty-item layui-input'>"+label+"</span>";
|
||||
obj.html(label);
|
||||
}
|
||||
}
|
||||
}
|
||||
formPriv.type["suggest"]={
|
||||
hide:function(obj){
|
||||
obj.hide();
|
||||
},
|
||||
read:function(obj){
|
||||
formPriv.removeStar(obj);
|
||||
if (obj.is('input') || obj.is('textarea')) {
|
||||
obj.addClass("layui-disabled").attr("readonly", "readonly").removeAttr("name").removeAttr("lay-verify").removeAttr("placeholder");
|
||||
} else {
|
||||
var label = obj.find('input');
|
||||
if(label==null||label.length==0){
|
||||
label = obj.find('textarea');
|
||||
}
|
||||
label.addClass("layui-disabled").attr("readonly", "readonly").removeAttr("name").removeAttr("lay-verify").removeAttr("placeholder");
|
||||
}
|
||||
}
|
||||
}
|
||||
formPriv.type["container"]={
|
||||
hide:function(obj){
|
||||
obj.remove();
|
||||
// obj.hide();
|
||||
},
|
||||
read:function(obj){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
formPriv.removeStar = function(obj){
|
||||
if(obj.length>0){
|
||||
if(obj.is('div')&&obj.hasClass('workflow-form-item')){
|
||||
var star = layui.jquery(obj).prev();
|
||||
if(star){
|
||||
if(layui.jquery(star).find('span').hasClass('required')){
|
||||
layui.jquery(star).find('span').remove();
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
obj = obj.parent();
|
||||
formPriv.removeStar(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Map() {
|
||||
this.container = new Object();
|
||||
}
|
||||
|
||||
Map.prototype.put = function (key, value) {
|
||||
this.container[key] = value;
|
||||
}
|
||||
|
||||
Map.prototype.get = function (key) {
|
||||
return this.container[key];
|
||||
}
|
||||
|
||||
Map.prototype.remove = function (key) {
|
||||
delete this.container[key];
|
||||
}
|
||||
|
||||
|
||||
layui.use(['form', 'admin', 'ax', 'formSelects'], function () {
|
||||
var $ = layui.jquery;
|
||||
form.formSelects = layui.formSelects;
|
||||
// var $ax = layui.ax;
|
||||
/* var openType = $("#formOpenType_").val();
|
||||
if(openType == "view"){
|
||||
formPriv.doView()
|
||||
}*/
|
||||
|
||||
});
|
|
@ -0,0 +1,181 @@
|
|||
layui.use(['table', 'form', 'func', 'HttpRequest', 'util', 'upload'], function () {
|
||||
var $ = layui.$;
|
||||
var table = layui.table;
|
||||
var form = layui.form;
|
||||
var func = layui.func;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var util = layui.util;
|
||||
var upload = layui.upload;
|
||||
var layer = layui.layer;
|
||||
|
||||
|
||||
// 职位表管理
|
||||
var FileInfo = {
|
||||
tableId: "fileTable"
|
||||
};
|
||||
|
||||
// 初始化表格的列
|
||||
FileInfo.initColumn = function () {
|
||||
return [[
|
||||
{type: 'checkbox'},
|
||||
{field: 'fileId', hide: true, title: '主键id'},
|
||||
{field: 'fileLocation', sort: true, title: '存储位置'},
|
||||
{field: 'fileOriginName', sort: true, title: '文件名称'},
|
||||
{field: 'secretFlag', sort: true, title: '是否机密'},
|
||||
{field: 'fileSuffix', sort: true, title: '文件后缀'},
|
||||
{field: 'fileSizeInfo', sort: true, title: '文件大小'},
|
||||
{
|
||||
field: 'createTime', sort: true, title: '创建时间', templet: function (d) {
|
||||
return util.toDateString(d.createTime);
|
||||
}
|
||||
},
|
||||
{field: 'createUserName', sort: true, title: '创建人'},
|
||||
{align: 'center', toolbar: '#tableBar', title: '操作', width: 230}
|
||||
]];
|
||||
};
|
||||
|
||||
|
||||
|
||||
//上传
|
||||
var uploadInst = upload.render({
|
||||
elem: '#btnUpload' //绑定元素
|
||||
,url: Feng.ctxPath + '/sysFileInfo/upload?secretFlag=N' //上传接口
|
||||
,done: function(res){
|
||||
//上传完毕回调
|
||||
Feng.success("上传成功!");
|
||||
|
||||
FileInfo.search();
|
||||
}
|
||||
,error: function(err){
|
||||
//请求异常回调
|
||||
Feng.error("上传失败!"+ err.message);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// 点击查询按钮
|
||||
FileInfo.search = function () {
|
||||
var queryData = {};
|
||||
queryData['fileOriginName'] = $("#fileOriginName").val();
|
||||
//queryData['positionCode'] = $("#positionCode").val();
|
||||
table.reload(FileInfo.tableId, {
|
||||
where: queryData,
|
||||
page: {curr: 1}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 点击编辑
|
||||
FileInfo.openEditDlg = function (data) {
|
||||
func.open({
|
||||
height: 800,
|
||||
title: '修改职位',
|
||||
content: Feng.ctxPath + '/position/editView?positionId=' + data.positionId,
|
||||
tableId: FileInfo.tableId
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 点击删除
|
||||
FileInfo.onDeleteFile = function (data) {
|
||||
var operation = function () {
|
||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/sysFileInfo/deleteReally", 'post', function (data) {
|
||||
Feng.success("删除成功!");
|
||||
table.reload(FileInfo.tableId);
|
||||
}, function (data) {
|
||||
Feng.error("删除失败!" + data.message + "!");
|
||||
});
|
||||
httpRequest.set(data);
|
||||
httpRequest.start(true);
|
||||
};
|
||||
Feng.confirm("是否删除?", operation);
|
||||
};
|
||||
|
||||
|
||||
// 下载
|
||||
FileInfo.onFileDownload = function (data) {
|
||||
if (data.secretFlag === 'Y'){
|
||||
window.location.href = Feng.ctxPath + '/sysFileInfo/privateDownload?fileId='+ data.fileId;
|
||||
}else {
|
||||
window.location.href = Feng.ctxPath + '/sysFileInfo/publicDownload?fileId='+ data.fileId;
|
||||
}
|
||||
}
|
||||
|
||||
// 预览
|
||||
FileInfo.openPreview = function (data) {
|
||||
var imgUrl = Feng.ctxPath + '/sysFileInfo/previewByObjectName?fileBucket=' + data.fileBucket + '&fileObjectName=' + data.fileObjectName;
|
||||
|
||||
// layer.open({
|
||||
// type: 1,
|
||||
// title: false,
|
||||
// closeBtn: 0,
|
||||
// skin: 'layui-layer-nobg', //没有背景色
|
||||
// shadeClose: true,
|
||||
// content: '<div >' +
|
||||
// '<img src="' +
|
||||
// Feng.ctxPath + '/sysFileInfo/previewByObjectName?fileBucket=' + data.fileBucket + '&fileObjectName=' + data.fileObjectName+
|
||||
// '" style="max-width: 100%;">' +
|
||||
// '</div> '
|
||||
// // content: Feng.ctxPath + '/sysFileInfo/previewByObjectName?fileBucket=' + data.fileBucket + '&fileObjectName=' + data.fileObjectName,
|
||||
// });
|
||||
//
|
||||
|
||||
var imgUrl = Feng.ctxPath + '/sysFileInfo/previewByObjectName?fileBucket=' + data.fileBucket + '&fileObjectName=' + data.fileObjectName;
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['500px', '300px'],
|
||||
shadeClose: true,
|
||||
content: imgUrl
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 渲染表格
|
||||
var tableResult = table.render({
|
||||
elem: '#' + FileInfo.tableId,
|
||||
url: Feng.ctxPath + '/sysFileInfo/fileInfoListPage',
|
||||
page: true,
|
||||
request: {pageName: 'pageNo', limitName: 'pageSize'}, //自定义分页参数
|
||||
height: "full-158",
|
||||
cellMinWidth: 100,
|
||||
cols: FileInfo.initColumn(),
|
||||
parseData: Feng.parseData
|
||||
});
|
||||
|
||||
// 搜索按钮点击事件
|
||||
$('#btnSearch').click(function () {
|
||||
FileInfo.search();
|
||||
});
|
||||
|
||||
|
||||
// 工具条点击事件
|
||||
table.on('tool(' + FileInfo.tableId + ')', function (obj) {
|
||||
var data = obj.data;
|
||||
var event = obj.event;
|
||||
if (event === 'edit') {
|
||||
FileInfo.openEditDlg(data);
|
||||
} else if (event === 'delete') {
|
||||
FileInfo.onDeleteFile(data);
|
||||
}else if (event === 'download'){
|
||||
FileInfo.onFileDownload(data);
|
||||
}else if(event === 'preview'){
|
||||
FileInfo.openPreview(data);
|
||||
}
|
||||
});
|
||||
|
||||
// 修改状态
|
||||
form.on('switch(status)', function (obj) {
|
||||
var fileInfoId = obj.elem.value;
|
||||
var checked = obj.elem.checked ? 1 : 2;
|
||||
FileInfo.updateStatus(fileInfoId, checked);
|
||||
});
|
||||
});
|
|
@ -0,0 +1,142 @@
|
|||
layui.use(['table', 'form', 'func', 'HttpRequest', 'util'], function () {
|
||||
var $ = layui.$;
|
||||
var table = layui.table;
|
||||
var form = layui.form;
|
||||
var func = layui.func;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var util = layui.util;
|
||||
|
||||
// 系统消息管理
|
||||
var Message = {
|
||||
tableId: "messageTable"
|
||||
};
|
||||
|
||||
// 初始化表格的列
|
||||
Message.initColumn = function () {
|
||||
return [[
|
||||
{type: 'checkbox'},
|
||||
{field: 'messageId', hide: true, title: '主键id'},
|
||||
{field: 'messageTitle', sort: true, title: '消息标题'},
|
||||
// {field: 'messageType', sort: true, title: '消息类型'},
|
||||
// {field: 'priorityLevelValue', sort: true, title: '优先级'},
|
||||
{field: 'priorityLevel', sort: true, title: '优先级', templet: function (d) {
|
||||
if (d.priorityLevel === "high") {
|
||||
return "高";
|
||||
} else if (d.priorityLevel === "middle") {
|
||||
return "中";
|
||||
} else {
|
||||
return "低";
|
||||
}
|
||||
}},
|
||||
{field: 'readFlag', sort: true, title: '阅读状态', templet: function (d) {
|
||||
if (d.readFlag === 0) {
|
||||
return "未读";
|
||||
} else {
|
||||
return "已读";
|
||||
}
|
||||
}},
|
||||
{field: 'messageSendTime', sort: true, title: '收到时间'},
|
||||
{align: 'center', toolbar: '#tableBar', title: '操作'}
|
||||
]];
|
||||
};
|
||||
|
||||
// 点击查询按钮
|
||||
Message.search = function () {
|
||||
var queryData = {};
|
||||
queryData['messageTitle'] = $("#messageTitle").val();
|
||||
//queryData['messageCode'] = $("#messageCode").val();
|
||||
table.reload(Message.tableId, {
|
||||
where: queryData,
|
||||
page: {curr: 1}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 点击查看
|
||||
*
|
||||
* @param data 点击按钮时候的行数据
|
||||
*/
|
||||
Message.openViewDlg = function (data) {
|
||||
func.open({
|
||||
title: '查看消息',
|
||||
// height: 900,
|
||||
content: Feng.ctxPath + '/view/message_view?messageId=' + data.messageId,
|
||||
tableId: Message.tableId
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 导出excel按钮
|
||||
Message.exportExcel = function () {
|
||||
var checkRows = table.checkStatus(Message.tableId);
|
||||
if (checkRows.data.length === 0) {
|
||||
Feng.error("请选择要导出的数据");
|
||||
} else {
|
||||
table.exportFile(tableResult.config.id, checkRows.data, 'xls');
|
||||
}
|
||||
};
|
||||
|
||||
// 点击删除
|
||||
Message.delete = function (data) {
|
||||
var operation = function () {
|
||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/sysMessage/delete", 'post', function (data) {
|
||||
Feng.success("删除成功!");
|
||||
table.reload(Message.tableId);
|
||||
}, function (data) {
|
||||
Feng.error("删除失败!" + data.message + "!");
|
||||
});
|
||||
httpRequest.set(data);
|
||||
httpRequest.start(true);
|
||||
};
|
||||
Feng.confirm("是否删除?", operation);
|
||||
};
|
||||
|
||||
// 标记为已读状态
|
||||
Message.allReadFlag = function () {
|
||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/sysMessage/allMessageReadFlag", 'get', function (data) {
|
||||
table.reload(Message.tableId);
|
||||
Feng.success("标记已读成功!");
|
||||
}, function (data) {
|
||||
table.reload(Message.tableId);
|
||||
Feng.error("标记已读失败!" + data.responseJSON.message);
|
||||
});
|
||||
httpRequest.start();
|
||||
};
|
||||
|
||||
// 渲染表格
|
||||
var tableResult = table.render({
|
||||
elem: '#' + Message.tableId,
|
||||
url: Feng.ctxPath + '/sysMessage/page',
|
||||
page: true,
|
||||
request: {pageName: 'pageNo', limitName: 'pageSize'}, //自定义分页参数
|
||||
height: "full-158",
|
||||
cellMinWidth: 100,
|
||||
cols: Message.initColumn(),
|
||||
parseData: Feng.parseData
|
||||
});
|
||||
|
||||
// 搜索按钮点击事件
|
||||
$('#btnSearch').click(function () {
|
||||
Message.search();
|
||||
});
|
||||
|
||||
// 全部已读点击事件
|
||||
$('#allReadFlag').click(function () {
|
||||
Message.allReadFlag();
|
||||
});
|
||||
|
||||
// 导出excel
|
||||
$('#btnExp').click(function () {
|
||||
Message.exportExcel();
|
||||
});
|
||||
|
||||
// 工具条点击事件
|
||||
table.on('tool(' + Message.tableId + ')', function (obj) {
|
||||
var data = obj.data;
|
||||
var event = obj.event;
|
||||
if (event === 'view') {
|
||||
Message.openViewDlg(data);
|
||||
} else if (event === 'delete') {
|
||||
Message.delete(data);
|
||||
}
|
||||
});
|
||||
});
|
|
@ -0,0 +1,50 @@
|
|||
/**
|
||||
* 详情对话框
|
||||
*/
|
||||
var MessageInfoDlg = {};
|
||||
|
||||
layui.use(['form', 'admin', 'HttpRequest', 'laydate'], function () {
|
||||
var $ = layui.jquery;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
lay('input.date-input').each(function(){
|
||||
laydate.render({
|
||||
elem: this
|
||||
,trigger: 'click'
|
||||
});
|
||||
});
|
||||
|
||||
//获取详情信息,填充表单
|
||||
var HttpRequest = new HttpRequest(Feng.ctxPath + "/sysMessage/detail?messageId=" + Feng.getUrlParam("messageId"), 'get');
|
||||
var result = HttpRequest.start();
|
||||
form.val('messageForm', result.data);
|
||||
|
||||
/* //表单提交事件
|
||||
form.on('submit(btnSubmit)', function (data) {
|
||||
var HttpRequest = new HttpRequest(Feng.ctxPath + "/sysMessage/editItem", 'post', function (data) {
|
||||
Feng.success("更新成功!");
|
||||
|
||||
//传给上个页面,刷新table用
|
||||
admin.putTempData('formOk', true);
|
||||
|
||||
//关掉对话框
|
||||
admin.closeThisDialog();
|
||||
|
||||
}, function (data) {
|
||||
Feng.error("更新失败!" + data.responseJSON.message)
|
||||
});
|
||||
data.field.fileIds = MessageInfoDlg.layUploader.getUploadFileIds().join(","); //获取上传附件ID 暂时注释掉
|
||||
HttpRequest.set(data.field);
|
||||
HttpRequest.start();
|
||||
|
||||
return false;
|
||||
});*/
|
||||
|
||||
|
||||
//查看模式
|
||||
var openType = $("#formOpenType_").val();
|
||||
if(openType == "view"){
|
||||
formPriv.doView()
|
||||
}
|
||||
});
|
|
@ -51,7 +51,6 @@ layui.use(['table', 'HttpRequest'], function () {
|
|||
}, function (data) {
|
||||
Feng.error(data.message + "!");
|
||||
});
|
||||
console.log(data)
|
||||
httpRequest.set('token', data.token);
|
||||
httpRequest.start(true);
|
||||
};
|
||||
|
|
|
@ -33,7 +33,6 @@ layui.use(['layer', 'form', 'table', 'ztree', 'laydate', 'admin', 'HttpRequest',
|
|||
|
||||
// 选择部门时
|
||||
Organization.onClickDept = function (obj) {
|
||||
console.log(obj);
|
||||
Organization.condition.orgParentId = obj.data.id;
|
||||
Organization.search();
|
||||
};
|
||||
|
|
|
@ -14,10 +14,11 @@ layui.use(['form', 'admin', 'HttpRequest', 'xmSelect'], function () {
|
|||
|
||||
// 初始化组织树
|
||||
new HttpRequest(Feng.ctxPath + "/hrOrganization/treeLayui", 'get', function (data) {
|
||||
console.log(result.data);
|
||||
organizationXmSel = xmSelect.render({
|
||||
el: '#organization',
|
||||
data: data.data,
|
||||
initValue: [result.data.orgId],
|
||||
initValue: [result.data.orgParentId],
|
||||
layVerify: 'required',
|
||||
model: {label: {type: 'text'}},
|
||||
prop: {name: 'title', value: 'id'},
|
||||
|
|
|
@ -45,7 +45,6 @@ layui.use(['layer', 'form', 'table', 'ztree', 'laydate', 'admin', 'HttpRequest',
|
|||
* 选择部门时
|
||||
*/
|
||||
MgrUser.onClickDept = function (obj) {
|
||||
console.log(obj);
|
||||
MgrUser.condition.orgId = obj.data.id;
|
||||
MgrUser.search();
|
||||
};
|
||||
|
|
|
@ -11,7 +11,6 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func
|
|||
var result = request.start();
|
||||
form.val('userForm', result.data);
|
||||
|
||||
console.log(result.data.grantRoleIdList);
|
||||
// 初始化角色
|
||||
new HttpRequest(Feng.ctxPath + "/sysRole/dropDown", 'get', function (data) {
|
||||
roleXmSel = xmSelect.render({
|
||||
|
@ -27,7 +26,6 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func
|
|||
// 表单提交事件
|
||||
form.on('submit(btnSubmit)', function (data) {
|
||||
// 角色ids
|
||||
console.log(Feng.getUrlParam("userId"));
|
||||
data.field.grantRoleIdList = roleXmSel.getValue('value');
|
||||
data.field.userId = Feng.getUrlParam("userId");
|
||||
|
||||
|
|
|
@ -21,6 +21,14 @@
|
|||
|
||||
</ul>
|
||||
<ul class="layui-nav layui-layout-right">
|
||||
<li class="layui-nav-item" lay-unselect="">
|
||||
<a ew-event="message" title="消息" data-url="${ctxPath}/view/message">
|
||||
<i class="layui-icon layui-icon-notice"></i>
|
||||
@if(msgUnReadCount>0){
|
||||
<span id="msg-dot" class="layui-badge-dot "></span>
|
||||
@}
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-nav-item layui-hide-xs" lay-unselect>
|
||||
<a ew-event="fullScreen" title="全屏"><i class="layui-icon layui-icon-screen-full"></i></a>
|
||||
</li>
|
||||
|
|
|
@ -1,128 +1,42 @@
|
|||
@layout("/layout/_container.html",{title:"消息列表",css:["/assets/modular/frame/message.css"],js:["/assets/modular/frame/message.js"]}){
|
||||
<div class="layui-tab layui-tab-brief" style="padding: 5px 0;margin: 0;">
|
||||
<ul class="layui-tab-title" style="text-align: center;">
|
||||
<li class="layui-this">通知(5)</li>
|
||||
<li>私信(12)</li>
|
||||
<li>待办(3)</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content" style="padding: 5px 0;">
|
||||
|
||||
<!-- tab1 -->
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="message-list">
|
||||
<!-- 实际项目请使用后台数据循环出来 -->
|
||||
<a class="message-list-item" href="javascript:;">
|
||||
<img class="message-item-icon" src="${ctxPath}/assets/common/images/message.png">
|
||||
<div class="message-item-right">
|
||||
<h2 class="message-item-title">你收到了14份新周报</h2>
|
||||
<p class="message-item-text">10个月前</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="message-list-item" href="javascript:;">
|
||||
<img class="message-item-icon" src="${ctxPath}/assets/common/images/message.png">
|
||||
<div class="message-item-right">
|
||||
<h2 class="message-item-title">你收到了14份新周报</h2>
|
||||
<p class="message-item-text">10个月前</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="message-list-item" href="javascript:;">
|
||||
<img class="message-item-icon" src="${ctxPath}/assets/common/images/message.png">
|
||||
<div class="message-item-right">
|
||||
<h2 class="message-item-title">你收到了14份新周报</h2>
|
||||
<p class="message-item-text">10个月前</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<link rel="stylesheet" href="${ctxPath}/assets/modular/frame/message.css"/>
|
||||
<div class="layui-card" style="box-shadow: none;border: none;">
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title" style="text-align: center;">
|
||||
<li class="layui-this">消息(<span id="msgCount" >${msgUnReadCount}</span>)</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content" style="padding: 0;">
|
||||
<!-- tab1 -->
|
||||
@if(isNotEmpty(msgUnReadList)){
|
||||
<div class="layui-tab-item layui-show ">
|
||||
<!-- 列表为空 -->
|
||||
<div class="message-list-empty" style="display: none;">
|
||||
<img src="${ctxPath}/assets/common/images/img_msg_notice.svg">
|
||||
<div>没有通知</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<a class="message-btn-clear" href="javascript:;">全部标记已读</a>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- tab2 -->
|
||||
<div class="layui-tab-item">
|
||||
<div class="message-list">
|
||||
<a class="message-list-item" href="javascript:;">
|
||||
<img class="message-item-icon" src="${ctxPath}/assets/common/images/head.png">
|
||||
<div class="message-item-right">
|
||||
<h2 class="message-item-title">xx评论了你</h2>
|
||||
<p class="message-item-text">哈哈哈哈哈哈</p>
|
||||
<p class="message-item-text">10个月前</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="message-list-item" href="javascript:;">
|
||||
<img class="message-item-icon" src="${ctxPath}/assets/common/images/head.png">
|
||||
<div class="message-item-right">
|
||||
<h2 class="message-item-title">xx评论了你</h2>
|
||||
<p class="message-item-text">哈哈哈哈哈哈</p>
|
||||
<p class="message-item-text">10个月前</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="message-list-item" href="javascript:;">
|
||||
<img class="message-item-icon" src="${ctxPath}/assets/common/images/head.png">
|
||||
<div class="message-item-right">
|
||||
<h2 class="message-item-title">xx评论了你</h2>
|
||||
<p class="message-item-text">哈哈哈哈哈哈</p>
|
||||
<p class="message-item-text">10个月前</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a id="btn-more1" class="message-btn-more" href="javascript:;">加载更多</a>
|
||||
|
||||
<!-- 列表为空 -->
|
||||
<div class="message-list-empty" style="display: none;">
|
||||
<img src="${ctxPath}/assets/common/images/img_msg_pri.svg">
|
||||
<div class="message-list-empty">
|
||||
<i class="layui-icon layui-icon-notice"></i>
|
||||
<div>没有消息</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<a class="message-btn-clear" href="javascript:;">清空消息</a>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- tab3 -->
|
||||
<div class="layui-tab-item">
|
||||
<div class="message-list">
|
||||
<a class="message-list-item" href="javascript:;">
|
||||
<div class="message-item-right">
|
||||
<span class="layui-badge pull-right">待完成</span>
|
||||
<h2 class="message-item-title">你收到了14份新周报</h2>
|
||||
<p class="message-item-text">10个月前</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="message-list-item" href="javascript:;">
|
||||
<div class="message-item-right">
|
||||
<span class="layui-badge layui-bg-gray pull-right">已完成</span>
|
||||
<h2 class="message-item-title">你收到了14份新周报</h2>
|
||||
<p class="message-item-text">10个月前</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="message-list-item" href="javascript:;">
|
||||
<div class="message-item-right">
|
||||
<span class="layui-badge layui-bg-gray pull-right">已完成</span>
|
||||
<h2 class="message-item-title">你收到了14份新周报</h2>
|
||||
<p class="message-item-text">10个月前</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- 列表为空 -->
|
||||
<div class="message-list-empty" style="display: none;">
|
||||
<img src="${ctxPath}/assets/common/images/img_msg_db.svg">
|
||||
<div>没有待办</div>
|
||||
<div class="message-list" id="message-list">
|
||||
<!-- 后台数据循环出来 -->
|
||||
@for(msg in msgUnReadList){
|
||||
<a class="message-list-item" href="javascript:;">
|
||||
<i class="layui-icon layui-icon-speaker message-item-icon"></i>
|
||||
<div class="message-item-right">
|
||||
<h2 class="message-item-title">${msg.messageTitle}</h2>
|
||||
<p class="message-item-text">${msg.messageSendTime,"yyyy-MM-dd HH:mm:ss"}</p>
|
||||
</div>
|
||||
</a>
|
||||
@}
|
||||
</div>
|
||||
|
||||
<a id="messageClearBtn" class="message-btn-clear">全部标记已读</a>
|
||||
</div>
|
||||
|
||||
<a class="message-btn-clear" href="javascript:;">清空待办</a>
|
||||
|
||||
@}else{
|
||||
<div class="layui-tab-item layui-show show-empty">
|
||||
<!-- 列表为空 -->
|
||||
<div class="message-list-empty" id="message-list-empty">
|
||||
<i class="layui-icon layui-icon-notice"></i>
|
||||
<div>没有消息</div>
|
||||
</div>
|
||||
</div>
|
||||
@}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@}
|
||||
<script type="text/javascript" src="${ctxPath}/assets/modular/frame/message.js"></script>
|
|
@ -0,0 +1,25 @@
|
|||
<input type="hidden" id="formOpenType_" value="${openType!}">
|
||||
<style type="text/css">
|
||||
.form-read-input{
|
||||
padding: 9px 15px;
|
||||
line-height: 1.3;
|
||||
display: block;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
border-color: #e6e6e6;
|
||||
}
|
||||
.form-read-a{
|
||||
color: #01AAED;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.form-read-a:hover{
|
||||
color: #ff0000;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="${ctxPath}/assets/modular/system/common/form.all.js?v=${constants.getReleaseVersion()}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
|
@ -0,0 +1,75 @@
|
|||
@layout("/layout/_container.html",{js:["/assets/modular/system/fileInfo/file_info.js"]}){
|
||||
|
||||
<div class="layui-body-header">
|
||||
<span class="layui-body-header-title">系统文件管理</span>
|
||||
</div>
|
||||
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-form toolbar">
|
||||
<div class="layui-form-item">
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">存储位置</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="fileLocation" lay-verify="">
|
||||
<option value="">请选择存储位置</option>
|
||||
<option value="4">本地</option>
|
||||
<option value="1">阿里云</option>
|
||||
<option value="2">腾讯云</option>
|
||||
<option value="3">minio</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-inline">-->
|
||||
<!-- <label class="layui-form-label">文件仓库</label>-->
|
||||
<!-- <div class="layui-input-inline">-->
|
||||
<!-- <input type="text" name="" class="layui-input">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">文件名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="fileOriginName" name="fileOriginName" placeholder="请输入文件名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<div style="padding-left: 45%">
|
||||
<button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<div style="padding-left: 45%">
|
||||
<button id="btnUpload" class="layui-btn icon-btn"><i class="layui-icon"></i>上传文件</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<table class="layui-table" id="fileTable" lay-filter="fileTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="tableBar">
|
||||
|
||||
<a class="layui-btn layui-btn-xs" lay-event="download">下载</a>
|
||||
|
||||
<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="details">详情</a>
|
||||
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
|
||||
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="preview">预览</a>
|
||||
|
||||
</script>
|
||||
|
||||
@}
|
|
@ -0,0 +1,36 @@
|
|||
@layout("/layout/_container.html",{js:["/assets/modular/system/message/message_list.js"]}){
|
||||
|
||||
<div class="layui-body-header">
|
||||
<span class="layui-body-header-title">我的消息</span>
|
||||
</div>
|
||||
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-form toolbar">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<input id="messageTitle" class="layui-input" type="text" placeholder="消息标题"/>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button>
|
||||
<button id="allReadFlag" class="layui-btn icon-btn"><i class="layui-icon">စ</i>全部已读</button>
|
||||
<button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon"></i>导出</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="layui-table" id="messageTable" lay-filter="messageTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="tableBar">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="view">查看</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
|
||||
</script>
|
||||
|
||||
@}
|
|
@ -0,0 +1,52 @@
|
|||
@layout("/layout/_form.html",{js:["/assets/modular/system/message/message_view.js"]}){
|
||||
|
||||
<form class="layui-form" id="messageForm" lay-filter="messageForm">
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">基本信息</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-form-item layui-row">
|
||||
<input name="messageId" type="hidden"/>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">消息标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="messageTitle" name="messageTitle" placeholder="请输入消息标题" type="text" class="layui-input" lay-verify="" required viewForm="textinput"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">优先级</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="priorityLevel" name="priorityLevel" placeholder="请输入优先级" type="text" class="layui-input" lay-verify="" required viewForm="textinput"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">收到时间</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="messageSendTime" name="messageSendTime" placeholder="请输入收到时间" type="text" class="layui-input date-icon date-input" autocomplete="off" viewForm="textinput"/>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">阅读状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="readFlag" name="readFlag" placeholder="请输入阅读状态" type="text" class="layui-input" lay-verify="" required viewForm="textinput"/>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">消息内容</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="messageContent" name="messageContent" placeholder="请输入消息内容" type="text" class="layui-textarea" viewForm='textinput'></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group-bottom text-center">
|
||||
<button class="layui-btn" lay-filter="btnSubmit" lay-submit viewForm="button"> 提交 </button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary" ew-event="closeDialog" id="closeBtn"> 取消 </button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@}
|
||||
@include("/modular/system/common/viewHide.html"){}
|
Loading…
Reference in New Issue