添加任务待办
This commit is contained in:
parent
044de7e8fd
commit
5b3c8f1a68
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- TODO 登录页面样式优化;(1)风格和整个系统统一; -->
|
||||||
<div class="login-view">
|
<div class="login-view">
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<div class="login-logo">
|
<div class="login-logo">
|
||||||
@ -144,7 +145,7 @@ const handleLogin = async () => {
|
|||||||
// 获取重定向路径
|
// 获取重定向路径
|
||||||
const redirectPath = sessionStorage.getItem('redirect') || '/';
|
const redirectPath = sessionStorage.getItem('redirect') || '/';
|
||||||
sessionStorage.removeItem('redirect'); // 清除重定向信息
|
sessionStorage.removeItem('redirect'); // 清除重定向信息
|
||||||
|
|
||||||
// 根据用户角色决定重定向目标
|
// 根据用户角色决定重定向目标
|
||||||
if (redirectPath === '/') {
|
if (redirectPath === '/') {
|
||||||
// 如果是管理员,直接跳转到/chat页面
|
// 如果是管理员,直接跳转到/chat页面
|
||||||
@ -152,7 +153,7 @@ const handleLogin = async () => {
|
|||||||
router.push('/chat');
|
router.push('/chat');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 普通用户跳转到默认智能体
|
// 普通用户跳转到默认智能体
|
||||||
try {
|
try {
|
||||||
// 尝试获取默认智能体
|
// 尝试获取默认智能体
|
||||||
@ -162,14 +163,14 @@ const handleLogin = async () => {
|
|||||||
router.push(`/agent/${data.default_agent_id}`);
|
router.push(`/agent/${data.default_agent_id}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 没有默认智能体,获取第一个可用智能体
|
// 没有默认智能体,获取第一个可用智能体
|
||||||
const agentData = await chatApi.getAgents();
|
const agentData = await chatApi.getAgents();
|
||||||
if (agentData.agents && agentData.agents.length > 0) {
|
if (agentData.agents && agentData.agents.length > 0) {
|
||||||
router.push(`/agent/${agentData.agents[0].name}`);
|
router.push(`/agent/${agentData.agents[0].name}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 没有可用智能体,回退到首页
|
// 没有可用智能体,回退到首页
|
||||||
router.push('/');
|
router.push('/');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- TODO 优化样式,表格优化,添加一个 utils 的函数,用来把时间戳转换为东 8 区的时间,并格式化显示出来 -->
|
||||||
<div class="">
|
<div class="">
|
||||||
<HeaderComponent title="设置" class="setting-header">
|
<HeaderComponent title="设置" class="setting-header">
|
||||||
|
|
||||||
@ -221,6 +222,7 @@
|
|||||||
@update:config="handleModelLocalPathsUpdate"
|
@update:config="handleModelLocalPathsUpdate"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- TODO 用户管理优化,添加姓名(默认使用用户名配置项) -->
|
||||||
<div class="setting" v-if="state.section === 'user'">
|
<div class="setting" v-if="state.section === 'user'">
|
||||||
<div class="section-header">
|
<div class="section-header">
|
||||||
<h2>用户管理</h2>
|
<h2>用户管理</h2>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user