diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs index 921d12f58..34840f03f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs @@ -954,6 +954,47 @@ namespace Learun.Application.Web.Controllers } ViewBag.NewsList = outnewslist.Take(5); ViewBag.NewsListStr = JsonConvert.SerializeObject(ViewBag.NewsList); + //宣传报道 + var newsListOfxuanchuan = outnewslist.Where(x => x.F_CategoryId == "15").Take(4); + foreach (var item in newsListOfxuanchuan) + { + if (!string.IsNullOrEmpty(item.F_NewsImage)) + { + var imagePath = annexesFileIBLL.GetEntityByFolderId(item.F_NewsImage)?.F_FilePath; + if (!string.IsNullOrEmpty(imagePath)) + { + item.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource")); + } + else + { + item.F_NewsImage = "/Content/images/DragSSO/noLogin.png"; + } + } + } + ViewBag.NewsListOfxuanchuan = newsListOfxuanchuan; + ViewBag.NewsListOfxuanchuanStr = JsonConvert.SerializeObject(ViewBag.NewsListOfxuanchuan); + //智慧教育 + ViewBag.NewsListOfzhihui = outnewslist.Where(x => x.F_CategoryId == "16").Take(6); + ViewBag.NewsListOfzhihuiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhihui); + //专题推荐 + var newsListOfzhuanti = outnewslist.Where(x => x.F_CategoryId == "17").Take(7); + foreach (var item in newsListOfzhuanti) + { + if (!string.IsNullOrEmpty(item.F_NewsImage)) + { + var imagePath = annexesFileIBLL.GetEntityByFolderId(item.F_NewsImage)?.F_FilePath; + if (!string.IsNullOrEmpty(imagePath)) + { + item.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource")); + } + else + { + item.F_NewsImage = "/Content/images/DragSSO/noLogin.png"; + } + } + } + ViewBag.NewsListOfzhuanti = newsListOfzhuanti; + ViewBag.NewsListOfzhuantiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhuanti); //办公事项-待办任务 paginationobj.sidx = "F_CreateDate"; paginationobj.rows = 4; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml index cd34229c4..6244b3910 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml @@ -45,7 +45,7 @@ +'
' +'图书馆借阅(未还) ' + '' - + '
' + parseInt(Math.random() * 100) + '
' + + '
0
' +'' +'
' +'
' @@ -59,14 +59,14 @@ +'
' +'智慧教育在线学习时长' +'
' - + '
' + (Math.random() * 50).toFixed(2)+'
' + + '
0
' +'
' +'
' +'
' +'
' +'办公业务往来人员' +'
' - + '
' + parseInt(Math.random() * 100)+'
' + + '
0
' +'
' +'
' +'
' @@ -80,7 +80,7 @@ +'
' +'累计在线时长' +'
' - + '
' + (Math.random() * 100).toFixed(2)+'
' + + '
0
' +'
' +'' +'' @@ -458,32 +458,43 @@ }; //宣传报道 var card8Fun = function (ind) { + var listStr = "@ViewBag.NewsListOfxuanchuanStr"; + var list = JSON.parse(listStr.replace(/"/g, "\"")); var html = '
' - +'
' - +'
' - +'宣传报道' - +'' - +'
' - +'' + + '
' + + '
' + + '宣传报道' + + '' + + '
' + + '
'; + if (list.length > 0) { + html += ''; + } else { + html += noHtml; + } + html+='
' +'
' +'
' ; @@ -590,22 +601,23 @@ }; //智慧教育 var card11Fun = function (ind) { + var listStr = "@ViewBag.NewsListOfzhihuiStr"; + var list = JSON.parse(listStr.replace(/"/g, "\"")); var html = '
' + '
' + '
' + '智慧教育' - + '' - + '
' - + '' + + '
'; + if (list.length > 0) { + for (var i = 0; i < list.length; i++) { + html += '' + list[i].F_FullHead+''; + } + } else { + html += noHtml; + } + html+= '
' + '
' + '
' ; @@ -613,32 +625,37 @@ }; //专题推荐 var card12Fun = function (ind) { + var listStr = "@ViewBag.NewsListOfzhuantiStr"; + var list = JSON.parse(listStr.replace(/"/g, "\"")); var html = '
' - +'
' - +'
' - +'专题推荐' - +'' - +'
' - +'' + + '
' + + '
' + + '专题推荐' + + '' + + '
' + + '
'; + if (list.length > 0) { + for (var i = 0; i < list.length; i++) { + if (i == 0) { + html += '' + + '' + + '
' + list[i].F_FullHead +'
' + + '
' + + '
'; + } else { + html += ''; + } + } + html+= '
'; + } else { + html += noHtml; + } + html+='
' +'
' +'
' ;