@@ -147,9 +147,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -186,9 +186,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -120,9 +120,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_fullname', | |||
keyId: 'name', | |||
callback: function (_data) { | |||
callback(_data['f_departmentid']); | |||
callback(_data['id']); | |||
} | |||
}); | |||
} | |||
@@ -203,9 +203,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -26,7 +26,7 @@ var bootstrap = function ($, learun) { | |||
bind: function () { | |||
var loginInfo = top.learun.clientdata.get(['userinfo']); | |||
$('#ReceiveUser').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }).lrselectSet(loginInfo.userId); | |||
$('#PDepartment').lrDataSourceSelect({ code: 'classdata', value: 'f_departmentid', text: 'f_fullname' }).lrselectSet(loginInfo.departmentId); | |||
$('#PDepartment').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }).lrselectSet(loginInfo.departmentId); | |||
$('#Ass_ReceiveItem').jfGrid({ | |||
headData: [ | |||
{ | |||
@@ -26,7 +26,7 @@ var bootstrap = function ($, learun) { | |||
bind: function () { | |||
var loginInfo = top.learun.clientdata.get(['userinfo']); | |||
$('#ReceiveUser').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }).lrselectSet(loginInfo.userId); | |||
$('#PDepartment').lrDataSourceSelect({ code: 'classdata', value: 'f_departmentid', text: 'f_fullname' }).lrselectSet(loginInfo.departmentId); | |||
$('#PDepartment').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }).lrselectSet(loginInfo.departmentId); | |||
$('#Ass_ReceiveItem').jfGrid({ | |||
headData: [ | |||
{ | |||
@@ -183,9 +183,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -282,7 +282,7 @@ | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, function (i, item) { | |||
str += '<option value="' + item.f_departmentid + '">' + item.f_fullname + '</option>' | |||
str += '<option value="' + item.id + '">' + item.name + '</option>' | |||
}) | |||
$("#F_DepartmentId").html(str); | |||
}, | |||
@@ -347,9 +347,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -368,9 +368,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -301,7 +301,7 @@ | |||
var companys = $.parseJSON(msg).data.data; | |||
var str = '<option value="">请选择</option>'; | |||
$.each(companys, function (i, item) { | |||
str += '<option value="' + item.f_departmentid + '">' + item.f_fullname + '</option>' | |||
str += '<option value="' + item.id + '">' + item.name + '</option>' | |||
}) | |||
$("#F_DepartmentId").html(str); | |||
}, | |||
@@ -14,6 +14,7 @@ namespace Learun.Application.Web.Areas.LR_IM.Controllers | |||
public class IMMsgController : MvcControllerBase | |||
{ | |||
private IMMsgIBLL iMMsgIBLL = new IMMsgBLL(); | |||
private IMSysUserIBLL iMSysUserIBLL = new IMSysUserBLL(); | |||
private IMContactsIBLL iMContactsIBLL = new IMContactsBLL(); | |||
#region 视图功能 | |||
@@ -52,7 +53,7 @@ namespace Learun.Application.Web.Areas.LR_IM.Controllers | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetMsgPageList(string pagination,string userId, string keyWord) | |||
public ActionResult GetMsgPageList(string pagination, string userId, string keyWord) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
UserInfo userInfo = LoginUserInfo.Get(); | |||
@@ -77,8 +78,16 @@ namespace Learun.Application.Web.Areas.LR_IM.Controllers | |||
public ActionResult GetContactsList() | |||
{ | |||
UserInfo userInfo = LoginUserInfo.Get(); | |||
var sysUserList = iMSysUserIBLL.GetList(""); | |||
var data = iMContactsIBLL.GetList(userInfo.userId); | |||
return JsonResult(data); | |||
var jsonData = new | |||
{ | |||
data, | |||
sysUserList | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
@@ -92,14 +101,15 @@ namespace Learun.Application.Web.Areas.LR_IM.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SendMsg(string userId,string content,int isSystem) | |||
//public ActionResult SendMsg(string userId, string content, int isSystem) | |||
public ActionResult SendMsg(string userId, string content) | |||
{ | |||
UserInfo userInfo = LoginUserInfo.Get(); | |||
IMMsgEntity entity = new IMMsgEntity(); | |||
entity.F_SendUserId = userInfo.userId; | |||
entity.F_RecvUserId = userId; | |||
entity.F_Content = content; | |||
entity.F_IsSystem = isSystem; | |||
//entity.F_IsSystem = isSystem; | |||
iMMsgIBLL.SaveEntity(entity); | |||
return Success("保存成功!"); | |||
} | |||
@@ -119,6 +129,19 @@ namespace Learun.Application.Web.Areas.LR_IM.Controllers | |||
iMContactsIBLL.SaveEntity(entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 移除一个最近的联系人 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult RemoveContact(string otherUserId) | |||
{ | |||
UserInfo userInfo = LoginUserInfo.Get(); | |||
iMContactsIBLL.DeleteEntity(userInfo.userId, otherUserId); | |||
return Success("移除成功!"); | |||
} | |||
/// <summary> | |||
/// 更新联系人消息读取状态 | |||
/// </summary> | |||
@@ -129,7 +152,7 @@ namespace Learun.Application.Web.Areas.LR_IM.Controllers | |||
public ActionResult UpdateContactState(string otherUserId) | |||
{ | |||
UserInfo userInfo = LoginUserInfo.Get(); | |||
iMContactsIBLL.UpdateState(userInfo.userId,otherUserId); | |||
iMContactsIBLL.UpdateState(userInfo.userId, otherUserId); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
@@ -5,11 +5,7 @@ | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record" > | |||
<div class="lr-form-item-title">员工名字</div> | |||
<input id="UserName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record" > | |||
<div class="lr-form-item-title">部门</div> | |||
<div id="Department" ></div> | |||
<div id="UserNo" type="text" class="form-control"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record" > | |||
<div class="lr-form-item-title">考勤类型</div> | |||
@@ -21,6 +21,8 @@ var bootstrap = function ($, learun) { | |||
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||
param: {} | |||
}); | |||
$('#UserNo').lrDataSourceSelect({ code: 'BaseUser', value: 'f_account', text: 'f_realname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -98,23 +98,55 @@ var bootstrap = function ($, learun) { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/ADR_Record/GetPageList', | |||
headData: [ | |||
{ label: "员工名字", name: "UserName", width: 100, align: "left" }, | |||
{ | |||
label: "员工名字", name: "UserNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: value, | |||
keyId: 'f_account', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "员工编号", name: "UserNo", width: 100, align: "left" }, | |||
{ | |||
label: "部门", name: "Department", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('department', { | |||
console.log(value); | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data.name); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "考勤类型", name: "ADType", width: 100, align: "left" }, | |||
{ | |||
label: "考勤类型", name: "ADType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'ADType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} }, | |||
{ label: "考勤时间", name: "ADTime", width: 100, align: "left" }, | |||
{ label: "打卡时间", name: "ClockTime", width: 100, align: "left" }, | |||
{ label: "打卡结果", name: "ClockStatus", width: 100, align: "left" }, | |||
{ | |||
label: "打卡结果", name: "ClockStatus", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'ADStatus', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} }, | |||
{ label: "打卡地点", name: "ClockPlace", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
@@ -246,9 +246,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -259,9 +259,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -15,7 +15,7 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#Department').lrDataSourceSelect({ code: 'classdata', value: 'f_departmentid', text: 'f_fullname' }); | |||
$('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||
$('#UnitName').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#Type').lrDataItemSelect({ code: 'EUserType' }); | |||
$('#RelationShip').lrDataItemSelect({ code: 'ERelationship' }); | |||
@@ -119,9 +119,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -16,7 +16,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
bind: function () { | |||
$('#Creater').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); | |||
$('#Department').lrDataSourceSelect({ code: 'classdata', value: 'f_departmentid', text: 'f_fullname' }); | |||
$('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||
$('#UnitName').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#Type').lrDataItemSelect({ code: 'EUserType' }); | |||
$('#RelationShip').lrDataItemSelect({ code: 'ERelationship' }); | |||
@@ -113,9 +113,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -83,9 +83,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -29,10 +29,10 @@ var bootstrap = function ($, learun) { | |||
{ | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
sync: true, | |||
callback: function (_data) { | |||
callback(_data.f_fullname); | |||
callback(_data.name); | |||
} | |||
}); | |||
} | |||
@@ -15,7 +15,7 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#WPDepartment').lrDataSourceSelect({ code: 'classdata', value: 'f_departmentid', text: 'f_fullname' }); | |||
$('#WPDepartment').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||
$('#WPUser').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); | |||
$('#WPTimeType').lrDataItemSelect({ code: 'WorkPlanType' }); | |||
$('#WPFile').lrUploader(); | |||
@@ -45,7 +45,7 @@ var bootstrap = function ($, learun) { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#WPDepartment').lrDataSourceSelect({ code: 'classdata', value: 'f_departmentid', text: 'f_fullname' }); | |||
$('#WPDepartment').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||
$('#WPUser').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); | |||
$('#WPTimeType').lrDataItemSelect({ code: 'WorkPlanType' }); | |||
// 刷新 | |||
@@ -110,9 +110,9 @@ var bootstrap = function ($, learun) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
@@ -15,7 +15,7 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#WSDepartment').lrDataSourceSelect({ code: 'classdata', value: 'f_departmentid', text: 'f_fullname' }); | |||
$('#WSDepartment').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||
$('#WSUser').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); | |||
$('#WSTimeType').lrDataItemSelect({ code: 'WorkSummaryType' }); | |||
$('#WSFile').lrUploader(); | |||
@@ -45,7 +45,7 @@ var bootstrap = function ($, learun) { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#WSDepartment').lrDataSourceSelect({ code: 'classdata', value: 'f_departmentid', text: 'f_fullname' }); | |||
$('#WSDepartment').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||
$('#WSUser').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); | |||
$('#WSTimeType').lrDataItemSelect({ code: 'WorkSummaryType' }); | |||
// 刷新 | |||
@@ -451,6 +451,7 @@ namespace Learun.Application.Web.Controllers | |||
{ | |||
var data = LoginUserInfo.Get(); | |||
data.imUrl = Config.GetValue("IMUrl"); | |||
data.imOpen = Config.GetValue("IMOpen"); | |||
data.password = null; | |||
data.secretkey = null; | |||
return JsonResult(data); | |||
@@ -16,7 +16,7 @@ | |||
<img style="height: 40px;" width="95%" src="~/LR_SystemModule/LogoImg/GetImg?code=headbg" alt="经典风格"> | |||
</div> | |||
<div> | |||
<iframe style="position: absolute; top: 18px; right: 110px; height: 25px;" id="fancybox-frame" name="fancybox-frame1591155087436" frameborder="0" scrolling="no" hspace="0" src="http://i.tianqi.com/index.php?c=code&a=getcode&id=34&h=25&w=280"></iframe> | |||
<iframe style="position: absolute; top: 18px; right: 150px; height: 25px;" id="fancybox-frame" name="fancybox-frame1591155087436" frameborder="0" scrolling="no" hspace="0" src="http://i.tianqi.com/index.php?c=code&a=getcode&id=34&h=25&w=280"></iframe> | |||
</div> | |||
</div> | |||
<div class="lr-lg-setting" id="lr_lg_setting"> | |||
@@ -25,11 +25,10 @@ | |||
</div> | |||
@* 即时通讯窗体 *@ | |||
@*<div class="lr-lzc-user"><a class="lr-lzca-user" href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">在线人数 @ViewBag.OnlineUserNum 人</a> | |||
<ul class="dropdown-menu pull-right lr-lzca-user-ul"> | |||
</ul></div>*@ | |||
<div class="lr-im-bell" title="消息中心"> | |||
<div class="lr-im-bell2" title="消息中心2"> | |||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"> | |||
<span class="point" style="display:none;"></span> | |||
<i style="font-size: 20px" class="fa fa-bell"></i> | |||
@@ -46,6 +45,12 @@ | |||
</ul> | |||
</div> | |||
@* 即时通讯窗体 *@ | |||
<div class="lr-im-bell" title="消息中心"> | |||
<span class="point" style="display:none;"></span> | |||
<i class="fa fa-bell"></i> | |||
</div> | |||
<div class="lr-im-body "> | |||
<div class="lr-im-title"> | |||
<div class="title-item active" data-value="lr_im_msglist"> | |||
@@ -830,3 +830,18 @@ | |||
color: #fff; | |||
background-color: #985CE2; | |||
} | |||
/*消息中心2*/ | |||
.lr-im-bell2 { | |||
position: fixed; | |||
right: 145px; | |||
top: 11px; | |||
width: 40px; | |||
height: 40px; | |||
line-height: 40px; | |||
color: #282E3B; | |||
text-align: center; | |||
cursor: pointer; | |||
z-index: 51; | |||
} |
@@ -202,7 +202,7 @@ var bootstrap = function ($, learun) { | |||
id: 'pwdform', | |||
title: '密码修改', | |||
closeBtn: 0, | |||
resize :false, | |||
resize: false, | |||
type: 2, | |||
skin: 'lr-layer', | |||
btn: ['确定'], | |||
@@ -213,7 +213,7 @@ var bootstrap = function ($, learun) { | |||
layero[0].learun_layerid = 'layer_pwdform'; | |||
}, | |||
yes: function (index, layero) { | |||
var flag = top['layer_pwdform'].acceptClick(function() { | |||
var flag = top['layer_pwdform'].acceptClick(function () { | |||
top.location.href = "/Login/Index"; | |||
}); | |||
if (!!flag) { | |||
@@ -381,6 +381,7 @@ var bootstrap = function ($, learun) { | |||
var companyMap = {}; | |||
var departmentMap = {}; | |||
var userMap = {}; | |||
var sysUserMap = {}; | |||
var imUserId = ''; | |||
@@ -504,30 +505,48 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
// 获取最近联系人列表 | |||
learun.im.getContacts(function (data) { | |||
learun.im.getContacts(function (data, sysUserList) { | |||
$.each(sysUserList, function (_index, _item) { | |||
sysUserMap[_item.F_Code] = _item; | |||
}); | |||
var $userList = $('#lr_immsg_userlist .lr-scroll-box'); | |||
$userList.html(""); | |||
$.each(data, function (_index, _item) { | |||
var html = '\ | |||
<div class="userlist-item '+ (_item.F_IsRead == '1' ? 'imHasMsg' : '') + '" data-value="' + _item.F_OtherUserId + '" >\ | |||
<div class="photo"><img src="'+ top.$.rootUrl + '/Content/images/head/on-boy.jpg" >\ | |||
<div class="point"></div></div>\ | |||
</div>'; | |||
var html = ' <div class="userlist-item ' + (_item.F_IsRead == '1' ? 'imHasMsg' : '') + '" data-value="' + _item.F_OtherUserId + '" >'; | |||
if (sysUserMap[_item.F_OtherUserId]) { | |||
html += '<div class="photo"><i class="' + sysUserMap[_item.F_OtherUserId].F_Icon + '" ></i>'; | |||
} | |||
else { | |||
html += '<div class="photo"><img src="' + top.$.rootUrl + '/Content/images/head/on-boy.jpg" >'; | |||
} | |||
html += '<div class="point"></div></div>'; | |||
html += '</div>'; | |||
$userList.append(html); | |||
learun.clientdata.getAsync('user', { | |||
key: _item.F_OtherUserId, | |||
index: _index, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.attr('title', data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
if (op.index == 0) { | |||
$item.trigger('click'); | |||
} | |||
$item = null; | |||
if (sysUserMap[_item.F_OtherUserId]) { | |||
var _$item = $userList.find('[data-value="' + _item.F_OtherUserId + '"]'); | |||
_$item.attr('title', sysUserMap[_item.F_OtherUserId].F_Name); | |||
if (_index == 0) { | |||
_$item.trigger('click'); | |||
} | |||
}); | |||
_$item = null; | |||
} | |||
else { | |||
learun.clientdata.getAsync('user', { | |||
key: _item.F_OtherUserId, | |||
index: _index, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.attr('title', data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
if (op.index == 0) { | |||
$item.trigger('click'); | |||
} | |||
$item = null; | |||
} | |||
}); | |||
} | |||
}); | |||
}); | |||
} | |||
@@ -539,7 +558,6 @@ var bootstrap = function ($, learun) { | |||
}); | |||
}, | |||
bind: function () { | |||
$('.lr-im-bell').show(); | |||
// 最近消息 与 联系人之间的切换 | |||
$('.lr-im-title .title-item').on('click', function () { | |||
var $this = $(this); | |||
@@ -612,19 +630,19 @@ var bootstrap = function ($, learun) { | |||
}); | |||
// 打开关闭聊天窗 | |||
//$('.lr-im-bell').off('click').on('click', function () { | |||
// var $this = $(this); | |||
// if ($this.hasClass('open')) { | |||
// $this.removeClass('open'); | |||
// $('.lr-im-body').removeClass('open'); | |||
// } | |||
// else { | |||
// $this.addClass('open'); | |||
// $('.lr-im-bell .point').hide(); | |||
// $('.lr-im-body').addClass('open'); | |||
// } | |||
// return false; | |||
//}); | |||
$('.lr-im-bell').off('click').on('click', function () { | |||
var $this = $(this); | |||
if ($this.hasClass('open')) { | |||
$this.removeClass('open'); | |||
$('.lr-im-body').removeClass('open'); | |||
} | |||
else { | |||
$this.addClass('open'); | |||
$('.lr-im-bell .point').hide(); | |||
$('.lr-im-body').addClass('open'); | |||
} | |||
return false; | |||
}); | |||
// 联系人 | |||
$('#lr_im_content_userlist').lrscroll(); | |||
$('#lr_immsg_userlist').lrscroll(); | |||
@@ -936,22 +954,34 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
else { | |||
var html = '\ | |||
<div class="userlist-item imHasMsg" data-value="'+ userId + '" >\ | |||
<div class="photo"><img src="'+ top.$.rootUrl + '/Content/images/head/on-boy.jpg" >\ | |||
<div class="point"></div></div>\ | |||
</div>'; | |||
var html = '<div class="userlist-item imHasMsg" data-value="' + userId + '" >'; | |||
if (sysUserMap[userId]) { | |||
html += '<div class="photo"><i class="' + sysUserMap[userId].F_Icon + '" ></i>'; | |||
} | |||
else { | |||
html += '<div class="photo"><img src="' + top.$.rootUrl + '/Content/images/head/on-boy.jpg" >'; | |||
} | |||
html += '<div class="point"></div></div>'; | |||
html += '</div>'; | |||
$userList.prepend(html); | |||
learun.clientdata.getAsync('user', { | |||
key: userId, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.attr('title', data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
$item = null; | |||
} | |||
}); | |||
if (sysUserMap[userId]) { | |||
var _$item = $userList.find('[data-value="' + userId + '"]'); | |||
_$item.attr('title', sysUserMap[userId].F_Name); | |||
_$item = null; | |||
} | |||
else { | |||
learun.clientdata.getAsync('user', { | |||
key: userId, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.attr('title', data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
$item = null; | |||
} | |||
}); | |||
} | |||
var _$userItem = $userList.find('.userlist-item'); | |||
if (_$userItem.length == 1) { | |||
@@ -376,6 +376,7 @@ var bootstrap = function ($, learun) { | |||
var companyMap = {}; | |||
var departmentMap = {}; | |||
var userMap = {}; | |||
var sysUserMap = {}; | |||
var imUserId = ''; | |||
@@ -499,30 +500,48 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
// 获取最近联系人列表 | |||
learun.im.getContacts(function (data) { | |||
learun.im.getContacts(function (data, sysUserList) { | |||
$.each(sysUserList, function (_index, _item) { | |||
sysUserMap[_item.F_Code] = _item; | |||
}); | |||
var $userList = $('#lr_immsg_userlist .lr-scroll-box'); | |||
$userList.html(""); | |||
$.each(data, function (_index, _item) { | |||
var html = '\ | |||
<div class="userlist-item '+ (_item.F_IsRead == '1' ? 'imHasMsg' : '') + '" data-value="' + _item.F_OtherUserId + '" >\ | |||
<div class="photo"><img src="'+ top.$.rootUrl + '/Content/images/head/on-boy.jpg" >\ | |||
<div class="point"></div></div>\ | |||
</div>'; | |||
var html = ' <div class="userlist-item ' + (_item.F_IsRead == '1' ? 'imHasMsg' : '') + '" data-value="' + _item.F_OtherUserId + '" >'; | |||
if (sysUserMap[_item.F_OtherUserId]) { | |||
html += '<div class="photo"><i class="' + sysUserMap[_item.F_OtherUserId].F_Icon + '" ></i>'; | |||
} | |||
else { | |||
html += '<div class="photo"><img src="' + top.$.rootUrl + '/Content/images/head/on-boy.jpg" >'; | |||
} | |||
html += '<div class="point"></div></div>'; | |||
html += '</div>'; | |||
$userList.append(html); | |||
learun.clientdata.getAsync('user', { | |||
key: _item.F_OtherUserId, | |||
index: _index, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.attr('title', data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
if (op.index == 0) { | |||
$item.trigger('click'); | |||
} | |||
$item = null; | |||
if (sysUserMap[_item.F_OtherUserId]) { | |||
var _$item = $userList.find('[data-value="' + _item.F_OtherUserId + '"]'); | |||
_$item.attr('title', sysUserMap[_item.F_OtherUserId].F_Name); | |||
if (_index == 0) { | |||
_$item.trigger('click'); | |||
} | |||
}); | |||
_$item = null; | |||
} | |||
else { | |||
learun.clientdata.getAsync('user', { | |||
key: _item.F_OtherUserId, | |||
index: _index, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.attr('title', data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
if (op.index == 0) { | |||
$item.trigger('click'); | |||
} | |||
$item = null; | |||
} | |||
}); | |||
} | |||
}); | |||
}); | |||
} | |||
@@ -534,7 +553,6 @@ var bootstrap = function ($, learun) { | |||
}); | |||
}, | |||
bind: function () { | |||
$('.lr-im-bell').show(); | |||
// 最近消息 与 联系人之间的切换 | |||
$('.lr-im-title .title-item').on('click', function () { | |||
var $this = $(this); | |||
@@ -607,19 +625,19 @@ var bootstrap = function ($, learun) { | |||
}); | |||
// 打开关闭聊天窗 | |||
//$('.lr-im-bell').off('click').on('click', function () { | |||
// var $this = $(this); | |||
// if ($this.hasClass('open')) { | |||
// $this.removeClass('open'); | |||
// $('.lr-im-body').removeClass('open'); | |||
// } | |||
// else { | |||
// $this.addClass('open'); | |||
// $('.lr-im-bell .point').hide(); | |||
// $('.lr-im-body').addClass('open'); | |||
// } | |||
// return false; | |||
//}); | |||
$('.lr-im-bell').off('click').on('click', function () { | |||
var $this = $(this); | |||
if ($this.hasClass('open')) { | |||
$this.removeClass('open'); | |||
$('.lr-im-body').removeClass('open'); | |||
} | |||
else { | |||
$this.addClass('open'); | |||
$('.lr-im-bell .point').hide(); | |||
$('.lr-im-body').addClass('open'); | |||
} | |||
return false; | |||
}); | |||
// 联系人 | |||
$('#lr_im_content_userlist').lrscroll(); | |||
$('#lr_immsg_userlist').lrscroll(); | |||
@@ -931,22 +949,34 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
else { | |||
var html = '\ | |||
<div class="userlist-item imHasMsg" data-value="'+ userId + '" >\ | |||
<div class="photo"><img src="'+ top.$.rootUrl + '/Content/images/head/on-boy.jpg" >\ | |||
<div class="point"></div></div>\ | |||
</div>'; | |||
var html = '<div class="userlist-item imHasMsg" data-value="' + userId + '" >'; | |||
if (sysUserMap[userId]) { | |||
html += '<div class="photo"><i class="' + sysUserMap[userId].F_Icon + '" ></i>'; | |||
} | |||
else { | |||
html += '<div class="photo"><img src="' + top.$.rootUrl + '/Content/images/head/on-boy.jpg" >'; | |||
} | |||
html += '<div class="point"></div></div>'; | |||
html += '</div>'; | |||
$userList.prepend(html); | |||
learun.clientdata.getAsync('user', { | |||
key: userId, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.attr('title', data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
$item = null; | |||
} | |||
}); | |||
if (sysUserMap[userId]) { | |||
var _$item = $userList.find('[data-value="' + userId + '"]'); | |||
_$item.attr('title', sysUserMap[userId].F_Name); | |||
_$item = null; | |||
} | |||
else { | |||
learun.clientdata.getAsync('user', { | |||
key: userId, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.attr('title', data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
$item = null; | |||
} | |||
}); | |||
} | |||
var _$userItem = $userList.find('.userlist-item'); | |||
if (_$userItem.length == 1) { | |||
@@ -16,7 +16,7 @@ | |||
<img style="height: 40px;" width="95%" src="~/LR_SystemModule/LogoImg/GetImg?code=headbg" alt="经典风格"> | |||
</div> | |||
<div style="position: absolute; top: 11px; width: 100px; right: 171px; height: 25px;"> | |||
<iframe style="position: absolute; top: 18px; right: 110px; height: 25px;" id="fancybox-frame" name="fancybox-frame1591155087436" frameborder="0" scrolling="no" hspace="0" src="http://i.tianqi.com/index.php?c=code&a=getcode&id=34&h=25&w=280"></iframe> | |||
<iframe style="position: absolute; top: 18px; right: 150px; height: 25px;" id="fancybox-frame" name="fancybox-frame1591155087436" frameborder="0" scrolling="no" hspace="0" src="http://i.tianqi.com/index.php?c=code&a=getcode&id=34&h=25&w=280"></iframe> | |||
</div> | |||
</div> | |||
<div class="lr-lg-setting" id="lr_lg_setting"> | |||
@@ -25,11 +25,10 @@ | |||
</div> | |||
@* 即时通讯窗体 *@ | |||
@*<div class="lr-lzc-user"><a class="lr-lzca-user" href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">在线人数 @ViewBag.OnlineUserNum 人</a> | |||
<ul class="dropdown-menu pull-right lr-lzca-user-ul"> | |||
</ul></div>*@ | |||
<div class="lr-im-bell" title="消息中心"> | |||
<div class="lr-im-bell2" title="消息中心2"> | |||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" style="position: relative;"> | |||
<span class="point" style="display:none;"></span> | |||
<i style="font-size: 20px" class="fa fa-bell"></i> | |||
@@ -50,6 +49,11 @@ | |||
</ul> | |||
</div> | |||
@* 即时通讯窗体 *@ | |||
<div class="lr-im-bell" title="消息中心"> | |||
<span class="point" style="display:none;"></span> | |||
<i class="fa fa-bell"></i> | |||
</div> | |||
<div class="lr-im-body "> | |||
<div class="lr-im-title"> | |||
<div class="title-item active" data-value="lr_im_msglist"> | |||
@@ -15,7 +15,7 @@ | |||
@*<img style="height: 40px;" width="95%" src="~/Content/images/indexHeadBg.png" alt="经典风格">*@ | |||
<img style="height: 40px;" width="95%" src="~/LR_SystemModule/LogoImg/GetImg?code=headbg" alt="经典风格"> | |||
</div> | |||
<div><iframe style="position: absolute; top: 18px; right: 110px; height: 25px;" id="fancybox-frame" name="fancybox-frame1591155087436" frameborder="0" scrolling="no" hspace="0" src="http://i.tianqi.com/index.php?c=code&a=getcode&id=34&h=25&w=280"></iframe></div> | |||
<div><iframe style="position: absolute; top: 18px; right: 150px; height: 25px;" id="fancybox-frame" name="fancybox-frame1591155087436" frameborder="0" scrolling="no" hspace="0" src="http://i.tianqi.com/index.php?c=code&a=getcode&id=34&h=25&w=280"></iframe></div> | |||
</div> | |||
<div class="lr-lg-setting" id="lr_lg_setting"> | |||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">[<span></span>]</a> | |||
@@ -23,11 +23,10 @@ | |||
</div> | |||
@* 即时通讯窗体 *@ | |||
@*<div class="lr-lzc-user"><a class="lr-lzca-user" href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">在线人数 @ViewBag.OnlineUserNum 人</a> | |||
<ul class="dropdown-menu pull-right lr-lzca-user-ul"> | |||
</ul></div>*@ | |||
<div class="lr-im-bell" title="消息中心"> | |||
<div class="lr-im-bell2" title="消息中心2"> | |||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"> | |||
<span class="point" style="display:none;"></span> | |||
<i style="font-size: 20px" class="fa fa-bell"></i> | |||
@@ -44,6 +43,11 @@ | |||
</ul> | |||
</div> | |||
@* 即时通讯窗体 *@ | |||
<div class="lr-im-bell" title="消息中心"> | |||
<span class="point" style="display:none;"></span> | |||
<i class="fa fa-bell"></i> | |||
</div> | |||
<div class="lr-im-body "> | |||
<div class="lr-im-title"> | |||
<div class="title-item active" data-value="lr_im_msglist"> | |||
@@ -83,6 +83,37 @@ var bootstrap = function ($, learun) { | |||
threeItemHtml += '</a>'; | |||
$threeMenuItem.append(threeItemHtml); | |||
$threeMenus.append($threeMenuItem); | |||
// 第四级菜单 | |||
var fourModules = modulesTree[threeItem.F_ModuleId] || []; | |||
var $fourMenus = $('<ul class="lr-four-menu-list"></ul>'); | |||
var fourMenuHad = false; | |||
for (var fi = 0, fl = fourModules.length; fi < fl; fi++) { | |||
var fourItem = fourModules[fi]; | |||
if (fourItem.F_IsMenu == 1) { | |||
if (fourItem.F_Target != 'expand') { | |||
$applistul.append(meuns.getAppItem(fourItem)); | |||
} | |||
fourMenuHad = true; | |||
var $fourMenuItem = $('<li></li>'); | |||
$fourMenuItem.attr('title', fourItem.F_FullName); | |||
var fourItemHtml = '<a id="' + fourItem.F_ModuleId + '" href="javascript:void(0);" class="lr-menu-item" >'; | |||
fourItemHtml += '<i class="' + fourItem.F_Icon + ' lr-menu-item-icon"></i>'; | |||
fourItemHtml += '<span class="lr-menu-item-text">' + fourItem.F_FullName + '</span>'; | |||
fourItemHtml += '</a>'; | |||
$fourMenuItem.append(fourItemHtml); | |||
$fourMenus.append($fourMenuItem); | |||
} | |||
} | |||
if (fourMenuHad) { | |||
$threeMenuItem.addClass('lr-meun-had'); | |||
$threeMenuItem.find('a').append('<span class="lr-menu-item-arrow"><i class="fa fa-angle-left"></i></span>'); | |||
$threeMenuItem.append($fourMenus); | |||
} | |||
} | |||
} | |||
if (threeMenuHad) { | |||
@@ -125,7 +156,6 @@ var bootstrap = function ($, learun) { | |||
}); | |||
}, | |||
bind: function () { | |||
$("#lr_frame_menu").lrscroll(); | |||
$("#lr_second_menu_wrap").lrscroll(); | |||
$('#lr_windows_start').on('click', meuns.startMenuClick); | |||
@@ -183,9 +213,18 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
else { | |||
$ul.parents('.lr-second-menu-list').find('.lr-three-menu-list').slideUp(300, function () { | |||
$(this).prev().removeClass('open'); | |||
}); | |||
if ($ul.hasClass('lr-three-menu-list')) { | |||
$ul.parents('.lr-second-menu-list').find('.lr-three-menu-list').slideUp(300, function () { | |||
$(this).prev().removeClass('open'); | |||
}); | |||
} | |||
else { | |||
$ul.parents('.lr-three-menu-list').find('.lr-four-menu-list').slideUp(300, function () { | |||
$(this).prev().removeClass('open'); | |||
}); | |||
} | |||
$ul.slideDown(300, function () { | |||
$obj.addClass('open'); | |||
}); | |||
@@ -294,6 +333,7 @@ var bootstrap = function ($, learun) { | |||
var companyMap = {}; | |||
var departmentMap = {}; | |||
var userMap = {}; | |||
var sysUserMap = {}; | |||
var imUserId = ''; | |||
@@ -421,30 +461,49 @@ var bootstrap = function ($, learun) { | |||
}); | |||
// 获取最近联系人列表 | |||
learun.im.getContacts(function (data) { | |||
learun.im.getContacts(function (data, sysUserList) { | |||
$.each(sysUserList, function (_index, _item) { | |||
sysUserMap[_item.F_Code] = _item; | |||
}); | |||
var $userList = $('#lr_immsg_userlist .lr-scroll-box'); | |||
$.each(data, function (_index, _item) { | |||
var html = '\ | |||
<div class="msg-item'+ (_item.F_IsRead == '1' ? 'imHasMsg' : '') + '" data-value="' + _item.F_OtherUserId + '" >\ | |||
<div class="photo">\ | |||
<img src="'+ top.$.rootUrl + '/Content/images/head/on-boy.jpg">\ | |||
<div class="point"></div>\ | |||
</div>\ | |||
<div class="name"></div>\ | |||
<div class="msg">'+ (_item.F_Content || '') + '</div>\ | |||
<div class="date">'+ getTime(_item.F_Time) + '</div>\ | |||
</div>'; | |||
var html = '<div class="msg-item' + (_item.F_IsRead == '1' ? 'imHasMsg' : '') + '" data-value="' + _item.F_OtherUserId + '" >'; | |||
html += '<div class="photo">'; | |||
if (sysUserMap[_item.F_OtherUserId]) { | |||
html += '<i class="' + sysUserMap[_item.F_OtherUserId].F_Icon + '" ></i>'; | |||
} | |||
else { | |||
html += '<img src="' + top.$.rootUrl + '/Content/images/head/on-boy.jpg" >'; | |||
} | |||
html += '<div class="point"></div>'; | |||
html += '</div>'; | |||
html += '<div class="name"></div>'; | |||
html += '<div class="msg">' + (_item.F_Content || '') + '</div>'; | |||
html += '<div class="date">' + getTime(_item.F_Time) + '</div>'; | |||
html += '</div>'; | |||
$userList.append(html); | |||
learun.clientdata.getAsync('user', { | |||
key: _item.F_OtherUserId, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.find('.name').text(data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
$item = null; | |||
} | |||
}); | |||
if (sysUserMap[_item.F_OtherUserId]) { | |||
var _$item = $userList.find('[data-value="' + _item.F_OtherUserId + '"]'); | |||
_$item.find('.name').text(sysUserMap[_item.F_OtherUserId].F_Name); | |||
_$item = null; | |||
} | |||
else { | |||
learun.clientdata.getAsync('user', { | |||
key: _item.F_OtherUserId, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.find('.name').text(data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
$item = null; | |||
} | |||
}); | |||
} | |||
}); | |||
}); | |||
@@ -783,27 +842,41 @@ var bootstrap = function ($, learun) { | |||
$userItem.find('.date').text(getTime(dateTime)); | |||
} | |||
else { | |||
var html = '\ | |||
<div class="msg-item" data-value="' + userId + '" >\ | |||
<div class="photo">\ | |||
<img src="'+ top.$.rootUrl + '/Content/images/head/on-boy.jpg">\ | |||
<div class="point"></div>\ | |||
</div>\ | |||
<div class="name"></div>\ | |||
<div class="msg">'+ msg + '</div>\ | |||
<div class="date">'+ getTime(dateTime) + '</div>\ | |||
</div>'; | |||
var html = '<div class="msg-item" data-value="' + userId + '" >'; | |||
html += '<div class="photo">'; | |||
if (sysUserMap[userId]) { | |||
html += '<i class="' + sysUserMap[userId].F_Icon + '" ></i>'; | |||
} | |||
else { | |||
html += '<img src="' + top.$.rootUrl + '/Content/images/head/on-boy.jpg" >'; | |||
} | |||
html += '<div class="point"></div>'; | |||
html += '</div>'; | |||
html += '<div class="name"></div>'; | |||
html += '<div class="msg">' + msg + '</div>'; | |||
html += '<div class="date">' + getTime(dateTime) + '</div>'; | |||
html += '</div>'; | |||
$userList.prepend(html); | |||
learun.clientdata.getAsync('user', { | |||
key: userId, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.find('.name').text(data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
$item = null; | |||
} | |||
}); | |||
if (sysUserMap[userId]) { | |||
var _$item = $userList.find('[data-value="' + userId + '"]'); | |||
_$item.find('.name').text(sysUserMap[userId].F_Name); | |||
_$item = null; | |||
} | |||
else { | |||
learun.clientdata.getAsync('user', { | |||
key: userId, | |||
callback: function (data, op) { | |||
var $item = $userList.find('[data-value="' + op.key + '"]'); | |||
$item.find('.name').text(data.name); | |||
data.id = op.key; | |||
$item.find('img').attr('src', getHeadImg(data)); | |||
$item = null; | |||
} | |||
}); | |||
} | |||
} | |||
} | |||
if (!$('.lr-im-bell').hasClass('open')) { | |||
@@ -486,9 +486,9 @@ | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
result = _data.f_fullname; | |||
result = _data.name; | |||
} | |||
}); | |||
return result; | |||
@@ -527,9 +527,9 @@ | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
result = _data.f_fullname; | |||
result = _data.name; | |||
} | |||
}); | |||
return result; | |||
@@ -61,6 +61,8 @@ | |||
<!-- ================== 6:即时通信参数 ================== --> | |||
<!-- SignalR服务接口--> | |||
<add key="IMUrl" value="http://192.168.2.126:8012/signalr" /> | |||
<add key="IMOpen" value="false" /> | |||
<add key="userKey" value="14B417B0-463D-4F2B-8075-0A20EEDB773A" /> | |||
<!-- ==================注意附件上传地址 修改到部署目录下的Resource要不然飞星会报错================== --> | |||
<add key="AnnexesFile" value="D:\gitLocalRepositories\DigitalScholl\Learun.Framework.Ultimate V7\Learun.Application.Web\Resource" /> | |||
@@ -30,6 +30,7 @@ namespace Learun.Application.WebApi.Modules | |||
} | |||
private IMSysUserIBLL iMSysUserIBLL = new IMSysUserBLL(); | |||
private IMMsgIBLL iMMsgIBLL = new IMMsgBLL(); | |||
private IMContactsIBLL iMContactsIBLL = new IMContactsBLL(); | |||
@@ -40,12 +41,14 @@ namespace Learun.Application.WebApi.Modules | |||
/// <returns></returns> | |||
public Response GetContactsList(dynamic _) | |||
{ | |||
var sysUserList = iMSysUserIBLL.GetList(""); | |||
string time = this.GetReqData();// 获取模板请求数据 | |||
DateTime beginTime = DateTime.Now; | |||
var data = iMContactsIBLL.GetList(userInfo.userId,DateTime.Parse(time)); | |||
var jsondata = new | |||
{ | |||
data = data, | |||
sysUserList, | |||
time = beginTime | |||
}; | |||
return Success(jsondata); | |||
@@ -29,9 +29,23 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
try | |||
{ | |||
var baseDataName = this.BaseRepository().getDbConnection().Database; | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT * "); | |||
strSql.Append(" FROM ADR_Record t "); | |||
strSql.Append(@"SELECT t.ID, | |||
emp.F_RealName UserName, | |||
t.UserNo, | |||
emp.F_DepartmentId Department , | |||
t.ADType, | |||
t.ADTime, | |||
t.ClockTime, | |||
t.ClockStatus, | |||
t.ClockPlace, | |||
t.ADYear, | |||
t.ADMonth, | |||
t.ADDay, | |||
t.ADPhoto | |||
"); | |||
strSql.Append($" FROM ADR_Record t RIGHT JOIN {baseDataName}.dbo.LR_Base_User emp ON t.UserNo=emp.F_Account"); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
@@ -45,13 +59,15 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
if (!queryParam["UserName"].IsEmpty()) | |||
{ | |||
dp.Add("UserName", "%" + queryParam["UserName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.UserName Like @UserName "); | |||
strSql.Append(" AND emp.EmpName Like @UserName "); | |||
} | |||
if (!queryParam["Department"].IsEmpty()) | |||
{ | |||
dp.Add("Department",queryParam["Department"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Department = @Department "); | |||
strSql.Append(" AND emp.F_DepartmentId = @Department "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<ADR_RecordEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -18,27 +18,31 @@ namespace Learun.Util | |||
/// <param name="methodName"></param> | |||
public static void callMethod(string methodName, params object[] args) | |||
{ | |||
var hubConnection = new HubConnection(Config.GetValue("IMUrl")); | |||
IHubProxy ChatsHub = hubConnection.CreateHubProxy("ChatsHub"); | |||
bool done = false; | |||
hubConnection.Start().ContinueWith(task => | |||
if (Config.GetValue("IMOpen") == "true") | |||
{ | |||
var hubConnection = new HubConnection(Config.GetValue("IMUrl")); | |||
IHubProxy ChatsHub = hubConnection.CreateHubProxy("ChatsHub"); | |||
bool done = false; | |||
hubConnection.Start().ContinueWith(task => | |||
{ | |||
//连接成功调用服务端方法 | |||
if (!task.IsFaulted) | |||
{ | |||
ChatsHub.Invoke(methodName, args); | |||
done = true; | |||
} | |||
else | |||
{ | |||
done = true; | |||
} | |||
}); | |||
while (!done) | |||
{ | |||
ChatsHub.Invoke(methodName, args); | |||
done = true; | |||
} | |||
else { | |||
done = true; | |||
Thread.Sleep(100); | |||
} | |||
}); | |||
while (!done) | |||
{ | |||
Thread.Sleep(100); | |||
//结束连接 | |||
hubConnection.Stop(); | |||
} | |||
//结束连接 | |||
hubConnection.Stop(); | |||
} | |||
} | |||
} |
@@ -142,6 +142,10 @@ namespace Learun.Util | |||
/// </summary> | |||
public string imUrl { get; set; } | |||
/// <summary> | |||
/// 即时通讯是否开启 | |||
/// </summary> | |||
public string imOpen { get; set; } | |||
/// <summary> | |||
/// 流程实例Id | |||
/// </summary> | |||
public string wfProcessId { get; set; } | |||