|
楼主 |
发表于 2017-4-11 14:04:32
|
显示全部楼层
本帖最后由 qweasdzxc 于 2017-4-11 14:05 编辑
下面是出现和隐藏的代码 div1里装chart
//初始化数据
Model.prototype.modelModelConstructDone = function(event) {
this.comp("treeGrid").expandAll();
this.comp("treeData").first();
this.refreshListData();
var row = this.comp("treeData").getCurrentRow();
var libraryId=row.getID();
this.comp("reportData1").setStringVar("libraryId",libraryId);
this.comp("chart1").refresh();
var chart = this.comp("chart1");//chart组件
if (!chart.loaded) {
setTimeout(function() {
chart.refresh();
}, 100);
chart.loaded = true;
}
};
Model.prototype.treeGridRowDblClick = function(event){
$(this.getElementByXid("div1")).hide();
$(this.getElementByXid("div2")).show();
};
Model.prototype.treeGridRowClick = function(event){
$(this.getElementByXid("div1")).show();
$(this.getElementByXid("div2")).hide();
var row = this.comp("treeData").getCurrentRow();
var libraryId=row.getID();
this.comp("reportData1").setStringVar("libraryId",libraryId);
this.comp("chart1").refresh();
var chart = this.comp("chart1");//chart组件
if (!chart.loaded) {
setTimeout(function() {
chart.refresh();
}, 100);
chart.loaded = true;
}
};
Model.prototype.input5Focus = function(event){
$(this.getElementByXid("div1")).hide();
$(this.getElementByXid("div2")).show();
};
|
|