perf: Login authentication added prompt message

This commit is contained in:
wangdan-fit2cloud 2025-11-18 11:22:19 +08:00
parent f09b68d301
commit 6d38a71906
10 changed files with 42 additions and 29 deletions

View File

@ -462,7 +462,7 @@ const postTableDocument: (
}
/**
* QA模
* QA模
* @param fileName,type,
*/
const exportQATemplate: (fileName: string, type: string, loading?: Ref<boolean>) => void = (
@ -474,7 +474,7 @@ const exportQATemplate: (fileName: string, type: string, loading?: Ref<boolean>)
}
/**
* table模
* table模
* @param fileName,type,
*/
const exportTableTemplate: (fileName: string, type: string, loading?: Ref<boolean>) => void = (

View File

@ -433,7 +433,7 @@ const postTableDocument: (
}
/**
* QA模
* QA模
* @param fileName,type,
*/
const exportQATemplate: (fileName: string, type: string, loading?: Ref<boolean>) => void = (
@ -445,7 +445,7 @@ const exportQATemplate: (fileName: string, type: string, loading?: Ref<boolean>)
}
/**
* table模
* table模
* @param fileName,type,
*/
const exportTableTemplate: (fileName: string, type: string, loading?: Ref<boolean>) => void = (

View File

@ -433,7 +433,7 @@ const postTableDocument: (
}
/**
* QA模
* QA模
* @param fileName,type,
*/
const exportQATemplate: (fileName: string, type: string, loading?: Ref<boolean>) => void = (
@ -445,7 +445,7 @@ const exportQATemplate: (fileName: string, type: string, loading?: Ref<boolean>)
}
/**
* table模
* table模
* @param fileName,type,
*/
const exportTableTemplate: (fileName: string, type: string, loading?: Ref<boolean>) => void = (

View File

@ -14,7 +14,7 @@ const getRoleList: (loading?: Ref<boolean>) => Promise<Result<{ internal_role: R
}
/**
*
*
*/
const getRoleTemplate: (role_type: RoleTypeEnum, loading?: Ref<boolean>) => Promise<Result<RolePermissionItem[]>> = (role_type, loading) => {
return get(`${prefix}/template/${role_type}`, undefined, loading)
@ -106,4 +106,4 @@ export default {
getRoleMemberList,
CreateMember,
deleteRoleMember
}
}

View File

@ -61,7 +61,7 @@
</slot>
</template>
</el-select>
<!-- 添加模 -->
<!-- 添加模 -->
<CreateModelDialog
v-if="showFooter"
ref="createModelRef"

View File

@ -43,6 +43,8 @@ export default {
loginMethodRequired: 'Please select login method',
toSettingChatUser: 'Go to configure chat user',
displayCodeRequired: 'Please enter the number of failed attempts',
authenticationTooltip:
'Enabling login authentication requires chat users to have authorization configured for both the app and its associated knowledge bases. Without proper authorization, users will not be able to log in or access knowledge base retrieval features.',
},
SettingAPIKeyDialog: {
allowCrossDomainLabel: 'Allow Cross-Domain Access',

View File

@ -43,6 +43,8 @@ export default {
loginMethodRequired: '请选择登录方式',
displayCodeRequired: '请输入失败次数',
toSettingChatUser: '去配置对话用户',
authenticationTooltip:
'开启登录认证后,应用和关联的知识库均需要对话用户授权配置,否则用户无权限登录和知识库检索',
},
SettingAPIKeyDialog: {
allowCrossDomainLabel: '允许跨域地址',
@ -99,7 +101,6 @@ export default {
disapproval: '反对',
tokenUsage: '用户消耗 Tokens',
topQuestions: '用户提问次数',
},
},
}

View File

@ -37,7 +37,7 @@ export default {
errorMessage2: '文件格式不支持',
errorMessage3: '文件不能为空',
// errorMessage4: '每次最多上传50个文件',
template: '模',
template: '模',
download: '下载',
},
@ -48,13 +48,13 @@ export default {
},
table: {
label: '表格',
tip1: '1、点击下载对应模并完善信息:',
tip1: '1、点击下载对应模并完善信息:',
tip2: '2、第一行必须是列标题且列标题必须是有意义的术语表中每条记录将作为一个分段',
tip3: '3、上传的表格文件中每个 sheet 会作为一个文档sheet名称为文档名称',
},
QA: {
label: 'QA 问答对',
tip1: '1、点击下载对应模并完善信息',
tip1: '1、点击下载对应模并完善信息',
tip2: '2、上传的表格文件中每个 sheet 会作为一个文档sheet名称为文档名称',
},
lark: {},

View File

@ -42,6 +42,8 @@ export default {
loginMethodRequired: '請選擇登陸方式',
displayCodeRequired: '請輸入失敗次數',
toSettingChatUser: '去配置對話用戶',
authenticationTooltip:
'開啟登陸認證後,應用和關聯的知識庫均需要對話用戶授權配置,否則用戶無權限登陸和知識庫檢索',
},
SettingAPIKeyDialog: {
dialogTitle: '設定',

View File

@ -23,8 +23,8 @@
step-strictly
/>
<span class="ml-4">{{
$t('views.applicationOverview.appInfo.LimitDialog.timesDays')
}}</span>
$t('views.applicationOverview.appInfo.LimitDialog.timesDays')
}}</span>
</el-form-item>
<!-- 身份验证 -->
<el-form-item
@ -74,7 +74,7 @@
style="margin: 0 4px 0 0 !important"
>
<el-icon>
<RefreshRight/>
<RefreshRight />
</el-icon>
</el-button>
</el-tooltip>
@ -88,8 +88,16 @@
:class="form.authentication_value.type === 'login' ? 'active' : ''"
>
<el-radio value="login" size="large">
<p class="mb-16 lighter">
<p class="mb-16 lighter flex align-center">
{{ $t('views.system.authentication.title') }}
<el-tooltip
popper-class="max-w-350"
effect="dark"
:content="$t('views.applicationOverview.appInfo.LimitDialog.authenticationTooltip')"
>
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
</el-tooltip>
<el-button type="primary" link @click="router.push({ name: 'applicationChatUser' })">
{{ $t('views.applicationOverview.appInfo.LimitDialog.toSettingChatUser') }}
</el-button>
@ -111,7 +119,7 @@
>
<el-checkbox-group v-model="form.authentication_value.login_value">
<template v-for="t in auth_list" :key="t.value">
<el-checkbox :label="t.label" :value="t.value"/>
<el-checkbox :label="t.label" :value="t.value" />
</template>
</el-checkbox-group>
</el-form-item>
@ -178,18 +186,18 @@
</el-drawer>
</template>
<script setup lang="ts">
import {ref, watch, computed} from 'vue'
import {useRoute, useRouter} from 'vue-router'
import type {FormInstance, FormRules} from 'element-plus'
import {MsgSuccess} from '@/utils/message'
import {t} from '@/locales'
import {copyClick} from '@/utils/clipboard'
import {loadSharedApi} from '@/utils/dynamics-api/shared-api'
import { ref, watch, computed } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import type { FormInstance, FormRules } from 'element-plus'
import { MsgSuccess } from '@/utils/message'
import { t } from '@/locales'
import { copyClick } from '@/utils/clipboard'
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
const router = useRouter()
const route = useRoute()
const {
params: {id},
params: { id },
} = route
const apiType = computed(() => {
@ -243,7 +251,7 @@ const open = (data: any) => {
}
form.value.authentication = data.authentication
dialogVisible.value = true
loadSharedApi({type: 'application', systemType: apiType.value})
loadSharedApi({ type: 'application', systemType: apiType.value })
.getChatUserAuthType()
.then((ok: any) => {
auth_list.value = ok.data
@ -261,7 +269,7 @@ const submit = async (formEl: FormInstance | undefined) => {
authentication: form.value.authentication,
authentication_value: form.value.authentication_value,
}
loadSharedApi({type: 'application', systemType: apiType.value})
loadSharedApi({ type: 'application', systemType: apiType.value })
.putAccessToken(id as string, obj, loading)
.then(() => {
emit('refresh')
@ -297,7 +305,7 @@ function firstGeneration() {
}
}
defineExpose({open})
defineExpose({ open })
</script>
<style lang="scss" scoped>
.authentication-append-input {