feat(仪表板、数据大屏): 跳转支持弹窗打开

This commit is contained in:
wangjiahao 2024-09-11 10:19:12 +08:00
parent c646fbda44
commit 3e6c65d30a
3 changed files with 13 additions and 1 deletions

View File

@ -106,10 +106,12 @@
>
<el-radio label="_self">{{ t('visualization.now_window') }}</el-radio>
<el-radio label="_blank">{{ t('visualization.new_window') }}</el-radio>
<el-radio label="newPop">{{ t('visualization.pop_window') }}</el-radio>
</el-radio-group>
<el-radio-group class="larger-radio" v-if="!state.linkJumpInfo" disabled>
<el-radio label="_self">{{ t('visualization.now_window') }}</el-radio>
<el-radio label="_blank">{{ t('visualization.new_window') }}</el-radio>
<el-radio label="newPop">{{ t('visualization.pop_window') }}</el-radio>
</el-radio-group>
</el-form-item>
</el-header>

View File

@ -2352,6 +2352,7 @@ export default {
open_mode: '打开方式',
new_window: '新开页面',
now_window: '当前页面',
pop_window: '弹窗页面',
hyperLinks: '目标地址',
link_open_tips: '仪表板非编辑状态可打开链接',
data_loading: '数据准备中...',

View File

@ -375,7 +375,16 @@ const divEmbedded = type => {
const windowsJump = (url, jumpType) => {
try {
const newWindow = window.open(url, jumpType)
let newWindow
if ('newPop' === jumpType) {
window.open(
url,
'_blank',
'width=800,height=600,left=200,top=100,toolbar=no,scrollbars=yes,resizable=yes,location=no'
)
} else {
newWindow = window.open(url, jumpType)
}
initOpenHandler(newWindow)
} catch (e) {
console.warn(t('visualization.url_check_error') + ':' + url)