From 47f5510056187904e26683559c47505a29c84655 Mon Sep 17 00:00:00 2001
From: bsw215583320 <baoshiwei121@163.com>
Date: 星期六, 05 八月 2023 14:38:47 +0800
Subject: [PATCH] 在底部加入日期时间显示
---
src/views/dry/bigScreen/BigWorkShop.vue | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/src/views/dry/bigScreen/BigWorkShop.vue b/src/views/dry/bigScreen/BigWorkShop.vue
index 18fea0f..af6143f 100644
--- a/src/views/dry/bigScreen/BigWorkShop.vue
+++ b/src/views/dry/bigScreen/BigWorkShop.vue
@@ -128,6 +128,11 @@
</div>
</div>
</div>
+ <div class="footer">
+
+ <div >{{ nowDate }}</div>
+ <div >{{ nowTime }}</div>
+ </div>
</div>
</div>
</div>
@@ -152,6 +157,9 @@
const Timer = ref()
const realTime = ref(new Map())
+ const nowTime = ref()
+ const nowDate = ref()
+
function listAllEqp() {
listAll({ enable: 'Y' })
@@ -211,9 +219,18 @@
}
}
+ function getNowTime() {
+ var date = new Date()
+ nowDate.value = (date.getFullYear()) + "/" + (date.getMonth()< 9? "0" + (date.getMonth() + 1): date.getMonth() + 1) + "/" + (date.getDay() < 10? "0" + date.getDay() : date.getDay())
+ nowTime.value = "" + (date.getHours()<10? "0" + date.getHours() : date.getHours()) + ":" + (date.getMinutes()< 10? "0" + date.getMinutes(): date.getMinutes())
+ //console.log("鑾峰彇褰撳墠鏃堕棿锛�");
+ }
+
+ getNowTime()
listAllEqp()
onMounted(() => {
Timer.value = setInterval(updateRealTime, 3000)
+ setInterval(getNowTime,10000)
})
onUnmounted(() => {
@@ -394,7 +411,17 @@
line-height: 26px;
}
- .value {
+
+ .footer {
+ height: 160px;
+ display: flex;
+ padding: 10px 20px;
+ font-size: 30px;
+ flex-direction: column-reverse;
+ align-items: flex-end;
+ color: white;
+ line-height: 40px;
+
}
:deep() .progress {
padding: 25px 25px;
--
Gitblit v1.9.3