Files
td_official/src/views/ProjectScreen/index.vue

109 lines
2.2 KiB
Vue
Raw Normal View History

2025-08-21 20:38:44 +08:00
<template>
2025-08-22 17:47:58 +08:00
<div class="large_screen">
2025-08-25 19:59:36 +08:00
<Header :projectId="projectId" :isFull="isFull" @changePage="handleChangePage" />
2025-08-21 20:38:44 +08:00
<div class="nav">
2025-08-22 22:17:57 +08:00
<div class="nav_left" :style="{ left: isHideOther ? '-25vw' : '0' }">
2025-08-22 17:47:58 +08:00
<leftPage :projectId="projectId" />
</div>
2025-08-22 22:17:57 +08:00
<div class="nav_center" :style="{ width: isFull ? '100%' : 'calc(50vw - 30px)' }">
2025-08-25 19:59:36 +08:00
<centerPage :projectId="projectId" :isHide="isFull" />
2025-08-22 17:47:58 +08:00
</div>
2025-08-22 22:17:57 +08:00
<div class="nav_right" :style="{ right: isHideOther ? '-25vw' : '0' }">
2025-08-22 17:47:58 +08:00
<rightPage :projectId="projectId" />
</div>
2025-08-21 20:38:44 +08:00
</div>
</div>
</template>
<script setup lang="ts">
2025-08-22 22:17:57 +08:00
import { ref } from 'vue';
2025-08-21 20:38:44 +08:00
import Header from './components/header.vue';
import leftPage from './components/leftPage.vue';
import centerPage from './components/centerPage.vue';
import rightPage from './components/rightPage.vue';
2025-08-22 17:47:58 +08:00
import { useUserStoreHook } from '@/store/modules/user';
2025-08-21 20:38:44 +08:00
2025-08-22 17:47:58 +08:00
const userStore = useUserStoreHook();
const projectId = computed(() => userStore.selectedProject.id);
2025-08-22 22:17:57 +08:00
const isFull = ref(false)
const isHideOther = ref(false)
2025-08-22 17:47:58 +08:00
2025-08-22 22:17:57 +08:00
/**
* 切换中心页面全屏
*/
2025-08-22 17:47:58 +08:00
const handleChangePage = () => {
2025-08-22 22:17:57 +08:00
if (isFull.value) {
isFull.value = false;
setTimeout(() => {
isHideOther.value = false;
}, 500);
} else {
isFull.value = true;
isHideOther.value = true;
}
2025-08-22 17:47:58 +08:00
}
2025-08-21 20:38:44 +08:00
</script>
<style lang="scss" scoped>
2025-08-22 17:47:58 +08:00
.large_screen {
2025-08-21 20:38:44 +08:00
width: 100vw;
height: 100vh;
background: url('@/assets/large/bg.png') no-repeat;
background-size: 100% 100%;
2025-08-22 17:47:58 +08:00
background-attachment: fixed;
2025-08-21 20:38:44 +08:00
background-color: rgba(4, 7, 17, 1);
2025-08-22 17:47:58 +08:00
overflow: hidden;
2025-08-21 20:38:44 +08:00
}
.nav {
2025-08-22 22:17:57 +08:00
position: relative;
display: grid;
place-items: center;
2025-08-22 17:47:58 +08:00
width: calc(100vw - 30px);
height: calc(100vh - 90px);
margin: 0 auto;
2025-08-21 20:38:44 +08:00
box-sizing: border-box;
color: #fff;
}
.nav_left,
.nav_right {
2025-08-22 22:17:57 +08:00
position: absolute;
width: calc(25vw - 15px);
height: 100%;
transition: all 0.5s ease;
}
.nav_left {
top: 0;
left: 0;
}
.nav_right {
top: 0;
right: 0;
2025-08-21 20:38:44 +08:00
}
.nav_center {
2025-08-22 22:17:57 +08:00
height: 100%;
transition: all 0.5s ease;
2025-08-22 17:47:58 +08:00
}
/* 中间面板全屏动画 */
.full-width {
/* 取消flex增长使用固定宽度 */
width: calc(100vw - 30px);
flex: none;
}
2025-08-22 22:17:57 +08:00
.slide_left {
left: -25vw;
2025-08-22 17:47:58 +08:00
opacity: 0;
}
2025-08-22 22:17:57 +08:00
.slide_right {
right: -25vw;
2025-08-22 17:47:58 +08:00
opacity: 0;
2025-08-21 20:38:44 +08:00
}
</style>