67,513
社区成员
发帖
与我相关
我的任务
分享
var grid=Ext.create('Ext.grid.Panel', {
renderTo : 'grid',
width : "99%",
emptyText:"无数据",
margin:'5',
store : sites_store,
viewConfig : {
forceFit : false,
scroll:'horizontal',
autoScroll:true
},
selModel:Ext.create('Ext.selection.CheckboxModel'),
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
],
columns : [{
text : '编号',
dataIndex : 'no'
}, {
text : '名称',
dataIndex : 'name'
}, {
text : '类型',
dataIndex : 'type'
}, {
text : '繁忙程度',
dataIndex : 'busyLevel'
}, {
text : '省/州',
dataIndex : 'pro'
}, {
text : '城市',
dataIndex : 'city'
}, {
text : '县/区',
dataIndex : 'county'
}, {
text : '管理员',
dataIndex : 'man'
}, {
text : '启用时间',
dataIndex : 'startUseTime',
width:200
}, {
text : 'mac地址',
dataIndex : 'mac'
// hidden:true
}, {
text : '经度',
dataIndex : 'long'
// hidden:true
}, {
text : '纬度',
dataIndex : 'lat'
// hidden:true
}],
tbar:{
items: [
{xtype: "button",text: "查看",handler:show,iconCls:"show"},
{xtype:"tbseparator"},
{xtype: "button",text: "新增",handler:addSite,iconCls:"add"},
{xtype:"tbseparator"},
{xtype: "button",text: "修改",handler:modSite,iconCls:"update"},
{xtype:"tbseparator"},
{xtype: "button",text: "删除",handler:delSite,iconCls:"del"},
{xtype: "button",id:"btn_excel",text: "导出为Excel",handler:genExcel,iconCls:"excel"},
'->',
{xtype: "button",text: "从Excel导入数据",handler:import_excel,iconCls :"excel_import"}]
},
bbar: new Ext.PagingToolbar({
store: sites_store,
displayInfo: true,
displayMsg: '显示第{0}条到{1}条记录,共 {2} 条',
emptyMsg: "没有记录"
})
});