Pārlūkot izejas kodu

【修改】办事大厅模式:卡片块定义,提交用户排序;

master
dyy pirms 3 gadiem
vecāks
revīzija
a0ffc3f1b1
9 mainītis faili ar 468 papildinājumiem un 337 dzēšanām
  1. +213
    -195
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/inSecHead.js
  2. +65
    -42
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/indexData.js
  3. +16
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs
  4. +99
    -90
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml
  5. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageBLL.cs
  6. +6
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageIBLL.cs
  7. +30
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageService.cs
  8. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageEntity.cs
  9. +6
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageService.cs

+ 213
- 195
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/inSecHead.js Parādīt failu

@@ -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 + '<span>(默认桌面)</span>' : 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 = '<div class="inSec3HeadTab '+ active + ' ' + className +'" ind="'+ num +'">'+
'<div class="inSec3HeadTabTxt">'+ txt +'</div>'+
'</div>'+
'<div class="inSec3HeadLine"></div>';
$('.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 + '<span>(默认桌面)</span>' : 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 = '<div class="inSec3HeadTab '+ active + ' ' + className +'" ind="'+ num +'">'+
// '<div class="inSec3HeadTabTxt">'+ txt +'</div>'+
// '</div>'+
// '<div class="inSec3HeadLine"></div>';
// $('.inSec3HeadTabBox').append(html)
// })
// },
//});

});
$(window).load(function () {
cardData()
});

//新建桌面
function desktopNew(name){
// var ind = $('.inSec3HeadTab').length;
var ind = inSec3TabArr[0];
inSec3TabArr.splice(0,1);
var htmlC = '<div class="inSec3Row clearfix" ind="'+ ind +'">'+ noCard +'</div>';
var htmlT = '<div class="inSec3HeadTab newlyBuild" ind="'+ ind +'">'+
'<div class="inSec3HeadTabTxt">'+ name +'</div>'+
'</div>'+
'<div class="inSec3HeadLine"></div>';
var deskSetLi = '<div class="deskSetLi" ind="'+ ind +'">'+
'<i class="fa fa-navicon"></i>'+
'<div class="deskName">'+
'<div class="deskNameTxt">'+ name +'</div>'+
'<div class="deskNameInput">'+
'<input type="text" value="'+ name +'">'+
'<span>4/8</span>'+
'</div>'+
'</div>'+
'<i class="fa fa-trash-o fa-lg faR"></i>'+
'<div class="deskSetLiTips" txt="删除该桌面成功">'+
'<span>确认删除该桌面?</span>'+
'<div class="deskSetTrue">'+
'<img src="images/duigou.png" alt="">'+
'</div>'+
'<div class="deskSetClose">'+
'<img src="images/close2.png" alt="">'+
'</div>'+
'</div>'+
'</div>';
$('.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 = '<div class="inSec3Row clearfix" ind="' + ind + '">' + noCard + '</div>';
var htmlT = '<div class="inSec3HeadTab newlyBuild" ind="' + ind + '" desktopId="">' +
'<div class="inSec3HeadTabTxt">' + name + '</div>' +
'</div>' +
'<div class="inSec3HeadLine"></div>';
var deskSetLi = '<div class="deskSetLi" ind="' + ind + '" defaultFlag="0" desktopId="">' +
'<i class="fa fa-navicon"></i>' +
'<div class="deskName">' +
'<div class="deskNameTxt"><b>' + name + '</b></div>' +
'<div class="deskNameInput">' +
'<input type="text" value="' + name + '">' +
'<span>4/8</span>' +
'</div>' +
'</div>' +
'<i class="fa fa-trash-o fa-lg faR"></i>' +
'<div class="deskSetLiTips" txt="删除该桌面成功">' +
'<span>确认删除该桌面?</span>' +
'<div class="deskSetTrue">' +
'<img src="images/duigou.png" alt="">' +
'</div>' +
'<div class="deskSetClose">' +
'<img src="images/close2.png" alt="">' +
'</div>' +
'</div>' +
'</div>';
$('.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);
}
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());

+ 65
- 42
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/indexData.js Parādīt failu

@@ -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 = '<div class="inSec3Col3" id="noHtml">'+
'<div class="inSec3Box">'+
'<div class="inSecT"></div>'+
'<div class="inSec3Con">'+
'<div class="noCard">'+
'<div class="noCardImg"><img src="../../Content/images/DragSSO/right2.png" alt=""></div>'+
'<div class="noCardTxt">从左侧选择需要的应用卡片</div>'+
'</div>'+
'</div>'+
'</div>'+
'</div>';
var noCard = '<div class="inSec3Col3" id="noHtml">' +
'<div class="inSec3Box">' +
'<div class="inSecT"></div>' +
'<div class="inSec3Con">' +
'<div class="noCard">' +
'<div class="noCardImg"><img src="../../Content/images/DragSSO/right2.png" alt=""></div>' +
'<div class="noCardTxt">从左侧选择需要的应用卡片</div>' +
'</div>' +
'</div>' +
'</div>' +
'</div>';
//没有数据
var noHtml = '<div class="noLogin">'+
'<div class="noLoginImg"><img src="../../Content/images/DragSSO/noLogin.png" alt=""></div>'+
'<div class="noLoginTxt">暂时没有数据</div>'+
'</div>';
var noHtml = '<div class="noLogin">' +
'<div class="noLoginImg"><img src="../../Content/images/DragSSO/noLogin.png" alt=""></div>' +
'<div class="noLoginTxt">暂时没有数据</div>' +
'</div>';
//

//添加桌面
var htmlLayer = '<div class="layerInput"><input type="text" value="新建桌面"></div>';
// 拖拽 排序 初始化
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');
})
}




+ 16
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs Parādīt failu

@@ -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
/// <summary>
@@ -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();
}

/// <summary>
/// 网上办事大厅拖拽版-效率优先模式
/// </summary>
@@ -1039,7 +1043,15 @@ namespace Learun.Application.Web.Controllers
{
return View();
}

/// <summary>
/// 网上办事大厅拖拽版-保存卡片块排序
/// </summary>
/// <returns></returns>
public ActionResult SaveCardSort(string userId, string modelCode, string desktopId, string cardSort)
{
sSO_Drag_CardSortManageIBLL.SaveCardSort(userId, modelCode, desktopId, cardSort);
return Success("操作成功");
}

}
}

+ 99
- 90
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml Parādīt failu

@@ -23,8 +23,8 @@

//定义卡片块
//数据看板
var card1Fun = function () {
var html = '<div class="inSec3Col6" id="' + $('.inSec3Row.active').attr('ind')+'_card1">'
var card1Fun = function (ind) {
var html = '<div class="inSec3Col6" id="' + ind+'_card1">'
+'<div class="inSec3Box" >'
+'<div class="inSecT">'
+'<span>数据看板</span>'
@@ -94,7 +94,7 @@
return html;
};
//办公事项
var card2Fun = function () {
var card2Fun = function (ind) {
var listStr = "@ViewBag.TaskListStr";
var list = JSON.parse(listStr.replace(/&quot;/g, "\""));
var listStr2 = "@ViewBag.FinishTaskListStr";
@@ -102,7 +102,7 @@
var listStr3 = "@ViewBag.MyListStr";
var list3 = JSON.parse(listStr3.replace(/&quot;/g, "\""));

var html = '<div class="inSec3Col3" id="' + $('.inSec3Row.active').attr('ind') + '_card2">'
var html = '<div class="inSec3Col3" id="' + ind + '_card2">'
+ '<div class="inSec3Box" >'
+ '<div class="inSecT">'
+ '<span>办公事项</span>'
@@ -174,10 +174,10 @@
return html;
};
//学校公文
var card3Fun = function () {
var card3Fun = function (ind) {
var listStr = "@ViewBag.ReceiveFileListStr";
var list = JSON.parse(listStr.replace(/&quot;/g, "\""));
var html = '<div class="inSec3Col3" id="' + $('.inSec3Row.active').attr('ind') + '_card3">'
var html = '<div class="inSec3Col3" id="' + ind + '_card3">'
+ '<div class="inSec3Box">'
+ '<div class="inSecT">'
+ '<span>学校公文</span>'
@@ -205,15 +205,16 @@
;
return html;
};
var card4Fun = function () {
var html = '<div class="inSec3Col6" id="' + $('.inSec3Row.active').attr('ind')+'_card4">'
//专业总览
var card4Fun = function (ind) {
var html = '<div class="inSec3Col6" id="' + ind + '_card4">'
+'<div class="inSec3Box" >'
+'<div class="inSecT">'
+'<span>专业总览</span>'
+'<a href="#" class="more"><span></span><span></span><span></span></a>'
+'</div>'
+'<div class="inSec3Con">'
+ '<div class="echartBox" id="' + $('.inSec3Row.active').attr('ind')+'_major"></div>'
+ '<div class="inSec3Con">'
+ '<div class="echartBox" id="' + ind + '_major"></div>'
+'<div class="inSec3majorTxt inSec3majorTxt1">'
+'<div>班级总数</div>'
+'<div>@ViewBag.ClassInfoTotalNum</div>'
@@ -233,8 +234,8 @@
return html;
};
//常用链接
var card5Fun = function () {
var html = '<div class="inSec3Col3" id="' + $('.inSec3Row.active').attr('ind')+'_card5">'
var card5Fun = function (ind) {
var html = '<div class="inSec3Col3" id="' + ind + '_card5">'
+'<div class="inSec3Box" >'
+'<div class="inSecT">'
+'<span>常用链接</span>'
@@ -281,7 +282,7 @@
return html;
};
//常用服务
var card6Fun = function () {
var card6Fun = function (ind) {
var listStr = "@ViewBag.OffenusedStr";
var list = JSON.parse(listStr.replace(/&quot;/g, "\""));
var listStr2 = "@ViewBag.OffenusedJiaoStr";
@@ -289,7 +290,7 @@
var listStr3 = "@ViewBag.OffenusedGuanStr";
var list3 = JSON.parse(listStr3.replace(/&quot;/g, "\""));

var html = '<div class="inSec3Col3" id="' + $('.inSec3Row.active').attr('ind')+'_card6">'
var html = '<div class="inSec3Col3" id="' + ind + '_card6">'
+ '<div class="inSec3Box" >'
+ '<div class="inSecT">'
+ '<span>常用服务</span>'
@@ -404,8 +405,8 @@
return html;
};
//校园总览
var card7Fun = function () {
var html = '<div class="inSec3Col6" id="' + $('.inSec3Row.active').attr('ind')+'_card7">'
var card7Fun = function (ind) {
var html = '<div class="inSec3Col6" id="' + ind + '_card7">'
+'<div class="inSec3Box" >'
+'<div class="inSecT">'
+'<span>校园总览</span>'
@@ -461,8 +462,8 @@
return html;
};
//宣传报道
var card8Fun = function () {
var html = '<div class="inSec3Col3" id="' + $('.inSec3Row.active').attr('ind')+'_card8">'
var card8Fun = function (ind) {
var html = '<div class="inSec3Col3" id="' + ind + '_card8">'
+'<div class="inSec3Box" >'
+'<div class="inSecT">'
+'<span>宣传报道</span>'
@@ -494,12 +495,12 @@
return html;
};
//办公邮件
var card9Fun = function () {
var card9Fun = function (ind) {
var listStr = "@ViewBag.LanMailStr";
var list = JSON.parse(listStr.replace(/&quot;/g, "\""));
var listStr2 = "@ViewBag.LanMailSendStr";
var list2 = JSON.parse(listStr2.replace(/&quot;/g, "\""));
var html = '<div class="inSec3Col3" id="' + $('.inSec3Row.active').attr('ind') + '_card9">'
var html = '<div class="inSec3Col3" id="' + ind + '_card9">'
+ '<div class="inSec3Box" >'
+ '<div class="inSecT">'
+ '<span>办公邮件</span>'
@@ -562,10 +563,10 @@
return html;
};
//通知公告
var card10Fun = function () {
var card10Fun = function (ind) {
var listStr = "@ViewBag.NewsListStr";
var list = JSON.parse(listStr.replace(/&quot;/g, "\""));
var html = '<div class="inSec3Col3" id="' + $('.inSec3Row.active').attr('ind') + '_card10">'
var html = '<div class="inSec3Col3" id="' + ind + '_card10">'
+ '<div class="inSec3Box">'
+ '<div class="inSecT">'
+ '<span>通知公告</span>'
@@ -593,8 +594,8 @@
return html;
};
//智慧教育
var card11Fun = function () {
var html = '<div class="inSec3Col3" id="' + $('.inSec3Row.active').attr('ind') + '_card11">'
var card11Fun = function (ind) {
var html = '<div class="inSec3Col3" id="' + ind + '_card11">'
+ '<div class="inSec3Box">'
+ '<div class="inSecT">'
+ '<span>智慧教育</span>'
@@ -616,8 +617,8 @@
return html;
};
//专题推荐
var card12Fun = function () {
var html = '<div class="inSec3Col3" id="' + $('.inSec3Row.active').attr('ind')+'_card12">'
var card12Fun = function (ind) {
var html = '<div class="inSec3Col3" id="' + ind + '_card12">'
+'<div class="inSec3Box" >'
+'<div class="inSecT">'
+'<span>专题推荐</span>'
@@ -649,17 +650,17 @@
return html;
};
//办公业务流量
var card13Fun = function () {
var html = '<div class="inSec3Col3" id="' + $('.inSec3Row.active').attr('ind')+'_card13">'
var card13Fun = function (ind) {
var html = '<div class="inSec3Col3" id="' + ind + '_card13">'
+'<div class="inSec3Box" >'
+'<div class="inSecT">'
+'<span>办公业务流量</span>'
+'<a href="#" class="more"><span></span><span></span><span></span></a>'
+'</div>'
+'<div class="inSec3Con">'
+ '<div id="' + $('.inSec3Row.active').attr('ind')+'_serviceEchart" class="echartBox"></div>'
+'<div class="layui-input-block">'
+ '<select id="' + $('.inSec3Row.active').attr('ind') + '_zy" name="' + $('.inSec3Row.active').attr('ind') + '_zy" lay-filter="' + $('.inSec3Row.active').attr('ind')+'_zy">'
+ '<div class="inSec3Con">'
+ '<div id="' + ind + '_serviceEchart" class="echartBox"></div>'
+ '<div class="layui-input-block">'
+ '<select id="' + ind + '_zy" name="' + ind + '_zy" lay-filter="' + ind + '_zy">'
+'<option value="" selected>请选择</option>'
+'<option value="0-20">0-20</option>'
+'<option value="20-40">20-40</option>'
@@ -679,11 +680,11 @@
</script>
<script>
//专业总览
function majorEchart() {
function majorEchart(ind) {
var listStr = "@ViewBag.StuByMajorStr";
var list = JSON.parse(listStr.replace(/&quot;/g, "\""));

var myChart5 = echarts.init($('.inSec3RowBox').find('#' + $('.inSec3Row.active').attr('ind')+'_major')[0]);
var myChart5 = echarts.init($('.inSec3RowBox').find('#' + ind + '_major')[0]);

option = {
tooltip: {
@@ -744,9 +745,9 @@
});
}
//办公业务流量
function serviceEchart() {
function serviceEchart(ind) {
// 基于准备好的dom,初始化echarts实例
var myChart2 = echarts.init($('.inSec3RowBox').find('#' + $('.inSec3Row.active').attr('ind') + '_serviceEchart')[0]);
var myChart2 = echarts.init($('.inSec3RowBox').find('#' + ind + '_serviceEchart')[0]);

option = {
tooltip: {
@@ -798,9 +799,15 @@
});
}
</script>

<style>
.desktopSetBox b {
font-weight: normal;
}
</style>
<!-- / warpper -->
<div class="warpper">
<input type="hidden" name="ModelCode" value="one" id="ModelCode" />
<input type="hidden" name="UserId" value="@ViewBag.UserId" id="UserId" />
<!-- search -->
<div class="search">
<div class="searchL">
@@ -1307,7 +1314,7 @@
<div class="inSec3HeadLine"></div>*@
@foreach (SSO_Drag_DesktopManageEntity desktopItem in ViewBag.DesktopList)
{
<div class="inSec3HeadTab @(desktopItem.DesktopCode =="teacherDesktop"?"active":"")" ind="@desktopItem.DesktopCode" attr-Id="@desktopItem.Id">
<div class="inSec3HeadTab @(desktopItem.DesktopCode =="teacherDesktop"?"active":"") @(desktopItem.DefaultFlag!="1"?"newlyBuild":"")" ind="@desktopItem.DesktopCode" desktopId="@desktopItem.Id">
<div class="inSec3HeadTabTxt">@desktopItem.DesktopName</div>
</div>
<div class="inSec3HeadLine"></div>
@@ -1339,69 +1346,69 @@
{
case "card1":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card1Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card1Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card2":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card2Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card2Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card3":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card3Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card3Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card4":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card4Fun());
majorEchart();
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card4Fun("@desktopItem.DesktopCode"));
majorEchart("@desktopItem.DesktopCode");
</script>
break;
case "card5":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card5Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card5Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card6":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card6Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card6Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card7":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card7Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card7Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card8":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card8Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card8Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card9":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card9Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card9Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card10":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card10Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card10Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card11":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card11Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card11Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card12":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card12Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card12Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card13":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card13Fun());
serviceEchart();
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card13Fun("@desktopItem.DesktopCode"));
serviceEchart("@desktopItem.DesktopCode");
</script>
break;
default:
@@ -1416,69 +1423,69 @@
{
case "card1":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card1Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card1Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card2":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card2Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card2Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card3":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card3Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card3Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card4":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card4Fun());
majorEchart();
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card4Fun("@desktopItem.DesktopCode"));
majorEchart("@desktopItem.DesktopCode");
</script>
break;
case "card5":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card5Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card5Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card6":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card6Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card6Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card7":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card7Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card7Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card8":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card8Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card8Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card9":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card9Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card9Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card10":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card10Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card10Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card11":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card11Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card11Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card12":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card12Fun());
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card12Fun("@desktopItem.DesktopCode"));
</script>
break;
case "card13":
<script>
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card13Fun());
serviceEchart();
$('.inSec3RowBox').find('.inSec3Row[ind="@desktopItem.DesktopCode"]').append(card13Fun("@desktopItem.DesktopCode"));
serviceEchart("@desktopItem.DesktopCode");
</script>
break;
default:
@@ -1505,15 +1512,17 @@
<div class="deskSetT">桌面设置</div>
<div class="deskSetInfo">共 <span>0</span>/<span>3</span> 个自建桌面</div>
<div class="deskSetList">
<div class="deskSetLi" ind="0">
<div class="deskSetLi" ind="0" defaultFlag="1" desktopId="">
<i class="fa fa-navicon"></i>
<div class="deskName">
<div class="deskNameTxt">教师桌面<span>(默认桌面)</span></div>
@*span需要判断*@
<div class="deskNameTxt"><b>教师桌面</b><span>(默认桌面)</span></div>
<div class="deskNameInput">
<input type="text" value="教师桌面">
<span>8/8</span>
</div>
</div>
@*小图标需要判断*@
<i class="fa fa-repeat faR"></i>
<div class="deskSetLiTips" txt="恢复成功">
<span>确认恢复默认设置?</span>
@@ -1525,10 +1534,10 @@
</div>
</div>
</div>
<div class="deskSetLi" ind="1">
<div class="deskSetLi" ind="1" defaultFlag="1" desktopId="">
<i class="fa fa-navicon"></i>
<div class="deskName">
<div class="deskNameTxt">OA桌面<span>(默认桌面)</span></div>
<div class="deskNameTxt"><b>OA桌面</b><span>(默认桌面)</span></div>
<div class="deskNameInput">
<input type="text" value="OA桌面">
<span>8/8</span>
@@ -1549,7 +1558,7 @@
<div class="deskSetLi deskSetLiNew">
<i class="fa fa-file-text-o"></i>
<div class="deskName">
<div class="deskNameTxt">新建桌面</div>
<div class="deskNameTxt"><b>新建桌面</b></div>
<div class="deskNameInput">
<input type="text" value="新建桌面">
<span>8/8</span>
@@ -1647,13 +1656,12 @@
//删除
$(this).removeClass('fa-minus').addClass('fa-plus');
var id = '#' + $('.inSec3Row.active').attr('ind') + '_' + $(this).parent().attr('id');
// console.log($('.inSec3Row').find(id))
$('.inSec3Row.active').find(id).remove();
layer.msg('删除成功!');
if ($('.inSec3Row.active > div').length == 0) {
$('.inSec3Row.active').html(noCard);
}
serializes()
serializes();
}).on('click', '.fa-plus', function () {
var noHtmls = $('.inSec3Row.active #noHtml');
if (noHtmls.length) {
@@ -1674,34 +1682,35 @@
// '</div>';
//点击卡片,增加不同的卡片块
var cardId = $(this).parent().attr('id');
var ind = $('.inSec3Row.active').attr('ind');
var html = '';
switch (cardId) {
case 'card1':
html = card1Fun(); break;
html = card1Fun(ind); break;
case 'card2':
html = card2Fun(); break;
html = card2Fun(ind); break;
case 'card3':
html = card3Fun(); break;
html = card3Fun(ind); break;
case 'card4':
html = card4Fun(); break;
html = card4Fun(ind); break;
case 'card5':
html = card5Fun(); break;
html = card5Fun(ind); break;
case 'card6':
html = card6Fun(); break;
html = card6Fun(ind); break;
case 'card7':
html = card7Fun(); break;
html = card7Fun(ind); break;
case 'card8':
html = card8Fun(); break;
html = card8Fun(ind); break;
case 'card9':
html = card9Fun(); break;
html = card9Fun(ind); break;
case 'card10':
html = card10Fun(); break;
html = card10Fun(ind); break;
case 'card11':
html = card11Fun(); break;
html = card11Fun(ind); break;
case 'card12':
html = card12Fun(); break;
html = card12Fun(ind); break;
case 'card13':
html = card13Fun(); break;
html = card13Fun(ind); break;
default:
html = ''; break;
}
@@ -1711,9 +1720,9 @@
serializes();
//初始化echart图表
if (cardId == "card4") {
majorEchart();
majorEchart(ind);
} else if (cardId == "card13") {
serviceEchart();
serviceEchart(ind);
}
})
// 拖拽 排序


+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageBLL.cs Parādīt failu

@@ -142,6 +142,27 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}

/// <summary>
/// 保存卡片块排序
/// </summary>
public void SaveCardSort(string userId, string modelCode, string desktopId, string cardSort)
{
try
{
sSO_Drag_CardSortManageService.SaveCardSort(userId, modelCode, desktopId, cardSort);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 6
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageIBLL.cs Parādīt failu

@@ -20,7 +20,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<SSO_Drag_CardSortManageEntity> GetList( string queryJson );
IEnumerable<SSO_Drag_CardSortManageEntity> GetList(string queryJson);
/// <summary>
/// 获取列表分页数据
/// </summary>
@@ -49,6 +49,11 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, SSO_Drag_CardSortManageEntity entity);

/// <summary>
/// 保存卡片块排序
/// </summary>
void SaveCardSort(string userId, string modelCode, string desktopId, string cardSort);
#endregion

}


+ 30
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageService.cs Parādīt failu

@@ -25,7 +25,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// </summary>
public SSO_Drag_CardSortManageService()
{
fieldSql=@"
fieldSql = @"
t.Id,
t.UserId,
t.ModelCode,
@@ -42,7 +42,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// </summary>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<SSO_Drag_CardSortManageEntity> GetList( string queryJson )
public IEnumerable<SSO_Drag_CardSortManageEntity> GetList(string queryJson)
{
try
{
@@ -135,7 +135,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
{
try
{
this.BaseRepository().Delete<SSO_Drag_CardSortManageEntity>(t=>t.Id == keyValue);
this.BaseRepository().Delete<SSO_Drag_CardSortManageEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
@@ -183,6 +183,33 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}

/// <summary>
/// 保存卡片块排序
/// </summary>
public void SaveCardSort(string userId, string modelCode, string desktopId, string cardSort)
{
try
{
var model = this.BaseRepository().FindEntity<SSO_Drag_CardSortManageEntity>(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

}


+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageEntity.cs Parādīt failu

@@ -50,6 +50,18 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// <returns></returns>
[Column("SORT")]
public string Sort { get; set; }
/// <summary>
/// 默认标识:1为默认桌面,0为自建桌面
/// </summary>
/// <returns></returns>
[Column("DEFAULTFLAG")]
public string DefaultFlag { get; set; }
/// <summary>
/// 默认名称
/// </summary>
/// <returns></returns>
[Column("DEFAULTNAME")]
public string DefaultName { get; set; }
#endregion

#region 扩展操作


+ 6
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_DesktopManage/SSO_Drag_DesktopManageService.cs Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt