forked from github/dataease
Merge pull request #5396 from dataease/pr@dev@fix_panel-view-cancel
fix(仪表板): 修复仪表板视图请求可能被提前取消导致视图不显示问题
This commit is contained in:
commit
6280514d0b
@ -423,10 +423,6 @@ export default {
|
|||||||
if (this.canvasId === 'canvas-main' && !this.showPosition.includes('multiplexing')) {
|
if (this.canvasId === 'canvas-main' && !this.showPosition.includes('multiplexing')) {
|
||||||
listenGlobalKeyDownPreview()
|
listenGlobalKeyDownPreview()
|
||||||
}
|
}
|
||||||
// 取消视图请求
|
|
||||||
this.$cancelRequest('/chart/view/getData/**')
|
|
||||||
this.$cancelRequest('/api/link/viewDetail/**')
|
|
||||||
this.$cancelRequest('/static-resource/**')
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initWatermark()
|
this.initWatermark()
|
||||||
|
@ -11,6 +11,7 @@ import store from '@/store'
|
|||||||
import { AIDED_DESIGN, MOBILE_SETTING, PAGE_LINE_DESIGN, PANEL_CHART_INFO, TAB_COMMON_STYLE } from '@/views/panel/panel'
|
import { AIDED_DESIGN, MOBILE_SETTING, PAGE_LINE_DESIGN, PANEL_CHART_INFO, TAB_COMMON_STYLE } from '@/views/panel/panel'
|
||||||
import html2canvas from 'html2canvasde'
|
import html2canvas from 'html2canvasde'
|
||||||
import xssCheck from 'xss'
|
import xssCheck from 'xss'
|
||||||
|
import Vue from 'vue'
|
||||||
|
|
||||||
export function deepCopy(target) {
|
export function deepCopy(target) {
|
||||||
if (typeof target === 'object' && target !== null) {
|
if (typeof target === 'object' && target !== null) {
|
||||||
@ -70,6 +71,10 @@ export function mobile2MainCanvas(mainSource, mobileSource) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function panelInit(componentData, componentStyle) {
|
export function panelInit(componentData, componentStyle) {
|
||||||
|
// 取消视图请求
|
||||||
|
Vue.prototype.$cancelRequest('/chart/view/getData/**')
|
||||||
|
Vue.prototype.$cancelRequest('/api/link/viewDetail/**')
|
||||||
|
Vue.prototype.$cancelRequest('/static-resource/**')
|
||||||
panelDataPrepare(componentData, componentStyle, function() {
|
panelDataPrepare(componentData, componentStyle, function() {
|
||||||
// 将data 和 style 数据设置到全局store中
|
// 将data 和 style 数据设置到全局store中
|
||||||
store.commit('setComponentData', resetID(componentData))
|
store.commit('setComponentData', resetID(componentData))
|
||||||
|
Loading…
Reference in New Issue
Block a user