extjs girdpanel中的数据为何不显示?专家帮帮忙!
时间:2011-09-22
来源:互联网
Ext.define('S3.Console.HealthReport1', {
constructor: function () {
var startDate = Ext.create('Ext.form.field.Date', {
fieldLabel: '开始时间',
format: 'Y/m/d',
editable: false,
value: Ext.Date.add(new Date(), Ext.Date.DAY, -7),
labelWidth: 80,
width: 200
});
var endDate = Ext.create('Ext.form.field.Date', {
fieldLabel: '结束时间',
format: 'Y/m/d',
editable: false,
value: new Date(),
labelWidth: 80,
width: 200
});
var store = new Ext.data.JsonStore({
root: 'data'
});
var grid = Ext.grid.GridPanel({
height: 350,
width: 600,
data:store
});
var panel = Ext.create('Ext.panel.Panel', {
width: 600,
height: 500,
layout: {
type: 'fit',
columns: 1
},
items: grid,
buttons: [
{ text: '立即体检',
width: 150,
height: 50,
handler: function () {
Ext.Ajax.request({
url: 'core/WebService.asmx/ColdStorage',
headers: {
'Content-Type': 'application/json; charset=utf-8'
},
method: 'POST',
jsonData: {
startTime: Ext.Date.format(startDate.getValue(), 'Y-m-d'),
endTime: Ext.Date.format(endDate.getValue(), 'Y-m-d') + ' 23:59:59.999',
dept_id: "0002"
},
success: function (response) {
var responseJson = Ext.JSON.decode(response.responseText);
store.loadData(responseJson);
// Ext.Msg.alert("dsd");
},
failure: function () { Ext.Msg.alert("错误"); }
});
}
}
]
});
var win = new Ext.create('Ext.Window', {
title: '报表',
height: 500,
width: 600,
layout: 'fit',
tbar: [startDate, endDate],
items: panel
})
win.show();
}
});
constructor: function () {
var startDate = Ext.create('Ext.form.field.Date', {
fieldLabel: '开始时间',
format: 'Y/m/d',
editable: false,
value: Ext.Date.add(new Date(), Ext.Date.DAY, -7),
labelWidth: 80,
width: 200
});
var endDate = Ext.create('Ext.form.field.Date', {
fieldLabel: '结束时间',
format: 'Y/m/d',
editable: false,
value: new Date(),
labelWidth: 80,
width: 200
});
var store = new Ext.data.JsonStore({
root: 'data'
});
var grid = Ext.grid.GridPanel({
height: 350,
width: 600,
data:store
});
var panel = Ext.create('Ext.panel.Panel', {
width: 600,
height: 500,
layout: {
type: 'fit',
columns: 1
},
items: grid,
buttons: [
{ text: '立即体检',
width: 150,
height: 50,
handler: function () {
Ext.Ajax.request({
url: 'core/WebService.asmx/ColdStorage',
headers: {
'Content-Type': 'application/json; charset=utf-8'
},
method: 'POST',
jsonData: {
startTime: Ext.Date.format(startDate.getValue(), 'Y-m-d'),
endTime: Ext.Date.format(endDate.getValue(), 'Y-m-d') + ' 23:59:59.999',
dept_id: "0002"
},
success: function (response) {
var responseJson = Ext.JSON.decode(response.responseText);
store.loadData(responseJson);
// Ext.Msg.alert("dsd");
},
failure: function () { Ext.Msg.alert("错误"); }
});
}
}
]
});
var win = new Ext.create('Ext.Window', {
title: '报表',
height: 500,
width: 600,
layout: 'fit',
tbar: [startDate, endDate],
items: panel
})
win.show();
}
});
作者: guo779820919 发布时间: 2011-09-22
是哪儿出错了吗?还是什么原因,谁知道呀!急着解决呀!
作者: guo779820919 发布时间: 2011-09-22
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28