diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/indexData.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/indexData.js
index 3aacb0b50..4aa2eae79 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/indexData.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/indexData.js
@@ -46,12 +46,13 @@ function serializes() {
var gg = $(".inSec3Row.active").sortable("serialize", {
key: "sort"
});
- console.log(gg);//sort=1&sort=2&sort=3&sort=4&sort=5&sort=6&sort=7&sort=8&sort=9&sort=10&sort=11&sort=12&sort=13
+ //console.log(gg);//sort=1&sort=2&sort=3&sort=4&sort=5&sort=6&sort=7&sort=8&sort=9&sort=10&sort=11&sort=12&sort=13
var gg2 = $(".inSec3Row.active").sortable("toArray");
- console.log(gg2);//["id_1", "id_2", "id_3", "id_4", "id_5", "id_6", "id_7", "id_8", "id_9", "id_10", "id_11", "id_12", "id_13"]
- console.log(gg2.toString());//id_1,id_2,id_3,id_4,id_5,id_6,id_7,id_8,id_9,id_10,id_11,id_12,id_13
- console.log(gg2.toString().replace(new RegExp("id_","g"),""));//1,2,3,4,5,6,7,8,9,10,11,12,13
+ //console.log(gg2);//["id_1", "id_2", "id_3", "id_4", "id_5", "id_6", "id_7", "id_8", "id_9", "id_10", "id_11", "id_12", "id_13"]
+ //console.log(gg2.toString());//id_1,id_2,id_3,id_4,id_5,id_6,id_7,id_8,id_9,id_10,id_11,id_12,id_13
+ //console.log(gg2.toString().replace(new RegExp("id_","g"),""));//1,2,3,4,5,6,7,8,9,10,11,12,13
+ //console.log(gg2.toString().replace(/id_/g, ""));//1,2,3,4,5,6,7,8,9,10,11,12,13
}
//初始化可用卡片
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/sortable.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/sortable.js
index 0e5f715e7..ea1893ac4 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/sortable.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/sortable.js
@@ -3,7 +3,7 @@ $(document).ready(function(){
$('.inSec1Drag').on('click', '.fa-minus', function() {
//删除
$(this).removeClass('fa-minus').addClass('fa-plus');
- var id = '#id_' + $(this).parent().attr('id');
+ var id = '#' + $('.inSec3Row.active').attr('ind') + '_' + $(this).parent().attr('id');
// console.log($('.inSec3Row').find(id))
$('.inSec3Row.active').find(id).remove();
layer.msg('删除成功!');
@@ -18,7 +18,8 @@ $(document).ready(function(){
}
//添加
$(this).removeClass('fa-plus').addClass('fa-minus');
- var id = 'id_' + $(this).parent().attr('id');
+ //点击卡片,增加相同的卡片块
+ var id = 'id_' + $(this).parent().attr('id');
var html = '
' +
'
' +
'
' +
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 6b331e6a1..b7d10f7cd 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs
@@ -16,6 +16,7 @@ using System.Web.Mvc;
using Learun.Cache.Base;
using Learun.Cache.Factory;
using Newtonsoft.Json;
+using Learun.Application.TwoDevelopment.LR_Desktop;
namespace Learun.Application.Web.Controllers
{
@@ -37,6 +38,7 @@ namespace Learun.Application.Web.Controllers
private Sys_ReceiveFileIBLL sys_ReceiveFileIBLL = new Sys_ReceiveFileBLL();
private Perm_FunctionVisitIBLL functionVisitIbll = new Perm_FunctionVisitBLL();
private ICache redisCache = CacheFactory.CaChe();
+ private SSO_Drag_DesktopManageIBLL sSO_Drag_DesktopManageIBLL = new SSO_Drag_DesktopManageBLL();
#region 统一身份认证2.0
///
@@ -854,6 +856,28 @@ namespace Learun.Application.Web.Controllers
///
public ActionResult DragModelOne()
{
+ //判断登录状态码
+ string account = "";
+ if (!Request.Headers["account"].IsEmpty())
+ {
+ account = Request.Headers["account"].ToString();
+ }
+ OperatorHelper helper = new OperatorHelper();
+ var result = helper.IsOnLine(account);
+ if (result.stateCode != 1)
+ {
+ return Redirect("DragNoLogin");
+ }
+ //桌面管理表、卡片块排序管理表增加默认数据
+ var userInfo = LoginUserInfo.Get();
+ sSO_Drag_DesktopManageIBLL.AddDefaultData(userInfo.userId, "one");
+ //获取桌面、卡片块排序列表
+ ViewBag.DesktopList = sSO_Drag_DesktopManageIBLL.GetListByModelCode(userInfo.userId, "one").OrderBy(x => x.Sort);
+ ViewBag.DesktopListStr = JsonConvert.SerializeObject(ViewBag.DesktopList);
+
+
+
+
return View();
}
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index b28cba3eb..d1ec68e8e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -7161,6 +7161,8 @@
+
+
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
new file mode 100644
index 000000000..3b3a03915
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml
@@ -0,0 +1,1669 @@
+@using Learun.Application.OA
+@using Learun.Application.Base.SystemModule
+@using Learun.Application.TwoDevelopment.EducationalAdministration
+@using Learun.Application.TwoDevelopment.Permission
+@using Learun.Application.WorkFlow
+@using Learun.Util
+
+@{
+ ViewBag.Title = "网上办事大厅拖拽版";
+ Layout = "~/Views/SSOSystem/_LayoutSSODrag.cshtml";
+}
+
+
+
+
+
+
+
+
+
+
+
服务角色
+
+ - 全部
+ - 校领导
+ - 游客
+ - 教师
+ - 学生
+
+
+
+
+
+ A-D (10)
+
+
+
+ E-H (10)
+
+
+
+ I-L (10)
+
+
+
+ M-P (10)
+
+
+
+ Q-T (10)
+
+
+
+ U-X (10)
+
+
+
+ Y-Z (10)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
我的收藏
+
+
+
+
+
+
+
可用应用
+
+
+
+
+
+
+
可用卡片
+
+
+
+
+
+
+
+
+
+
我的收藏
+
+
+
+
可用应用
+
+
+
+
可用卡片
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
数据看板
+
+
+
+
+
办公事项
+
+
+
+
+
学校公文
+
+
+
+
+
专业总览
+
+
+
+
+
常用链接
+
+
+
+
+
常用服务
+
+
+
+
+
校园总览
+
+
+
+
+
宣传报道
+
+
+
+
+
办公邮件
+
+
+
+
+
通知公告
+
+
+
+
+
智慧教育
+
+
+
+
+
专题推荐
+
+
+
+
+
办公业务流量
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
待办任务
+
+
+
+
+
+
+
我发起的
+
+
+
+
+
+
+
周期服务
+
+
+
+
+
+
+
未读消息
+
+
+
+
+
+
+
+
+
+
任务
+
+
+
+
消息
+
+
+
+
+
+
+
+ -
+ 3
+ 待办任务
+
+ -
+ 3
+ 我发起的
+
+ -
+ 3
+ 周期服务
+
+ -
+ 3
+ 已办任务
+
+
+
+
+
+
+
刘艳的出差申请审批
+
2020-09-01 10:25:36
+
请处理
+
+
+
刘艳的出差申请审批
+
2020-09-01 10:25:36
+
请处理
+
+
+
+
+
刘艳的出差申请审批
+
2020-09-01 10:25:36
+
已完成
+
+
+
+
+
+
刘艳的出差申请审批
+
2020-09-01 10:25:36
+
已完成
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
桌面设置
+
共 0/3 个自建桌面
+
+
+
+
+
教师桌面(默认桌面)
+
+
+ 8/8
+
+
+
+
+
确认恢复默认设置?
+
+
+
+
+
+
+
+
+
+
+
+
OA桌面(默认桌面)
+
+
+ 8/8
+
+
+
+
+
确认恢复默认设置?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
保存该桌面?
+
+
+
+
+
+
+
+
+
完成
+
+
+
+
+
+
+
+
+
+
+
+
建议使用360或谷歌浏览器
+
+
+
+
+
+
+
+
+
+
+
+@**@
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/_LayoutSSODrag.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/_LayoutSSODrag.cshtml
new file mode 100644
index 000000000..5ee1f16e4
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/_LayoutSSODrag.cshtml
@@ -0,0 +1,145 @@
+@using Learun.Util
+
+
+
+
+
+
+
+
+
+ 网上办事大厅拖拽版
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @{
+ var logininfo = LoginUserInfo.Get();
+ if (logininfo == null)
+ {
+ logininfo = new UserInfo();
+ }
+ }
+
+
+ 网上办事大厅
+
+
+
+
+
数字化智慧校园
+
+
+
+
+
+
+
@logininfo.realName
+
+
+
工号 @logininfo.account
+
@logininfo.departmentName @logininfo.roleName
+
+
+
+
+
+
+
皮肤
+
+
+
+
+
蓝
+
选用皮肤
+
+
+ 使用中
+
+
+
+
+
+
+
红
+
选用皮肤
+
+
+ 使用中
+
+
+
+
+
+
+
绿
+
选用皮肤
+
+
+ 使用中
+
+
+
+
+
+
+
+
+
+
+ @RenderBody()
+ @Html.AppendJsFile(
+ "/Views/LR_Content/script/lr-base.js",
+ "/Views/LR_Content/script/lr-clientdata.js",
+ "/Views/LR_Content/script/lr-ajax.js"
+ )
+
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageBLL.cs
index 4bd217abe..2338f8a96 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageBLL.cs
@@ -90,7 +90,29 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
}
-
+ ///
+ /// 获取列表数据
+ ///
+ /// 条件参数
+ ///
+ public IEnumerable GetListByModelCode(string userId, string modelCode)
+ {
+ try
+ {
+ return sSO_Drag_DesktopManageService.GetListByModelCode(userId, modelCode);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
#endregion
#region 提交数据
@@ -142,6 +164,31 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
+
+ ///
+ /// 桌面管理表、卡片块排序管理表增加默认数据
+ /// 用户ID
+ /// 模式编号
+ ///
+ public void AddDefaultData(string userId, string modelCode)
+ {
+ try
+ {
+ sSO_Drag_DesktopManageService.AddDefaultData(userId, modelCode);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
#endregion
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageEntity.cs
index 0890b22e6..1bd7f7af6 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageEntity.cs
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// 日 期:2021-03-18 09:47
/// 描 述:网上办事大厅拖拽版-桌面管理
///
- public class SSO_Drag_DesktopManageEntity
+ public class SSO_Drag_DesktopManageEntity
{
#region 实体成员
///
@@ -27,7 +27,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
[Column("USERID")]
public string UserId { get; set; }
///
- /// 模式编号:0办事大厅模式,1效率优先模式,2管理驾驶舱模式
+ /// 模式编号:one办事大厅模式,two效率优先模式,three管理驾驶舱模式
///
///
[Column("MODELCODE")]
@@ -69,6 +69,13 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
this.Id = keyValue;
}
#endregion
+ #region 扩展数据
+ ///
+ /// 卡片块排序
+ ///
+ [NotMapped]
+ public string CardSort { get; set; }
+ #endregion
}
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageIBLL.cs
index 41f2594e8..5621e801f 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageIBLL.cs
@@ -20,7 +20,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
///
/// 查询参数
///
- IEnumerable GetList( string queryJson );
+ IEnumerable GetList(string queryJson);
///
/// 获取列表分页数据
///
@@ -34,6 +34,12 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// 主键
///
SSO_Drag_DesktopManageEntity GetEntity(string keyValue);
+ ///
+ /// 获取列表数据
+ ///
+ /// 条件参数
+ ///
+ IEnumerable GetListByModelCode(string userId, string modelCode);
#endregion
#region 提交数据
@@ -49,6 +55,14 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// 主键
/// 实体
void SaveEntity(string keyValue, SSO_Drag_DesktopManageEntity entity);
+
+
+ ///
+ /// 桌面管理表、卡片块排序管理表增加默认数据
+ /// 用户ID
+ /// 模式编号
+ ///
+ void AddDefaultData(string userId, string modelCode);
#endregion
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageService.cs
index 0e03af697..4612da61a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageService.cs
@@ -25,7 +25,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
///
public SSO_Drag_DesktopManageService()
{
- fieldSql=@"
+ fieldSql = @"
t.Id,
t.UserId,
t.ModelCode,
@@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
///
///
条件参数
///
- public IEnumerable
GetList( string queryJson )
+ public IEnumerable GetList(string queryJson)
{
try
{
@@ -53,9 +53,8 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
//var dp = new DynamicParameters(new { });
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
var strSql = new StringBuilder();
- strSql.Append("SELECT ");
- strSql.Append(fieldSql);
- strSql.Append(" FROM SSO_Drag_DesktopManage t ");
+ strSql.Append("SELECT t.*,c.CardSort ");
+ strSql.Append(" FROM SSO_Drag_DesktopManage t left join SSO_Drag_CardSortManage c on t.Id=c.DesktopId ");
return this.BaseRepository().FindList(strSql.ToString());
}
catch (Exception ex)
@@ -123,6 +122,33 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
}
+ ///
+ /// 获取列表数据
+ ///
+ /// 条件参数
+ ///
+ public IEnumerable GetListByModelCode(string userId, string modelCode)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT t.*,c.CardSort ");
+ strSql.Append(" FROM SSO_Drag_DesktopManage t left join SSO_Drag_CardSortManage c on t.Id=c.DesktopId ");
+ strSql.Append(" where t.UserId='" + userId + "' and t.ModelCode='" + modelCode + "' ");
+ return this.BaseRepository().FindList(strSql.ToString());
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
#endregion
@@ -136,7 +162,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
{
try
{
- this.BaseRepository().Delete(t=>t.Id == keyValue);
+ this.BaseRepository().Delete(t => t.Id == keyValue);
}
catch (Exception ex)
{
@@ -184,6 +210,80 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
+
+ ///
+ /// 桌面管理表、卡片块排序管理表增加默认数据
+ /// 用户ID
+ /// 模式编号
+ ///
+ public void AddDefaultData(string userId, string modelCode)
+ {
+ var db = this.BaseRepository().BeginTrans();
+ try
+ {
+ //判断用户是否存在默认数据:不存在则增加;
+ var desktopEntity = db.FindEntity(x => x.UserId == userId && x.ModelCode == modelCode && x.DesktopCode == "teacherDesktop");
+ if (desktopEntity == null)
+ {
+ //默认数据为:教师桌面(卡片块排序为:card1,card2,card3,card4,card5,card6,card7,card8,card9,card10,card11,card12,card13)、OA办公桌面()、
+ var desktopModel1 = new SSO_Drag_DesktopManageEntity()
+ {
+ UserId = userId,
+ ModelCode = modelCode,
+ DesktopName = "教师桌面",
+ DesktopCode = "teacherDesktop",
+ Sort = "0"
+ };
+ desktopModel1.Create();
+ db.Insert(desktopModel1);
+ var desktopModel2 = new SSO_Drag_DesktopManageEntity()
+ {
+ UserId = userId,
+ ModelCode = modelCode,
+ DesktopName = "OA办公桌面",
+ DesktopCode = "workDesktop",
+ Sort = "1"
+ };
+ desktopModel2.Create();
+ db.Insert(desktopModel2);
+ var cardSortModel1 = new SSO_Drag_CardSortManageEntity()
+ {
+ UserId = userId,
+ ModelCode = modelCode,
+ DesktopId = desktopModel1.Id,
+ CardSort = "card1,card2,card3,card4,card5,card6,card7,card8,card9,card10,card11,card12,card13"
+ };
+ cardSortModel1.Create();
+ db.Insert(cardSortModel1);
+ var cardSortModel2 = new SSO_Drag_CardSortManageEntity()
+ {
+ UserId = userId,
+ ModelCode = modelCode,
+ DesktopId = desktopModel2.Id,
+ CardSort = ""
+ };
+ cardSortModel2.Create();
+ db.Insert(cardSortModel2);
+
+ }
+
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
#endregion
}