mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 11:32:57 +08:00
Merge pull request #9422 from dataease/pr@dev-v2@fix_tabel-details
Pr@dev v2@fix tabel details
This commit is contained in:
commit
76779aa45c
@ -867,6 +867,7 @@ function removeItem(index) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
componentData.value.splice(index, 1)
|
componentData.value.splice(index, 1)
|
||||||
|
dvMainStore.removeLinkageInfo(item['id'])
|
||||||
if (!!checkedFields.length) {
|
if (!!checkedFields.length) {
|
||||||
Array.from(new Set(checkedFields)).forEach(ele => {
|
Array.from(new Set(checkedFields)).forEach(ele => {
|
||||||
emitter.emit(`query-data-${ele}`)
|
emitter.emit(`query-data-${ele}`)
|
||||||
|
@ -793,6 +793,9 @@ export const dvMainStore = defineStore('dataVisualization', {
|
|||||||
setNowPanelJumpInfo(jumpInfo) {
|
setNowPanelJumpInfo(jumpInfo) {
|
||||||
this.nowPanelJumpInfo = jumpInfo.baseJumpInfoMap
|
this.nowPanelJumpInfo = jumpInfo.baseJumpInfoMap
|
||||||
},
|
},
|
||||||
|
setNowPanelJumpInfoInner(jumpInfo) {
|
||||||
|
this.nowPanelJumpInfo = jumpInfo
|
||||||
|
},
|
||||||
setNowTargetPanelJumpInfo(jumpInfo) {
|
setNowTargetPanelJumpInfo(jumpInfo) {
|
||||||
this.nowPanelJumpInfoTargetPanel = jumpInfo.baseJumpInfoVisualizationMap
|
this.nowPanelJumpInfoTargetPanel = jumpInfo.baseJumpInfoVisualizationMap
|
||||||
},
|
},
|
||||||
@ -1122,6 +1125,24 @@ export const dvMainStore = defineStore('dataVisualization', {
|
|||||||
this.componentData = []
|
this.componentData = []
|
||||||
this.canvasViewInfo = {}
|
this.canvasViewInfo = {}
|
||||||
},
|
},
|
||||||
|
removeLinkageInfo(targetId) {
|
||||||
|
if (!!targetId && !!this.nowPanelTrackInfo) {
|
||||||
|
Object.keys(this.nowPanelTrackInfo).forEach(trackId => {
|
||||||
|
const targetInfo = this.nowPanelTrackInfo[trackId]
|
||||||
|
for (let i = 0; i < targetInfo.length; i++) {
|
||||||
|
if (targetInfo[i].indexOf(targetId) > -1) {
|
||||||
|
targetInfo.splice(i, 1)
|
||||||
|
i--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
Object.keys(this.nowPanelTrackInfo).forEach(trackId => {
|
||||||
|
if (trackId.indexOf(targetId) > -1 || this.nowPanelTrackInfo[trackId].length === 0) {
|
||||||
|
delete this.nowPanelTrackInfo[trackId]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
canvasDataInit() {
|
canvasDataInit() {
|
||||||
this.canvasViewInfo = {}
|
this.canvasViewInfo = {}
|
||||||
this.componentData = []
|
this.componentData = []
|
||||||
|
@ -13,7 +13,8 @@ const {
|
|||||||
canvasStyleData,
|
canvasStyleData,
|
||||||
canvasViewInfo,
|
canvasViewInfo,
|
||||||
curOriginThemes,
|
curOriginThemes,
|
||||||
dataPrepareState
|
dataPrepareState,
|
||||||
|
nowPanelTrackInfo
|
||||||
} = storeToRefs(dvMainStore)
|
} = storeToRefs(dvMainStore)
|
||||||
|
|
||||||
let defaultCanvasInfo = {
|
let defaultCanvasInfo = {
|
||||||
@ -81,6 +82,7 @@ export const snapshotStore = defineStore('snapshot', {
|
|||||||
dvMainStore.setComponentData(snapshotInfo.componentData)
|
dvMainStore.setComponentData(snapshotInfo.componentData)
|
||||||
dvMainStore.setCanvasStyle(snapshotInfo.canvasStyleData)
|
dvMainStore.setCanvasStyle(snapshotInfo.canvasStyleData)
|
||||||
dvMainStore.setCanvasViewInfo(snapshotInfo.canvasViewInfo)
|
dvMainStore.setCanvasViewInfo(snapshotInfo.canvasViewInfo)
|
||||||
|
dvMainStore.setNowPanelJumpInfoInner(snapshotInfo.nowPanelTrackInfo)
|
||||||
const curCacheViewIdInfo = deepCopy(this.cacheViewIdInfo)
|
const curCacheViewIdInfo = deepCopy(this.cacheViewIdInfo)
|
||||||
this.cacheViewIdInfo = snapshotInfo.cacheViewIdInfo
|
this.cacheViewIdInfo = snapshotInfo.cacheViewIdInfo
|
||||||
|
|
||||||
@ -139,7 +141,8 @@ export const snapshotStore = defineStore('snapshot', {
|
|||||||
componentData: deepCopy(componentData.value),
|
componentData: deepCopy(componentData.value),
|
||||||
canvasStyleData: deepCopy(canvasStyleData.value),
|
canvasStyleData: deepCopy(canvasStyleData.value),
|
||||||
canvasViewInfo: deepCopy(canvasViewInfo.value),
|
canvasViewInfo: deepCopy(canvasViewInfo.value),
|
||||||
cacheViewIdInfo: deepCopy(this.cacheViewIdInfo)
|
cacheViewIdInfo: deepCopy(this.cacheViewIdInfo),
|
||||||
|
nowPanelTrackInfo: deepCopy(nowPanelTrackInfo.value)
|
||||||
}
|
}
|
||||||
this.snapshotData[++this.snapshotIndex] = newSnapshot
|
this.snapshotData[++this.snapshotIndex] = newSnapshot
|
||||||
// 在 undo 过程中,添加新的快照时,要将它后面的快照清理掉
|
// 在 undo 过程中,添加新的快照时,要将它后面的快照清理掉
|
||||||
|
@ -21,7 +21,7 @@ import { BASE_VIEW_CONFIG } from '../util/chart'
|
|||||||
import { cloneDeep, defaultsDeep } from 'lodash-es'
|
import { cloneDeep, defaultsDeep } from 'lodash-es'
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
|
|
||||||
const { nowPanelTrackInfo, nowPanelJumpInfo, dvInfo } = storeToRefs(dvMainStore)
|
const { nowPanelTrackInfo, nowPanelJumpInfo, dvInfo, componentData } = storeToRefs(dvMainStore)
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const linkJumpRef = ref(null)
|
const linkJumpRef = ref(null)
|
||||||
|
@ -408,10 +408,9 @@ onBeforeUnmount(() => {
|
|||||||
|
|
||||||
const autoStyle = computed(() => {
|
const autoStyle = computed(() => {
|
||||||
return {
|
return {
|
||||||
height: 100 / scale.value + '%!important',
|
height: 20 * scale.value + 8 + 'px',
|
||||||
width: 100 / scale.value + '%!important',
|
width: 100 / scale.value + '%!important',
|
||||||
left: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
|
left: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
|
||||||
top: 50 * (1 - 1 / scale.value) + '%', // 放大余量 除以 2
|
|
||||||
transform: 'scale(' + scale.value + ')'
|
transform: 'scale(' + scale.value + ')'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -435,8 +434,8 @@ const autoHeightStyle = computed(() => {
|
|||||||
<div v-if="!isError" class="canvas-content">
|
<div v-if="!isError" class="canvas-content">
|
||||||
<div style="position: relative; height: 100%" :id="containerId"></div>
|
<div style="position: relative; height: 100%" :id="containerId"></div>
|
||||||
</div>
|
</div>
|
||||||
<el-row :style="autoHeightStyle" v-if="showPage && !isError">
|
<el-row :style="autoStyle" v-if="showPage && !isError">
|
||||||
<div :style="autoStyle" class="table-page-info">
|
<div class="table-page-info">
|
||||||
<div>共{{ state.pageInfo.total }}条</div>
|
<div>共{{ state.pageInfo.total }}条</div>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
class="table-page-content"
|
class="table-page-content"
|
||||||
@ -475,7 +474,6 @@ const autoHeightStyle = computed(() => {
|
|||||||
height: 20px;
|
height: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: space-between;
|
|
||||||
color: grey;
|
color: grey;
|
||||||
:deep(.table-page-content) {
|
:deep(.table-page-content) {
|
||||||
button,
|
button,
|
||||||
|
Loading…
Reference in New Issue
Block a user