notice-window.js
2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
var selectedbg = "rgb(238, 249 ,249)";
var contentpath ;
var gid="";
var status="";
var curserver;
$(document).ready(function () {
curserver = CONF_BACK_SERVERURL;
gid=$("#gid").val();
contentpath = $("#contentpath").val();
load();
// addEvent();
});
//window.onload=function(){
// // 滚动条样式更新
// $("#bodycontent").mCustomScrollbar();
//}
function load(){
$.ajax({
type: 'POST',
dataType: 'json',
url: curserver + global.modelctls.homepage.homePageDetail,
headers:{
"token":$.cookie('ftoken')
},
data: {gid : gid},
success: function (result) {
var data=result.Data;
if(data==null){return;}
var str = JSON.stringify(data);
for(var i=0;i<data.length;i++){
var map_result = data[i];
var createtime= new Date(map_result["创建时间"]);
var unit=map_result["创建单位"]==null?"暂无":map_result["创建单位"];
var noticeTitle=map_result["公告标题"]==null?"暂无":map_result["公告标题"];
var noticeType=map_result["公告类型"]==null?"暂无":map_result["公告类型"];
var content=map_result["公告内容"]==null?"暂无内容":map_result["公告内容"];
if(unit==null){unit="暂无单位";}
var docattachmentpath = map_result["附件路径"];
// listFiles(docattachmentpath,"lookover");
var contentstr="<div class='div-content' style='border-bottom: 1px dashed;padding-bottom: 20px;margin-bottom: 20px;'>"+
"<label style='margin-bottom: 10px;font-weight: bold; font-size: 16px;' >"+noticeTitle+"</label><br>"+
"<img src='../../../image/index/icon-noticetype-other.png'>"+
"<label class='' style='margin-left:10px'>"+map_result["公告类型"]+"</label>"+
"<img style='margin-left:50px;' src='../../../image/index/icon-time.png'>"+
"<label class='' style='margin-left:10px'>"+createtime.format("yyyy-MM-dd hh:mm")+"</label>"+
"</div>"+
"<div class='div-opinion-content'>"+
"<label class='div-reply-info'>"+content+"</label>"+
"</div>";
$("#gg-detail").append(contentstr);
loadAttachment2(docattachmentpath);
}
},
error: function (error, status, text) {
}
});
}