feat: 前端页面优化与入库任务重试/删除
- 概览与检索合并为单一概览页 - 类目/文档管理/入库整合为树形目录知识库页(Library),支持文档搜索 - 入库进度改为右侧 Drawer,支持任务详情、重试、删除 - 后端新增任务重试与删除接口
This commit is contained in:
@@ -5,9 +5,6 @@ import { storeToRefs } from 'pinia'
|
||||
import { Modal, message } from 'ant-design-vue'
|
||||
import {
|
||||
DashboardOutlined,
|
||||
FileTextOutlined,
|
||||
UploadOutlined,
|
||||
SearchOutlined,
|
||||
AppstoreOutlined,
|
||||
SettingOutlined,
|
||||
MenuFoldOutlined,
|
||||
@@ -21,11 +18,14 @@ import {
|
||||
import { useAuthStore } from '@/stores/useAuthStore'
|
||||
import { changeMyPassword } from '@/api/auth'
|
||||
import { callApi } from '@/api/client'
|
||||
import TasksDrawer from '@/views/TasksDrawer.vue'
|
||||
import { useTasksDrawer } from '@/composables/useTasksDrawer'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const authStore = useAuthStore()
|
||||
const { user, displayName } = storeToRefs(authStore)
|
||||
const tasksDrawer = useTasksDrawer()
|
||||
|
||||
const collapsed = ref(false)
|
||||
|
||||
@@ -37,12 +37,9 @@ const openKeys = ref(['main'])
|
||||
|
||||
const menuItems = computed(() => {
|
||||
const items = [
|
||||
{ key: 'overview', icon: () => h(DashboardOutlined), label: '概览' },
|
||||
{ key: 'documents', icon: () => h(FileTextOutlined), label: '文档管理' },
|
||||
{ key: 'ingest', icon: () => h(UploadOutlined), label: '文档入库' },
|
||||
{ key: 'overview', icon: () => h(DashboardOutlined), label: '概览与检索' },
|
||||
{ key: 'library', icon: () => h(AppstoreOutlined), label: '知识库' },
|
||||
{ key: 'tasks', icon: () => h(ClockCircleOutlined), label: '入库进度' },
|
||||
{ key: 'search', icon: () => h(SearchOutlined), label: '检索测试台' },
|
||||
{ key: 'categories', icon: () => h(AppstoreOutlined), label: '类目列表' },
|
||||
{ key: 'settings', icon: () => h(SettingOutlined), label: '设置' },
|
||||
{ key: 'api-docs', icon: () => h(ApiOutlined), label: 'API 说明' }
|
||||
]
|
||||
@@ -53,6 +50,10 @@ const menuItems = computed(() => {
|
||||
})
|
||||
|
||||
function handleMenuClick({ key }) {
|
||||
if (key === 'tasks') {
|
||||
tasksDrawer.open()
|
||||
return
|
||||
}
|
||||
if (key && key !== route.name) {
|
||||
router.push({ name: key })
|
||||
}
|
||||
@@ -194,6 +195,9 @@ async function handleSubmitPassword() {
|
||||
</a-layout-footer>
|
||||
</a-layout>
|
||||
|
||||
<!-- 入库进度右侧 Drawer -->
|
||||
<TasksDrawer />
|
||||
|
||||
<!-- 强制改密弹窗(must_change_password 用户,不可关闭) -->
|
||||
<a-modal
|
||||
v-model:open="passwordModalVisible"
|
||||
|
||||
Reference in New Issue
Block a user