public List getOrgList() {
List sumList = new ArrayList();
List<?> list = xarchJdbcDao.createNativeQuery(ORG_LIST_SQL);
for (Object obj : list) {
Object[] objs = (Object[]) obj;
Map map = new HashMap();
if (objs[0] != null)
map.put("createtime", objs[0].toString());
else
map.put("createtime", "");
if (objs[1] != null)
map.put("cistatus", objs[1].toString());
else
map.put("cistatus", "");
if (objs[2] != null)
map.put("name", objs[2].toString());
else
map.put("name", "");
sumList.add(map);
}
return sumList;
}
/**
*
* 用户节点列表
*
* */
public void getOrgList() {
list = getDataModel(getModelTemplate());
processFilter(list);
list.setData(this.getService().getOrgList());
}
function orgList(){
$.ajax({
url:'${ctx}/organization!getOrgList.json',
type:'POST',
data:'',
async:false,
success:function(result){
$("#orgList").append('');
var table = '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
var re = result.data;
for(var i=0; i<re.length; i++){
table += '<tr style="height:25px; line-height:25px;">'
+'<td align="left" width="50%" style="padding-left:10px">'+re[i].createtime.substr(0, 16)+'</td>'
+'<td align="left" width="10%">'+re[i].cistatus.substr(0, 16)+'</td>'
+'<td align="left" width="30%">'+re[i].name.substr(0, 16)+'</td>'
+'<td class="red" width="10%"><a href="${ctx}/views/zwww/zygl/gcs/list.jsp" title="" style="text-decoration:underline">详情</a></td>'
+'</tr>';
}
table += '</table>';
$("#orgList").append(table);
}
});
}
上面是一套
或者
$(function(){
init();
var a ='<%=id%>';
var path="<%=path%>";
var url=path+"/process-log!getProcessLogById.json?id="+a;
var urltro=path+"/trouble-proces-order!queryTroubleProcessById.json?id="+a;
var urlhichar=path+"/trouble-proces-order!queryTroubleProcessCount.json";
// window.location.href=url;
var center=path+"/organization!queryOrgGz.json?id="+a;
// window.location.href=url;
var table = '<table width="100%" border="0" cellspacing="32" cellpadding="32" bgcolor="#f2f1f1" style="height: 190px;">';
var table1 = $('<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#f2f1f1" style="height: 90px;"></table>');
var org=[];
var ip;
$.ajax({
type:'post',
url:center,
async:false,
data:null,
dataType:'json',
success:function(data){
var a = eval(data);
if(data){
ip=a[0].ip;
var _tr1 = $("<tr></tr>");
var _tr2 = $("<tr></tr>");
var _tr3 = $("<tr></tr>");
_tr1.append('<td width="10%" rowspan="2"> </td>');
_tr1.append('<td rowspan="2"><div class="res_bg"></div></td>');
_tr1.append('<td>资源名称:接入交换机</td>');
_tr2.append('<td> IP地址:'+ip+'</td>');
table1.append(_tr1).append(_tr2);
$("#count1").append(table1);
table += "<tr margin-top='30px'><th colspan='3' bgcolor='#dedede' >受影响单位</th></tr>";
for(var i=0;i<a.length;i++){
ip=a[1].ip;
org[i]=a[i].name;
table += '<tr>'
+'<td width="10%"> </td>'
+'<td width="30%" align="center"><div class="syxdw"></div></td>'
+'<td width="60%" style="text-align: center;">'+a[i].name+'</td>'
+'</tr>';
}
table += '</table>';
$("#count1").append(table);
}
},
error:function(){
//$.message("失败");
}
});
对于有头图片的,用样式里面设置背景图片的方式:
table += '<tr style="height:30px; line-height:30px;">'
+'<td class="msg_title" width="50%">'+kind+':</td>'
+'<td class="msg_count">'+re[i].cl+'(个)</td>'
+'<td class="msg_detal" align="right"><a href="javascript:;" style="text-decoration:underline" onclick="doDetail();">详情</a></td>'
+'</tr>';
.msg_title{
background: url("${stylePath}/images/msg_title_bg.png") no-repeat 5px;
padding-left: 30px;
}
页面列表
猜你喜欢
转载自yuhuiblog6338999322098842.iteye.com/blog/2124120
今日推荐
周排行