This commit is contained in:
2025-09-11 09:10:25 +08:00
3 changed files with 40 additions and 13 deletions

View File

@ -8,9 +8,9 @@ VITE_APP_ENV = 'development'
# VITE_APP_BASE_API = 'http://192.168.110.209:8899' # VITE_APP_BASE_API = 'http://192.168.110.209:8899'
# 李陈杰 209 # 李陈杰 209
# VITE_APP_BASE_API = 'http://192.168.110.209:8899' VITE_APP_BASE_API = 'http://192.168.110.209:8899'
# 曾涛 # 曾涛
VITE_APP_BASE_API = 'http://192.168.110.149:8899' # VITE_APP_BASE_API = 'http://192.168.110.149:8899'
# 罗成 # 罗成
# VITE_APP_BASE_API = 'http://192.168.110.188:8899' # VITE_APP_BASE_API = 'http://192.168.110.188:8899'
# 朱银 # 朱银

View File

@ -6,7 +6,7 @@
<leftPage :projectId="projectId" /> <leftPage :projectId="projectId" />
</div> </div>
<div class="nav_center" :style="{ width: isFull ? '100%' : 'calc(50vw - 30px)' }"> <div class="nav_center" :style="{ width: isFull ? '100%' : 'calc(50vw - 30px)' }">
<centerPage :projectId="projectId" :isHide="isFull" /> <!-- <centerPage :projectId="projectId" :isHide="isFull" /> -->
</div> </div>
<div class="nav_right" :style="{ right: isHideOther ? '-25vw' : '0' }"> <div class="nav_right" :style="{ right: isHideOther ? '-25vw' : '0' }">
<rightPage :projectId="projectId" /> <rightPage :projectId="projectId" />

View File

@ -2,7 +2,8 @@
<div class="leftPage"> <div class="leftPage">
<div class="topPage"> <div class="topPage">
<Title title="项目公告" /> <Title title="项目公告" />
<div class="content"> <div class="content" ref="contentRef" id="event_scroll" @mouseenter.native="autoScrollTable(true, false)"
@mouseleave.native="autoScrollTable(false, true)">
<div class="content_item" v-for="item in news" :key="item.id"> <div class="content_item" v-for="item in news" :key="item.id">
<img src="@/assets/projectLarge/round.svg" alt=""> <img src="@/assets/projectLarge/round.svg" alt="">
<div class="ellipsis"> <div class="ellipsis">
@ -88,6 +89,7 @@ const props = defineProps({
let mapChart = null let mapChart = null
const mapChartRef = ref<HTMLDivElement | null>(null); const mapChartRef = ref<HTMLDivElement | null>(null);
const contentRef = ref<HTMLDivElement | null>(null);
const news = ref([]) const news = ref([])
const newDetail = ref({ const newDetail = ref({
title: '', title: '',
@ -135,19 +137,44 @@ const getNewsData = async () => {
const { data, code } = res const { data, code } = res
if (code === 200) { if (code === 200) {
news.value = data news.value = data
autoScrollTable(5)
} }
} }
/** var lastTime = 0;
* 初始化地图 const state = reactive({
*/ events: [],
const initMapChart = () => { outputList: [],
if (!mapChartRef.value) { detialInfoShow: false,
notShowPro: [{ id: 37 }, { id: 44 }, { id: 48 }], //模块内容区域不展示的项目(中煤科工 广东户用光伏项目 兴隆光伏)
scrolltimerTable: null,
flagPause: true, //滚动继续滚动
});
const autoScrollTable = (time, flag = true) => {
//表格自动滚动
const divData = document.getElementById('event_scroll');
if (!flag || !state.flagPause) {
cancelAnimationFrame(state.scrolltimerTable);
return; return;
} }
mapChart = echarts.init(mapChartRef.value); if (time - lastTime < 25) {
mapChart.setOption(mapOption); // 50毫秒更新一次
state.scrolltimerTable = requestAnimationFrame(autoScrollTable);
return; // 如果时间未到,则返回,不执行动画更新
} }
lastTime = time;
// 元素自增距离顶部1像素
divData.scrollTop += 1;
// 判断元素是否滚动到底部(可视高度+距离顶部=整个高度)
if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) {
// 重置table距离顶部距离
divData.scrollTop = 0;
state.scrolltimerTable = requestAnimationFrame(autoScrollTable);
} else {
state.scrolltimerTable = requestAnimationFrame(autoScrollTable);
}
};
onMounted(() => { onMounted(() => {
// nextTick(() => { // nextTick(() => {