2025-04-30 06:53:42 +00:00
|
|
|
|
<script setup lang="ts">
|
2025-06-20 19:55:48 +00:00
|
|
|
|
import { computed } from 'vue'
|
2026-03-04 01:29:54 +00:00
|
|
|
|
import Sidebar from '@/layout/components/sidebar/index.vue'
|
2025-04-30 06:53:42 +00:00
|
|
|
|
import AppMain from '@/layout/app-main/index.vue'
|
2026-03-04 01:29:54 +00:00
|
|
|
|
import LayoutContainer from '@/components/layout-container/index.vue'
|
2026-03-04 02:57:37 +00:00
|
|
|
|
import UserAvatar from '@/layout/layout-header/avatar/index.vue'
|
2025-06-20 19:55:48 +00:00
|
|
|
|
import useStore from '@/stores'
|
2025-07-02 14:41:33 +00:00
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
|
const route = useRoute()
|
2026-03-04 01:29:54 +00:00
|
|
|
|
const { user } = useStore()
|
2025-07-02 14:41:33 +00:00
|
|
|
|
const {
|
|
|
|
|
|
params: { folderId }, // id为knowledgeID
|
2025-07-30 11:36:37 +00:00
|
|
|
|
query: { from },
|
2025-07-02 14:41:33 +00:00
|
|
|
|
} = route as any
|
|
|
|
|
|
const isShared = computed(() => {
|
2025-07-30 11:36:37 +00:00
|
|
|
|
return (
|
|
|
|
|
|
folderId === 'shared' ||
|
|
|
|
|
|
from === 'systemShare' ||
|
|
|
|
|
|
from === 'systemManage' ||
|
2025-07-31 06:50:23 +00:00
|
|
|
|
route.path.includes('resource-management')
|
2025-07-30 11:36:37 +00:00
|
|
|
|
)
|
2025-07-02 14:41:33 +00:00
|
|
|
|
})
|
2026-03-04 02:57:37 +00:00
|
|
|
|
|
|
|
|
|
|
// 判断是否在系统管理页面
|
|
|
|
|
|
const isSystemManagement = computed(() => {
|
|
|
|
|
|
const path = route.path
|
|
|
|
|
|
return path.startsWith('/system')
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// 页面标题
|
|
|
|
|
|
const pageTitle = computed(() => {
|
|
|
|
|
|
return 'AI-RAG'
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// 当前系统页面
|
|
|
|
|
|
const currentSystemPage = computed(() => {
|
|
|
|
|
|
const path = route.path
|
|
|
|
|
|
if (path.startsWith('/system/user')) {
|
|
|
|
|
|
return '用户管理'
|
|
|
|
|
|
} else if (path.startsWith('/system/resource')) {
|
|
|
|
|
|
return '资源授权'
|
|
|
|
|
|
} else if (path.startsWith('/system/settings')) {
|
|
|
|
|
|
return '系统设置'
|
|
|
|
|
|
}
|
|
|
|
|
|
return '用户管理'
|
|
|
|
|
|
})
|
2025-04-30 06:53:42 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-layout">
|
2026-03-04 05:45:06 +00:00
|
|
|
|
<div class="app-main" :class="user.isExpire() ? 'isExpire' : ''" style="display: flex;">
|
|
|
|
|
|
<!-- 最左侧侧边栏 -->
|
|
|
|
|
|
<div style="width: 240px; border-right: 1px solid #e5e7eb;">
|
|
|
|
|
|
<Sidebar />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- 主内容区 -->
|
|
|
|
|
|
<div style="flex: 1; overflow: hidden;">
|
|
|
|
|
|
<!-- 顶部功能区(仅系统管理模式显示) -->
|
|
|
|
|
|
<div v-if="isSystemManagement" style="display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #e5e7eb;">
|
|
|
|
|
|
<div style="display: flex; align-items: center;">
|
|
|
|
|
|
<h2 style="font-size: 18px; font-weight: 600; margin: 0;">AI-RAG | 系统管理</h2>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div style="display: flex; align-items: center;">
|
|
|
|
|
|
<router-link to="/application" style="display: flex; align-items: center; padding: 6px 12px; border-radius: 6px; text-decoration: none; color: #1890ff; border: 1px solid #1890ff;">
|
|
|
|
|
|
<span style="margin-right: 4px;">←</span>
|
|
|
|
|
|
返回工作空间
|
|
|
|
|
|
</router-link>
|
2026-03-04 02:57:37 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-03-04 05:45:06 +00:00
|
|
|
|
<AppMain />
|
|
|
|
|
|
</div>
|
2025-04-30 06:53:42 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
@use './index.scss';
|
|
|
|
|
|
</style>
|