0 0

ExtJS4 renderer将绑定的数据列进行格式化,但是没效果。。求解。。5

Ext.define("GBApp.BrowseroptimizationApp.view.DetailGetlist", {

extend : 'Ext.grid.Panel',

alias : 'widget.detaillist',

title : '详细信息',

id : 'getDetailList',

store : 'BrowseroptDetailStore',

selType : 'checkboxmodel',// 设定选择模式

multiSelect : true,// 运行多选

columnLines:true,

columns : [{

text : "业务类型",

dataIndex : 'frame',

width : 80,

lockWidth : true

}, {

text : "时间",

dataIndex : 'ttime'

}, {

text : "LAC",

dataIndex : 'lac',

width : 60,

lockWidth : true

}, {

text : "CI",

dataIndex : 'ci',

width : 60,

lockWidth : true

}, {

text : "地市",

dataIndex : 'city',

width : 60,

lockWidth : true

}, {

text : "SGSN IP",

dataIndex : 'sgsnIp',

renderer :  function(){

alert("1111");

},

lockWidth : true

},{

text : 'SGSN名',

dataIndex : 'sgsnName'

},{

text : "BSC/RNC",

dataIndex : 'rncId'

}, {

text : "BSC/RNC名",

dataIndex : 'rncName'

}, {

text : "BSCIP",

dataIndex : 'bscIp',

renderer :  Ext.util.Format.ip

},{

text : "PUC名",

dataIndex : 'pcuName'

}

,{

text : "小区名",

dataIndex : 'ciName'

}, {

text : "站型",

dataIndex : 'ciStyle'

}, {

text : "网络类型",

dataIndex : 'ratType',

width : 60,

lockWidth : true

}, {

text : "WAP12",

dataIndex : 'wap12'

}, {

text : "3G终端",

dataIndex : 'umtsTdd'

},{

text : "网关Ip",

dataIndex : 'destIp',

renderer : Ext.util.Format.ip

},{

text : "网关端口",

dataIndex : 'destPort'

},{

text : '用户',

dataIndex : 'imsi',

width : 120,

lockWidth : true

},{

text : "手机类型",  //

dataIndex : 'mobileType'

},{

text : "失败原因",  //

dataIndex : 'failureCause'

}, {

text : "原因建议",//

dataIndex : 'causeOpinion'

}, {

text : "操作系统",

dataIndex : 'os'

}, {

text : "客户端",

dataIndex : 'clientSoft'

},{

text : '站址类型',

dataIndex : 'totalCategory'

},{

text : '业务分类',

dataIndex : 'subCategory1'

},{

text : '一级目录',

dataIndex : 'subCategory2'

},{

text : '二级目录',

dataIndex : 'subCategory3'

},{

text : '二级分类',

dataIndex : 'subCategory4'

},{

text : '具体分类',

dataIndex : 'category'

},{

text : "URI地址",

dataIndex : 'uriMain'

},{

text : "终端类型",

dataIndex : 'userAgent'

},{

text : "内容类型",

dataIndex : 'contentType'

},{

text : "状态码",

dataIndex : 'statusCode'

},{

text : "是否成功",

dataIndex : 'success'

},{

text : "内容长度",

dataIndex : 'contentLength',

xtype : 'numbercolumn',

format : '0',

align : 'right',

width : 60,

lockWidth : true

},{

text : "HTTP长度",

dataIndex : 'httpLength',

xtype : 'numbercolumn',

format : '0',

align : 'right',

width : 80,

lockWidth : true

},{

text : "重选次数",

dataIndex : 'flushCount',

xtype : 'numbercolumn',

format : '0',

align : 'right',

width : 80,

lockWidth : true

},{

text : "时延",

dataIndex : 'responseTime',

xtype : 'numbercolumn',

format : '0',

align : 'right',

width : 60,

lockWidth : true

},{

text : "是否超时",

dataIndex : 'timeOut'

},{

text : "速率",

dataIndex : 'speed',

align : 'right',

width : 60,

lockWidth : true

},{

text : "重传率",

dataIndex : 'retransferCount',

renderer : Ext.util.Format.percentage,

align : 'right',

width : 60,

lockWidth : true

},{

text : "是否掉线",

dataIndex : 'fallLine'

},{

text : "是否与无线侧失去联系",

dataIndex : 'radioStatus',

width : 200

},{

text : '起始文件',

dataIndex : 'recordFileIndex'

},{

text : "结束文件",

dataIndex : 'lastFileIndex'

},{

text : "帧号",

dataIndex : 'frameNum',

xtype : 'numbercolumn',

format : '0',

align : 'right',

width : 60,

lockWidth : true

}

],

dockedItems : [{

           xtype : 'pagingtoolbar',

store : 'BrowseroptDetailStore',

dock : 'bottom',

displayInfo : true    

}]

 

});

 

 

以上是展示详情的js,需要对其中的ip列进行格式化后显示,格式化的方法是没错的,另外其他展示详情的js也是可以实现ip格式化的,但是这个js就是不行,我也比照了其他的js,没发现有什么不同的地方,这个问题困扰了半天了,还请各位大神能帮我看看,到底问题出在哪里了,有劳了,感谢~~

2013年5月15日 13:31

1个答案 按时间排序 按投票排序

0 0

没明白你的意思,我的理解是想让传递的数据sgsnIp以其他表现形式显示在页面上
{

text : "SGSN IP",

dataIndex : 'sgsnIp',

renderer :  function(){

alert("1111");

},
你需要在renderer里面设计好你想要显示的格式,然后return这个值

2013年5月15日 15:53

相关推荐

Global site tag (gtag.js) - Google Analytics