notice-details.js
1.39 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
var contentpath;
$(document).ready(function () {
contentpath = global.contextPath;
load();
});
function load(){
var gid=$("#gid").val();
var str="首页";
var auxiliariesNumber;
$.post(global.contextPath + global.modelctls.homepage.homePageDetail, {
gid : gid
}, function(result) {
//$("#homepage_notice").children().filter('.div-content-list').remove();
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["创建单位"];
if(unit==null){unit="暂无单位";}
var docattachmentpath = map_result["附件路径"];
listFiles(docattachmentpath,"首页详情");
var contentstr="<div>"
+"<div class='div-notice-title'><span class='div-notice-type'>["+map_result["公告类型"]+"]</span>"+map_result["公告标题"]+"</div>"
+"<div class='div-notice-attachment'><img src='../assets/images/index/icon-attachments.png' />附件(0)</div>"
+"<div class='div-notice-time'>"+createtime.format("yyyy-MM-dd hh:mm:ss")+"</div>"
+"<div class='div-notice-remove'><span class='glyphicon glyphicon-trash'></span></div>"
+"<div class='clearboth'></div>"
+"</div>";
$(".div-notice-item").append(contentstr);
}
//AnnouncementDetails();
});
}