diff --git a/psdc-ui/src/views/analyse/nhdb/index.vue b/psdc-ui/src/views/analyse/nhdb/index.vue index 188f9a6..de08251 100644 --- a/psdc-ui/src/views/analyse/nhdb/index.vue +++ b/psdc-ui/src/views/analyse/nhdb/index.vue @@ -25,7 +25,7 @@ const imgSrc = ref('../src/assets/images/策略icon.png') const data = reactive({ celueInfoList:[ { - sceneName:'策略一', + sceneName:'策略1', data:[ { key: 1, @@ -44,13 +44,13 @@ const data = reactive({ }, { key: 4, - label:'单位时间能耗', + label:'单位时间用电', startTime:'5kWh' }, { key: 5, label:'执行前室内温度', - startTime:'15℃' + startTime:'20℃' }, { key: 6, @@ -60,7 +60,7 @@ const data = reactive({ { key: 7, label:'执行后室内温度', - startTime:'19℃' + startTime:'29℃' }, { key: 8, @@ -69,48 +69,98 @@ const data = reactive({ }, { key: 9, - label:'总能耗', + label:'总用电量', startTime:'16kWh' } ] }, { - sceneName:'策略二', + sceneName:'策略2', data:[ { key: 1, label:'开始执行时间', - startTime:'2023-06-08 15:00:00' + startTime:'2023-06-05 11:00:00' }, { key: 2, label:'结束执行时间', - startTime:'2023-06-08 18:00:00' + startTime:'2023-06-05 13:00:00' }, { key: 3, label:'执行时长', - startTime:'3h' + startTime:'2h' }, { key: 4, - label:'单位时间能耗', - startTime:'5kWh' + label:'单位时间用电', + startTime:'6kWh' }, { key: 5, label:'执行前室内温度', + startTime:'22℃' + }, + { + key: 6, + label:'执行前室外温度', + startTime:'15℃' + }, + { + key: 7, + label:'执行后室内温度', + startTime:'30℃' + }, + { + key: 8, + label:'执行后室外温度', startTime:'15℃' }, + { + key: 9, + label:'总用电量', + startTime:'12kWh' + } + ] + }, + { + sceneName:'策略3', + data:[ + { + key: 1, + label:'开始执行时间', + startTime:'2023-06-05 11:00:00' + }, + { + key: 2, + label:'结束执行时间', + startTime:'2023-06-05 13:00:00' + }, + { + key: 3, + label:'执行时长', + startTime:'2h' + }, + { + key: 4, + label:'单位时间用电', + startTime:'6kWh' + }, + { + key: 5, + label:'执行前室内温度', + startTime:'22℃' + }, { key: 6, label:'执行前室外温度', - startTime:'14℃' + startTime:'15℃' }, { key: 7, label:'执行后室内温度', - startTime:'19℃' + startTime:'30℃' }, { key: 8, @@ -119,8 +169,8 @@ const data = reactive({ }, { key: 9, - label:'总能耗', - startTime:'16kWh' + label:'总用电量', + startTime:'12kWh' } ] }, diff --git a/psdc-ui/src/views/bigview/index.vue b/psdc-ui/src/views/bigview/index.vue index 35026db..662030f 100644 --- a/psdc-ui/src/views/bigview/index.vue +++ b/psdc-ui/src/views/bigview/index.vue @@ -2,6 +2,7 @@

电能替代分布式控制试验平台

+
{{timer}}
@@ -118,6 +119,7 @@ import {getTemperature,getDevicesInfo,getZdb} from '../../api/bigview/bigview' /** 页面加载时*/ onMounted(()=>{ + currentTime(); dcglChartFun(); kqyrbChartFun(); frdlChartFun(); @@ -128,6 +130,35 @@ onMounted(()=>{ dqglChartFun() }) +/** 日期*/ +const timer = ref() +//格式化日期 +function currentTime() { + var now = new Date(); + var year; + var month; + var day; + var hour; + var minute; + var second; + var week; + var zeroFill = function(value) { + if (value < 10) { + value = '0' + value + } + return value + } + year = now.getFullYear(); + month = zeroFill(now.getMonth() + 1); + day = zeroFill(now.getDate()); + hour = zeroFill(now.getHours()); + minute = zeroFill(now.getMinutes()); + second = zeroFill(now.getSeconds()); + week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'][now.getDay()]; + // return (`${year}${month}${day}`); + timer.value = `${year}-${month}-${day} ${hour}:${minute}:${second} ${week}` +} + /** 8个温度传感器数据*/ const wdcgqArr = ref([]) function getWenduFun(){ @@ -844,6 +875,13 @@ onBeforeUnmount(() => { height: 70px; background-image: url("../../assets/images/headtitle.png"); background-size: 100% 100%; + .timer{ + position: absolute; + top: 13px; + left: 30px; + font-size: 16px; + font-weight: bold; + } h2{ font-size: 36px; color: #AFEAFF; diff --git a/psdc-ui/src/views/emonitor/wdcgq/index.vue b/psdc-ui/src/views/emonitor/wdcgq/index.vue index 8a63c08..c5ee72f 100644 --- a/psdc-ui/src/views/emonitor/wdcgq/index.vue +++ b/psdc-ui/src/views/emonitor/wdcgq/index.vue @@ -1,7 +1,7 @@