forked from github/dataease
feat(仪表板、数据大屏): 复用组件主体适配组件伸缩方式优化,支持原尺寸
This commit is contained in:
parent
e755f70d74
commit
86f49da257
@ -397,10 +397,13 @@ const calcData = (view: Chart, callback) => {
|
|||||||
state.viewDataInfo = {}
|
state.viewDataInfo = {}
|
||||||
state.totalItems = 0
|
state.totalItems = 0
|
||||||
const curViewInfo = canvasViewInfo.value[element.value.id]
|
const curViewInfo = canvasViewInfo.value[element.value.id]
|
||||||
|
if (curViewInfo) {
|
||||||
curViewInfo['curFields'] = []
|
curViewInfo['curFields'] = []
|
||||||
dvMainStore.setViewDataDetails(element.value.id, state.viewDataInfo)
|
dvMainStore.setViewDataDetails(element.value.id, state.viewDataInfo)
|
||||||
initReady.value = true
|
initReady.value = true
|
||||||
initCurFields(curViewInfo)
|
initCurFields(curViewInfo)
|
||||||
|
}
|
||||||
|
initReady.value = true
|
||||||
callback?.()
|
callback?.()
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
initReady.value = true
|
initReady.value = true
|
||||||
|
@ -13,6 +13,7 @@ const dvMainStore = dvMainStoreWithOut()
|
|||||||
const composeStore = composeStoreWithOut()
|
const composeStore = composeStoreWithOut()
|
||||||
const contextmenuStore = contextmenuStoreWithOut()
|
const contextmenuStore = contextmenuStoreWithOut()
|
||||||
const {
|
const {
|
||||||
|
multiplexingStyleAdapt,
|
||||||
curComponent,
|
curComponent,
|
||||||
curComponentIndex,
|
curComponentIndex,
|
||||||
curMultiplexingComponents,
|
curMultiplexingComponents,
|
||||||
@ -52,13 +53,17 @@ export const copyStore = defineStore('copy', {
|
|||||||
// dashboard 平铺2个
|
// dashboard 平铺2个
|
||||||
const xPositionOffset = index % 2
|
const xPositionOffset = index % 2
|
||||||
const yPositionOffset = index % 2
|
const yPositionOffset = index % 2
|
||||||
|
if (!(copyFrom === 'multiplexing' && !multiplexingStyleAdapt.value)) {
|
||||||
newComponent.sizeX = pcMatrixCount.value.x / 2
|
newComponent.sizeX = pcMatrixCount.value.x / 2
|
||||||
newComponent.sizeY = 14
|
newComponent.sizeY = 14
|
||||||
|
// dataV 数据大屏
|
||||||
|
newComponent.style.width = ((canvasStyleData.value.width / 3) * scale) / 100
|
||||||
|
newComponent.style.height = ((canvasStyleData.value.height / 3) * scale) / 100
|
||||||
|
}
|
||||||
|
// dataV 数据大屏
|
||||||
newComponent.x = newComponent.sizeX * xPositionOffset + 1
|
newComponent.x = newComponent.sizeX * xPositionOffset + 1
|
||||||
newComponent.y = 200
|
newComponent.y = 200
|
||||||
// dataV 数据大屏
|
// dataV 数据大屏
|
||||||
newComponent.style.width = (width * scale) / 400
|
|
||||||
newComponent.style.height = (height * scale) / 400
|
|
||||||
newComponent.style.left = 0
|
newComponent.style.left = 0
|
||||||
newComponent.style.top = 0
|
newComponent.style.top = 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user