From fbd49cdf07495f3369854550e6888b7a95f0bc9b Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Sat, 12 Oct 2024 15:42:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E3=80=81=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=9B=B8=E5=90=8C=E7=95=8C=E9=9D=A2=E5=B5=8C=E5=85=A5=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E7=9B=B8=E5=90=8C=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/pages/panel/main.ts | 9 ++++++++- core/core-frontend/src/store/modules/embedded.ts | 10 ++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/pages/panel/main.ts b/core/core-frontend/src/pages/panel/main.ts index 668c0acf3d..5637d1b227 100644 --- a/core/core-frontend/src/pages/panel/main.ts +++ b/core/core-frontend/src/pages/panel/main.ts @@ -69,6 +69,7 @@ const setupAll = async ( type: string, busiFlag: string, outerParams: string, + suffixId: string, token: string, baseUrl: string, dvId: string, @@ -77,7 +78,7 @@ const setupAll = async ( resourceId: string ): Promise> => { const app = createApp(AppElement, { componentName: type }) - app.provide('embeddedParams', { chartId, resourceId, dvId, pid, busiFlag, outerParams }) + app.provide('embeddedParams', { chartId, resourceId, dvId, pid, busiFlag, outerParams, suffixId }) await setupI18n(app) setupStore(app) setupRouter(app) @@ -87,6 +88,7 @@ const setupAll = async ( embeddedStore.setType(type) embeddedStore.setBusiFlag(busiFlag) embeddedStore.setOuterParams(outerParams) + embeddedStore.setSuffixId(suffixId) embeddedStore.setToken(token) embeddedStore.setBaseUrl(baseUrl) embeddedStore.setDvId(dvId) @@ -132,6 +134,7 @@ class DataEaseBi { dvId: string busiFlag: 'dashboard' | 'dataV' outerParams: string + suffixId: string resourceId: string pid: string chartId: string @@ -143,6 +146,7 @@ class DataEaseBi { this.token = options.token this.busiFlag = options.busiFlag this.outerParams = options.outerParams + this.suffixId = options.suffixId this.baseUrl = options.baseUrl this.dvId = options.dvId this.pid = options.pid @@ -157,6 +161,7 @@ class DataEaseBi { this.type, this.busiFlag, this.outerParams, + this.suffixId, this.token, this.baseUrl, this.dvId, @@ -171,6 +176,7 @@ class DataEaseBi { embeddedStore.setType(null) embeddedStore.setBusiFlag(null) embeddedStore.setOuterParams(null) + embeddedStore.setSuffixId(null) embeddedStore.setToken(null) embeddedStore.setBaseUrl(null) embeddedStore.setChartId(null) @@ -180,6 +186,7 @@ class DataEaseBi { this.token = null this.busiFlag = null this.outerParams = null + this.suffixId = null this.baseUrl = null this.dvId = null this.pid = null diff --git a/core/core-frontend/src/store/modules/embedded.ts b/core/core-frontend/src/store/modules/embedded.ts index f7060d4d80..85b200dfd8 100644 --- a/core/core-frontend/src/store/modules/embedded.ts +++ b/core/core-frontend/src/store/modules/embedded.ts @@ -6,6 +6,7 @@ interface AppState { token: string busiFlag: string outerParams: string + suffixId: string baseUrl: string dvId: string pid: string @@ -31,6 +32,7 @@ export const userStore = defineStore('embedded', { token: '', busiFlag: '', outerParams: '', + suffixId: '', baseUrl: '', dvId: '', pid: '', @@ -74,6 +76,9 @@ export const userStore = defineStore('embedded', { getOuterParams(): string { return this.outerParams }, + getSuffixId(): string { + return this.suffixId + }, getBaseUrl(): string { return this.baseUrl }, @@ -100,6 +105,7 @@ export const userStore = defineStore('embedded', { embeddedToken: this.token, busiFlag: this.busiFlag, outerParams: this.outerParams, + suffixId: this.suffixId, type: this.type, dvId: this.dvId, chartId: this.chartId, @@ -148,6 +154,9 @@ export const userStore = defineStore('embedded', { setOuterParams(outerParams: string) { this.outerParams = outerParams }, + setSuffixId(suffixId: string) { + this.suffixId = suffixId + }, setBaseUrl(baseUrl: string) { this.baseUrl = baseUrl }, @@ -171,6 +180,7 @@ export const userStore = defineStore('embedded', { this.token = data['embeddedToken'] this.busiFlag = data['busiFlag'] this.outerParams = data['outerParams'] + this.suffixId = data['suffixId'] this.dvId = data['dvId'] this.chartId = data['chartId'] this.pid = data['pid']