diff --git a/ui/src/layout/layout-header/workspace-dropdown/index.vue b/ui/src/layout/layout-header/workspace-dropdown/index.vue index 126c389d7..c928615f2 100644 --- a/ui/src/layout/layout-header/workspace-dropdown/index.vue +++ b/ui/src/layout/layout-header/workspace-dropdown/index.vue @@ -55,7 +55,7 @@ async function getWorkspaceList() { onBeforeMount(async () => { await getWorkspaceList() - const id = user.getWorkspaceId() ?? 'default' + const id = localStorage.getItem('workspace_id') ?? 'default' currentWorkspace.value = workspaceList.value.find((item) => item.id === id) }) diff --git a/ui/src/stores/modules/user.ts b/ui/src/stores/modules/user.ts index 4df662ced..31341bdc1 100644 --- a/ui/src/stores/modules/user.ts +++ b/ui/src/stores/modules/user.ts @@ -32,7 +32,7 @@ const useUserStore = defineStore('user', { license_is_valid: false, edition: 'CE', themeInfo: null, - workspace_id: 'default', + workspace_id: '', }), actions: { getLanguage() { @@ -53,14 +53,8 @@ const useUserStore = defineStore('user', { localStorage.setItem('workspace_id', workspace_id) }, getWorkspaceId(): string | null { - if (this.workspace_id) { - return this.workspace_id - } - const workspace_id = localStorage.getItem('workspace_id') - if (workspace_id) { - this.workspace_id = workspace_id - } - return workspace_id + this.workspace_id = this.workspace_id || localStorage.getItem('workspace_id') || 'default' + return this.workspace_id }, getPermissions() { diff --git a/ui/src/views/document/component/SelectKnowledgeDialog.vue b/ui/src/views/document/component/SelectKnowledgeDialog.vue index 83ffeeb4d..eeb813140 100644 --- a/ui/src/views/document/component/SelectKnowledgeDialog.vue +++ b/ui/src/views/document/component/SelectKnowledgeDialog.vue @@ -8,36 +8,14 @@ :close-on-press-escape="false" > -
- - -
- - - - -
- - - {{ item.name }} - -
-
-
-
-
-
-
-
-
+ + + diff --git a/ui/vite.config.ts b/ui/vite.config.ts index 08f5c370c..d47432997 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -17,7 +17,7 @@ export default defineConfig(({ mode }) => { const prefix = process.env.VITE_DYNAMIC_PREFIX || ENV.VITE_BASE_PATH const proxyConf: Record = {} proxyConf['/api'] = { - target: 'http://127.0.0.1:8080', + target: 'http://43.166.1.146:8080/', changeOrigin: true, rewrite: (path: string) => path.replace(ENV.VITE_BASE_PATH, '/'), }