@yiranphp
2016-05-09T10:13:44.000000Z
字数 896
阅读 2150
dashboard
梳理后的数据结构
{
id:
title:
pages: {
activeIndex: 2,
data: [{
id:
title:
height:
widgetsData:[{具体结构见下面}]
}]
}
}
widgetsData对应的结构
{
id: "dashboard367_page1461633458521_widget0",
type: "KPIWidget",
ui: {
width:
height:
left:
top:
draggable: {}
resizable: {}
},
toolbar: {
type: "KPIToolbar",
settings: {
items: [
{
type: "StyleSetting",
data: {
bgVal: "opaque"
}
},
{
type: "TierSetting",
data: {
zIndex: 3
}
},
{
type: "KPISetting",
data: {
filterWidgetIDs: [
"dashboard367_page-1_widget0",
"dashboard367_page1461633458521_widget4",
"dashboard367_page-1_widget1",
"dashboard367_page1461633458521_widget3"
],
cube: "connection/店铺数据/店铺数据/base_shop_base",
measure: "Measures.pv",
filterType: "now",
filterValue: 2,
filter: "date_year",
dimension: "date_year_month",
showChart: false
}
}
]
}
},
data: {}
}
page:getDataTemplate
def("getDataTemplate", function (feed) {
return $.extend(true, {
//id: -1,
//title: "",
height: NewBIConstant.Page.DEFAULT_HEIGHT,
widgetsData: []
}, feed);
});