forked from github/dataease
Merge pull request #9164 from dataease/pr@dev-v2@fix_trackbar
fix(仪表板): 修复联动跳转弹出框可能被遮挡问题
This commit is contained in:
commit
0718bbe9f6
@ -1,8 +1,8 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/dataease?autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
||||
url: jdbc:mysql://39.98.78.97:13306/dataease?autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: 123456
|
||||
password: Password123@mysql
|
||||
messages:
|
||||
basename: i18n/lic,i18n/core,i18n/permissions,i18n/xpack
|
||||
flyway:
|
||||
|
@ -420,3 +420,20 @@ export async function decompressionPre(params, callBack) {
|
||||
})
|
||||
callBack(deTemplateData)
|
||||
}
|
||||
|
||||
export function trackBarStyleCheck(element, trackbarStyle, scale) {
|
||||
const { width, height } = element.value.style
|
||||
const widthReal = width * scale
|
||||
const heightReal = height * scale
|
||||
if (trackbarStyle.left < 0) {
|
||||
trackbarStyle.left = 0
|
||||
} else if (widthReal - trackbarStyle.left < 60) {
|
||||
trackbarStyle.left = trackbarStyle.left - 60
|
||||
}
|
||||
|
||||
if (trackbarStyle.top < 0) {
|
||||
trackbarStyle.top = 0
|
||||
} else if (heightReal - trackbarStyle.top < 100) {
|
||||
trackbarStyle.top = trackbarStyle.top - 100
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ import { BASE_VIEW_CONFIG } from '../../editor/util/chart'
|
||||
import { customAttrTrans, customStyleTrans, recursionTransObj } from '@/utils/canvasStyle'
|
||||
import { deepCopy } from '@/utils/utils'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import { trackBarStyleCheck } from '@/utils/canvasUtils'
|
||||
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc } = storeToRefs(dvMainStore)
|
||||
@ -247,8 +248,13 @@ const action = param => {
|
||||
trackClick(trackMenu.value[0])
|
||||
} else {
|
||||
// 图表关联多个事件
|
||||
state.trackBarStyle.left = param.x - 50 + 'px'
|
||||
state.trackBarStyle.top = param.y + 10 + 'px'
|
||||
const barStyleTemp = {
|
||||
left: param.x - 50,
|
||||
top: param.y + 10
|
||||
}
|
||||
trackBarStyleCheck(props.element, barStyleTemp, props.scale)
|
||||
state.trackBarStyle.left = barStyleTemp.left + 'px'
|
||||
state.trackBarStyle.top = barStyleTemp.top + 'px'
|
||||
viewTrack.value.trackButtonClick()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user