完善项目及大屏

This commit is contained in:
shi
2025-08-22 22:17:57 +08:00
parent a712dce2cd
commit e4523299d4
7 changed files with 296 additions and 119 deletions

View File

@ -32,3 +32,35 @@ export const getScreenLand = (projectId: number | string) => {
method: 'get', method: 'get',
}); });
}; };
// 查询项目形象进度
export const getScreenImgProcess = (projectId: number | string) => {
return request({
url: '/project/big/screen/imageProgress/' + projectId,
method: 'get',
});
};
// 查询项目人员情况
export const getScreenPeople = (projectId: number | string) => {
return request({
url: '/project/big/screen/people/' + projectId,
method: 'get',
});
};
// 查询项目AI安全巡检
export const getScreenSafetyInspection = (projectId: number | string) => {
return request({
url: '/project/big/screen/safetyInspection/' + projectId,
method: 'get',
});
};
// 查询项目概况
export const getScreenGeneralize = (projectId: number | string) => {
return request({
url: '/project/big/screen/generalize/' + projectId,
method: 'get',
});
};

View File

@ -1,26 +1,25 @@
<template> <template>
<div class="centerPage"> <div class="centerPage">
<div class="topPage" :class="{ 'full-height': hideFooter }"> <div class="topPage">
<!-- <img src="@/assets/projectLarge/center.png" alt="" style="width: 100%;object-fit: scale-down"> --> <img src="@/assets/projectLarge/center.png" alt="">
</div> </div>
<div class="endPage" :class="{ 'slide-out-down': hideFooter }" v-if="!isHide"> <div class="endPage" :class="{ 'slide-out-down': hideFooter }" v-if="!isHide">
<Title title="AI安全巡检" :prefix="true" /> <Title title="AI安全巡检" :prefix="true" />
<div class="swiper"> <div class="swiper">
<div class="arrow" :class="{ 'canUse': canLeft }" @click="swiperClick('left')"> <div class="arrow" :class="{ 'canUse': canLeft }" @click="swiperClick('left')">
<el-icon size="16" color="skyblue"> <el-icon size="16" :color="canLeft ? 'rgba(29, 214, 255, 1)' : 'rgba(29, 214, 255, 0.3)'">
<ArrowLeft /> <ArrowLeft />
</el-icon> </el-icon>
</div> </div>
<div class="swiper_content" ref="swiperContent"> <div class="swiper_content" ref="swiperContent">
<div class="swiper_item" v-for="(item, i) in 10" :key="i"> <div class="swiper_item" v-for="(item, i) in inspectionList" :key="i">
<img src="@/assets/projectLarge/swiper.png" alt="安全巡检图片" class="swiper_img"> <img :src="item.picture" alt="安全巡检图片" class="swiper_img">
<div class="swiper_date">2025-03-18</div> <div class="swiper_date">{{ item.createTime.slice(5) }}</div>
<div class="swiper_tip">未佩戴安全帽{{ i }}</div> <div class="swiper_tip">{{ item.label }}</div>
</div> </div>
</div> </div>
<div class="arrow" :class="{ 'canUse': canRight }" @click="swiperClick('right')"> <div class="arrow" :class="{ 'canUse': canRight }" @click="swiperClick('right')">
<el-icon size="16"> <el-icon size="16" :color="canRight ? 'rgba(29, 214, 255, 1)' : 'rgba(29, 214, 255, 0.3)'">
<ArrowRight /> <ArrowRight />
</el-icon> </el-icon>
</div> </div>
@ -30,9 +29,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from "vue" import { ref, onMounted, toRefs, getCurrentInstance } from "vue"
import Title from './title.vue' import Title from './title.vue'
import { ArrowLeft, ArrowRight } from '@element-plus/icons-vue' import { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'
import { getScreenSafetyInspection } from '@/api/projectScreen'
const { proxy } = getCurrentInstance();
const { violation_level_type } = toRefs(proxy?.useDict('violation_level_type'));
const props = defineProps({ const props = defineProps({
hideFooter: { hideFooter: {
@ -42,10 +45,19 @@ const props = defineProps({
isHide: { isHide: {
type: Boolean, type: Boolean,
default: false default: false
},
projectId: {
type: String,
default: ""
} }
}) })
const swiperList = ref([]) const inspectionList = ref([{
id: "",
label: "",
picture: "",
createTime: ""
}])
const swiperContent = ref<HTMLDivElement>() const swiperContent = ref<HTMLDivElement>()
const swiperItemWidth = ref(100) const swiperItemWidth = ref(100)
const canLeft = ref(false) const canLeft = ref(false)
@ -75,7 +87,19 @@ const swiperClick = (direction: 'left' | 'right') => {
canRight.value = swiperContent.value.scrollLeft < swiperContent.value.scrollWidth - swiperContent.value.clientWidth canRight.value = swiperContent.value.scrollLeft < swiperContent.value.scrollWidth - swiperContent.value.clientWidth
} }
const getInspectionList = async () => {
const res = await getScreenSafetyInspection(props.projectId)
const { code, data } = res
if (code === 200) {
data.map(item => {
item.label = violation_level_type.value.find((i: any) => i.value === item.violationType)?.label
})
inspectionList.value = data
}
}
onMounted(() => { onMounted(() => {
getInspectionList()
if (swiperContent.value && swiperContent.value.children.length > 0) { if (swiperContent.value && swiperContent.value.children.length > 0) {
swiperItemWidth.value = swiperContent.value.children[0].clientWidth + 20 swiperItemWidth.value = swiperContent.value.children[0].clientWidth + 20
} }
@ -94,30 +118,23 @@ onMounted(() => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center;
width: 100%; width: 100%;
padding: 15px 0; padding: 15px 0;
border: 1px solid rgba(29, 214, 255, 0.1); border: 1px solid rgba(230, 247, 255, 0.1);
box-sizing: border-box; box-sizing: border-box;
} }
.topPage { .topPage {
flex: 1; flex: 1;
margin-bottom: 23px; margin-bottom: 23px;
transition: flex 1s ease; transition: flex 0.5s ease;
/* 添加flex过渡效果 */
}
/* 当endPage隐藏时topPage占满高度 */
.full-height {
flex: 1 1 100%;
margin-bottom: 0;
} }
.endPage { .endPage {
max-height: 300px; max-height: 300px;
/* 根据实际内容调整最大高度 */
opacity: 1; opacity: 1;
transition: all 1s ease; transition: all 0.5s ease;
} }
/* 向下滑出动画 */ /* 向下滑出动画 */
@ -189,17 +206,16 @@ onMounted(() => {
.arrow { .arrow {
display: grid; display: grid;
place-items: center; place-items: center;
width: 20px; width: 24px;
height: 20px; height: 24px;
border-radius: 50%; border-radius: 50%;
border: 1px solid skyblue; border: 1px solid rgba(29, 214, 255, 0.3);
color: skyblue; color: skyblue;
cursor: pointer; cursor: pointer;
transition: all 0.3s ease; transition: all 0.3s ease;
&.canUse { &.canUse {
background-color: skyblue; border: 1px solid rgba(29, 214, 255, 1);
color: #fff !important;
} }
&:hover:not(.canUse) { &:hover:not(.canUse) {

View File

@ -16,6 +16,10 @@
</div> </div>
<div class="header_right"> <div class="header_right">
<div class="top-bar"> <div class="top-bar">
<!-- -->
<div style="margin-right: 10px;cursor: pointer;" @click="emit('changePage')">
<el-icon size="20"><Expand /></el-icon>
</div>
<!-- 左侧天气图标 + 日期文字 --> <!-- 左侧天气图标 + 日期文字 -->
<div class="left-section"> <div class="left-section">
<div class="weather-list" @mouseenter="requestPause" @mouseleave="resumeScroll"> <div class="weather-list" @mouseenter="requestPause" @mouseleave="resumeScroll">
@ -33,7 +37,7 @@
<div class="bottom-block"></div> <div class="bottom-block"></div>
</div> </div>
<!-- 右侧管理系统图标 + 文字 --> <!-- 右侧管理系统图标 + 文字 -->
<div class="right-section" @click="emit('changePage')"> <div class="right-section">
<img src="@/assets/large/setting.png" alt="设置图标" /> <img src="@/assets/large/setting.png" alt="设置图标" />
<span>管理系统</span> <span>管理系统</span>
</div> </div>

View File

@ -2,31 +2,53 @@
<div class="leftPage"> <div class="leftPage">
<div class="topPage"> <div class="topPage">
<Title title="项目公告" /> <Title title="项目公告" />
<div class="content"> <div class="content">
<div class="content_item" v-for="item in news" :key="item.id"> <div class="content_item" v-for="item in news" :key="item.id">
<div class="round"> <img src="@/assets/projectLarge/round.svg" alt="">
<div class="sub_round"></div> <div class="ellipsis">
{{ item.title }}
<span @click="showNewsDetail(item)" style="color: rgba(138, 149, 165, 1);">{{ item.id === newId ? '关闭' :
'查看' }}</span>
</div> </div>
<div class="ellipsis">{{ item.title }}</div>
</div> </div>
</div> </div>
</div> </div>
<div class="detailBox" :class="{'show': newId}">
<!-- <div class="detail_title">{{ newDetail.title }}</div> -->
<div class="detail_content" v-html="newDetail.content"></div>
</div>
<div class="endPage"> <div class="endPage">
<Title title="人员情况" /> <Title title="人员情况" />
<div class="map"> <div class="map">
<img src="@/assets/projectLarge/map.svg" alt=""> <img src="@/assets/projectLarge/map.svg" alt="">
<!-- <div ref="mapChartRef"></div> --> <!-- <div ref="mapChartRef"></div> -->
</div> </div>
<div class="attendance_tag"> <div class="attendance_tag">
<div class="tag_item" v-for="(item, index) in tagList" :key="index"> <div class="tag_item">
<img src="@/assets/projectLarge/people.svg" alt=""> <img src="@/assets/projectLarge/people.svg" alt="">
<div class="tag_title">{{ item.title }}</div> <div class="tag_title">出勤人数</div>
<div class="tag_info"> <div class="tag_info">
{{ item.number }} {{ attendanceCount }}
<span style="font-size: 14px;">{{ index === 2 ? '%' : '人' }}</span> <span style="font-size: 14px;"></span>
</div>
</div>
<div class="tag_item">
<img src="@/assets/projectLarge/people.svg" alt="">
<div class="tag_title">在岗人数</div>
<div class="tag_info">
{{ peopleCount }}
<span style="font-size: 14px;"></span>
</div>
</div>
<div class="tag_item">
<img src="@/assets/projectLarge/people.svg" alt="">
<div class="tag_title">出勤率</div>
<div class="tag_info">
{{ attendanceRate }}
<span style="font-size: 14px;">%</span>
</div> </div>
</div> </div>
</div> </div>
@ -38,11 +60,11 @@
<div class="attendance_item_title">出勤率</div> <div class="attendance_item_title">出勤率</div>
<div class="attendance_item_title">出勤时间</div> <div class="attendance_item_title">出勤时间</div>
</div> </div>
<div v-for="item in list" :key="item.title" class="attendance_item"> <div v-for="item in teamAttendanceList" :key="item.id" class="attendance_item">
<div class="attendance_item_title">{{ item.title }}</div> <div class="attendance_item_title">{{ item.teamName }}</div>
<div class="attendance_item_number">{{ item.number }} <span class="subfont">/{{ item.number }}</span></div> <div class="attendance_item_number">{{ item.attendanceNumber }} <span class="subfont">/{{ item.allNumber }}</span></div>
<div class="attendance_item_rate">{{ item.attendanceRate }} %</div> <div class="attendance_item_rate">{{ item.attendanceRate }} %</div>
<div class="attendance_item_date subfont">{{ item.date }}</div> <div class="attendance_item_date subfont">{{ item.attendanceTime }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -52,7 +74,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue" import { ref } from "vue"
import Title from './title.vue' import Title from './title.vue'
import { getScreenNews } from '@/api/projectScreen'; import { getScreenNews, getScreenPeople } from '@/api/projectScreen';
import { mapOption } from './optionList' import { mapOption } from './optionList'
import * as echarts from 'echarts'; import * as echarts from 'echarts';
@ -66,20 +88,55 @@ const props = defineProps({
let mapChart = null let mapChart = null
const mapChartRef = ref<HTMLDivElement | null>(null); const mapChartRef = ref<HTMLDivElement | null>(null);
const news = ref([]) const news = ref([])
const list = ref([ const newDetail = ref({
{ title: '智慧系统运维', number: 30, attendanceRate: 100, date: '2025-08-05 08:10' }, title: '',
{ title: '智慧系统运维', number: 30, attendanceRate: 100, date: '2025-08-05 08:10' }, content: ''
{ title: '智慧系统运维', number: 30, attendanceRate: 100, date: '2025-08-05 08:10' }, })
{ title: '智慧系统运维', number: 30, attendanceRate: 100, date: '2025-08-05 08:10' }, const newId = ref('')
{ title: '智慧系统运维', number: 30, attendanceRate: 100, date: '2025-08-05 08:10' }, const attendanceCount = ref(0)
{ title: '智慧系统运维', number: 30, attendanceRate: 100, date: '2025-08-05 08:10' }, const attendanceRate = ref(0)
]) const peopleCount = ref(0)
const tagList = ref([ const teamAttendanceList = ref([
{ title: '出勤人数', number: 259 }, { id: "", teamName: "", attendanceNumber: 0, allNumber: 0, attendanceRate: 0, attendanceTime: "" },
{ title: '在岗人数', number: 100 },
{ title: '出勤率', number: 100 },
]) ])
/**
* 显示新闻详情
*/
const showNewsDetail = (item: any) => {
if (newId.value === item.id) {
newId.value = ''
return
}
newDetail.value = item
newId.value = item.id
}
/**
* 获取项目人员出勤数据
*/
const getPeopleData = async () => {
const res = await getScreenPeople(props.projectId);
const { data, code } = res
if (code === 200) {
attendanceCount.value = data.attendanceCount
attendanceRate.value = data.attendanceRate
peopleCount.value = data.peopleCount
teamAttendanceList.value = data.teamAttendanceList
}
}
/**
* 获取项目新闻数据
*/
const getNewsData = async () => {
const res = await getScreenNews(props.projectId);
const { data, code } = res
if (code === 200) {
news.value = data
}
}
/** /**
* 初始化地图 * 初始化地图
*/ */
@ -95,12 +152,8 @@ onMounted(() => {
// nextTick(() => { // nextTick(() => {
// initMapChart(); // initMapChart();
// }); // });
getScreenNews(props.projectId).then(res => { getPeopleData()
const { data, code } = res getNewsData()
if (code === 200) {
news.value = data
}
})
}) })
onUnmounted(() => { onUnmounted(() => {
@ -116,7 +169,6 @@ onUnmounted(() => {
.leftPage { .leftPage {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 25vw;
height: 100%; height: 100%;
.topPage, .topPage,
@ -158,11 +210,11 @@ onUnmounted(() => {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
gap: 10px; gap: 10px;
// position: relative;
margin-bottom: 20px; margin-bottom: 20px;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: rgba(230, 247, 255, 1); color: rgba(230, 247, 255, 1);
cursor: pointer;
.ellipsis { .ellipsis {
display: -webkit-box; display: -webkit-box;
@ -177,21 +229,8 @@ onUnmounted(() => {
margin-bottom: 0; margin-bottom: 0;
} }
.round { img {
display: grid;
place-items: center;
margin-top: 3px; margin-top: 3px;
width: 12px;
height: 12px;
border-radius: 50%;
background: rgba(29, 214, 255, 0.3);
.sub_round {
width: 6px;
height: 6px;
border-radius: 50%;
background: #1DD6FF;
}
} }
} }
} }
@ -244,4 +283,45 @@ onUnmounted(() => {
.subfont { .subfont {
color: rgba(138, 149, 165, 1); color: rgba(138, 149, 165, 1);
} }
.detailBox {
position: absolute;
left: 20vw;
top: 0;
width: 300px;
height: 300px;
max-height: 500px;
overflow-y: auto;
padding: 0 15px;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.2);
border-radius: 4px;
transition: all 0.3s ease;
opacity: 0;
z-index: -1;
&.show {
left: 25vw;
opacity: 1;
z-index: 1;
}
}
.detailBox::before {
content: '';
/* 绝对定位相对于父元素 */
position: absolute;
/* 定位到左侧中间位置 */
left: -10px;
top: 50%;
/* 垂直居中 */
transform: translateY(-50%);
/* 利用边框创建三角形 */
border-width: 10px 10px 10px 0;
border-style: solid;
/* 三角形颜色与背景匹配,左侧边框透明 */
border-color: transparent rgba(255, 255, 255, 0.2) transparent transparent;
/* 确保三角形在内容下方 */
z-index: -1;
}
</style> </style>

View File

@ -84,6 +84,12 @@ export let barOption = {
axisLabel: { axisLabel: {
color: '#fff' color: '#fff'
}, },
axisLine: {
show: false
},
splitLine: {
show: false
}
}, },
yAxis: { yAxis: {
name: '单位m²', name: '单位m²',

View File

@ -2,20 +2,10 @@
<div class="leftPage"> <div class="leftPage">
<div class="topPage"> <div class="topPage">
<Title title="项目概况" /> <Title title="项目概况" />
<div class="content" v-html="generalize"></div>
<div class="content">
<div class="content_item">项目名称智慧生态工地社区开发项目</div>
<div class="content_item">项目位置贵州省贵阳市乌当区具体地块编号01-123-11</div>
<div class="content_item">占地面积约10000亩</div>
<div class="content_item"> 土地性质城镇住宅用地兼容商业用地容积率2.5</div>
<div class="content_item"> 土地性质城镇住宅用地兼容商业用地容积率2.5</div>
<div class="content_item"> 土地性质城镇住宅用地兼容商业用地容积率2.5</div>
<div class="content_item"> 土地性质城镇住宅用地兼容商业用地容积率2.5</div>
</div>
</div> </div>
<div class="endPage"> <div class="endPage">
<Title title="形象进度" /> <Title title="形象进度" />
<div class="chart_container"> <div class="chart_container">
<div ref="pieChartRef" class="echart" /> <div ref="pieChartRef" class="echart" />
<div ref="lineChartRef" class="echart" /> <div ref="lineChartRef" class="echart" />
@ -29,7 +19,7 @@ import { ref, onMounted, onUnmounted, nextTick } from "vue"
import Title from './title.vue' import Title from './title.vue'
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { pieOption, barOption } from './optionList'; import { pieOption, barOption } from './optionList';
import { getScreenLand } from '@/api/projectScreen'; import { getScreenLand, getScreenImgProcess, getScreenGeneralize } from '@/api/projectScreen';
const props = defineProps({ const props = defineProps({
projectId: { projectId: {
@ -38,9 +28,11 @@ const props = defineProps({
} }
}) })
const generalize = ref()
// 饼图相关 // 饼图相关
const pieChartRef = ref<HTMLDivElement | null>(null); const pieChartRef = ref<HTMLDivElement | null>(null);
let pieChart: any = null; let pieChart: any = null;
const totalPercent = ref(0)
// 折线图相关 // 折线图相关
const lineChartRef = ref<HTMLDivElement | null>(null); const lineChartRef = ref<HTMLDivElement | null>(null);
let lineChart: any = null; let lineChart: any = null;
@ -49,11 +41,12 @@ const designAreaData = ref([])
const transferAreaData = ref([]) const transferAreaData = ref([])
// 饼图数据 // 饼图数据
const pieData = [ const pieData = [
{ name: '桩点浇筑', value: 13 }, { label: 'areaPercentage', name: '厂区', value: 0 },
{ name: '水泥灌注', value: 7 }, { label: 'roadPercentage', name: '道路', value: 0 },
{ name: '箱变安装', value: 40 }, { label: 'collectorLinePercentage', name: '集电线路', value: 0 },
{ name: '支架安装', value: 20 }, { label: 'exportLinePercentage', name: '送出线路', value: 0 },
{ name: '组件安装', value: 20 }, { label: 'substationPercentage', name: '升压站', value: 0 },
{ label: 'boxTransformerPercentage', name: '箱变', value: 0 },
] ]
// 初始化饼图 // 初始化饼图
@ -63,6 +56,7 @@ const initPieChart = () => {
return; return;
} }
pieOption.series.data = pieData pieOption.series.data = pieData
pieOption.graphic[0].style.text = totalPercent.value + '%'
pieChart = echarts.init(pieChartRef.value, null, { pieChart = echarts.init(pieChartRef.value, null, {
renderer: 'canvas', renderer: 'canvas',
useDirtyRect: false useDirtyRect: false
@ -104,9 +98,37 @@ const getScreenLandData = async () => {
} }
} }
/**
* 获取项目形象进度数据
*/
const getScreenImgProcessData = async () => {
const res = await getScreenImgProcess(props.projectId);
const { data, code } = res
if (code === 200) {
totalPercent.value = data.totalPercentage
pieData.forEach((item: any) => {
item.value = data[item.label]
})
initPieChart()
}
}
/**
* 获取项目概况数据
*/
const getScreenGeneralizeData = async () => {
const res = await getScreenGeneralize(props.projectId);
const { data, code } = res
if (code === 200) {
generalize.value = data
}
}
// 组件挂载时初始化图表 // 组件挂载时初始化图表
onMounted(() => { onMounted(() => {
getScreenLandData() getScreenLandData()
getScreenImgProcessData()
getScreenGeneralizeData()
nextTick(() => { nextTick(() => {
initPieChart(); initPieChart();
window.addEventListener('resize', handleResize); window.addEventListener('resize', handleResize);
@ -131,7 +153,6 @@ onUnmounted(() => {
.leftPage { .leftPage {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 25vw;
height: 100%; height: 100%;
.topPage, .topPage,

View File

@ -2,13 +2,13 @@
<div class="large_screen"> <div class="large_screen">
<Header :projectId="projectId" @changePage="handleChangePage" /> <Header :projectId="projectId" @changePage="handleChangePage" />
<div class="nav"> <div class="nav">
<div class="nav_left" v-if="!isHide" :class="{ 'slide-out-left': isHiding }"> <div class="nav_left" :style="{ left: isHideOther ? '-25vw' : '0' }">
<leftPage :projectId="projectId" /> <leftPage :projectId="projectId" />
</div> </div>
<div class="nav_center" :class="{ 'full-width': isHiding }"> <div class="nav_center" :style="{ width: isFull ? '100%' : 'calc(50vw - 30px)' }">
<centerPage :projectId="projectId" :hideFooter="isHiding" :isHide="isHide" /> <centerPage :projectId="projectId" :hideFooter="isHiding" :isHide="isFull" />
</div> </div>
<div class="nav_right" v-if="!isHide" :class="{ 'slide-out-right': isHiding }"> <div class="nav_right" :style="{ right: isHideOther ? '-25vw' : '0' }">
<rightPage :projectId="projectId" /> <rightPage :projectId="projectId" />
</div> </div>
</div> </div>
@ -16,6 +16,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue';
import Header from './components/header.vue'; import Header from './components/header.vue';
import leftPage from './components/leftPage.vue'; import leftPage from './components/leftPage.vue';
import centerPage from './components/centerPage.vue'; import centerPage from './components/centerPage.vue';
@ -24,16 +25,23 @@ import { useUserStoreHook } from '@/store/modules/user';
const userStore = useUserStoreHook(); const userStore = useUserStoreHook();
const projectId = computed(() => userStore.selectedProject.id); const projectId = computed(() => userStore.selectedProject.id);
const isHide = ref(false) const isFull = ref(false)
const isHideOther = ref(false)
const isHiding = ref(false) const isHiding = ref(false)
/**
* 切换中心页面全屏
*/
const handleChangePage = () => { const handleChangePage = () => {
isHiding.value = true; if (isFull.value) {
isFull.value = false;
setTimeout(() => { setTimeout(() => {
isHide.value = !isHide.value; isHideOther.value = false;
isHiding.value = false; }, 500);
}, 500); } else {
isFull.value = true;
isHideOther.value = true;
}
} }
</script> </script>
@ -49,9 +57,9 @@ const handleChangePage = () => {
} }
.nav { .nav {
display: flex; position: relative;
justify-content: center; display: grid;
gap: 15px; place-items: center;
width: calc(100vw - 30px); width: calc(100vw - 30px);
height: calc(100vh - 90px); height: calc(100vh - 90px);
margin: 0 auto; margin: 0 auto;
@ -61,15 +69,25 @@ const handleChangePage = () => {
.nav_left, .nav_left,
.nav_right { .nav_right {
width: 25vw; position: absolute;
transition: transform 1s ease, opacity 1s ease; width: calc(25vw - 15px);
flex-shrink: 0; height: 100%;
transition: all 0.5s ease;
}
.nav_left {
top: 0;
left: 0;
}
.nav_right {
top: 0;
right: 0;
} }
.nav_center { .nav_center {
flex: 1 1 auto; height: 100%;
min-width: 0; transition: all 0.5s ease;
transition: all 1s ease;
} }
/* 中间面板全屏动画 */ /* 中间面板全屏动画 */
@ -79,13 +97,13 @@ const handleChangePage = () => {
flex: none; flex: none;
} }
.slide-out-left { .slide_left {
transform: translateX(-100%); left: -25vw;
opacity: 0; opacity: 0;
} }
.slide-out-right { .slide_right {
transform: translateX(100%); right: -25vw;
opacity: 0; opacity: 0;
} }
</style> </style>