From 889eb15032190cdbbffb6b8cab67ad4e73e4da84 Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Mon, 10 May 2021 12:15:20 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A1=8C=E9=9D=A2=E6=B6=88=E6=81=AF=E6=8F=90?=
=?UTF-8?q?=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/MessageRindController.cs | 14 +++
.../LR_Desktop/Views/MessageRind/Index.js | 23 +---
.../Views/MessageRind/UnreadIndex.cshtml | 106 ++++++++++--------
.../Views/Home/AdminDesktop.cshtml | 6 +-
.../Views/Home/AdminDesktop/Index.js | 34 +++++-
.../Views/LR_Content/script/lr-layer.js | 5 +-
.../LR_Desktop/MessageRind/MessageRindBLL.cs | 24 ++++
.../LR_Desktop/MessageRind/MessageRindIBLL.cs | 5 +
.../MessageRind/MessageRindService.cs | 28 +++++
9 files changed, 172 insertions(+), 73 deletions(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs
index 80bc359df..19bd02828 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs
@@ -73,6 +73,20 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
return Success(jsonData);
}
+ ///
+ /// 获取未读的消息的数量
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetCountForUnread()
+ {
+ var count = messageRindIBLL.GetCountForUnread();
+
+ return Success(count);
+ }
///
/// 获取未读的消息
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js
index eab7de93b..2f79e8e57 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js
@@ -129,26 +129,5 @@ var bootstrap = function ($, learun) {
$('#gridtable').jfGridSet('reload');
};
page.init();
- funopen();
-
- function funopen() {
- learun.layeropen({
- //id: 'form',
- type: 2,
- title: "消息提示",
- closeBtn: 0, //不显示关闭按钮
- shade: [0],
- area: ['340px', '215px'],
- offset: 'rb', //右下角弹出
- anim: 2,
- content: top.$.rootUrl + '/LR_Desktop/MessageRind/UnreadIndex',
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- };
-
- function onload() {
- $('#gridtable').jfGridSet('reload');
- }
+
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml
index 6119861ba..fb0603873 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml
@@ -85,58 +85,74 @@
//更改状态为已读
var MessageId = params[2];
if (top.learun.checkrow(MessageId)) {
- $.ajax({
- url: top.$.rootUrl + '/LR_Desktop/MessageRind/SaveReadSigns',
- type: "post",
- data: { keyValue: MessageId },
- dataType: "json",
- async: false,
- success: function (data) {
- //console.log(data);
- //弹窗查看详情
- var keyValue = params[1];
- var ConnectionUrl = params[3];
- var title = params[0];
- if (top.learun.checkrow(keyValue)) {
- top.learun.layerForm({
- id: 'formview',
- title: title,
- url: top.$.rootUrl + ConnectionUrl + keyValue,
- width: 1000,
- height: 650,
- maxmin: true,
- btn: null,
- callBack: function (id) {
- return top[id].acceptClick(onload());
- }
- });
-
- }
+ top.learun.deleteForm(top.$.rootUrl + '/LR_Desktop/MessageRind/SaveReadSigns', { keyValue: MessageId }, function () {
+ //弹窗查看详情
+ var keyValue = params[1];
+ var ConnectionUrl = params[3];
+ var title = params[0];
+ if (top.learun.checkrow(keyValue)) {
+ top.learun.layerForm({
+ id: 'formview',
+ title: title,
+ url: top.$.rootUrl + ConnectionUrl + keyValue,
+ width: 1000,
+ height: 650,
+ maxmin: true,
+ btn: null,
+ });
+
}
- })
+ });
+
+
+ //$.ajax({
+ // url: top.$.rootUrl + '/LR_Desktop/MessageRind/SaveReadSigns',
+ // type: "post",
+ // data: { keyValue: MessageId },
+ // dataType: "json",
+ // async: false,
+ // success: function (data) {
+ // //弹窗查看详情
+ // var keyValue = params[1];
+ // var ConnectionUrl = params[3];
+ // var title = params[0];
+ // if (top.learun.checkrow(keyValue)) {
+ // top.learun.layerForm({
+ // id: 'formview',
+ // title: title,
+ // url: top.$.rootUrl + ConnectionUrl + keyValue,
+ // width: 1000,
+ // height: 650,
+ // maxmin: true,
+ // btn: null,
+ // });
+
+ // }
+ // }
+ //})
}
});
});
- //function funLook(param) {
-
- // var id = "433d5658-40b0-4e2d-b736-c4e8561d017e";//$obj.attr('id');
- // var _module = top.learun.clientdata.get(['modulesMap', id]);
- // switch (_module.F_Target) {
- // case 'iframe':// 窗口
- // if (top.learun.validator.isNotNull(_module.F_UrlAddress).code) {
- // top.learun.frameTab.open(_module);
- // }
- // break;
- // case 'open':// 窗口
- // var newWin = window.open(_module.F_UrlAddress);
- // newWin.location.replace(_module.F_UrlAddress);
- // break;
- // }
-
- //}
+ //function funLook(param) {
+
+ // var id = "433d5658-40b0-4e2d-b736-c4e8561d017e";//$obj.attr('id');
+ // var _module = top.learun.clientdata.get(['modulesMap', id]);
+ // switch (_module.F_Target) {
+ // case 'iframe':// 窗口
+ // if (top.learun.validator.isNotNull(_module.F_UrlAddress).code) {
+ // top.learun.frameTab.open(_module);
+ // }
+ // break;
+ // case 'open':// 窗口
+ // var newWin = window.open(_module.F_UrlAddress);
+ // newWin.location.replace(_module.F_UrlAddress);
+ // break;
+ // }
+
+ //}