ComplianceServer/oldcode/WEB/messageexport.html

290 lines
12 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html class="panel-fit">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{{worknickname}}与{{nickname}}的聊天记录</title>
<meta http-equiv="X-UA-Compatible" content="IE=11;IE=10; IE=9; IE=8; IE=7; IE=EDGE">
{{script}}
</head>
<body class="easyui-layout layout panel-noscroll">
<style>
#wochalei {
height: 30px;
width: 100%;
background-color: #536484;
}
#wochalei ul {
padding: 0px;
font-size: 12px;
color: #FFF;
line-height: 26px;
whitewhite-space: nowrap;
}
#wochalei li {
list-style-type: none;
}
#wochalei li span {
text-decoration: none;
font-family: Arial, Helvetica, sans-serif;
padding: 7px 5px;
width: 100%;
}
.rcontacthover {
color: #ff0;
background-color: #7E8BA3;
}
.rcontactClick {
color: #ff0;
background-color: #8988AE;
}
.isSelf {
color: #006EFE;
padding-left: 10px;
}
.isFriend {
color: #42B475;
padding-left: 10px;
}
.message {
padding-left: 20px;
}
.redColor {
color: red;
}
.displayLi {
display: none;
}
.contentTable td {
font-size: 12px;
line-height: 26px;
}
.imageClass {
max-width: 200px;
}
.miniimageClass {
max-width: 100px;
}
</style>
<script type="text/JavaScript" language="javascript">
var face = [
{ name: "[微笑]", imgpath: "0.png" }, { name: "[撇嘴]", imgpath: "1.png" }, { name: "[色]", imgpath: "2.png" },
{ name: "[发呆]", imgpath: "3.png" },
{ name: "[得意]", imgpath: "4.png" }, { name: "[流泪]", imgpath: "5.png" }, { name: "[害羞]", imgpath: "6.png" },
{ name: "[闭嘴]", imgpath: "7.png" }, { name: "[睡]", imgpath: "8.png" },
{ name: "[大哭]", imgpath: "9.png" }, { name: "[尴尬]", imgpath: "10.png" }, { name: "[发怒]", imgpath: "11.png" },
{ name: "[调皮]", imgpath: "12.png" },
{ name: "[呲牙]", imgpath: "13.png" }, { name: "[惊讶]", imgpath: "14.png" }, { name: "[难过]", imgpath: "15.png" },
{ name: "[酷]", imgpath: "16.png" },
{ name: "[囧]", imgpath: "17.png" }, { name: "[抓狂]", imgpath: "18.png" }, { name: "[吐]", imgpath: "19.png" },
{ name: "[偷笑]", imgpath: "20.png" },
{ name: "[愉快]", imgpath: "21.png" }, { name: "[白眼]", imgpath: "22.png" }, { name: "[傲慢]", imgpath: "23.png" },
{ name: "[饿]", imgpath: "24.png" }, { name: "[困]", imgpath: "25.png" }, { name: "[惊恐]", imgpath: "26.png" },
{ name: "[流汗]", imgpath: "27.png" }, { name: "[憨笑]", imgpath: "28.png" }, { name: "[悠闲]", imgpath: "29.png" },
{ name: "[奋斗]", imgpath: "30.png" },
{ name: "[咒骂]", imgpath: "31.png" }, { name: "[疑问]", imgpath: "32.png" }, { name: "[嘘]", imgpath: "33.png" },
{ name: "[晕]", imgpath: "34.png" },
{ name: "[疯]", imgpath: "35.png" }, { name: "[衰]", imgpath: "36.png" }, { name: "[骷髅]", imgpath: "37.png" },
{ name: "[敲打]", imgpath: "38.png" }, { name: "[再见]", imgpath: "39.png" }, { name: "[擦汗]", imgpath: "40.png" },
{ name: "[抠鼻]", imgpath: "41.png" }, { name: "[鼓掌]", imgpath: "42.png" }, { name: "[糟糕]", imgpath: "43.png" },
{ name: "[坏笑]", imgpath: "44.png" }, { name: "[左哼哼]", imgpath: "45.png" },
{ name: "[右哼哼]", imgpath: "46.png" }, { name: "[哈欠]", imgpath: "47.png" },
{ name: "[鄙视]", imgpath: "48.png" }, { name: "[委屈]", imgpath: "49.png" },
{ name: "[快哭了]", imgpath: "50.png" }, { name: "[阴险]", imgpath: "51.png" },
{ name: "[亲亲]", imgpath: "52.png" }, { name: "[吓]", imgpath: "53.png" },
{ name: "[可怜]", imgpath: "54.png" }, { name: "[菜刀]", imgpath: "55.png" },
{ name: "[西瓜]", imgpath: "56.png" }, { name: "[啤酒]", imgpath: "57.png" },
{ name: "[篮球]", imgpath: "58.png" }, { name: "[乒乓]", imgpath: "59.png" },
{ name: "[咖啡]", imgpath: "60.png" }, { name: "[美食]", imgpath: "61.png" },
{ name: "[猪头]", imgpath: "62.png" }, { name: "[玫瑰]", imgpath: "63.png" },
{ name: "[凋谢]", imgpath: "64.png" }, { name: "[嘴唇]", imgpath: "65.png" },
{ name: "[爱心]", imgpath: "66.png" }, { name: "[心碎]", imgpath: "67.png" },
{ name: "[蛋糕]", imgpath: "68.png" }, { name: "[电]", imgpath: "69.png" }, { name: "[炸弹]", imgpath: "70.gif" },
{ name: "[便便]", imgpath: "71.gif" },
{ name: "[月亮]", imgpath: "72.gif" }, { name: "[太阳]", imgpath: "73.gif" }, { name: "[拥抱]", imgpath: "74.png" },
{ name: "[强]", imgpath: "75.gif" }, { name: "[弱]", imgpath: "76.gif" },
{ name: "[握手]", imgpath: "77.gif" }, { name: "[胜利]", imgpath: "78.gif" }, { name: "[抱拳]", imgpath: "79.gif" },
{ name: "[勾引]", imgpath: "80.gif" },
{ name: "[拳头]", imgpath: "81.gif" }, { name: "[OK]", imgpath: "82.gif" }, { name: "[跳跳]", imgpath: "83.gif" },
{ name: "[发抖]", imgpath: "84.gif" },
{ name: "[怄火]", imgpath: "85.png" }, { name: "[转圈]", imgpath: "86.gif" }
];
</script>
<script type="text/javascript">
var sortBy = function (filed, rev, primer) {
rev = (rev) ? -1 : 1;
return function (a, b) {
a = a[filed];
b = b[filed];
if (typeof (primer) != 'undefined') {
a = primer(a);
b = primer(b);
}
if (a < b) { return rev * -1; }
if (a > b) { return rev * 1; }
return 1;
}
};
$(function () {
GetMessage();
});
var username = "{{username}}";
var userdata = {{data}};
function GetMessage() {
//var txtDate = $("#txtDate").val();
//if (txtDate != "") {
// $("#contentBody").html("");
// var getDate = txtDate.replace("-", "");
// $(userdata).each(function(x, y) {
// if (y[n] === getDate) {
// GetMessageByUrl(y[n], "contentBody");
// }
// });
//} else {
$("#contentBody").html("");
$("#QunFacontentBody").html("");
var arrayObj = {{month}};
$(arrayObj).each(function (i, n) {
$(userdata).each(function (x, y){
if(y[n] != undefined)
{
if(n==="qunfa")
{
GetMessageByUrl(y[n], "QunFacontentBody");
}
else
{
GetMessageByUrl(y[n], "contentBody");
}
}
});
});
//}
}
function GetMessageByUrl(data, tabName) {
var workAccountName = "{{worknickname}}";
var json = data;
json.sort(sortBy('createTime', false, parseInt));
$(json).each(function (i, da) {
var newDate = new Date();
newDate.setTime(da.createTime);
var dataStr = getNowFormatDate(newDate);//聊天时间
var html = "";
if (da.isSend == 1) {
html += "<tr><td class=\"isSelf\">" + workAccountName + " " + dataStr + "</td></tr>";
} else {
html += "<tr><td class=\"isFriend\">" + da.nickname + " " + dataStr + "</td></tr>";
}
if (da.type == 3) {
html += "<tr><td class=\"message\">[图片]<img style='max-width:300px' id='file_" + da.msgSvrId + "' src='content/" + da.url + "'></td></tr>";
$("#" + tabName).append(html);
} else if (da.type == 47) {
if (da.url != "" && da.url != "null") {
html += "<tr><td class=\"message\"><img style='max-width:100px' id='file_" + da.msgSvrId + "' src='content/" + da.url + "'></td></tr>";
$("#" + tabName).append(html);
} else {
html += "<tr><td class=\"message\"><img style='max-width:100px' id='file_" + da.msgSvrId + "' src='content/" + da.url + "'></td></tr>";
$("#" + tabName).append(html);
}
} else if (da.type == 34) {
html += "<tr><td class=\"message\"><a id='file_" + da.msgSvrId + "' href='content/" + da.url + "'>[语音]<a></td></tr>";
$("#" + tabName).append(html);
} else if (da.type == 43) {
html += "<tr><td class=\"message\"><a id='file_" + da.msgSvrId + "' href='content/" + da.url + "'>[视频]<a></td></tr>";
$("#" + tabName).append(html);
} else if (da.type == 49) {
html += "<tr><td class=\"message\"><a id='file_" + da.msgSvrId + "' href='content/" + da.url + "'>[文件]<a></td></tr>";
$("#" + tabName).append(html);
}
else {//普通文本
html += "<tr><td class=\"message\">" + replaceFace(da.content) + "</td></tr>";
$("#" + tabName).append(html);
}
});
}
//替换表情
function replaceFace(cotent) {
var txt = cotent;
$(face).each(function (i, n) {
while (txt.indexOf(n.name) > -1) {
txt = txt.replace(n.name, "<img src=\"content/" + n.imgpath + "\">");
}
});
return txt;
}
//linux时间格式化
function getNowFormatDate(date) {
//var date = new Date();
var seperator1 = "-";
var seperator2 = ":";
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate + " " + date.getHours() + seperator2 + date.getMinutes() + seperator2 + date.getSeconds();
return currentdate;
}
function findTxt() {
$(".displayLi").each(function (i, n) {
$(this).removeClass("displayLi");
});
$(".redColor").each(function (i, n) {
$(this).after($(this).attr("ntitle"));
$(this).remove();
});
var txt = $("#findTxt").val();
if (txt == "")
return;
$("#friendList li").each(function () {
var html = $(this).html();
html = html.replace(txt, "<b ntitle=\"" + txt + "\" class=\"redColor\">" + txt + "</b>");
$(this).html(html);
if (html.indexOf("redColor") == -1) {
$(this).addClass("displayLi");
}
});
}
</script>
<div id="rcontent" data-options="region:'center',title:'{{worknickname}}与{{nickname}} --聊天记录'">
<div id="tt" class="easyui-tabs" data-options="fit:true" style="width: 500px; height: 250px;">
<div title="消息内容" style="padding: 5px;" data-options="fit:true">
<table class="contentTable">
<tbody id="contentBody"></tbody>
</table>
</div>
<div title="群发消息" data-options="closable:false,fit:true" style="overflow: auto; padding: 5px;">
<table class="contentTable">
<tbody id="QunFacontentBody"></tbody>
</table>
</div>
</div>
</div>
<!--<div data-options="region:'south',border:false" style="height: 30px; background-color: #E4EBF9">
<input id='txtDate' name='txtDate' class='Wdate' type='text' value='' onclick="WdatePicker({ dateFmt: 'yyyy-M', isShowToday: false, isShowClear: false })"/>
<input type="button" value="过滤" onclick="GetMessage()"/>
</div>-->
</body>
</html>