|
@ -1,10 +1,8 @@ |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import HomeAlarmSvg from 'assets/images/home/home-alarm.svg' |
|
|
|
|
|
import WifiConnSvg from 'assets/images/wifi-conn.svg' |
|
|
import WifiConnSvg from 'assets/images/wifi-conn.svg' |
|
|
import WifiUnconnSvg from 'assets/images/wifi-unconn.svg' |
|
|
import WifiUnconnSvg from 'assets/images/wifi-unconn.svg' |
|
|
import ErrorEventsModal from 'components/system/ErrorEventsModal.vue' |
|
|
import ErrorEventsModal from 'components/system/ErrorEventsModal.vue' |
|
|
import NetReconnection from 'components/system/NetReconnection.vue' |
|
|
import NetReconnection from 'components/system/NetReconnection.vue' |
|
|
// import ErrorBox from 'libs/modalUtil' |
|
|
|
|
|
import { formatDateTime, openFullscreen } from 'libs/utils' |
|
|
import { formatDateTime, openFullscreen } from 'libs/utils' |
|
|
import { authRoutes } from 'router/routes' |
|
|
import { authRoutes } from 'router/routes' |
|
|
import { useDeviceStore } from 'stores/deviceStore' |
|
|
import { useDeviceStore } from 'stores/deviceStore' |
|
@ -149,6 +147,25 @@ const toggleLanguage = () => { |
|
|
locale.value = locale.value === 'zh' ? 'en' : 'zh' |
|
|
locale.value = locale.value === 'zh' ? 'en' : 'zh' |
|
|
localStorage.setItem('locale', locale.value) // 保存到本地存储 |
|
|
localStorage.setItem('locale', locale.value) // 保存到本地存储 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const statusMap = { |
|
|
|
|
|
info: { |
|
|
|
|
|
type: 'primary', |
|
|
|
|
|
name: '设备提示信息', |
|
|
|
|
|
}, |
|
|
|
|
|
success: { |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
name: '设备执行信息', |
|
|
|
|
|
}, |
|
|
|
|
|
check: { |
|
|
|
|
|
type: 'danger', |
|
|
|
|
|
name: '设备错误信息', |
|
|
|
|
|
}, |
|
|
|
|
|
warn: { |
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
name: '设备告警信息', |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
@ -217,7 +234,7 @@ const toggleLanguage = () => { |
|
|
</router-view> |
|
|
</router-view> |
|
|
</el-main> |
|
|
</el-main> |
|
|
</el-container> |
|
|
</el-container> |
|
|
<footer class="footer"> |
|
|
|
|
|
|
|
|
<!-- <footer class="footer"> |
|
|
<div class="ip-info"> |
|
|
<div class="ip-info"> |
|
|
IP : {{ deviceInfo.ip }} |
|
|
IP : {{ deviceInfo.ip }} |
|
|
</div> |
|
|
</div> |
|
@ -230,7 +247,52 @@ const toggleLanguage = () => { |
|
|
<div class="time"> |
|
|
<div class="time"> |
|
|
{{ currentTime }} |
|
|
{{ currentTime }} |
|
|
</div> |
|
|
</div> |
|
|
</footer> |
|
|
|
|
|
|
|
|
</footer> --> |
|
|
|
|
|
<el-footer class="footer"> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="6"> |
|
|
|
|
|
<div class="ip-info"> |
|
|
|
|
|
IP : {{ deviceInfo.ip }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<div class="footer-left"> |
|
|
|
|
|
<img src="../assets/images/run.svg" alt=""> |
|
|
|
|
|
<span v-if="!systemStore.systemLogList.length" class="text">设备运行状态</span> |
|
|
|
|
|
<el-popover v-else width="auto" trigger="click" placement="top"> |
|
|
|
|
|
<template #reference> |
|
|
|
|
|
<el-tag style="width: 100%" :type="statusMap[systemStore.systemLogList[0]?.status as keyof typeof statusMap].type"> |
|
|
|
|
|
{{ statusMap[systemStore.systemLogList[0]?.status as keyof typeof statusMap].name }}: {{ systemStore.systemLogList[0]?.name }} |
|
|
|
|
|
{{ systemStore.systemLogList[0]?.time }} |
|
|
|
|
|
</el-tag> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template #default> |
|
|
|
|
|
<div class="log-box"> |
|
|
|
|
|
<el-tag |
|
|
|
|
|
v-for="(item, key) in systemStore.systemLogList" |
|
|
|
|
|
:key |
|
|
|
|
|
:type="statusMap[item?.status as keyof typeof statusMap].type" |
|
|
|
|
|
> |
|
|
|
|
|
<div style="display: flex;justify-content: space-between;width: 100%"> |
|
|
|
|
|
<span> |
|
|
|
|
|
<span>{{ item.name }}: </span> |
|
|
|
|
|
<span>{{ statusMap[item.status as keyof typeof statusMap].name }}</span> |
|
|
|
|
|
</span> |
|
|
|
|
|
<span>{{ item.time }}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-tag> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-popover> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="6"> |
|
|
|
|
|
<div class="time"> |
|
|
|
|
|
{{ currentTime }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-footer> |
|
|
<NetReconnection /> |
|
|
<NetReconnection /> |
|
|
<ErrorEventsModal /> |
|
|
<ErrorEventsModal /> |
|
|
</el-container> |
|
|
</el-container> |
|
|