|
@@ -3,22 +3,22 @@
|
|
|
<div class="home-container" v-if="pageType == 'home'">
|
|
|
<div class="header">
|
|
|
<div class="head-time">
|
|
|
- <span>2022/03/28</span>
|
|
|
- <span>星期一</span>
|
|
|
- <span>13:46:37</span>
|
|
|
+ <span>{{ nowTime }}</span>
|
|
|
+ <span>{{ weeks }}</span>
|
|
|
+ <span>{{ timeDate }}</span>
|
|
|
</div>
|
|
|
<div class="main-title">通防智能管控系统</div>
|
|
|
</div>
|
|
|
<div class="home-contents">
|
|
|
<div class="left-content">
|
|
|
- <!-- 局部通风机 -->
|
|
|
- <div class="monitor-box">
|
|
|
- <fanMonitor @goDetail="goDetail" :fandata="fanLocalList" />
|
|
|
- </div>
|
|
|
<!-- 主通风机 -->
|
|
|
- <div class="monitor-box monitor-box1">
|
|
|
+ <div class="monitor-box ">
|
|
|
<mainMonitor :maindata="mainList" @goDetail="goDetail" />
|
|
|
</div>
|
|
|
+ <!-- 局部通风机 -->
|
|
|
+ <div class="monitor-box monitor-box1">
|
|
|
+ <fanMonitor @goDetail="goDetail" :fandata="fanLocalList" />
|
|
|
+ </div>
|
|
|
<!-- 通风设备远程控制 -->
|
|
|
<div class="monitor-box">
|
|
|
<windDevice :devicedata="deviceData" @goDetail="goDetail" />
|
|
@@ -77,7 +77,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
- import { reactive, onMounted, ref, nextTick, createVNode } from 'vue';
|
|
|
+ import { reactive, onMounted, ref, nextTick, createVNode, computed } from 'vue';
|
|
|
import fanMonitor from './components/fan-monitor.vue';
|
|
|
import mainMonitor from './components/main-monitor.vue';
|
|
|
import windDevice from './components/wind-device.vue';
|
|
@@ -90,6 +90,7 @@
|
|
|
import DeviceMonitor from '../../monitorManager/deviceMonitor/index.vue';
|
|
|
import { Modal } from 'ant-design-vue';
|
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
|
+ import moment from 'moment';
|
|
|
|
|
|
let timer: NodeJS.Timeout | null = null;
|
|
|
let fanLocalList = reactive<any[]>([]); //局部风机数据
|
|
@@ -184,7 +185,38 @@
|
|
|
deviceData.value = res.device;
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+ let weeks = computed(() => {
|
|
|
+ let week = moment(new Date().getTime()).day();
|
|
|
+ switch (week) {
|
|
|
+ case 0:
|
|
|
+ return '星期日';
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ return '星期一';
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ return '星期二';
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ return '星期三';
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ return '星期四';
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ return '星期五';
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ return '星期六';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let nowTime = computed(() => {
|
|
|
+ return moment().format('YYYY/MM/DD');
|
|
|
+ });
|
|
|
+ let timeDate=computed(()=>{
|
|
|
+ return moment().format('HH:MM:SS')
|
|
|
+ })
|
|
|
onMounted(() => {
|
|
|
getList();
|
|
|
changeModalBox();
|
|
@@ -266,7 +298,7 @@
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
.monitor-box1 {
|
|
|
- margin: 15px 0px;
|
|
|
+ margin: 10px 0px;
|
|
|
}
|
|
|
}
|
|
|
.center-content {
|
|
@@ -384,7 +416,7 @@
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
.monitor-box1 {
|
|
|
- margin: 15px 0px;
|
|
|
+ margin: 10px 0px;
|
|
|
}
|
|
|
}
|
|
|
}
|