Sfoglia il codice sorgente

【增加】网上办事大厅拖拽版:增加办事大厅模式页面;

master
dyy 3 anni fa
parent
commit
c8b217f573
10 ha cambiato i file con 2026 aggiunte e 16 eliminazioni
  1. +5
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/indexData.js
  2. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/sortable.js
  3. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs
  4. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +1669
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml
  6. +145
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/_LayoutSSODrag.cshtml
  7. +48
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageBLL.cs
  8. +9
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageEntity.cs
  9. +15
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageIBLL.cs
  10. +106
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageService.cs

+ 5
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/indexData.js Vedi File

@@ -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

}
//初始化可用卡片


+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/sortable.js Vedi File

@@ -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 = '<div class="inSec3Col3" id="' + id + '">' +
'<div class="inSec3Box">' +
'<div class="inSecT">' +


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs Vedi File

@@ -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
/// <summary>
@@ -854,6 +856,28 @@ namespace Learun.Application.Web.Controllers
/// <returns></returns>
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();
}
/// <summary>


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Vedi File

@@ -7161,6 +7161,8 @@
<Content Include="Views\Home\SSOApplication.cshtml" />
<Content Include="Views\Home\GoToApplication.cshtml" />
<Content Include="Views\SSOSystem\DragNoLogin.cshtml" />
<Content Include="Views\SSOSystem\DragModelOne.cshtml" />
<Content Include="Views\SSOSystem\_LayoutSSODrag.cshtml" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />


+ 1669
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml
File diff soppresso perché troppo grande
Vedi File


+ 145
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/_LayoutSSODrag.cshtml Vedi File

@@ -0,0 +1,145 @@
@using Learun.Util

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit" />
<meta name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<title>网上办事大厅拖拽版</title>
<meta name="keywords" content="网上办事大厅拖拽版" />
<meta name="description" content="网上办事大厅拖拽版" />
<link rel="stylesheet" type="text/css" href="/Content/font/css/font-awesome.css" />
<link rel="stylesheet" href="/Content/layui/css/layui.css" />
<link rel="stylesheet" type="text/css" href="/Content/css/DragSSO/common.css" />
<link rel="stylesheet" href="/Content/css/DragSSO/login5.css" />
<link rel="stylesheet" type="text/css" href="/Content/css/DragSSO/index.css" />
<!-- 蓝色背景 -->
<link rel="stylesheet" id="skinLink" type="text/css" href="/Content/css/DragSSO/blue.css" />
<!-- 红色背景 -->
<!-- <link rel="stylesheet" type="text/css" href="/Content/css/DragSSO/red.css"> -->
<!-- 绿色背景 -->
<!-- <link rel="stylesheet" id="skinLink" type="text/css" href="/Content/css/DragSSO/green.css"> -->
<!----自适应----->

<script src="/Content/js/jquery.min.js"></script>
<script type="text/javascript" src="/Content/js/qrcode.min.js"></script>
<script src="/Content/js/echarts.js"></script>
<script src="/Content/layui/layui.js" charset="utf-8"></script>
<script src="/Content/js/jquery-ui.min.js"></script>
<script src="/Content/js/DragSSO/main.js"></script>
<!----自适应----->

</head>
<body>
@{
var logininfo = LoginUserInfo.Get();
if (logininfo == null)
{
logininfo = new UserInfo();
}
}
<div class="header inSecShadow">
<a href="/SSOSystem/DragModelOne" class="headLogo">
网上办事大厅
</a>
<ul class="headTab">
<li class="active"><a href="/SSOSystem/DragModelOne"><img src="/Content/images/DragSSO/head1.png" alt="" /></a></li>
</ul>
<div class="headTitle">数字化智慧校园</div>
<div class="headSearch">
<input type="text" placeholder="查找服务" />
<div class="headSearchImg"><img src="/Content/images/DragSSO/search.png" alt="" /></div>
<div class="headSearchHistory">
<div class="headSearchHistBox">历史 <i class="fa fa-angle-down"></i></div>
</div>
<div class="headSearchClose">关闭搜索</div>
</div>
<div class="headUser">
<div class="headMode">
<div class="headModeTxt"><span>办事大厅模式</span> <i class="fa fa-angle-down"></i> </div>
<ul class="headModeList">
<li class="active"><a href="/SSOSystem/DragModelOne">办事大厅模式</a></li>
<li><a href="/SSOSystem/DragModelTwo">效率优先模式</a></li>
<li><a href="/SSOSystem/DragModelThree">管理驾驶舱模式</a></li>
</ul>
</div>
<!-- 登录后 -->
<div class="headLine1"></div>
<div class="headUserImg"><img src="/LR_OrganizationModule/User/GetImg?userId=@logininfo.userId " alt="" /></div>
<div class="headUserTxt">@logininfo.realName</div>
<div class="headLine1"></div>
<div class="headNumBox">
<div class="headNum">工号 @logininfo.account</div>
<div class="headNumTxt">@logininfo.departmentName <span></span> @logininfo.roleName</div>
</div>
<!-- 登录后 -->
<div class="headLine1"></div>
<div class="skinBox">
<img src="/Content/images/DragSSO/head4.png" alt="" />
<div class="skin inSecShadow">
<div class="skinT">皮肤 <img src="/Content/images/DragSSO/close.png" alt="" /></div>
<div class="skinList">
<div skin="blue" class="skins blue active">
<div>
<img src="/Content/images/DragSSO/skin1.jpg" alt="" />
<div class="skinTxt">蓝</div>
<div class="skinText">选用皮肤</div>
<div class="skinCheck">
<i class="fa fa-check-circle"></i>
<span>使用中</span>
</div>
</div>
</div>
<div skin="red" class="skins red">
<div>
<img src="/Content/images/DragSSO/skin3.jpg" alt="" />
<div class="skinTxt">红</div>
<div class="skinText">选用皮肤</div>
<div class="skinCheck">
<i class="fa fa-check-circle"></i>
<span>使用中</span>
</div>
</div>
</div>
<div skin="green" class="skins green">
<div>
<img src="/Content/images/DragSSO/skin2.jpg" alt="" />
<div class="skinTxt">绿</div>
<div class="skinText">选用皮肤</div>
<div class="skinCheck">
<i class="fa fa-check-circle"></i>
<span>使用中</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="headLine1"></div>
<div class="downloadFx">
<img src="/Content/images/DragSSO/download.png" alt="" />
<a href="/飞星客户端.exe"><span style="color:white;">飞星下载</span></a>
</div>
</div>
</div>
@RenderBody()
@Html.AppendJsFile(
"/Views/LR_Content/script/lr-base.js",
"/Views/LR_Content/script/lr-clientdata.js",
"/Views/LR_Content/script/lr-ajax.js"
)

</body>

</html>
<script>
$(function () {


})
</script>

+ 48
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageBLL.cs Vedi File

@@ -90,7 +90,29 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
}

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<SSO_Drag_DesktopManageEntity> 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
}
}


/// <summary>
/// 桌面管理表、卡片块排序管理表增加默认数据
/// <param name="userId">用户ID</param>
/// <param name="modelCode">模式编号</param>
/// </summary>
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

}


+ 9
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageEntity.cs Vedi File

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// 日 期:2021-03-18 09:47
/// 描 述:网上办事大厅拖拽版-桌面管理
/// </summary>
public class SSO_Drag_DesktopManageEntity
public class SSO_Drag_DesktopManageEntity
{
#region 实体成员
/// <summary>
@@ -27,7 +27,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
[Column("USERID")]
public string UserId { get; set; }
/// <summary>
/// 模式编号:0办事大厅模式,1效率优先模式,2管理驾驶舱模式
/// 模式编号:one办事大厅模式,two效率优先模式,three管理驾驶舱模式
/// </summary>
/// <returns></returns>
[Column("MODELCODE")]
@@ -69,6 +69,13 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
this.Id = keyValue;
}
#endregion
#region 扩展数据
/// <summary>
/// 卡片块排序
/// </summary>
[NotMapped]
public string CardSort { get; set; }
#endregion
}
}


+ 15
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageIBLL.cs Vedi File

@@ -20,7 +20,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<SSO_Drag_DesktopManageEntity> GetList( string queryJson );
IEnumerable<SSO_Drag_DesktopManageEntity> GetList(string queryJson);
/// <summary>
/// 获取列表分页数据
/// </summary>
@@ -34,6 +34,12 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// <param name="keyValue">主键</param>
/// <returns></returns>
SSO_Drag_DesktopManageEntity GetEntity(string keyValue);
/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
IEnumerable<SSO_Drag_DesktopManageEntity> GetListByModelCode(string userId, string modelCode);
#endregion

#region 提交数据
@@ -49,6 +55,14 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, SSO_Drag_DesktopManageEntity entity);


/// <summary>
/// 桌面管理表、卡片块排序管理表增加默认数据
/// <param name="userId">用户ID</param>
/// <param name="modelCode">模式编号</param>
/// </summary>
void AddDefaultData(string userId, string modelCode);
#endregion

}


+ 106
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageService.cs Vedi File

@@ -25,7 +25,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// </summary>
public SSO_Drag_DesktopManageService()
{
fieldSql=@"
fieldSql = @"
t.Id,
t.UserId,
t.ModelCode,
@@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// </summary>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<SSO_Drag_DesktopManageEntity> GetList( string queryJson )
public IEnumerable<SSO_Drag_DesktopManageEntity> 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<SSO_Drag_DesktopManageEntity>(strSql.ToString());
}
catch (Exception ex)
@@ -123,6 +122,33 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
}
/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<SSO_Drag_DesktopManageEntity> 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<SSO_Drag_DesktopManageEntity>(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<SSO_Drag_DesktopManageEntity>(t=>t.Id == keyValue);
this.BaseRepository().Delete<SSO_Drag_DesktopManageEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
@@ -184,6 +210,80 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}


/// <summary>
/// 桌面管理表、卡片块排序管理表增加默认数据
/// <param name="userId">用户ID</param>
/// <param name="modelCode">模式编号</param>
/// </summary>
public void AddDefaultData(string userId, string modelCode)
{
var db = this.BaseRepository().BeginTrans();
try
{
//判断用户是否存在默认数据:不存在则增加;
var desktopEntity = db.FindEntity<SSO_Drag_DesktopManageEntity>(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

}


Caricamento…
Annulla
Salva