Compare commits

..

No commits in common. "ba4b9795843e4ddb90e729d23cddd67735bcceba" and "f1d248eaab65ef7d8ef72481f8406869f02eb682" have entirely different histories.

2 changed files with 5 additions and 23 deletions

View File

@ -16,8 +16,7 @@
<!-- 视频播放器 -->
<video :src="monitor.videoSrc" autoplay loop muted playsinline />
<!-- 如果需要显示当前时间则取消下面注释 -->
<!-- <div class="video-time">{{ currentTime }}</div> -->
<div class="video-time">{{ currentTime }}</div>
</div>
<!-- 控制条叠加在视频底部 -->
<div class="video-controls">

View File

@ -50,31 +50,14 @@ export function useDisasterData() {
}
})
// 获取当前日期
function getCurrentDate() {
const date = new Date();
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
}
// 获取当前日期加上指定时间
function getCurrentDateTime(time) {
const date = new Date();
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day} ${time}`;
}
// 协同信息
const collaborationInfo = ref([
{
id: 1,
source: '气象预警',
content:
`巫溪县气象台${getCurrentDate()} 08:30分升级发布"暴雨黄色预警信号"过去6小时文峰、红池坝、天元、长桂等乡镇累计降雨量已达70毫米以上。`,
timestamp: getCurrentDateTime('08:30')
'巫溪县气象台2025年10月17日12时30分升级发布"暴雨黄色预警信号"过去6小时文峰、红池坝、天元、长桂等乡镇累计降雨量已达70毫米以上。',
timestamp: '2025-10-17 12:30'
},
{
id: 2,
@ -86,8 +69,8 @@ export function useDisasterData() {
id: 3,
source: '融媒体中心',
content:
`发布了阻断信息巴南G348武大线三湾于6月28日发生山体滑坡边坡有继续垮塌风险需断道观察车辆从桥口坝绕行金田村预计${getCurrentDate()} 24:00恢复通行。`,
timestamp: getCurrentDateTime('24:00')
'发布了阻断信息巴南G348武大线三湾于6月28日发生山体滑坡边坡有继续垮塌风险需断道观察车辆从桥口坝绕行金田村预计2025年10月17日18时30分恢复通行。',
timestamp: '2025-10-17 14:30'
}
])