diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/inSecHead.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/inSecHead.js index bde91434c..66d87b5e4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/inSecHead.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/inSecHead.js @@ -1,201 +1,219 @@ -$(document).ready(function() { - - //桌面切换 - $('.inSec3Head').on('click', '.inSec3HeadTab', function() { - if ($(this).hasClass('active')) return; - var ind = $(this).attr('ind'); - // console.log(ind) - $('.inSec3Row.active').sortable("destroy"); - $(this).addClass('active').siblings('.inSec3HeadTab').removeClass('active'); - $('.inSec3Row').css('display', 'none').removeClass('active').siblings('.inSec3Row[ind="'+ ind +'"]').fadeIn().addClass('active'); - sortableInit() - }) - //新建桌面 - $('.desktopSetBox').on('click', '.faR', function(){ - $(this).parents('.deskSetLi').addClass('active') - }).on('click', '.deskSetClose', function(){//删除桌面 - var parents = $(this).parents('.deskSetLi').removeClass('active'); - - - }).on('click', '.deskSetTrue', function(){//添加桌面或者重置桌面 - var parents = $(this).parents('.deskSetLi'); - // console.log(parents) - if(parents.hasClass('deskSetLiNew')){ - var inputs = parents.find('input'); - desktopNew(inputs.val()) - inputs.val('新建桌面') - }else{ - var ind = parents.attr('ind'); - var txt = $(this).parent().attr('txt') - parents.removeClass('active'); - if(ind > 1){ - desktopDel(ind) - }else{ - - } - layer.msg(txt) - } - }).on('click', '.deskNameTxt', function(){ - $(this).siblings('.deskNameInput').addClass('active').find('input').focus(); - }).on('blur', '.deskSetList input', function(){ //修改桌面成功 - var ind = $(this).parents('.deskSetLi').attr('ind') - var txt = $(this).val(); - if(txt.length == 0){ - layer.msg('桌面不能为空!'); - $(this).focus(); - return - } - var spans = $(this).parents('.deskName').find('.deskNameTxt span'); - txt = spans.length? txt + '(默认桌面)' : txt; - $(this).parent().removeClass('active').siblings('.deskNameTxt').html(txt); - $('.inSec3HeadTab[ind="'+ ind +'"] .inSec3HeadTabTxt').html(txt); - }).on('input', '.deskNameInput input', function(){ //修改桌面 - var txt = $(this).val() - var len = txt.length; - if(len >=8){ - len = 8; - $(this).val(txt.substring(0,8)) - } - $(this).siblings('span').html(len + '/8') - }).on('click', '.deskSetLiNew .deskName', function(){ - $(this).parents('.deskSetLi').addClass('active'); - }).on('click', '.desktopSet > img', function(){ - $('.desktopSetBox').removeClass('active'); - }).on('click', '.deskSetBtn', function(){ - $('.desktopSetBox').removeClass('active'); - }) - //桌面设置 - $('.inSec3Setting').on('click', function(){ - deskNum() - $('.desktopSetBox').addClass('active'); - }) - //添加桌面 - $(document).on('input', '.layerInput input', function(){ - var txt = $(this).val() - var len = txt.length; - if(len >=8){ - len = 8; - txt = txt.substring(0,8); - } - if(len == 0){ - txt = '新建桌面'; - } - $(this).val(txt) - }) - $('.inSec3HeadAdd').on('click', function() { - var _this = $(this); - layer.open({ - type: 1, - title: '命名桌面', - btnAlign: 'c', - content: htmlLayer, - area: ['300px', 'auto'], - btn: ['保存', '取消'], - yes: function(index, layero) { - //按钮【按钮一】的回调 - desktopNew($('.layerInput input').val()); - layer.close(index); - }, - btn2: function(index, layero) { - //按钮【按钮二】的回调 - //return false 开启该代码可禁止点击该按钮关闭 - } - }) - - }) - //桌面排序 - $('.deskSetList').sortable({ - opacity: 0.8, - containment: '.deskSetList', - handle: '.fa-navicon', - // helper: 'clone', - // scroll: false, - cursor: "move", - stop: function(event, ui) { - //当排序停止时触发该事件。 - var ind = $('.inSec3HeadTab.active').attr('ind'); - $('.inSec3HeadTabBox').html(''); - $('.deskSetList .deskSetLi').each(function(i, n){ - var num = $(this).attr('ind'); - var txt = $(n).find('input').val(); - var className = $(n).find('.deskNameTxt span').length? 'newlyBuild' : ''; - var active = num == ind? 'active' : ''; - var html = '
'+ - '
'+ txt +'
'+ - '
'+ - '
'; - $('.inSec3HeadTabBox').append(html) - }) - }, - }); - -}) -$(window).load(function() { - cardData() -}) +$(document).ready(function () { + + //桌面切换 + $('.inSec3Head').on('click', '.inSec3HeadTab', function () { + if ($(this).hasClass('active')) return; + var ind = $(this).attr('ind'); + // console.log(ind); + $('.inSec3Row.active').sortable("destroy"); + $(this).addClass('active').siblings('.inSec3HeadTab').removeClass('active'); + $('.inSec3Row').css('display', 'none').removeClass('active').siblings('.inSec3Row[ind="' + ind + '"]').fadeIn().addClass('active'); + sortableInit(); + }); + //桌面设置弹框中的事件 + $('.desktopSetBox').on('click', '.faR', function () {//点击默认桌面-恢复标识,显示恢复提示 + $(this).parents('.deskSetLi').addClass('active') + }).on('click', '.deskSetClose', function () {//点击提示中关闭标识,不显示恢复提示 + $(this).parents('.deskSetLi').removeClass('active'); + }).on('click', '.deskSetTrue', function () {//点击提示中确定标识,添加桌面或者重置桌面 + var parents = $(this).parents('.deskSetLi'); + if (parents.hasClass('deskSetLiNew')) { + var inputs = parents.find('input'); + desktopNew(inputs.val()); + inputs.val('新建桌面'); + } else { + var txt = $(this).parent().attr('txt'); + parents.removeClass('active'); + //if(ind > 1){ + var defaultFlag = parents.attr('defaultFlag'); + if (defaultFlag != 1) { + var ind = parents.attr('ind'); + var desktopId = parents.attr('desktopId'); + desktopDel(ind, desktopId); + } else { + //todo:ajax默认桌面的恢复操作 + } + //todo:操作成功后执行代码开始 + layer.msg(txt); + //todo:操作成功后执行代码结束 + } + }).on('click', '.deskNameTxt', function () { + $(this).siblings('.deskNameInput').addClass('active').find('input').focus(); + }).on('blur', '.deskSetList input', function () { //桌面名称表单失去焦点时 + var ind = $(this).parents('.deskSetLi').attr('ind'); + var txt = $(this).val(); + if (txt.length == 0) { + layer.msg('桌面不能为空!'); + $(this).focus(); + return; + } + //var spans = $(this).parents('.deskName').find('.deskNameTxt span'); + //txt = spans.length? txt + '(默认桌面)' : txt; + $(this).parent().removeClass('active').siblings('.deskNameTxt').find('b').html(txt); + $('.inSec3HeadTab[ind="' + ind + '"] .inSec3HeadTabTxt').html(txt); + }).on('input', '.deskNameInput input', function () { //监听桌面名称表单input事件 + var txt = $(this).val(); + var len = txt.length; + if (len >= 8) { + len = 8; + $(this).val(txt.substring(0, 8)) + } + $(this).siblings('span').html(len + '/8') + }).on('click', '.deskSetLiNew .deskName', function () { + $(this).parents('.deskSetLi').addClass('active'); + }).on('click', '.desktopSet > img', function () {//点击桌面设置弹框右上角关闭按钮 + $('.desktopSetBox').removeClass('active'); + }).on('click', '.deskSetBtn', function () {//点击桌面设置弹框的完成按钮 + $('.desktopSetBox').removeClass('active'); + }); + //点击桌面栏-设置按钮,显示桌面设置弹框 + $('.inSec3Setting').on('click', function () { + deskNum(); + $('.desktopSetBox').addClass('active'); + }); + //监听layer添加桌面弹框中表单的input事件 + $(document).on('input', '.layerInput input', function () { + var txt = $(this).val(); + var len = txt.length; + if (len >= 8) { + len = 8; + txt = txt.substring(0, 8); + } + if (len == 0) { + txt = '新建桌面'; + } + $(this).val(txt); + }); + //点击桌面栏-添加按钮,显示layer添加桌面弹框 + $('.inSec3HeadAdd').on('click', function () { + var _this = $(this); + layer.open({ + type: 1, + title: '命名桌面', + btnAlign: 'c', + content: htmlLayer, + area: ['300px', 'auto'], + btn: ['保存', '取消'], + yes: function (index, layero) { + //按钮【按钮一】的回调 + desktopNew($('.layerInput input').val()); + layer.close(index); + }, + btn2: function (index, layero) { + //按钮【按钮二】的回调 + //return false 开启该代码可禁止点击该按钮关闭 + } + }) + + }); + //桌面设置弹框中桌面的排序 + //$('.deskSetList').sortable({ + // opacity: 0.8, + // containment: '.deskSetList', + // handle: '.fa-navicon', + // // helper: 'clone', + // // scroll: false, + // cursor: "move", + // stop: function(event, ui) { + // //当排序停止时触发该事件。 + // var ind = $('.inSec3HeadTab.active').attr('ind'); + // $('.inSec3HeadTabBox').html(''); + // $('.deskSetList .deskSetLi').each(function(i, n){ + // var num = $(this).attr('ind'); + // var txt = $(n).find('input').val(); + // var className = $(n).find('.deskNameTxt span').length? 'newlyBuild' : ''; + // var active = num == ind? 'active' : ''; + // var html = '
'+ + // '
'+ txt +'
'+ + // '
'+ + // '
'; + // $('.inSec3HeadTabBox').append(html) + // }) + // }, + //}); + +}); +$(window).load(function () { + cardData() +}); //新建桌面 -function desktopNew(name){ - // var ind = $('.inSec3HeadTab').length; - var ind = inSec3TabArr[0]; - inSec3TabArr.splice(0,1); - var htmlC = '
'+ noCard +'
'; - var htmlT = '
'+ - '
'+ name +'
'+ - '
'+ - '
'; - var deskSetLi = '
'+ - ''+ - '
'+ - '
'+ name +'
'+ - '
'+ - ''+ - '4/8'+ - '
'+ - '
'+ - ''+ - '
'+ - '确认删除该桌面?'+ - '
'+ - ''+ - '
'+ - '
'+ - ''+ - '
'+ - '
'+ - '
'; - $('.deskSetLiNew').removeClass('active').find('.deskNameInput').removeClass('active'); - $('.inSec3Row.active').sortable("destroy"); - $('.inSec3RowBox').append(htmlC).find('.inSec3Row').css('display', 'none').removeClass('active').last().addClass('active').fadeIn(); - $('.inSec3HeadTabBox').append(htmlT).find('.inSec3HeadTab').removeClass('active').last().addClass('active'); - $('.deskSetList').append(deskSetLi); - sortableInit(); - deskNum(); - //最多新建3个桌面 - if(($('.inSec3HeadTab').length +1) > desktopNum){ - $('.inSec3HeadAdd').css('display', 'none').next().css('display', 'none'); - $('.deskSetLiNew').css('display', 'none'); - } +function desktopNew(name) { + //var ind = inSec3TabArr[0]; + //inSec3TabArr.splice(0,1); + var ind = getRandomNum(); + //todo:ajax自建桌面新增操作,操作成功后执行下面代码,需要返回Id值并绑定到htmlT的desktopId中; + //todo:操作成功后执行代码开始 + var htmlC = '
' + noCard + '
'; + var htmlT = '
' + + '
' + name + '
' + + '
' + + '
'; + var deskSetLi = '
' + + '' + + '
' + + '
' + name + '
' + + '
' + + '' + + '4/8' + + '
' + + '
' + + '' + + '
' + + '确认删除该桌面?' + + '
' + + '' + + '
' + + '
' + + '' + + '
' + + '
' + + '
'; + $('.deskSetLiNew').removeClass('active').find('.deskNameInput').removeClass('active'); + $('.inSec3Row.active').sortable("destroy"); + $('.inSec3RowBox').append(htmlC).find('.inSec3Row').css('display', 'none').removeClass('active').last().addClass('active').fadeIn(); + $('.inSec3HeadTabBox').append(htmlT).find('.inSec3HeadTab').removeClass('active').last().addClass('active'); + $('.deskSetList').append(deskSetLi); + sortableInit(); + deskNum(); + //最多新建3个桌面 + if (($('.inSec3HeadTab').length + 1) > desktopNum) { + $('.inSec3HeadAdd').css('display', 'none').next().css('display', 'none'); + $('.deskSetLiNew').css('display', 'none'); + } + //todo:操作成功后执行代码结束 } //删除桌面 -function desktopDel(ind){ - $('.deskSetLi[ind="'+ ind +'"]').remove(); - $('.inSec3HeadTab[ind="'+ ind +'"]').next().remove().end().remove(); - var inSec3Row = $('.inSec3Row[ind="'+ ind +'"]'); - if(inSec3Row.hasClass('active')){ - $('.inSec3Row.active').sortable("destroy"); - inSec3Row.remove(); - $('.inSec3Row').eq(0).addClass('active').fadeIn(); - $('.inSec3HeadTab').eq(0).addClass('active'); - sortableInit() - }else{ - inSec3Row.remove(); - } - inSec3TabArr.push(ind); - $('.inSec3HeadAdd').css('display', 'inline-block').next().css('display', 'inline-block'); - $('.deskSetLiNew').css('display', 'block'); +function desktopDel(ind, desktopId) { + //todo:ajax自建桌面的删除操作 + //todo:操作成功后执行代码开始 + $('.deskSetLi[ind="' + ind + '"]').remove(); + $('.inSec3HeadTab[ind="' + ind + '"]').next().remove().end().remove(); + var inSec3Row = $('.inSec3Row[ind="' + ind + '"]'); + if (inSec3Row.hasClass('active')) { + $('.inSec3Row.active').sortable("destroy"); + inSec3Row.remove(); + $('.inSec3Row').eq(0).addClass('active').fadeIn(); + $('.inSec3HeadTab').eq(0).addClass('active'); + sortableInit() + } else { + inSec3Row.remove(); + } + //inSec3TabArr.push(ind); + deskNum(); + $('.inSec3HeadAdd').css('display', 'inline-block').next().css('display', 'inline-block'); + $('.deskSetLiNew').css('display', 'block'); + //todo:操作成功后执行代码结束 } //初始化桌面设置 -function deskNum(){ - $('.deskSetInfo span').eq(0).html($('.newlyBuild').length); -} \ No newline at end of file +function deskNum() { + //console.log($('.newlyBuild').length); + $('.deskSetInfo span').eq(0).html($('.newlyBuild').length); +} +//获取随机数 +function getRandomNum() { + var now = new Date(); + var result = now.getFullYear() + "" + now.getMonth() + "" + now.getDate() + "" + now.getHours() + "" + now.getMinutes() + "" + now.getSeconds() + "" + now.getMilliseconds(); + return result; +} +//console.log(getRandomNum()); \ No newline at end of file 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 79b340f0f..82dfdc1b3 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 @@ -2,66 +2,89 @@ var layer = null; var inSec3TabArr = [2, 3, 4]; //inSec3TabArr.splice($.inArray(ind,inSec3TabArr),1); //最多新建3个桌面 2个默认桌面 -var desktopNum = 5; +var desktopNum = 5; //没有卡片 -var noCard = '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
从左侧选择需要的应用卡片
'+ - '
'+ - '
'+ - '
'+ - '
'; +var noCard = '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
从左侧选择需要的应用卡片
' + + '
' + + '
' + + '
' + + '
'; //没有数据 -var noHtml = '
'+ - '
'+ - '
暂时没有数据
'+ - '
'; +var noHtml = '
' + + '
' + + '
暂时没有数据
' + + '
'; // //添加桌面 var htmlLayer = '
'; // 拖拽 排序 初始化 -function sortableInit(){ - $('.inSec3Row.active').sortable({ - opacity: 0.8, - containment: '.inSec3Row.active', - handle: '.inSecT', - helper: 'clone', - scroll: false, - cursor: "move", - stop: function(event, ui) { - //当排序停止时触发该事件。 - serializes() - }, - }); - cardData() +function sortableInit() { + $('.inSec3Row.active').sortable({ + opacity: 0.8, + containment: '.inSec3Row.active', + handle: '.inSecT', + helper: 'clone', + scroll: false, + cursor: "move", + stop: function (event, ui) { + //当排序停止时触发该事件。 + serializes() + }, + }); + cardData() } //当排序停止时触发该事件。 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 + 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 var result = gg.replace(/sort=/g, "").replace(/&/g, ","); //console.log(result); - //todo:ajax提交用户排序 + //ajax提交用户排序 + var desktopId = $('.inSec3HeadTabBox').find('.inSec3HeadTab.active').attr('desktopId'); + var modelCode = $('#ModelCode').val(); + var userId = $('#UserId').val(); + if (userId != "" && userId != undefined && desktopId != "" && desktopId != undefined && modelCode != "") { + $.ajax({ + url: "/SSOSystem/SaveCardSort", + headers: { __RequestVerificationToken: $.lrToken }, + data: { userId: userId, modelCode: modelCode, desktopId: desktopId, cardSort: result }, + type: "post", + dataType: "json", + success: function (res) { + if (res.code == 200) { + layer.msg('操作成功!'); + } + else if (res.code == 400) { + layer.msg(res.info); + } + else if (res.code == 500) { + layer.msg('服务端异常,请联系管理员'); + } + } + }); + } } //初始化可用卡片 function cardData() { - $('.inSec1Drag .fa').removeClass('fa-minus').addClass('fa-plus'); - $('.inSec3Row.active > div').each(function(i, n) { - var id = $(n).attr('id'); - if (id == 'noHtml') return - id = id.split('_')[1]; - $('#' + id).find('.fa').removeClass('fa-plus').addClass('fa-minus'); - }) + $('.inSec1Drag .fa').removeClass('fa-minus').addClass('fa-plus'); + $('.inSec3Row.active > div').each(function (i, n) { + var id = $(n).attr('id'); + if (id == 'noHtml') return + id = id.split('_')[1]; + $('#' + id).find('.fa').removeClass('fa-plus').addClass('fa-minus'); + }) } 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 63fdfcc4c..c67029bb0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs @@ -45,6 +45,7 @@ namespace Learun.Application.Web.Controllers private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); private ClassroomInfoIBLL classroomInfoIBLL = new ClassroomInfoBLL(); private EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); + private SSO_Drag_CardSortManageIBLL sSO_Drag_CardSortManageIBLL = new SSO_Drag_CardSortManageBLL(); #region 统一身份认证2.0 /// @@ -874,11 +875,13 @@ namespace Learun.Application.Web.Controllers { return Redirect("DragNoLogin"); } - //桌面管理表、卡片块排序管理表增加默认数据 + //登录用户 var userInfo = LoginUserInfo.Get(); + ViewBag.UserId = userInfo.userId; + //桌面管理表、卡片块排序管理表增加默认数据 sSO_Drag_DesktopManageIBLL.AddDefaultData(userInfo.userId, "one"); //获取桌面、卡片块排序列表 - ViewBag.DesktopList = sSO_Drag_DesktopManageIBLL.GetListByModelCode(userInfo.userId, "one").OrderBy(x => x.Sort); + ViewBag.DesktopList = sSO_Drag_DesktopManageIBLL.GetListByModelCode(userInfo.userId, "one").OrderByDescending(x=>x.DefaultFlag).ThenBy(x => x.Sort); ViewBag.DesktopListStr = JsonConvert.SerializeObject(ViewBag.DesktopList); //分页查询条件设置 Pagination paginationobj = new Pagination() { rows = 5, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" }; @@ -1020,9 +1023,10 @@ namespace Learun.Application.Web.Controllers ViewBag.FlowType = flowType; ViewBag.FlowList = JsonConvert.SerializeObject(flowList); - + return View(); } + /// /// 网上办事大厅拖拽版-效率优先模式 /// @@ -1039,7 +1043,15 @@ namespace Learun.Application.Web.Controllers { return View(); } - + /// + /// 网上办事大厅拖拽版-保存卡片块排序 + /// + /// + public ActionResult SaveCardSort(string userId, string modelCode, string desktopId, string cardSort) + { + sSO_Drag_CardSortManageIBLL.SaveCardSort(userId, modelCode, desktopId, cardSort); + return Success("操作成功"); + } } } \ No newline at end of file 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 fe4eee8c4..6d6826ae7 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 @@ -23,8 +23,8 @@ //定义卡片块 //数据看板 - var card1Fun = function () { - var html = '
' + var card1Fun = function (ind) { + var html = '
' +'
' +'
' +'数据看板' @@ -94,7 +94,7 @@ return html; }; //办公事项 - var card2Fun = function () { + var card2Fun = function (ind) { var listStr = "@ViewBag.TaskListStr"; var list = JSON.parse(listStr.replace(/"/g, "\"")); var listStr2 = "@ViewBag.FinishTaskListStr"; @@ -102,7 +102,7 @@ var listStr3 = "@ViewBag.MyListStr"; var list3 = JSON.parse(listStr3.replace(/"/g, "\"")); - var html = '
' + var html = '
' + '
' + '
' + '办公事项' @@ -174,10 +174,10 @@ return html; }; //学校公文 - var card3Fun = function () { + var card3Fun = function (ind) { var listStr = "@ViewBag.ReceiveFileListStr"; var list = JSON.parse(listStr.replace(/"/g, "\"")); - var html = '
' + var html = '
' + '
' + '
' + '学校公文' @@ -205,15 +205,16 @@ ; return html; }; - var card4Fun = function () { - var html = '
' + //专业总览 + var card4Fun = function (ind) { + var html = '
' +'
' +'
' +'专业总览' +'' +'
' - +'
' - + '
' + + '
' + + '
' +'
' +'
班级总数
' +'
@ViewBag.ClassInfoTotalNum
' @@ -233,8 +234,8 @@ return html; }; //常用链接 - var card5Fun = function () { - var html = '
' + var card5Fun = function (ind) { + var html = '
' +'
' +'
' +'常用链接' @@ -281,7 +282,7 @@ return html; }; //常用服务 - var card6Fun = function () { + var card6Fun = function (ind) { var listStr = "@ViewBag.OffenusedStr"; var list = JSON.parse(listStr.replace(/"/g, "\"")); var listStr2 = "@ViewBag.OffenusedJiaoStr"; @@ -289,7 +290,7 @@ var listStr3 = "@ViewBag.OffenusedGuanStr"; var list3 = JSON.parse(listStr3.replace(/"/g, "\"")); - var html = '
' + var html = '
' + '
' + '
' + '常用服务' @@ -404,8 +405,8 @@ return html; }; //校园总览 - var card7Fun = function () { - var html = '
' + var card7Fun = function (ind) { + var html = '
' +'
' +'
' +'校园总览' @@ -461,8 +462,8 @@ return html; }; //宣传报道 - var card8Fun = function () { - var html = '
' + var card8Fun = function (ind) { + var html = '
' +'
' +'
' +'宣传报道' @@ -494,12 +495,12 @@ return html; }; //办公邮件 - var card9Fun = function () { + var card9Fun = function (ind) { var listStr = "@ViewBag.LanMailStr"; var list = JSON.parse(listStr.replace(/"/g, "\"")); var listStr2 = "@ViewBag.LanMailSendStr"; var list2 = JSON.parse(listStr2.replace(/"/g, "\"")); - var html = '
' + var html = '
' + '
' + '
' + '办公邮件' @@ -562,10 +563,10 @@ return html; }; //通知公告 - var card10Fun = function () { + var card10Fun = function (ind) { var listStr = "@ViewBag.NewsListStr"; var list = JSON.parse(listStr.replace(/"/g, "\"")); - var html = '
' + var html = '
' + '
' + '
' + '通知公告' @@ -593,8 +594,8 @@ return html; }; //智慧教育 - var card11Fun = function () { - var html = '
' + var card11Fun = function (ind) { + var html = '
' + '
' + '
' + '智慧教育' @@ -616,8 +617,8 @@ return html; }; //专题推荐 - var card12Fun = function () { - var html = '
' + var card12Fun = function (ind) { + var html = '
' +'
' +'
' +'专题推荐' @@ -649,17 +650,17 @@ return html; }; //办公业务流量 - var card13Fun = function () { - var html = '
' + var card13Fun = function (ind) { + var html = '
' +'
' +'
' +'办公业务流量' +'' +'
' - +'
' - + '
' - +'
' - + '' +'' +'' +'' @@ -679,11 +680,11 @@ - +
+ +
/// 查询参数 /// - IEnumerable GetList( string queryJson ); + IEnumerable GetList(string queryJson); /// /// 获取列表分页数据 /// @@ -49,6 +49,11 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop /// 主键 /// 实体 void SaveEntity(string keyValue, SSO_Drag_CardSortManageEntity entity); + + /// + /// 保存卡片块排序 + /// + void SaveCardSort(string userId, string modelCode, string desktopId, string cardSort); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageService.cs index d58d1cf93..89d070705 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageService.cs @@ -25,7 +25,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop /// public SSO_Drag_CardSortManageService() { - fieldSql=@" + fieldSql = @" t.Id, t.UserId, t.ModelCode, @@ -42,7 +42,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop /// /// 条件参数 /// - public IEnumerable GetList( string queryJson ) + public IEnumerable GetList(string queryJson) { try { @@ -135,7 +135,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) { @@ -183,6 +183,33 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop } } + /// + /// 保存卡片块排序 + /// + public void SaveCardSort(string userId, string modelCode, string desktopId, string cardSort) + { + try + { + var model = this.BaseRepository().FindEntity(x => x.UserId == userId && x.ModelCode == modelCode && x.DesktopId == desktopId); + if (model != null) + { + model.CardSort = cardSort; + this.BaseRepository().Update(model); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(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 1bd7f7af6..97b0d1e73 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 @@ -50,6 +50,18 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop /// [Column("SORT")] public string Sort { get; set; } + /// + /// 默认标识:1为默认桌面,0为自建桌面 + /// + /// + [Column("DEFAULTFLAG")] + public string DefaultFlag { get; set; } + /// + /// 默认名称 + /// + /// + [Column("DEFAULTNAME")] + public string DefaultName { get; set; } #endregion #region 扩展操作 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 4612da61a..a4e73ec21 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 @@ -232,7 +232,9 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop ModelCode = modelCode, DesktopName = "教师桌面", DesktopCode = "teacherDesktop", - Sort = "0" + Sort = "0", + DefaultFlag="1", + DefaultName="教师桌面" }; desktopModel1.Create(); db.Insert(desktopModel1); @@ -242,7 +244,9 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop ModelCode = modelCode, DesktopName = "OA办公桌面", DesktopCode = "workDesktop", - Sort = "1" + Sort = "1", + DefaultFlag = "1", + DefaultName = "OA办公桌面" }; desktopModel2.Create(); db.Insert(desktopModel2);