diff --git a/core/core-backend/src/main/resources/application-standalone.yml b/core/core-backend/src/main/resources/application-standalone.yml index b521aa59d0..868f07365c 100644 --- a/core/core-backend/src/main/resources/application-standalone.yml +++ b/core/core-backend/src/main/resources/application-standalone.yml @@ -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: diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts index ad2aca03cf..f6e15fecd1 100644 --- a/core/core-frontend/src/utils/canvasUtils.ts +++ b/core/core-frontend/src/utils/canvasUtils.ts @@ -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 + } +} diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue index af30e0ab22..9dd1364517 100644 --- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue +++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue @@ -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() } }