diff --git a/core/core-frontend/src/pages/panel/App.vue b/core/core-frontend/src/pages/panel/App.vue index 45dae81613..6dc9124cbd 100644 --- a/core/core-frontend/src/pages/panel/App.vue +++ b/core/core-frontend/src/pages/panel/App.vue @@ -1,5 +1,5 @@ diff --git a/core/core-frontend/src/pages/panel/main.ts b/core/core-frontend/src/pages/panel/main.ts index 5637d1b227..ef8e4377c4 100644 --- a/core/core-frontend/src/pages/panel/main.ts +++ b/core/core-frontend/src/pages/panel/main.ts @@ -75,10 +75,20 @@ const setupAll = async ( dvId: string, pid: string, chartId: string, - resourceId: string + resourceId: string, + dfId: string ): Promise> => { const app = createApp(AppElement, { componentName: type }) - app.provide('embeddedParams', { chartId, resourceId, dvId, pid, busiFlag, outerParams, suffixId }) + app.provide('embeddedParams', { + chartId, + resourceId, + dfId, + dvId, + pid, + busiFlag, + outerParams, + suffixId + }) await setupI18n(app) setupStore(app) setupRouter(app) @@ -94,6 +104,7 @@ const setupAll = async ( embeddedStore.setDvId(dvId) embeddedStore.setPid(pid) embeddedStore.setResourceId(resourceId) + embeddedStore.setDfId(dfId) const directive = await import('@/directive') directive.installDirective(app) const res = await import('@/store/modules/user') @@ -131,11 +142,13 @@ class DataEaseBi { | 'Dashboard' | 'ScreenPanel' | 'DashboardPanel' + | 'DataFilling' dvId: string busiFlag: 'dashboard' | 'dataV' outerParams: string suffixId: string resourceId: string + dfId: string pid: string chartId: string deOptions: Options @@ -152,6 +165,7 @@ class DataEaseBi { this.pid = options.pid this.chartId = options.chartId this.resourceId = options.resourceId + this.dfId = options.dfId } async initialize(options: Options) { @@ -167,7 +181,8 @@ class DataEaseBi { this.dvId, this.pid, this.chartId, - this.resourceId + this.resourceId, + this.dfId ) } @@ -192,6 +207,7 @@ class DataEaseBi { this.pid = null this.chartId = null this.resourceId = null + this.dfId = null this.vm = null } } diff --git a/core/core-frontend/src/store/modules/embedded.ts b/core/core-frontend/src/store/modules/embedded.ts index 85b200dfd8..08c3925c09 100644 --- a/core/core-frontend/src/store/modules/embedded.ts +++ b/core/core-frontend/src/store/modules/embedded.ts @@ -12,6 +12,7 @@ interface AppState { pid: string chartId: string resourceId: string + dfId: string opt: string createType: string templateParams: string @@ -38,6 +39,7 @@ export const userStore = defineStore('embedded', { pid: '', chartId: '', resourceId: '', + dfId: '', opt: '', createType: '', templateParams: '', @@ -94,6 +96,9 @@ export const userStore = defineStore('embedded', { getResourceId(): string { return this.resourceId }, + getDfId(): string { + return this.dfId + }, getOpt(): string { return this.opt }, @@ -110,7 +115,8 @@ export const userStore = defineStore('embedded', { dvId: this.dvId, chartId: this.chartId, pid: this.pid, - resourceId: this.resourceId + resourceId: this.resourceId, + dfId: this.dfId } } }, @@ -172,6 +178,9 @@ export const userStore = defineStore('embedded', { setResourceId(resourceId: string) { this.resourceId = resourceId }, + setDfId(dfId: string) { + this.dfId = dfId + }, setOpt(opt: string) { this.opt = opt }, @@ -185,6 +194,7 @@ export const userStore = defineStore('embedded', { this.chartId = data['chartId'] this.pid = data['pid'] this.resourceId = data['resourceId'] + this.dfId = data['dfId'] }, async setTokenInfo(tokenInfo: Map) { this.tokenInfo = tokenInfo @@ -195,6 +205,7 @@ export const userStore = defineStore('embedded', { this.setCreateType('') this.setTemplateParams('') this.setResourceId('') + this.setDfId('') this.setDvId('') this.setJumpInfoParam('') this.setOuterUrl('') diff --git a/core/core-frontend/src/views/chart/ChartView.vue b/core/core-frontend/src/views/chart/ChartView.vue index 95b16e3582..1be09da827 100644 --- a/core/core-frontend/src/views/chart/ChartView.vue +++ b/core/core-frontend/src/views/chart/ChartView.vue @@ -1,5 +1,12 @@