我正在使用sbisdk-all-production.js集成SpagoBI驾驶舱在外部网络应用程序。
下面是我用来在web应用程序中加载驾驶舱的代码片段:
var url = Sbi.sdk.api.getDocumentUrl({
documentLabel: 'cockpit__xxxxxx'
// The document label.
, executionRole: '/spagobi/user'
, parameters: {par_clientId : 3}
, displayToolbar: false
, displaySliders: false
, height: '600px'
, width: '100%'
, iframe: {
style: 'border: 0px;'
}
});
document.getElementById('spagoCockpitIframe').src = url;驾驶舱被展示了。
但是,当参数通过JavaScript api Sbi.sdk.api.getDocumentUrl传递时,参数将被忽略。
从三天以来,我一直被困在这个问题上。有人能给我指点吗?
发布于 2017-04-26 14:27:11
您可以尝试编写以下内容
parameters: {'PARAMETERS': 'par_clientId=3'}
示例
var url = Sbi.sdk.api.getDocumentUrl({
documentLabel: 'cockpit__xxxxxx',
executionRole: '/spagobi/user',
parameters: {'PARAMETERS': 'par_clientId=3'},
displayToolbar: false,
displaySliders: false,
height: '600px',
width: '100%',
iframe: {
style: 'border: 0px;'
}
});
document.getElementById('spagoCockpitIframe').src = url;https://stackoverflow.com/questions/42069619
复制相似问题