diff --git a/ui/src/api/chat-user/chat-user.ts b/ui/src/api/chat-user/chat-user.ts index 716cba9fa..db4a144b7 100644 --- a/ui/src/api/chat-user/chat-user.ts +++ b/ui/src/api/chat-user/chat-user.ts @@ -23,7 +23,7 @@ const getUserGroupList: (resource: ChatUserResourceParams, loading?: Ref) => Promise> = (resource, data, loading) => { - return put(`${prefix}/${resource.resource_type}/${resource.resource_id}/user_group`, data, undefined, loading) + return put(`${prefix.value}/${resource.resource_type}/${resource.resource_id}/user_group`, data, undefined, loading) } /** diff --git a/ui/src/locales/lang/en-US/views/chat-user.ts b/ui/src/locales/lang/en-US/views/chat-user.ts index c1716c115..b1092913a 100644 --- a/ui/src/locales/lang/en-US/views/chat-user.ts +++ b/ui/src/locales/lang/en-US/views/chat-user.ts @@ -1,10 +1,19 @@ export default { title: 'Chat users', - syncUsers: 'Sync users', - setUserGroups: 'Set user groups', + syncUsers: 'Synchronize users', + setUserGroups: 'Configure user groups', + knowledgeTitleTip: 'This configuration will only take effect when the associated application enables chat user login authentication', + applicationTitleTip: 'This configuration requires login authentication to be enabled in the application', autoAuthorization: 'Auto authorization', authorization: 'Authorization', group: { title: 'User groups', + name: 'User group name', + usernameOrName: 'Username/Name', + delete: { + confirmTitle: 'Confirm to delete user group:', + confirmMessage: 'After deletion, all members in this user group will be removed. Please proceed with caution!', + }, + batchDeleteMember: 'Remove selected {count} members?', } }; \ No newline at end of file diff --git a/ui/src/locales/lang/zh-CN/views/chat-user.ts b/ui/src/locales/lang/zh-CN/views/chat-user.ts index 7df2d3bb6..703907cc9 100644 --- a/ui/src/locales/lang/zh-CN/views/chat-user.ts +++ b/ui/src/locales/lang/zh-CN/views/chat-user.ts @@ -2,6 +2,8 @@ export default { title: '对话用户', syncUsers: '同步用户', setUserGroups: '设置用户组', + knowledgeTitleTip: '该配置需要关联的应用开启对话用户登录认证后才会生效', + applicationTitleTip: '该配置需要应用开启登录认证后生效', autoAuthorization: '自动授权', authorization: '授权', group: { diff --git a/ui/src/locales/lang/zh-Hant/views/chat-user.ts b/ui/src/locales/lang/zh-Hant/views/chat-user.ts index 119a4a49d..3eba778bb 100644 --- a/ui/src/locales/lang/zh-Hant/views/chat-user.ts +++ b/ui/src/locales/lang/zh-Hant/views/chat-user.ts @@ -2,9 +2,18 @@ export default { title: '對話用戶', syncUsers: '同步用戶', setUserGroups: '設定用戶組', + knowledgeTitleTip: '該配置需要關聯的應用開啟對話用戶登入認證後才會生效', + applicationTitleTip: '該配置需要應用開啟登入認證後生效', autoAuthorization: '自動授權', authorization: '授權', group: { title: '用戶組', + name: '用戶組名稱', + usernameOrName: '用戶名/姓名', + delete: { + confirmTitle: '是否刪除用戶組:', + confirmMessage: '刪除後,該用戶組下的成員將全部移除,請謹慎操作!', + }, + batchDeleteMember: '是否移除選中的 {count} 個成員?', } }; \ No newline at end of file diff --git a/ui/src/router/modules/document.ts b/ui/src/router/modules/document.ts index 4aeb182c3..56499dd15 100644 --- a/ui/src/router/modules/document.ts +++ b/ui/src/router/modules/document.ts @@ -55,7 +55,7 @@ const DocumentRouter = { active: 'chat-log', parentPath: '/knowledge/:id/:folderId', parentName: 'KnowledgeDetail', - resourceType: ChatUserResourceEnum.APPLICATION + resourceType: ChatUserResourceEnum.KNOWLEDGE }, component: () => import('@/views/chat-user/index.vue') }, diff --git a/ui/src/views/chat-user/index.vue b/ui/src/views/chat-user/index.vue index 0c5e6c7c1..500439019 100644 --- a/ui/src/views/chat-user/index.vue +++ b/ui/src/views/chat-user/index.vue @@ -3,7 +3,8 @@ @@ -109,7 +110,7 @@ import { ChatUserResourceEnum } from '@/enums/workspaceChatUser' import { MsgSuccess } from '@/utils/message' const route = useRoute() -const resource: ChatUserResourceParams = { resource_id: route.params.id as string, resource_type: route.meta.resourceType as ChatUserResourceEnum } +const resource: ChatUserResourceParams = reactive({ resource_id: route.params.id as string, resource_type: route.meta.resourceType as ChatUserResourceEnum }) const filterText = ref('') const loading = ref(false) diff --git a/ui/src/views/system-chat-user/group/index.vue b/ui/src/views/system-chat-user/group/index.vue index 8fde82614..30e8b55a7 100644 --- a/ui/src/views/system-chat-user/group/index.vue +++ b/ui/src/views/system-chat-user/group/index.vue @@ -2,11 +2,11 @@ @@ -293,6 +293,23 @@ function handleDeleteUser(item?: ChatUserGroupUserItem) {