fix: 增加请求超时时间并优化团队管理页面逻辑 (#49)
- 将axios请求超时时间从5000ms增加到50000ms,以应对网络不稳定的情况 - 在团队管理页面中,添加计算属性过滤可添加的用户,并优化用户选择框的显示逻辑 - 移除docker-compose文件中不必要的构建配置,简化部署流程
This commit is contained in:
parent
35bb70cee9
commit
45bd222176
|
@ -35,37 +35,6 @@ services:
|
||||||
- ragflow
|
- ragflow
|
||||||
restart: on-failure
|
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:
|
||||||
# mysql:5.7 linux/arm64 image is unavailable.
|
# mysql:5.7 linux/arm64 image is unavailable.
|
||||||
image: mysql:8.0.39
|
image: mysql:8.0.39
|
||||||
|
|
|
@ -32,10 +32,6 @@ services:
|
||||||
management-frontend:
|
management-frontend:
|
||||||
container_name: ragflowplus-management-frontend
|
container_name: ragflowplus-management-frontend
|
||||||
image: zstar1003/ragflowplus-management-web:v0.2.0
|
image: zstar1003/ragflowplus-management-web:v0.2.0
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: Dockerfile
|
|
||||||
# target: frontend
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/management_nginx.conf:/etc/nginx/conf.d/default.conf
|
- ./nginx/management_nginx.conf:/etc/nginx/conf.d/default.conf
|
||||||
ports:
|
ports:
|
||||||
|
@ -51,10 +47,6 @@ services:
|
||||||
management-backend:
|
management-backend:
|
||||||
container_name: ragflowplus-management-backend
|
container_name: ragflowplus-management-backend
|
||||||
image: zstar1003/ragflowplus-management-server:v0.2.0
|
image: zstar1003/ragflowplus-management-server:v0.2.0
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
target: backend
|
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -32,10 +32,6 @@ services:
|
||||||
management-frontend:
|
management-frontend:
|
||||||
container_name: ragflowplus-management-frontend
|
container_name: ragflowplus-management-frontend
|
||||||
image: zstar1003/ragflowplus-management-web:v0.2.0
|
image: zstar1003/ragflowplus-management-web:v0.2.0
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: Dockerfile
|
|
||||||
# target: frontend
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/management_nginx.conf:/etc/nginx/conf.d/default.conf
|
- ./nginx/management_nginx.conf:/etc/nginx/conf.d/default.conf
|
||||||
ports:
|
ports:
|
||||||
|
@ -51,10 +47,6 @@ services:
|
||||||
management-backend:
|
management-backend:
|
||||||
container_name: ragflowplus-management-backend
|
container_name: ragflowplus-management-backend
|
||||||
image: zstar1003/ragflowplus-management-server:v0.2.0
|
image: zstar1003/ragflowplus-management-server:v0.2.0
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
target: backend
|
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -116,7 +116,7 @@ function createRequest(instance: AxiosInstance) {
|
||||||
// 请求体
|
// 请求体
|
||||||
data: {},
|
data: {},
|
||||||
// 请求超时
|
// 请求超时
|
||||||
timeout: 5000,
|
timeout: 50000,
|
||||||
// 跨域请求时是否携带 Cookies
|
// 跨域请求时是否携带 Cookies
|
||||||
withCredentials: false
|
withCredentials: false
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ import type { FormInstance } from "element-plus"
|
||||||
import { addTeamMemberApi, getTableDataApi, getTeamMembersApi, getUsersApi, removeTeamMemberApi } from "@@/apis/teams"
|
import { addTeamMemberApi, getTableDataApi, getTeamMembersApi, getUsersApi, removeTeamMemberApi } from "@@/apis/teams"
|
||||||
import { usePagination } from "@@/composables/usePagination"
|
import { usePagination } from "@@/composables/usePagination"
|
||||||
import { CirclePlus, Refresh, Search, UserFilled } from "@element-plus/icons-vue"
|
import { CirclePlus, Refresh, Search, UserFilled } from "@element-plus/icons-vue"
|
||||||
|
import { computed } from "vue" // 导入 computed
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "TeamManagement"
|
name: "TeamManagement"
|
||||||
|
@ -95,6 +96,12 @@ const userLoading = ref<boolean>(false)
|
||||||
const selectedUser = ref<number | undefined>(undefined)
|
const selectedUser = ref<number | undefined>(undefined)
|
||||||
const selectedRole = ref<string>("normal")
|
const selectedRole = ref<string>("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) {
|
function handleManageMembers(row: TeamData) {
|
||||||
currentTeam.value = row
|
currentTeam.value = row
|
||||||
memberDialogVisible.value = true
|
memberDialogVisible.value = true
|
||||||
|
@ -324,9 +331,15 @@ watch([() => paginationData.currentPage, () => paginationData.pageSize], getTabl
|
||||||
<div v-loading="userLoading">
|
<div v-loading="userLoading">
|
||||||
<el-form label-width="80px">
|
<el-form label-width="80px">
|
||||||
<el-form-item label="选择用户">
|
<el-form-item label="选择用户">
|
||||||
<el-select v-model="selectedUser" placeholder="请选择用户" style="width: 100%">
|
<!-- 修改 placeholder 属性,使其动态绑定 -->
|
||||||
|
<el-select
|
||||||
|
v-model="selectedUser"
|
||||||
|
:placeholder="availableUsers.length > 0 ? '请选择用户' : '(当前无添加的用户数据)'"
|
||||||
|
style="width: 100%"
|
||||||
|
:disabled="availableUsers.length === 0"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="user in userList"
|
v-for="user in availableUsers"
|
||||||
:key="user.id"
|
:key="user.id"
|
||||||
:label="user.username"
|
:label="user.username"
|
||||||
:value="user.id"
|
:value="user.id"
|
||||||
|
@ -346,7 +359,7 @@ watch([() => paginationData.currentPage, () => paginationData.pageSize], getTabl
|
||||||
<el-button @click="addMemberDialogVisible = false">
|
<el-button @click="addMemberDialogVisible = false">
|
||||||
取消
|
取消
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="confirmAddMember">
|
<el-button type="primary" @click="confirmAddMember" :disabled="!selectedUser">
|
||||||
确认
|
确认
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -11,9 +11,12 @@ declare module 'vue' {
|
||||||
ElAside: typeof import('element-plus/es')['ElAside']
|
ElAside: typeof import('element-plus/es')['ElAside']
|
||||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||||
ElBacktop: typeof import('element-plus/es')['ElBacktop']
|
ElBacktop: typeof import('element-plus/es')['ElBacktop']
|
||||||
|
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
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']
|
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||||
|
@ -21,17 +24,35 @@ declare module 'vue' {
|
||||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
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']
|
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
ElMain: typeof import('element-plus/es')['ElMain']
|
ElMain: typeof import('element-plus/es')['ElMain']
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
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']
|
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']
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||||
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
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']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
}
|
}
|
||||||
|
export interface ComponentCustomProperties {
|
||||||
|
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue