From 53a0137cb4984278308b932e2d84940f7049dc9c Mon Sep 17 00:00:00 2001 From: Kven <2955163637@qq.com> Date: Mon, 5 May 2025 18:00:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(@vben/web-antd):=20=E9=87=8D=E6=9E=84PPT?= =?UTF-8?q?=E7=94=9F=E6=88=90=E9=A1=B5=E9=9D=A2=E5=B9=B6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/api/core/chatflow.ts | 26 +- apps/web-antd/src/api/core/server.ts | 8 +- apps/web-antd/src/store/auth.ts | 4 +- apps/web-antd/src/views/ppt/index.vue | 177 ++++++++------ apps/web-antd/src/views/spider/index.vue | 227 +++++++++++++++--- apps/web-antd/src/views/spider/index2.vue | 210 ---------------- apps/web-antd/src/views/word/index.vue | 23 +- apps/web-antd/vite.config.mts | 12 +- packages/effects/common-ui/package.json | 1 - .../common-ui/src/ui/home/workflows-view.vue | 1 + packages/effects/common-ui/src/ui/index.ts | 1 - .../effects/common-ui/src/ui/spider/index.ts | 3 - .../src/ui/spider/spider-list-view.vue | 49 ---- .../src/ui/spider/spider-work-view.vue | 139 ----------- .../effects/common-ui/src/ui/spider/typing.ts | 9 - pnpm-lock.yaml | 3 - 16 files changed, 339 insertions(+), 554 deletions(-) delete mode 100644 apps/web-antd/src/views/spider/index2.vue delete mode 100644 packages/effects/common-ui/src/ui/spider/index.ts delete mode 100644 packages/effects/common-ui/src/ui/spider/spider-list-view.vue delete mode 100644 packages/effects/common-ui/src/ui/spider/spider-work-view.vue delete mode 100644 packages/effects/common-ui/src/ui/spider/typing.ts diff --git a/apps/web-antd/src/api/core/chatflow.ts b/apps/web-antd/src/api/core/chatflow.ts index 239b8bd..bfec8e1 100644 --- a/apps/web-antd/src/api/core/chatflow.ts +++ b/apps/web-antd/src/api/core/chatflow.ts @@ -24,15 +24,21 @@ export namespace ChatflowApi { } export interface ChatListResult { - id: string; - name: string; - inputs: { - [key: string]: any; - }; - status: string; - introduction: string; - createAt: string; - updatedAt: string; + data: [ + { + createAt: string; + id: string; + inputs: { + [key: string]: any; + }; + introduction: string; + name: string; + status: string; + updatedAt: string; + }, + ]; + hasMore: boolean; + limit: number; } } @@ -51,7 +57,7 @@ export async function getChatList( const url = params.appid ? `/v1/chat/conversations/${params.appid}` : '/v1/chat/conversations/'; - return requestClient.request(url, { + return requestClient.request(url, { data, method: 'POST', }); diff --git a/apps/web-antd/src/api/core/server.ts b/apps/web-antd/src/api/core/server.ts index 162b14a..7d7520c 100644 --- a/apps/web-antd/src/api/core/server.ts +++ b/apps/web-antd/src/api/core/server.ts @@ -1,5 +1,3 @@ -import type { SpiderItem } from '@vben/common-ui'; - import { requestClient } from '#/api/request'; export namespace RepositoryApi { @@ -9,9 +7,9 @@ export namespace RepositoryApi { } } -export async function getAppList(params: RepositoryApi.AppListParams) { - return requestClient.get(`/v1/server/apps`, { params }); -} +export const getAppList = (params: RepositoryApi.AppListParams) => { + return requestClient.get(`/v1/server/apps`, { params }); +}; // export const getAppDetail = (id) => { // return requestClient.get(`/v1/server/${id}`) diff --git a/apps/web-antd/src/store/auth.ts b/apps/web-antd/src/store/auth.ts index 116d6b1..8b83178 100644 --- a/apps/web-antd/src/store/auth.ts +++ b/apps/web-antd/src/store/auth.ts @@ -51,7 +51,7 @@ export const useAuthStore = defineStore('auth', () => { realName: user.username, username: user.username, roles: [user.role.name], - homePath: '/home', + homePath: '/analytics', token: csrf.token, }; accessStore.setAccessToken(csrf.token); @@ -114,7 +114,7 @@ export const useAuthStore = defineStore('auth', () => { realName: user.username, username: user.username, roles: [user.role.name], - homePath: '/home', + homePath: '/analytics', token: csrf.token, }; userStore.setUserInfo(userInfo); diff --git a/apps/web-antd/src/views/ppt/index.vue b/apps/web-antd/src/views/ppt/index.vue index 2120508..1dcad5b 100644 --- a/apps/web-antd/src/views/ppt/index.vue +++ b/apps/web-antd/src/views/ppt/index.vue @@ -1,4 +1,4 @@ -