2025-04-30 06:53:42 +00:00
|
|
|
<script setup lang="ts">
|
2025-06-20 19:55:48 +00:00
|
|
|
import { computed } from 'vue'
|
2025-04-30 06:53:42 +00:00
|
|
|
import UserHeader from '@/layout/layout-header/UserHeader.vue'
|
2025-07-02 14:41:33 +00:00
|
|
|
import SystemHeader from '@/layout/layout-header/SystemHeader.vue'
|
2025-04-30 06:53:42 +00:00
|
|
|
import AppMain from '@/layout/app-main/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()
|
2025-07-14 06:33:30 +00:00
|
|
|
const { theme, user } = useStore()
|
2025-06-20 19:55:48 +00:00
|
|
|
const isDefaultTheme = computed(() => {
|
|
|
|
|
return theme.isDefaultTheme()
|
|
|
|
|
})
|
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
|
|
|
})
|
2025-04-30 06:53:42 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-layout">
|
2025-06-20 19:55:48 +00:00
|
|
|
<div class="app-header" :class="!isDefaultTheme ? 'custom-header' : ''">
|
2025-07-14 06:33:30 +00:00
|
|
|
<el-alert
|
|
|
|
|
v-if="user.isExpire()"
|
|
|
|
|
:title="$t('layout.isExpire')"
|
|
|
|
|
type="warning"
|
|
|
|
|
class="border-b"
|
|
|
|
|
show-icon
|
|
|
|
|
:closable="false"
|
|
|
|
|
/>
|
2025-07-02 14:41:33 +00:00
|
|
|
<SystemHeader v-if="isShared"></SystemHeader>
|
|
|
|
|
<UserHeader v-else />
|
2025-04-30 06:53:42 +00:00
|
|
|
</div>
|
2025-07-14 06:33:30 +00:00
|
|
|
<div class="app-main" :class="user.isExpire() ? 'isExpire' : ''">
|
2025-04-30 06:53:42 +00:00
|
|
|
<AppMain />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
@use './index.scss';
|
|
|
|
|
</style>
|