extjs 图形 store 读远程数据不能显示?
/本地数据可以显示varstore1=newExt.data.JsonStore({fields:['name','vl'],data:[{name:'西药',vl:15...
/本地数据 可以显示
var store1 = new Ext.data.JsonStore({
fields: ['name', 'vl'],
data: [{
name: '西药',
vl: 150
},{
name: '中成药',
vl: 245
},{
name: '诊治',
total: 117
},{
name: '中草药',
vl: 104
}]
});
//这个远程数据不能 显示
var store2 = new Ext.data.JsonStore({
url:"/hmms/json/getFeiYong.action",
root: 'sfy',
fields: ['name', 'vl', {name:'西药', type: 'float',mapping: "cw"}, {name:'中成药', type:'float',mapping: "hl"}]
});
store2 的json 是这样的:
{"feiYong":"success", "sfy":{"cw":6013.0,"hl":12910.00,"hy":13931.00,"jc":6071.00}}
store2.load(); 展开
var store1 = new Ext.data.JsonStore({
fields: ['name', 'vl'],
data: [{
name: '西药',
vl: 150
},{
name: '中成药',
vl: 245
},{
name: '诊治',
total: 117
},{
name: '中草药',
vl: 104
}]
});
//这个远程数据不能 显示
var store2 = new Ext.data.JsonStore({
url:"/hmms/json/getFeiYong.action",
root: 'sfy',
fields: ['name', 'vl', {name:'西药', type: 'float',mapping: "cw"}, {name:'中成药', type:'float',mapping: "hl"}]
});
store2 的json 是这样的:
{"feiYong":"success", "sfy":{"cw":6013.0,"hl":12910.00,"hy":13931.00,"jc":6071.00}}
store2.load(); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询