|
|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
<div
|
|
|
|
|
ref="fullscreenTargetRef"
|
|
|
|
|
class="run-overview-page"
|
|
|
|
|
:class="{ 'is-fullscreen': isFullscreen }"
|
|
|
|
|
:class="{ 'is-fullscreen': isFullscreenLayout }"
|
|
|
|
|
>
|
|
|
|
|
<div class="run-overview-page__floating-tools">
|
|
|
|
|
<el-tooltip
|
|
|
|
|
@ -54,6 +54,7 @@
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
import { useFullscreen } from '@vueuse/core'
|
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
import { DeviceOperationOverviewApi } from '@/api/iot/deviceOperationOverview'
|
|
|
|
|
import { DeviceLedgerApi, DeviceLedgerVO } from '@/api/mes/deviceledger'
|
|
|
|
|
import { OrganizationApi } from '@/api/mes/organization'
|
|
|
|
|
@ -75,12 +76,22 @@ import type {
|
|
|
|
|
defineOptions({ name: 'IotRunOverview' })
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const fullscreenTargetRef = ref()
|
|
|
|
|
const { isFullscreen, toggle: toggleFullscreen } = useFullscreen(fullscreenTargetRef)
|
|
|
|
|
const deviceLedgerList = ref<DeviceLedgerVO[]>([])
|
|
|
|
|
const groupOptions = ref<OrganizationTreeOption[]>([])
|
|
|
|
|
let deviceLedgerRequestSeq = 0
|
|
|
|
|
|
|
|
|
|
const isEnabledQueryValue = (value: unknown) => {
|
|
|
|
|
const rawValue = Array.isArray(value) ? value[0] : value
|
|
|
|
|
return ['1', 'true', 'yes', 'on'].includes(String(rawValue ?? '').toLowerCase())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const isFullscreenLayout = computed(
|
|
|
|
|
() => isFullscreen.value || isEnabledQueryValue(route.query.fullscreen ?? route.query.full)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const createDateRangeByQuickKey = (key: QuickRangeKey): [string, string] => {
|
|
|
|
|
const format = 'YYYY-MM-DD HH:mm:ss'
|
|
|
|
|
const now = dayjs()
|
|
|
|
|
@ -453,7 +464,11 @@ onMounted(async () => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.run-overview-page.is-fullscreen {
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: fixed;
|
|
|
|
|
inset: 0;
|
|
|
|
|
z-index: 2000;
|
|
|
|
|
width: 100vw;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
padding: 16px;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
background: #f5f7fa;
|
|
|
|
|
|