forked from github/dataease
refactor(仪表板): 增加仪表板跳转外部链接URL非法提示
This commit is contained in:
parent
b60f78fd56
commit
0cea8a41ae
@ -966,7 +966,7 @@ export default {
|
||||
// 判断是否有公共链接ID
|
||||
if (jumpInfo.publicJumpId) {
|
||||
const url = '/link/' + jumpInfo.publicJumpId
|
||||
window.open(url, jumpInfo.jumpType)
|
||||
this.windowsJump(url, jumpInfo.jumpType)
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'warn',
|
||||
@ -976,7 +976,7 @@ export default {
|
||||
}
|
||||
} else {
|
||||
const url = '#/preview/' + jumpInfo.targetPanelId
|
||||
window.open(url, jumpInfo.jumpType)
|
||||
this.windowsJump(url, jumpInfo.jumpType)
|
||||
}
|
||||
} else {
|
||||
this.$message({
|
||||
@ -989,7 +989,7 @@ export default {
|
||||
const colList = [...param.dimensionList, ...param.quotaList]
|
||||
let url = this.setIdValueTrans('id', 'value', jumpInfo.content, colList)
|
||||
url = checkAddHttp(url)
|
||||
window.open(url, jumpInfo.jumpType)
|
||||
this.windowsJump(url, jumpInfo.jumpType)
|
||||
}
|
||||
} else {
|
||||
if (this.chart.type.indexOf('table') === -1) {
|
||||
@ -1019,6 +1019,17 @@ export default {
|
||||
}
|
||||
return name2Id
|
||||
},
|
||||
windowsJump(url, jumpType) {
|
||||
try {
|
||||
window.open(url, jumpType)
|
||||
} catch (e) {
|
||||
this.$message({
|
||||
message: this.$t('panel.url_check_error') + ':' + url,
|
||||
type: 'error',
|
||||
showClose: true
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
resetDrill() {
|
||||
const length = this.drillClickDimensionList.length
|
||||
|
@ -1954,6 +1954,7 @@ export default {
|
||||
back_parent: 'Back to previous'
|
||||
},
|
||||
panel: {
|
||||
url_check_error: 'Jump error, Illegal URL',
|
||||
view_style: 'View Style',
|
||||
view_color_setting: 'View Color Setting',
|
||||
border_color_setting: 'Border Color',
|
||||
|
@ -1948,6 +1948,7 @@ export default {
|
||||
back_parent: '返回上一級'
|
||||
},
|
||||
panel: {
|
||||
url_check_error: '跳轉錯誤,URL不合法',
|
||||
view_style: '視圖樣式',
|
||||
view_color_setting: '視圖配色',
|
||||
border_color_setting: '邊框配色',
|
||||
|
@ -1948,6 +1948,7 @@ export default {
|
||||
back_parent: '返回上一级'
|
||||
},
|
||||
panel: {
|
||||
url_check_error: '跳转错误,URL不合法',
|
||||
view_style: '视图样式',
|
||||
view_color_setting: '视图配色',
|
||||
border_color_setting: '边框配色',
|
||||
|
Loading…
Reference in New Issue
Block a user