fix(数据大屏、仪表板): 修复Tab内图表不支持自动刷新问题

This commit is contained in:
wangjiahao 2024-08-27 17:08:10 +08:00
parent a287a2db62
commit 9301932fa7
2 changed files with 28 additions and 4 deletions

View File

@ -67,6 +67,11 @@ const props = defineProps({
required: false,
default: 1
},
outerSearchCount: {
type: Number,
required: false,
default: 0
},
isSelector: {
type: Boolean,
default: false
@ -82,7 +87,8 @@ const {
showPosition,
previewActive,
downloadStatus,
outerScale
outerScale,
outerSearchCount
} = toRefs(props)
const domId = 'preview-' + canvasId.value
const scaleWidthPoint = ref(100)
@ -99,6 +105,9 @@ const dashboardActive = computed(() => {
return dvInfo.value.type === 'dashboard'
})
const curSearchCount = computed(() => {
return outerSearchCount.value + searchCount.value
})
// full
const dataVKeepRadio = computed(() => {
return canvasStyleData.value?.screenAdaptor !== 'full'
@ -411,7 +420,7 @@ defineExpose({
:config="item"
:style="getShapeItemShowStyle(item)"
:show-position="showPosition"
:search-count="searchCount"
:search-count="curSearchCount"
:scale="mobileInPc ? 100 : scaleMin"
:is-selector="props.isSelector"
@userViewEnlargeOpen="userViewEnlargeOpen($event, item)"

View File

@ -74,6 +74,7 @@
:preview-active="editableTabsValue === tabItem.name"
:show-position="showPosition"
:outer-scale="scale"
:outer-search-count="searchCount"
></de-preview>
</el-tab-pane>
</template>
@ -164,10 +165,24 @@ const props = defineProps({
type: Number,
required: false,
default: 1
},
//
searchCount: {
type: Number,
required: false,
default: 0
}
})
const { element, isEdit, showPosition, canvasStyleData, canvasViewInfo, dvInfo, scale } =
toRefs(props)
const {
element,
isEdit,
showPosition,
canvasStyleData,
canvasViewInfo,
dvInfo,
scale,
searchCount
} = toRefs(props)
const state = reactive({
activeTabName: '',