From 45bd222176a9c585ff86df1ea590e9bfe082f968 Mon Sep 17 00:00:00 2001 From: zstar <65890619+zstar1003@users.noreply.github.com> Date: Thu, 24 Apr 2025 22:13:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=9B=A2=E9=98=9F=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E9=80=BB?= =?UTF-8?q?=E8=BE=91=20(#49)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将axios请求超时时间从5000ms增加到50000ms,以应对网络不稳定的情况 - 在团队管理页面中,添加计算属性过滤可添加的用户,并优化用户选择框的显示逻辑 - 移除docker-compose文件中不必要的构建配置,简化部署流程 --- docker/docker-compose-base.yml | 31 ------------------- docker/docker-compose.yml | 8 ----- docker/docker-compose_gpu.yml | 8 ----- management/web/src/http/axios.ts | 2 +- .../web/src/pages/team-management/index.vue | 19 ++++++++++-- management/web/types/auto/components.d.ts | 21 +++++++++++++ 6 files changed, 38 insertions(+), 51 deletions(-) diff --git a/docker/docker-compose-base.yml b/docker/docker-compose-base.yml index 93804d5..11303f3 100644 --- a/docker/docker-compose-base.yml +++ b/docker/docker-compose-base.yml @@ -35,37 +35,6 @@ services: - ragflow restart: on-failure - infinity: - container_name: ragflow-infinity - profiles: - - infinity - image: infiniflow/infinity:v0.6.0-dev3 - volumes: - - infinity_data:/var/infinity - - ./infinity_conf.toml:/infinity_conf.toml - command: ["-f", "/infinity_conf.toml"] - ports: - - ${INFINITY_THRIFT_PORT}:23817 - - ${INFINITY_HTTP_PORT}:23820 - - ${INFINITY_PSQL_PORT}:5432 - env_file: .env - environment: - - TZ=${TIMEZONE} - mem_limit: ${MEM_LIMIT} - ulimits: - nofile: - soft: 500000 - hard: 500000 - networks: - - ragflow - healthcheck: - test: ["CMD", "curl", "http://localhost:23820/admin/node/current"] - interval: 10s - timeout: 10s - retries: 120 - restart: on-failure - - mysql: # mysql:5.7 linux/arm64 image is unavailable. image: mysql:8.0.39 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c610adb..47c2da8 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -32,10 +32,6 @@ services: management-frontend: container_name: ragflowplus-management-frontend image: zstar1003/ragflowplus-management-web:v0.2.0 - # build: - # context: . - # dockerfile: Dockerfile - # target: frontend volumes: - ./nginx/management_nginx.conf:/etc/nginx/conf.d/default.conf ports: @@ -51,10 +47,6 @@ services: management-backend: container_name: ragflowplus-management-backend image: zstar1003/ragflowplus-management-server:v0.2.0 - build: - context: . - dockerfile: Dockerfile - target: backend ports: - "5000:5000" volumes: diff --git a/docker/docker-compose_gpu.yml b/docker/docker-compose_gpu.yml index 66ab048..e4e3742 100644 --- a/docker/docker-compose_gpu.yml +++ b/docker/docker-compose_gpu.yml @@ -32,10 +32,6 @@ services: management-frontend: container_name: ragflowplus-management-frontend image: zstar1003/ragflowplus-management-web:v0.2.0 - # build: - # context: . - # dockerfile: Dockerfile - # target: frontend volumes: - ./nginx/management_nginx.conf:/etc/nginx/conf.d/default.conf ports: @@ -51,10 +47,6 @@ services: management-backend: container_name: ragflowplus-management-backend image: zstar1003/ragflowplus-management-server:v0.2.0 - build: - context: . - dockerfile: Dockerfile - target: backend ports: - "5000:5000" volumes: diff --git a/management/web/src/http/axios.ts b/management/web/src/http/axios.ts index f0cb95e..840aaa9 100644 --- a/management/web/src/http/axios.ts +++ b/management/web/src/http/axios.ts @@ -116,7 +116,7 @@ function createRequest(instance: AxiosInstance) { // 请求体 data: {}, // 请求超时 - timeout: 5000, + timeout: 50000, // 跨域请求时是否携带 Cookies withCredentials: false } diff --git a/management/web/src/pages/team-management/index.vue b/management/web/src/pages/team-management/index.vue index beb5b17..032c095 100644 --- a/management/web/src/pages/team-management/index.vue +++ b/management/web/src/pages/team-management/index.vue @@ -3,6 +3,7 @@ import type { FormInstance } from "element-plus" import { addTeamMemberApi, getTableDataApi, getTeamMembersApi, getUsersApi, removeTeamMemberApi } from "@@/apis/teams" import { usePagination } from "@@/composables/usePagination" import { CirclePlus, Refresh, Search, UserFilled } from "@element-plus/icons-vue" +import { computed } from "vue" // 导入 computed defineOptions({ name: "TeamManagement" @@ -95,6 +96,12 @@ const userLoading = ref(false) const selectedUser = ref(undefined) const selectedRole = ref("normal") +// 计算属性:过滤出可添加的用户(不在当前团队成员列表中的用户) +const availableUsers = computed(() => { + const memberUserIds = new Set(teamMembers.value.map(member => member.userId)) + return userList.value.filter(user => !memberUserIds.has(user.id)) +}) + function handleManageMembers(row: TeamData) { currentTeam.value = row memberDialogVisible.value = true @@ -324,9 +331,15 @@ watch([() => paginationData.currentPage, () => paginationData.pageSize], getTabl
- + + paginationData.currentPage, () => paginationData.pageSize], getTabl 取消 - + 确认 diff --git a/management/web/types/auto/components.d.ts b/management/web/types/auto/components.d.ts index c3fd1ac..114565d 100644 --- a/management/web/types/auto/components.d.ts +++ b/management/web/types/auto/components.d.ts @@ -11,9 +11,12 @@ declare module 'vue' { ElAside: typeof import('element-plus/es')['ElAside'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElBacktop: typeof import('element-plus/es')['ElBacktop'] + ElBadge: typeof import('element-plus/es')['ElBadge'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] + ElCard: typeof import('element-plus/es')['ElCard'] + ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElContainer: typeof import('element-plus/es')['ElContainer'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDivider: typeof import('element-plus/es')['ElDivider'] @@ -21,17 +24,35 @@ declare module 'vue' { ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] + ElEmpty: typeof import('element-plus/es')['ElEmpty'] + ElForm: typeof import('element-plus/es')['ElForm'] + ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] + ElInput: typeof import('element-plus/es')['ElInput'] ElMain: typeof import('element-plus/es')['ElMain'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] + ElOption: typeof import('element-plus/es')['ElOption'] + ElPagination: typeof import('element-plus/es')['ElPagination'] + ElPopover: typeof import('element-plus/es')['ElPopover'] ElProgress: typeof import('element-plus/es')['ElProgress'] + ElRadio: typeof import('element-plus/es')['ElRadio'] + ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] + ElSelect: typeof import('element-plus/es')['ElSelect'] ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] + ElTable: typeof import('element-plus/es')['ElTable'] + ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTabPane: typeof import('element-plus/es')['ElTabPane'] + ElTabs: typeof import('element-plus/es')['ElTabs'] + ElTag: typeof import('element-plus/es')['ElTag'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } + export interface ComponentCustomProperties { + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] + } }