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 66d87b5e4..ba7ca308d 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
@@ -4,7 +4,6 @@ $(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');
@@ -24,33 +23,75 @@ $(document).ready(function () {
} else {
var txt = $(this).parent().attr('txt');
parents.removeClass('active');
- //if(ind > 1){
+ var desktopId = parents.attr('desktopId');
var defaultFlag = parents.attr('defaultFlag');
if (defaultFlag != 1) {
var ind = parents.attr('ind');
- var desktopId = parents.attr('desktopId');
desktopDel(ind, desktopId);
} else {
- //todo:ajax默认桌面的恢复操作
+ //ajax默认桌面的恢复操作
+ if (desktopId != "" && desktopId != undefined) {
+ $.ajax({
+ url: "/SSOSystem/RestoreDefaultDesktop",
+ headers: { __RequestVerificationToken: $.lrToken },
+ data: { desktopId: desktopId },
+ type: "post",
+ dataType: "json",
+ success: function (res) {
+ if (res.code == 200) {
+ layer.msg('恢复成功!');
+ //操作成功后执行的代码开始
+ location.reload();
+ //操作成功后执行的代码结束
+ }
+ else if (res.code == 400) {
+ layer.msg(res.info);
+ }
+ else if (res.code == 500) {
+ layer.msg('服务端异常,请联系管理员');
+ }
+ }
+ });
+ }
}
- //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 parents = $(this).parents('.deskSetLi');
+ var ind = parents.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);
+ //ajax桌面的修改名称操作
+ var desktopId = parents.attr('desktopId');
+ if (desktopId != "" && desktopId != undefined) {
+ $.ajax({
+ url: "/SSOSystem/ModifyDesktop",
+ headers: { __RequestVerificationToken: $.lrToken },
+ data: { desktopId: desktopId, desktopName: txt },
+ type: "post",
+ dataType: "json",
+ success: function (res) {
+ if (res.code == 200) {
+ layer.msg('桌面名称修改成功!');
+ //操作成功后执行的代码开始
+ parents.find('.deskNameInput').removeClass('active').siblings('.deskNameTxt').find('b').html(txt);
+ $('.inSec3HeadTab[ind="' + ind + '"] .inSec3HeadTabTxt').html(txt);
+ //操作成功后执行的代码结束
+ }
+ else if (res.code == 400) {
+ layer.msg(res.info);
+ }
+ else if (res.code == 500) {
+ layer.msg('服务端异常,请联系管理员');
+ }
+ }
+ });
+ }
}).on('input', '.deskNameInput input', function () { //监听桌面名称表单input事件
var txt = $(this).val();
var len = txt.length;
@@ -139,75 +180,117 @@ $(window).load(function () {
//新建桌面
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');
+ //ajax自建桌面新增操作,操作成功后执行下面代码,需要返回Id值并绑定到htmlT的desktopId中;
+ var modelCode = $('#ModelCode').val();
+ var userId = $('#UserId').val();
+ if (userId != "" && userId != undefined && modelCode != "" && modelCode != undefined && name != "" && name != undefined && ind != "" && ind != undefined) {
+ $.ajax({
+ url: "/SSOSystem/AddDesktop",
+ headers: { __RequestVerificationToken: $.lrToken },
+ data: { userId: userId, modelCode: modelCode, desktopName: name, desktopCode: ind },
+ type: "post",
+ dataType: "json",
+ success: function (res) {
+ if (res.code == 200) {
+ layer.msg('添加桌面成功!');
+ if (res.data != null) {
+ //操作成功后执行代码开始
+ 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');
+ }
+ //操作成功后执行代码结束
+ }
+ }
+ else if (res.code == 400) {
+ layer.msg(res.info);
+ }
+ else if (res.code == 500) {
+ layer.msg('服务端异常,请联系管理员');
+ }
+ }
+ });
}
- //todo:操作成功后执行代码结束
+
}
//删除桌面
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();
+ //ajax自建桌面的删除操作
+ if (desktopId != "" && desktopId != undefined) {
+ $.ajax({
+ url: "/SSOSystem/DeleteDesktop",
+ headers: { __RequestVerificationToken: $.lrToken },
+ data: { desktopId: desktopId },
+ type: "post",
+ dataType: "json",
+ success: function (res) {
+ if (res.code == 200) {
+ layer.msg('删除该桌面成功!');
+ //操作成功后执行代码开始
+ $('.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();
+ }
+ deskNum();
+ $('.inSec3HeadAdd').css('display', 'inline-block').next().css('display', 'inline-block');
+ $('.deskSetLiNew').css('display', 'block');
+ //操作成功后执行代码结束
+ }
+ else if (res.code == 400) {
+ layer.msg(res.info);
+ }
+ else if (res.code == 500) {
+ layer.msg('服务端异常,请联系管理员');
+ }
+ }
+ });
}
- //inSec3TabArr.push(ind);
- deskNum();
- $('.inSec3HeadAdd').css('display', 'inline-block').next().css('display', 'inline-block');
- $('.deskSetLiNew').css('display', 'block');
- //todo:操作成功后执行代码结束
+
}
//初始化桌面设置
function deskNum() {
- //console.log($('.newlyBuild').length);
$('.deskSetInfo span').eq(0).html($('.newlyBuild').length);
}
//获取随机数
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index2.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index2.js
index 6e0a1a01d..2ef5cf17c 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index2.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index2.js
@@ -7,7 +7,7 @@ layui.use('form', function() {
// form.render()
//监听select选择 专业总览
form.on('select', function(data) {
- console.log(data);
+ //console.log(data);
});
});
$(window).load(function() {
@@ -15,7 +15,12 @@ $(window).load(function() {
resizes()
setTimeout(function() {
resizes()
- }, 0)
+ }, 0)
+ //导航栏
+ $(".headModeList li").eq(0).removeClass("active");
+ $(".headModeList li").eq(1).addClass("active");
+ $(".headModeList li").eq(2).removeClass("active");
+ $(".headModeTxt").find('span').html($(".headModeList li").eq(1).find('a').html());
//右侧菜单显示隐藏
$('.index_sec2').on('click', '.inSecLeftCon', function() {
@@ -51,9 +56,9 @@ $(window).load(function() {
//办公业务流量
- serviceEchart()
+ //serviceEchart()
//专业总览
- majorEchart()
+ //majorEchart()
}).resize(function() {
resizes()
})
@@ -65,158 +70,158 @@ function resizes() {
//专业总览
-function majorEchart() {
- var myChart5 = echarts.init(document.getElementById('major'));
-
- option = {
- tooltip: {
- trigger: 'item',
- formatter: '{b} : {c}'
- },
- series: [{
- name: '专业学生',
- type: 'pie',
- radius: [60, 75],
- center: ['50%', '50%'],
- label: {
- // show: true
- show: false
- },
- color: ['#6C5CEA', '#57C5F5', '#E7C900', '#FF9C95', '#59D078', '#C97FEF', '#ECBD02', '#DF59B8', '#F6685E',
- '#00E7B9', '#7A74F1', '#4A9ADE', '#33F0E5', '#ECBD02', '#DF59B8'
- ],
- // hoverAnimation: false,
- data: [{
- value: 10,
- name: '物理',
- },
- {
- value: 5,
- name: '数学',
- },
- {
- value: 15,
- name: '化学',
- },
- {
- value: 15,
- name: '历史',
- },
- {
- value: 5,
- name: '医学',
- },
- {
- value: 15,
- name: '计算机',
- },
- {
- value: 15,
- name: '矿业',
- }
- ]
- }, {
- name: '班级总数',
- type: 'pie',
- radius: [50, 65],
- center: ['17%', '50%'],
- label: {
- // show: true
- show: false
- },
- color: ['#59D078', '#57C5F5', '#E7C900'],
- // hoverAnimation: false,
- data: [{
- value: 10,
- name: '班级总数',
- }]
- }, {
- name: '专业教室',
- type: 'pie',
- radius: [50, 65],
- center: ['83%', '50%'],
- label: {
- // show: true
- show: false
- },
- color: ['#3E49E2', '#677BF5', '#67A0F5', '#E7C900'],
- // hoverAnimation: false,
- data: [{
- value: 10,
- name: '教室1',
- }, {
- value: 5,
- name: '教室2',
- }, {
- value: 20,
- name: '教室3',
- }, {
- value: 30,
- name: '教室4',
- }]
- }, ]
- };
-
- // 使用刚指定的配置项和数据显示图表。
- myChart5.setOption(option);
- window.addEventListener("resize", function() {
- myChart5.resize();
- });
-}
+//function majorEchart() {
+// var myChart5 = echarts.init(document.getElementById('major'));
+
+// option = {
+// tooltip: {
+// trigger: 'item',
+// formatter: '{b} : {c}'
+// },
+// series: [{
+// name: '专业学生',
+// type: 'pie',
+// radius: [60, 75],
+// center: ['50%', '50%'],
+// label: {
+// // show: true
+// show: false
+// },
+// color: ['#6C5CEA', '#57C5F5', '#E7C900', '#FF9C95', '#59D078', '#C97FEF', '#ECBD02', '#DF59B8', '#F6685E',
+// '#00E7B9', '#7A74F1', '#4A9ADE', '#33F0E5', '#ECBD02', '#DF59B8'
+// ],
+// // hoverAnimation: false,
+// data: [{
+// value: 10,
+// name: '物理',
+// },
+// {
+// value: 5,
+// name: '数学',
+// },
+// {
+// value: 15,
+// name: '化学',
+// },
+// {
+// value: 15,
+// name: '历史',
+// },
+// {
+// value: 5,
+// name: '医学',
+// },
+// {
+// value: 15,
+// name: '计算机',
+// },
+// {
+// value: 15,
+// name: '矿业',
+// }
+// ]
+// }, {
+// name: '班级总数',
+// type: 'pie',
+// radius: [50, 65],
+// center: ['17%', '50%'],
+// label: {
+// // show: true
+// show: false
+// },
+// color: ['#59D078', '#57C5F5', '#E7C900'],
+// // hoverAnimation: false,
+// data: [{
+// value: 10,
+// name: '班级总数',
+// }]
+// }, {
+// name: '专业教室',
+// type: 'pie',
+// radius: [50, 65],
+// center: ['83%', '50%'],
+// label: {
+// // show: true
+// show: false
+// },
+// color: ['#3E49E2', '#677BF5', '#67A0F5', '#E7C900'],
+// // hoverAnimation: false,
+// data: [{
+// value: 10,
+// name: '教室1',
+// }, {
+// value: 5,
+// name: '教室2',
+// }, {
+// value: 20,
+// name: '教室3',
+// }, {
+// value: 30,
+// name: '教室4',
+// }]
+// }, ]
+// };
+
+// // 使用刚指定的配置项和数据显示图表。
+// myChart5.setOption(option);
+// window.addEventListener("resize", function() {
+// myChart5.resize();
+// });
+//}
//办公业务流量
-function serviceEchart() {
- // 基于准备好的dom,初始化echarts实例
- myChart2 = echarts.init(document.getElementById('serviceEchart'));
-
- option = {
- tooltip: {
- trigger: 'axis'
- },
- color: ['#CB0005', '#EF9116', '#466AD2', '#7408A6', '#0CB5C4', '#DEBC03', '#0BB56C', '#CB1FA1'],
- legend: {
- data: ['语文'],
- icon: "circle",
- itemWidth: 7,
- right: '40px',
- top: '20px'
- },
- grid: {
- left: '3%',
- right: '3%',
- bottom: '3%',
- top: '23%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- name: '星期',
- boundaryGap: false,
- data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
- formatter: function(params) {
- console.log(params)
- // return params[0].name + ' : ' + params[0].value + ' 小时';
- },
- },
- yAxis: {
- type: 'value',
- name: '办公量',
- },
- series: [{
- name: '办公量',
- type: 'line',
- stack: '总量',
- // lineStyle: {
- // color: '#000'
- // },
- data: [120, 132, 101, 134, 90, 230, 210]
- }]
- };
-
- // 使用刚指定的配置项和数据显示图表。
- myChart2.setOption(option);
- window.addEventListener("resize", function() {
- myChart2.resize();
- });
-}
+//function serviceEchart() {
+// // 基于准备好的dom,初始化echarts实例
+// myChart2 = echarts.init(document.getElementById('serviceEchart'));
+
+// option = {
+// tooltip: {
+// trigger: 'axis'
+// },
+// color: ['#CB0005', '#EF9116', '#466AD2', '#7408A6', '#0CB5C4', '#DEBC03', '#0BB56C', '#CB1FA1'],
+// legend: {
+// data: ['语文'],
+// icon: "circle",
+// itemWidth: 7,
+// right: '40px',
+// top: '20px'
+// },
+// grid: {
+// left: '3%',
+// right: '3%',
+// bottom: '3%',
+// top: '23%',
+// containLabel: true
+// },
+// xAxis: {
+// type: 'category',
+// name: '星期',
+// boundaryGap: false,
+// data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
+// formatter: function(params) {
+// console.log(params)
+// // return params[0].name + ' : ' + params[0].value + ' 小时';
+// },
+// },
+// yAxis: {
+// type: 'value',
+// name: '办公量',
+// },
+// series: [{
+// name: '办公量',
+// type: 'line',
+// stack: '总量',
+// // lineStyle: {
+// // color: '#000'
+// // },
+// data: [120, 132, 101, 134, 90, 230, 210]
+// }]
+// };
+
+// // 使用刚指定的配置项和数据显示图表。
+// myChart2.setOption(option);
+// window.addEventListener("resize", function() {
+// myChart2.resize();
+// });
+//}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index3.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index3.js
index bae8f9714..6fa746153 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index3.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index3.js
@@ -1,4 +1,10 @@
-$(window).load(function() {
+$(window).load(function () {
+ //导航栏
+ $(".headModeList li").eq(0).removeClass("active");
+ $(".headModeList li").eq(1).removeClass("active");
+ $(".headModeList li").eq(2).addClass("active");
+ $(".headModeTxt").find('span').html($(".headModeList li").eq(2).find('a').html());
+
//学生到课率预警
var toClassNum = 43;
var toClassBl = $('.toClassBl')
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 c67029bb0..ef8701c16 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs
@@ -881,7 +881,7 @@ namespace Learun.Application.Web.Controllers
//桌面管理表、卡片块排序管理表增加默认数据
sSO_Drag_DesktopManageIBLL.AddDefaultData(userInfo.userId, "one");
//获取桌面、卡片块排序列表
- ViewBag.DesktopList = sSO_Drag_DesktopManageIBLL.GetListByModelCode(userInfo.userId, "one").OrderByDescending(x=>x.DefaultFlag).ThenBy(x => x.Sort);
+ ViewBag.DesktopList = sSO_Drag_DesktopManageIBLL.GetListByModelCode(userInfo.userId, "one").OrderByDescending(x => x.DefaultFlag).ThenBy(x => x.Sort).ThenBy(x => x.CreateDate);
ViewBag.DesktopListStr = JsonConvert.SerializeObject(ViewBag.DesktopList);
//分页查询条件设置
Pagination paginationobj = new Pagination() { rows = 5, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" };
@@ -1033,6 +1033,167 @@ namespace Learun.Application.Web.Controllers
///
public ActionResult DragModelTwo()
{
+ //判断登录状态码
+ 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();
+ ViewBag.UserId = userInfo.userId;
+ //桌面管理表、卡片块排序管理表增加默认数据
+ sSO_Drag_DesktopManageIBLL.AddDefaultData(userInfo.userId, "two");
+ //获取桌面、卡片块排序列表
+ ViewBag.DesktopList = sSO_Drag_DesktopManageIBLL.GetListByModelCode(userInfo.userId, "two").OrderByDescending(x => x.DefaultFlag).ThenBy(x => x.Sort).ThenBy(x => x.CreateDate);
+ ViewBag.DesktopListStr = JsonConvert.SerializeObject(ViewBag.DesktopList);
+ //分页查询条件设置
+ Pagination paginationobj = new Pagination() { rows = 5, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" };
+ //邮件-收件箱
+ var maildata = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userInfo.userId + "\"}");
+ var maildataAll = sYS_ReceiveMessageIBLL.GetList("{\"userId\":\"" + userInfo.userId + "\"}");
+ ViewBag.LanMail = maildata;
+ ViewBag.LanMailStr = JsonConvert.SerializeObject(ViewBag.LanMail);
+ ViewBag.LanMailUnReadCount = maildataAll.Count(m => m.READFLAG == 0);
+ //邮件-已发送
+ paginationobj.sidx = "SENDTIME desc";
+ var mailsenddata = sYS_SendMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userInfo.userId + "\"}");
+ var mailsenddataAll = sYS_SendMessageIBLL.GetList2("{\"userId\":\"" + userInfo.userId + "\"}");
+ ViewBag.LanMailSend = mailsenddata;
+ ViewBag.LanMailSendStr = JsonConvert.SerializeObject(ViewBag.LanMailSend);
+ //来往邮件数量
+ ViewBag.LanMailTotalNum = maildataAll.Count() + mailsenddataAll.Count();
+ //公文
+ paginationobj.sidx = "SendTime";
+ ViewBag.ReceiveFileList = sys_ReceiveFileIBLL.GetPageList(paginationobj, "{\"ReceiverId\":\"" + userInfo.userId + "\"}");
+ ViewBag.ReceiveFileListStr = JsonConvert.SerializeObject(ViewBag.ReceiveFileList);
+ //公告
+ List outnewslist = new List();
+ var newsList = newsIBLL.GetList("", userInfo.userId);
+ foreach (var newsitemEntity in newsList)
+ {
+ if (!string.IsNullOrEmpty(newsitemEntity.F_SendPostId))
+ {
+ if (!string.IsNullOrEmpty(userInfo.postIds))
+ {
+ if (userInfo.postIds.Contains(","))
+ {
+ foreach (var postid in userInfo.postIds.Split(','))
+ {
+ if (newsitemEntity.F_SendPostId.Contains(postid))
+ {
+ outnewslist.Add(newsitemEntity);
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (newsitemEntity.F_SendPostId.Contains(userInfo.postIds))
+ {
+ outnewslist.Add(newsitemEntity);
+ }
+ }
+ }
+ }
+ else
+ {
+ if (!string.IsNullOrEmpty(newsitemEntity.F_SendDeptId))
+ {
+ if (newsitemEntity.F_SendDeptId.Contains(userInfo.departmentId))
+ {
+ outnewslist.Add(newsitemEntity);
+ }
+ }
+ else
+ {
+ outnewslist.Add(newsitemEntity);
+ }
+ }
+ }
+ ViewBag.NewsList = outnewslist.Take(5);
+ ViewBag.NewsListStr = JsonConvert.SerializeObject(ViewBag.NewsList);
+ //办公事项-待办任务
+ paginationobj.sidx = "F_CreateDate";
+ paginationobj.rows = 4;
+ var taskListAll = nWFProcessIBLL.GetMyTaskPageList(userInfo, "{}");
+ ViewBag.TaskList = nWFProcessIBLL.GetMyTaskPageList(userInfo, paginationobj, "{}");
+ ViewBag.TaskListStr = JsonConvert.SerializeObject(ViewBag.TaskList);
+ ViewBag.TaskTotalNum = taskListAll.Count();
+ //办公事项-已办任务
+ var finishTaskListAll = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, "{}");
+ ViewBag.FinishTaskList = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, paginationobj, "{}");
+ ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ViewBag.FinishTaskList);
+ ViewBag.FinishTaskTotalNum = finishTaskListAll.Count();
+ //办公事项-我发起的
+ var myListAll = nWFProcessIBLL.GetMyPageList(userInfo.userId, "{}");
+ ViewBag.MyList = nWFProcessIBLL.GetMyPageList(userInfo.userId, paginationobj, "{}");
+ ViewBag.MyListStr = JsonConvert.SerializeObject(ViewBag.MyList);
+ ViewBag.MyListTotalNum = myListAll.Count();
+ //常用服务
+ List modulelist = new List();
+ List offenused = LogBLL.GetGroupLog(userInfo.userId).Select(m => m.F_Module).Take(20).ToList();
+ var moduledata = moduleIBLL.GetModuleList().Where(m => m.F_EnabledMark == 1 && m.F_DeleteMark == 0 && !string.IsNullOrEmpty(m.F_UrlAddress));
+ foreach (var oitem in offenused)
+ {
+ ModuleEntity fod = moduledata.FirstOrDefault(m => m.F_FullName == oitem);
+ if (fod != null)
+ {
+ modulelist.Add(fod);
+ }
+ }
+ ViewBag.OffenusedJiao = modulelist.Where(x => x.F_FullName.Contains("教"));
+ ViewBag.OffenusedGuan = modulelist.Where(x => x.F_FullName.Contains("管理"));
+ ViewBag.Offenused = modulelist.Except(modulelist.Where(x => x.F_FullName.Contains("教") || x.F_FullName.Contains("管理"))).Take(6);
+ ViewBag.OffenusedJiaoStr = JsonConvert.SerializeObject(ViewBag.OffenusedJiao);
+ ViewBag.OffenusedGuanStr = JsonConvert.SerializeObject(ViewBag.OffenusedGuan);
+ ViewBag.OffenusedStr = JsonConvert.SerializeObject(ViewBag.Offenused);
+ //校园总览
+ //专业
+ var majorData = cdMajorIBLL.GetAllList();
+ ViewBag.MajorTotalNum = majorData.Count();
+ //班级
+ var classInfoData = classInfoIBLL.GetAllClass();
+ ViewBag.ClassInfoTotalNum = classInfoData.Count();
+ //学生
+ var stuInfoData = stuInfoBasicIBLL.GetAllList();
+ ViewBag.StuInfoTotalNum = stuInfoData.Count();
+ //教师
+ var teacherData = empInfoIBLL.GetAllList();
+ ViewBag.TeacherTotalNum = teacherData.Count();
+ //教室
+ var classRoomData = classroomInfoIBLL.GetAllList();
+ ViewBag.ClassRoomTotalNum = classRoomData.Count();
+ //专业总览
+ //专业学生
+ var stuByMajor = stuInfoData.GroupBy(x => x.MajorNo).Select(x => new
+ {
+ value = x.Select(y => y.StuId).Count(),
+ name = cdMajorIBLL.GetCdMajorEntityByMajorNo(x.Key)?.MajorName
+ });
+ ViewBag.StuByMajorStr = JsonConvert.SerializeObject(stuByMajor);
+ //流程
+ var flowType = dataItemIBLL.GetDetailList("FlowSort", "");
+ var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
+ var allCount = 0;
+ foreach (var flow in flowType)
+ {
+ var count = flowList.Count(a => a.F_Category == flow.F_ItemName);
+ flow.FlowCount = count;
+ allCount += count;
+
+ }
+ ViewBag.AllCount = allCount;
+ ViewBag.FlowType = flowType;
+ ViewBag.FlowList = JsonConvert.SerializeObject(flowList);
+
+
return View();
}
///
@@ -1041,6 +1202,60 @@ namespace Learun.Application.Web.Controllers
///
public ActionResult DragModelThree()
{
+ //判断登录状态码
+ 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();
+ ViewBag.UserId = userInfo.userId;
+ //校园总览
+ //专业
+ var majorData = cdMajorIBLL.GetAllList();
+ ViewBag.MajorTotalNum = majorData.Count();
+ //班级
+ var classInfoData = classInfoIBLL.GetAllClass();
+ ViewBag.ClassInfoTotalNum = classInfoData.Count();
+ //学生
+ var stuInfoData = stuInfoBasicIBLL.GetAllList();
+ ViewBag.StuInfoTotalNum = stuInfoData.Count();
+ //教师
+ var teacherData = empInfoIBLL.GetAllList();
+ ViewBag.TeacherTotalNum = teacherData.Count();
+ //教室
+ var classRoomData = classroomInfoIBLL.GetAllList();
+ ViewBag.ClassRoomTotalNum = classRoomData.Count();
+ //专业总览
+ //专业学生
+ var stuByMajor = stuInfoData.GroupBy(x => x.MajorNo).Select(x => new
+ {
+ value = x.Select(y => y.StuId).Count(),
+ name = cdMajorIBLL.GetCdMajorEntityByMajorNo(x.Key)?.MajorName
+ });
+ ViewBag.StuByMajorStr = JsonConvert.SerializeObject(stuByMajor);
+ //流程
+ var flowType = dataItemIBLL.GetDetailList("FlowSort", "");
+ var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
+ var allCount = 0;
+ foreach (var flow in flowType)
+ {
+ var count = flowList.Count(a => a.F_Category == flow.F_ItemName);
+ flow.FlowCount = count;
+ allCount += count;
+
+ }
+ ViewBag.AllCount = allCount;
+ ViewBag.FlowType = flowType;
+ ViewBag.FlowList = JsonConvert.SerializeObject(flowList);
+
return View();
}
///
@@ -1053,5 +1268,50 @@ namespace Learun.Application.Web.Controllers
return Success("操作成功");
}
+ ///
+ /// 网上办事大厅拖拽版-新增桌面
+ ///
+ ///
+ public ActionResult AddDesktop(string userId, string modelCode, string desktopName, string desktopCode)
+ {
+ sSO_Drag_DesktopManageIBLL.AddDesktop(userId, modelCode, desktopName, desktopCode);
+ var data = sSO_Drag_DesktopManageIBLL.GetEntityByDesktopCode(userId, modelCode, desktopCode);
+ return Success("操作成功", data);
+ }
+
+ ///
+ /// 网上办事大厅拖拽版-删除桌面
+ ///
+ ///
+ public ActionResult DeleteDesktop(string desktopId)
+ {
+ sSO_Drag_DesktopManageIBLL.DeleteEntity(desktopId);
+ return Success("操作成功");
+ }
+
+ ///
+ /// 网上办事大厅拖拽版-修改桌面
+ ///
+ ///
+ public ActionResult ModifyDesktop(string desktopId, string desktopName)
+ {
+ var entity = new SSO_Drag_DesktopManageEntity()
+ {
+ DesktopName = desktopName
+ };
+ sSO_Drag_DesktopManageIBLL.SaveEntity(desktopId, entity);
+ return Success("操作成功");
+ }
+
+ ///
+ /// 网上办事大厅拖拽版-默认桌面恢复默认设置
+ ///
+ ///
+ public ActionResult RestoreDefaultDesktop(string desktopId)
+ {
+ sSO_Drag_DesktopManageIBLL.RestoreDefaultDesktop(desktopId);
+ return Success("操作成功");
+ }
+
}
}
\ No newline at end of file
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 d1ec68e8e..e58c7590e 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
@@ -7163,6 +7163,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
index 6d6826ae7..d6b5ed65f 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
@@ -14,12 +14,7 @@
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml
new file mode 100644
index 000000000..e666fd2fd
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml
@@ -0,0 +1,1606 @@
+@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
+@using Learun.Application.TwoDevelopment.LR_Desktop
+
+
+@{
+ ViewBag.Title = "网上办事大厅拖拽版";
+ Layout = "~/Views/SSOSystem/_LayoutSSODrag.cshtml";
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
服务角色
+
+ - 全部
+ - 校领导
+ - 游客
+ - 教师
+ - 学生
+
+
+
+
+
+ A-D (1)
+
+
+
+ E-H (0)
+
+
+
+
+ I-L (0)
+
+
+
+
+ M-P (0)
+
+
+
+
+ Q-T (0)
+
+
+
+
+ U-X (0)
+
+
+
+
+ Y-Z (0)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
我的收藏
+
+
+
+
+
+
+
可用应用
+
+
+
+
+
+
+
可用卡片
+
+
+
+
+
+
+
+
+
+
我的收藏
+
+
+
+
可用应用
+
+
+
+
可用卡片
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
数据看板
+
+
+
+
+
办公事项
+
+
+
+
+
学校公文
+
+
+
+
+
专业总览
+
+
+
+
+
常用链接
+
+
+
+
+
常用服务
+
+
+
+
+
校园总览
+
+
+
+
+
宣传报道
+
+
+
+
+
办公邮件
+
+
+
+
+
通知公告
+
+
+
+
+
智慧教育
+
+
+
+
+
专题推荐
+
+
+
+
+
办公业务流量
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
网站设置
+
+
+
+
+
+
+
用户管理
+
+
+
+
+
+
+
权限分配
+
+
+
+
+
+
+
+
+ 网站设置
+
+
+ 用户管理
+
+
+ 权限分配
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
桌面设置
+
共 0/3 个自建桌面
+
+ @foreach (SSO_Drag_DesktopManageEntity item in ViewBag.DesktopList)
+ {
+
+
+
+
@item.DesktopName@(item.DefaultFlag == "1" ? "(默认桌面)" : "")
+
+
+ 8/8
+
+
+
+
+
@(item.DefaultFlag == "1" ? "确认恢复默认设置?" : "确认删除该桌面?")
+
+
+
+
+
+
+
+
+ }
+
+ @if (DesktopList.Count() < 5)
+ {
+
+
+
+
+
保存该桌面?
+
+
+
+
+
+
+
+
+ }
+
完成
+
+
+
+
+
+
+
+
+
+
+
+
建议使用360或谷歌浏览器
+
+
+
+
+
+
+
+
+
+
+
+@**@
+
+
+
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 2338f8a96..e96a4e839 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
@@ -113,6 +113,29 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
}
+
+ ///
+ /// 获取实体数据
+ ///
+ ///
+ public SSO_Drag_DesktopManageEntity GetEntityByDesktopCode(string userId, string modelCode, string desktopCode)
+ {
+ try
+ {
+ return sSO_Drag_DesktopManageService.GetEntityByDesktopCode(userId, modelCode, desktopCode);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
#endregion
#region 提交数据
@@ -189,6 +212,49 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
+ ///
+ /// 新建桌面
+ ///
+ public void AddDesktop(string userId, string modelCode, string desktopName, string desktopCode)
+ {
+ try
+ {
+ sSO_Drag_DesktopManageService.AddDesktop(userId, modelCode, desktopName, desktopCode);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 默认桌面恢复默认设置
+ ///
+ public void RestoreDefaultDesktop(string desktopId)
+ {
+ try
+ {
+ sSO_Drag_DesktopManageService.RestoreDefaultDesktop(desktopId);
+ }
+ 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 97b0d1e73..66ed51133 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
@@ -62,6 +62,12 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
///
[Column("DEFAULTNAME")]
public string DefaultName { get; set; }
+ ///
+ /// 创建时间
+ ///
+ ///
+ [Column("CREATEDATE")]
+ public DateTime? CreateDate { 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_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 5621e801f..6945e0614 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
@@ -40,6 +40,12 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// 条件参数
///
IEnumerable GetListByModelCode(string userId, string modelCode);
+
+ ///
+ /// 获取实体数据
+ ///
+ ///
+ SSO_Drag_DesktopManageEntity GetEntityByDesktopCode(string userId, string modelCode, string desktopCode);
#endregion
#region 提交数据
@@ -63,6 +69,16 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// 模式编号
///
void AddDefaultData(string userId, string modelCode);
+
+ ///
+ /// 新建桌面
+ ///
+ void AddDesktop(string userId, string modelCode, string desktopName, string desktopCode);
+
+ ///
+ /// 默认桌面恢复默认设置
+ ///
+ void RestoreDefaultDesktop(string desktopId);
#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 a4e73ec21..ca8ae6f7b 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
@@ -150,6 +150,28 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
+ ///
+ /// 获取实体数据
+ ///
+ ///
+ public SSO_Drag_DesktopManageEntity GetEntityByDesktopCode(string userId, string modelCode, string desktopCode)
+ {
+ try
+ {
+ return this.BaseRepository().FindEntity(x => x.UserId == userId && x.ModelCode == modelCode && x.DesktopCode == desktopCode);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
#endregion
#region 提交数据
@@ -160,12 +182,19 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// 主键
public void DeleteEntity(string keyValue)
{
+ var db = this.BaseRepository().BeginTrans();
try
{
- this.BaseRepository().Delete(t => t.Id == keyValue);
+ //this.BaseRepository().Delete(t => t.Id == keyValue);
+ //删除卡片块排序
+ db.Delete(x => x.DesktopId == keyValue);
+ //删除桌面
+ db.Delete(x => x.Id == keyValue);
+ db.Commit();
}
catch (Exception ex)
{
+ db.Rollback();
if (ex is ExceptionEx)
{
throw;
@@ -221,11 +250,14 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
var db = this.BaseRepository().BeginTrans();
try
{
+ var now = DateTime.Now;
//判断用户是否存在默认数据:不存在则增加;
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办公桌面()、
+ //默认数据为:教师桌面(模式一卡片块排序为:card1,card2,card3,card4,card5,card6,card7,card8,card9,card10,card11,card12,card13;模式二的卡片块排序为:card2,card3,card4,card5,card6,card7,card8,card9,card10,card11,card12,card13)、OA办公桌面()、
+ var cardSortInOne = "card1,card2,card3,card4,card5,card6,card7,card8,card9,card10,card11,card12,card13";
+ var cardSortInTwo = "card2,card3,card4,card5,card6,card7,card8,card9,card10,card11,card12,card13";
var desktopModel1 = new SSO_Drag_DesktopManageEntity()
{
UserId = userId,
@@ -233,8 +265,9 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
DesktopName = "教师桌面",
DesktopCode = "teacherDesktop",
Sort = "0",
- DefaultFlag="1",
- DefaultName="教师桌面"
+ DefaultFlag = "1",
+ DefaultName = "教师桌面",
+ CreateDate = now
};
desktopModel1.Create();
db.Insert(desktopModel1);
@@ -246,7 +279,8 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
DesktopCode = "workDesktop",
Sort = "1",
DefaultFlag = "1",
- DefaultName = "OA办公桌面"
+ DefaultName = "OA办公桌面",
+ CreateDate = now
};
desktopModel2.Create();
db.Insert(desktopModel2);
@@ -255,7 +289,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
UserId = userId,
ModelCode = modelCode,
DesktopId = desktopModel1.Id,
- CardSort = "card1,card2,card3,card4,card5,card6,card7,card8,card9,card10,card11,card12,card13"
+ CardSort = modelCode == "one" ? cardSortInOne : cardSortInTwo
};
cardSortModel1.Create();
db.Insert(cardSortModel1);
@@ -288,6 +322,104 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
+
+ ///
+ /// 新建桌面
+ ///
+ public void AddDesktop(string userId, string modelCode, string desktopName, string desktopCode)
+ {
+ var db = this.BaseRepository().BeginTrans();
+ try
+ {
+ //增加桌面数据
+ var desktopModel = new SSO_Drag_DesktopManageEntity()
+ {
+ UserId = userId,
+ ModelCode = modelCode,
+ DesktopName = desktopName,
+ DesktopCode = desktopCode,
+ Sort = "2",
+ DefaultFlag = "0",
+ CreateDate = DateTime.Now
+ };
+ desktopModel.Create();
+ db.Insert(desktopModel);
+ //增加卡片块排序数据
+ var cardModel = new SSO_Drag_CardSortManageEntity()
+ {
+ UserId = userId,
+ ModelCode = modelCode,
+ DesktopId = desktopModel.Id,
+ CardSort = ""
+ };
+ cardModel.Create();
+ db.Insert(cardModel);
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 默认桌面恢复默认设置
+ ///
+ public void RestoreDefaultDesktop(string desktopId)
+ {
+ var db = this.BaseRepository().BeginTrans();
+ try
+ {
+ //桌面
+ var desktopEntity = db.FindEntity(x => x.Id == desktopId);
+ if (desktopEntity != null && desktopEntity.DefaultFlag == "1")
+ {
+ desktopEntity.DesktopName = desktopEntity.DefaultName;
+ db.Update(desktopEntity);
+ //卡片块排序
+ var cardEntity = db.FindEntity(x => x.DesktopId == desktopEntity.Id);
+ if (cardEntity != null)
+ {
+ if (desktopEntity.DesktopCode == "teacherDesktop")
+ {
+ var cardSortInOne = "card1,card2,card3,card4,card5,card6,card7,card8,card9,card10,card11,card12,card13";
+ var cardSortInTwo = "card2,card3,card4,card5,card6,card7,card8,card9,card10,card11,card12,card13";
+
+ cardEntity.CardSort = desktopEntity.ModelCode == "one" ? cardSortInOne : cardSortInTwo;
+ }
+ else
+ {
+ cardEntity.CardSort = "";
+ }
+ db.Update(cardEntity);
+ }
+ }
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
#endregion
}