我有两个打开的标签,如下所示:
在底部有一个iframe(面板),但当我关闭一个时,其他标签消失:
得到了这个错误:
未捕获的TypeError:无法读取属性' parentNode'未定义的
观看代码:
Ext.define('tls.modulos.repservfact.view.Reporte', {
extend: 'Ext.panel.Panel',
iconCls: 'icon-report',
alias: 'widget.reporte',
closeAction: 'destroy',
name: 'tbReportes',
layout: {
type: 'border'
},
title: 'Resumen Servicios Facturados',
region: 'north',
flex: 1,
initComponent: function() {
var me = this;
var storeGenCar = Ext.create('tls.modulos.repservfact.store.Empresa');
storeGenCar.proxy.extraParams = {IdTipoEmpresa: 'GenCar'};
storeGenCar.load();
var storeTransp = Ext.create('tls.modulos.repservfact.store.Empresa');
storeTransp.proxy.extraParams = {IdTipoEmpresa: 'Transp'};
storeTransp.load();
var storeTipoCarga = Ext.create('tls.modulos.repservfact.store.TipoCarga');
storeTipoCarga.load();
Ext.applyIf(me, {
items: [
{
xtype: 'form',
region: 'center',
layout: 'column',
bodyPadding: 10,
defaults: {
width: 300,
padding: 2
},
items: [
{
xtype: 'datefield',
format: 'Y-m-d',
showToday: true,
fieldLabel: 'Fecha Inicial',
name: 'FechaInicial',
editable: false,
allowBlank: false
},
{
xtype: 'datefield',
format: 'Y-m-d',
showToday: true,
fieldLabel: 'Fecha Final',
name: 'FechaFinal',
editable: false,
allowBlank: false
},
{
xtype: 'combo',
store: storeGenCar,
name: 'cmbGenCar',
fieldLabel: 'Generador de Carga',
displayField: 'RazonSocial',
valueField: 'IdEmpresa',
editable: false,
labelWidth: 130
},
{
xtype: 'combo',
store: storeTransp,
name: 'cmbTransp',
fieldLabel: 'Transportadora',
displayField: 'RazonSocial',
valueField: 'IdEmpresa',
editable: false
},
{
xtype: 'textfield',
name: 'txtPlaca',
fieldLabel: 'Placa'
},
{
xtype: 'combo',
store: storeTipoCarga,
name: 'cmbTipoCarga',
fieldLabel: 'Tipo de Carga',
displayField: 'ValorParametro',
valueField: 'IdValorParametro',
editable: false
},
{
xtype: 'textfield',
name: 'txtProducto',
fieldLabel: 'Producto'
}
],
buttons: [
{
xtype: 'button',
name: 'btnMostrar',
text: 'Ver Reporte',
formBind: true
},
{
xtype: 'button',
name: 'btnExcel',
text: 'Exportar a Excel',
formBind: true,
iconCls: 'icon-xls'
},
{
xtype: 'button',
name: 'btnPDF',
text: 'Exportar a PDF',
formBind: true,
iconCls: 'icon-pdf'
},
{
xtype: 'button',
name: 'btnBorrar',
formBind: true,
text: 'Borrar'
}
]
},
// This is the panel for iframe.
{
xtype: 'panel',
region: 'south',
height: '80%',
html: '',
name: 'ifReporte',
id: 'ifReporte'
}
]
});
me.callParent(arguments);
}
});
如果删除iframe面板,则效果很好。但我需要它来显示一份报告。 一些帮助?