|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div
|
|
<div
|
|
|
- class="bg-gradient-to-br from-slate-950 via-blue-950 to-slate-900 text-cyan-100 p-6 relative"
|
|
|
|
|
|
|
+ class="bg-gradient-to-br from-slate-950 via-blue-950 to-slate-900 text-cyan-100 p-4 relative h-screen overflow-hidden flex flex-col"
|
|
|
:class="{ 'fullscreen-layout': isFullscreen }"
|
|
:class="{ 'fullscreen-layout': isFullscreen }"
|
|
|
>
|
|
>
|
|
|
<!-- Animated background grid -->
|
|
<!-- Animated background grid -->
|
|
@@ -14,8 +14,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Header -->
|
|
<!-- Header -->
|
|
|
- <div class="relative z-10 mb-6">
|
|
|
|
|
- <div class="flex items-center justify-center border-b-2 border-cyan-500/30 pb-4 gap-8">
|
|
|
|
|
|
|
+ <div class="relative z-10 flex-shrink-0">
|
|
|
|
|
+ <div class="flex items-center justify-center border-b-2 border-cyan-500/30 pb-2 gap-8">
|
|
|
<h1 class="text-2xl font-bold text-cyan-300 flex-6 tracking-wider">
|
|
<h1 class="text-2xl font-bold text-cyan-300 flex-6 tracking-wider">
|
|
|
{{ dataInfo.groupName }}
|
|
{{ dataInfo.groupName }}
|
|
|
</h1>
|
|
</h1>
|
|
@@ -55,18 +55,18 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="relative z-10 grid grid-cols-12 gap-4 mt-5 p-6">
|
|
|
|
|
|
|
+ <div class="relative z-10 grid grid-cols-12 gap-3 flex-1 min-h-0 p-2">
|
|
|
<!-- Left panels - 固定高度 -->
|
|
<!-- Left panels - 固定高度 -->
|
|
|
- <div class="col-span-3">
|
|
|
|
|
- <div class="panel h-full flex flex-col">
|
|
|
|
|
|
|
+ <div class="col-span-3 flex flex-col min-h-0">
|
|
|
|
|
+ <div class="panel flex-1 flex flex-col min-h-0">
|
|
|
<!-- 增压机参数 -->
|
|
<!-- 增压机参数 -->
|
|
|
- <div class="flex-1 border-b border-cyan-500/30 pb-2 mb-2">
|
|
|
|
|
- <div class="flex justify-between items-center panel-title mb-2">
|
|
|
|
|
|
|
+ <div class="flex-[3] border-b border-cyan-500/30 pb-1 mb-1 flex flex-col min-h-0">
|
|
|
|
|
+ <div class="flex justify-between items-center panel-title mb-1 flex-shrink-0">
|
|
|
<h4>增压机参数</h4>
|
|
<h4>增压机参数</h4>
|
|
|
- <dv-decoration3 style="width: 120px; height: 30px" />
|
|
|
|
|
|
|
+ <dv-decoration3 style="width: 100px; height: 24px" />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="space-y-3 overflow-y-auto overflow-x-hidden flex-grow">
|
|
|
|
|
|
|
+ <div class="space-y-1 text-xs overflow-y-auto overflow-x-hidden flex-1 min-h-0">
|
|
|
<DataRow
|
|
<DataRow
|
|
|
v-for="item in psaData"
|
|
v-for="item in psaData"
|
|
|
:key="item.modelName"
|
|
:key="item.modelName"
|
|
@@ -77,12 +77,12 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 累计运行时间 -->
|
|
<!-- 累计运行时间 -->
|
|
|
- <div class="flex-1">
|
|
|
|
|
- <div class="flex justify-between items-center panel-title mb-2">
|
|
|
|
|
|
|
+ <div class="flex-1 flex flex-col min-h-0">
|
|
|
|
|
+ <div class="flex justify-between items-center panel-title mb-1 flex-shrink-0">
|
|
|
<h4>累计运行时间</h4>
|
|
<h4>累计运行时间</h4>
|
|
|
- <dv-decoration3 style="width: 120px; height: 30px" />
|
|
|
|
|
|
|
+ <dv-decoration3 style="width: 100px; height: 24px" />
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="space-y-3 overflow-y-auto overflow-x-hidden flex-grow">
|
|
|
|
|
|
|
+ <div class="space-y-1 overflow-y-auto overflow-x-hidden flex-1 min-h-0">
|
|
|
<DataRow
|
|
<DataRow
|
|
|
v-for="item in airTreatmentData"
|
|
v-for="item in airTreatmentData"
|
|
|
:key="item.modelName"
|
|
:key="item.modelName"
|
|
@@ -94,32 +94,32 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="col-span-6 space-y-4">
|
|
|
|
|
|
|
+ <div class="col-span-6 flex flex-col gap-2 min-h-0">
|
|
|
<!-- 3D模型面板 -->
|
|
<!-- 3D模型面板 -->
|
|
|
- <div class="panel h-[60%] relative overflow-hidden">
|
|
|
|
|
|
|
+ <div class="panel flex-[6] relative overflow-hidden min-h-0">
|
|
|
<div class="relative h-full flex items-center justify-center">
|
|
<div class="relative h-full flex items-center justify-center">
|
|
|
<ModelViewer />
|
|
<ModelViewer />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 状态参数面板 -->
|
|
<!-- 状态参数面板 -->
|
|
|
- <div class="panel h-[40%]">
|
|
|
|
|
- <div class="mb-2">
|
|
|
|
|
|
|
+ <div class="panel flex-[4] flex flex-col min-h-0">
|
|
|
|
|
+ <div class="mb-1 flex-shrink-0">
|
|
|
<dv-decoration7>
|
|
<dv-decoration7>
|
|
|
- <h3 class="text-cyan-300 text-lg font-bold px-1"> 状态参数 </h3>
|
|
|
|
|
|
|
+ <h3 class="text-cyan-300 text-base font-bold px-1"> 状态参数 </h3>
|
|
|
</dv-decoration7>
|
|
</dv-decoration7>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="grid grid-cols-5 gap-4 h-[calc(100%-2rem)]">
|
|
|
|
|
|
|
+ <div class="grid grid-cols-5 gap-2 flex-1 min-h-0 overflow-hidden">
|
|
|
<div
|
|
<div
|
|
|
v-for="(group, i) in compressorData"
|
|
v-for="(group, i) in compressorData"
|
|
|
:key="i"
|
|
:key="i"
|
|
|
- class="space-y-2 text-center h-full overflow-y-auto"
|
|
|
|
|
|
|
+ class="space-y-1 text-center overflow-y-auto"
|
|
|
>
|
|
>
|
|
|
- <div class="text-sm" v-for="item in group" :key="item.modelName">
|
|
|
|
|
|
|
+ <div class="text-xs" v-for="item in group" :key="item.modelName">
|
|
|
<div class="text-cyan-200">{{ item.modelName }}</div>
|
|
<div class="text-cyan-200">{{ item.modelName }}</div>
|
|
|
<div class="text-white font-mono flex items-center justify-center">
|
|
<div class="text-white font-mono flex items-center justify-center">
|
|
|
<span
|
|
<span
|
|
|
- :class="['w-3 h-3 rounded-full inline-block mr-2', getStatusClass(item.value)]"
|
|
|
|
|
|
|
+ :class="['w-2 h-2 rounded-full inline-block mr-1', getStatusClass(item.value)]"
|
|
|
></span>
|
|
></span>
|
|
|
{{ getStatusDisplayText(item.modelName, item.value) }}
|
|
{{ getStatusDisplayText(item.modelName, item.value) }}
|
|
|
</div>
|
|
</div>
|
|
@@ -130,13 +130,15 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Right panel - 氮气参数和井口参数平分高度 -->
|
|
<!-- Right panel - 氮气参数和井口参数平分高度 -->
|
|
|
- <div class="col-span-3">
|
|
|
|
|
- <div class="panel h-[50%] mb-2">
|
|
|
|
|
- <div class="flex items-center justify-between mb-4 border-b border-cyan-500/30 pb-2">
|
|
|
|
|
- <h3 class="text-cyan-300 text-lg font-bold">氮气参数</h3>
|
|
|
|
|
- <dv-decoration8 :reverse="true" style="width: 110px; height: 20px" />
|
|
|
|
|
|
|
+ <div class="col-span-3 flex flex-col gap-2 min-h-0">
|
|
|
|
|
+ <div class="panel flex-1 flex flex-col min-h-0">
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="flex items-center justify-between mb-2 border-b border-cyan-500/30 pb-1 flex-shrink-0"
|
|
|
|
|
+ >
|
|
|
|
|
+ <h3 class="text-cyan-300 text-base font-bold">氮气参数</h3>
|
|
|
|
|
+ <dv-decoration8 :reverse="true" style="width: 100px; height: 18px" />
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="space-y-2 text-sm overflow-y-auto overflow-x-hidden h-[calc(100%-3rem)]">
|
|
|
|
|
|
|
+ <div class="space-y-1 text-sm overflow-y-auto overflow-x-hidden flex-1 min-h-0">
|
|
|
<DataRow
|
|
<DataRow
|
|
|
v-for="item in liquidDrivenData"
|
|
v-for="item in liquidDrivenData"
|
|
|
:key="item.modelName"
|
|
:key="item.modelName"
|
|
@@ -146,12 +148,14 @@
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="panel h-[50%]">
|
|
|
|
|
- <div class="flex items-center justify-between mb-4 border-b border-cyan-500/30 pb-2">
|
|
|
|
|
- <h3 class="text-cyan-300 text-lg font-bold">井口参数 </h3>
|
|
|
|
|
- <dv-decoration8 :reverse="true" style="width: 110px; height: 20px" />
|
|
|
|
|
|
|
+ <div class="panel flex-1 flex flex-col min-h-0">
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="flex items-center justify-between mb-2 border-b border-cyan-500/30 pb-1 flex-shrink-0"
|
|
|
|
|
+ >
|
|
|
|
|
+ <h3 class="text-cyan-300 text-base font-bold">井口参数</h3>
|
|
|
|
|
+ <dv-decoration8 :reverse="true" style="width: 100px; height: 18px" />
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="space-y-2 text-sm overflow-y-auto overflow-x-hidden h-[calc(100%-3rem)]">
|
|
|
|
|
|
|
+ <div class="space-y-1 text-sm overflow-y-auto overflow-x-hidden flex-1 min-h-0">
|
|
|
<DataRow
|
|
<DataRow
|
|
|
v-for="item in wellheadData"
|
|
v-for="item in wellheadData"
|
|
|
:key="item.modelName"
|
|
:key="item.modelName"
|
|
@@ -167,7 +171,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref, onMounted, nextTick } from 'vue'
|
|
|
|
|
|
|
+import { ref, onMounted, nextTick, onUnmounted } from 'vue'
|
|
|
import DataRow from './data-row.vue'
|
|
import DataRow from './data-row.vue'
|
|
|
import ModelViewer from './ModelViewer2.vue'
|
|
import ModelViewer from './ModelViewer2.vue'
|
|
|
import { IotDeviceApi } from '@/api/pms/device'
|
|
import { IotDeviceApi } from '@/api/pms/device'
|
|
@@ -287,20 +291,11 @@ const handleFullscreenChange = () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-onMounted(() => {
|
|
|
|
|
- document.addEventListener('fullscreenchange', handleFullscreenChange)
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-// 添加 onUnmounted 来清理事件监听器
|
|
|
|
|
-onUnmounted(() => {
|
|
|
|
|
- document.removeEventListener('fullscreenchange', handleFullscreenChange)
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
const getStatusText = (statusValue: string | number) => {
|
|
const getStatusText = (statusValue: string | number) => {
|
|
|
return statusValue === '1' || statusValue === 1 || statusValue === 'true' ? '运行中' : '停止'
|
|
return statusValue === '1' || statusValue === 1 || statusValue === 'true' ? '运行中' : '停止'
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-onMounted(async () => {
|
|
|
|
|
|
|
+const fetchData = async () => {
|
|
|
try {
|
|
try {
|
|
|
const res = await IotDeviceApi.getDeviceSetParams(route.query.deviceSetId)
|
|
const res = await IotDeviceApi.getDeviceSetParams(route.query.deviceSetId)
|
|
|
|
|
|
|
@@ -385,6 +380,16 @@ onMounted(async () => {
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('获取设备参数失败:', error)
|
|
console.error('获取设备参数失败:', error)
|
|
|
}
|
|
}
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ document.addEventListener('fullscreenchange', handleFullscreenChange)
|
|
|
|
|
+ fetchData()
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+// 添加 onUnmounted 来清理事件监听器
|
|
|
|
|
+onUnmounted(() => {
|
|
|
|
|
+ document.removeEventListener('fullscreenchange', handleFullscreenChange)
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
@@ -435,11 +440,12 @@ onMounted(async () => {
|
|
|
background: linear-gradient(to bottom right, rgba(15, 23, 42, 0.8), rgba(30, 58, 138, 0.5));
|
|
background: linear-gradient(to bottom right, rgba(15, 23, 42, 0.8), rgba(30, 58, 138, 0.5));
|
|
|
backdrop-filter: blur(4px);
|
|
backdrop-filter: blur(4px);
|
|
|
border: 2px solid rgba(6, 182, 212, 0.4);
|
|
border: 2px solid rgba(6, 182, 212, 0.4);
|
|
|
- padding: 1rem;
|
|
|
|
|
|
|
+ padding: 0.75rem;
|
|
|
border-radius: 0.5rem;
|
|
border-radius: 0.5rem;
|
|
|
box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
|
|
box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
|
|
|
transition: all 0.3s;
|
|
transition: all 0.3s;
|
|
|
min-height: 0; /* 允许flex项目收缩到其内容以下 */
|
|
min-height: 0; /* 允许flex项目收缩到其内容以下 */
|
|
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.panel:hover {
|
|
.panel:hover {
|
|
@@ -509,21 +515,13 @@ onMounted(async () => {
|
|
|
height: 100vh !important;
|
|
height: 100vh !important;
|
|
|
width: 100vw !important;
|
|
width: 100vw !important;
|
|
|
margin: 0 !important;
|
|
margin: 0 !important;
|
|
|
- padding: 0 !important;
|
|
|
|
|
- padding-top: 20px !important;
|
|
|
|
|
- padding-left: 10px !important;
|
|
|
|
|
- padding-right: 10px !important;
|
|
|
|
|
- padding-bottom: 150px !important;
|
|
|
|
|
|
|
+ padding: 1rem !important;
|
|
|
position: fixed !important;
|
|
position: fixed !important;
|
|
|
top: 0 !important;
|
|
top: 0 !important;
|
|
|
left: 0 !important;
|
|
left: 0 !important;
|
|
|
- overflow: auto !important;
|
|
|
|
|
- overflow-x: hidden !important;
|
|
|
|
|
|
|
+ overflow: hidden !important;
|
|
|
max-width: 100vw !important;
|
|
max-width: 100vw !important;
|
|
|
max-height: 100vh !important;
|
|
max-height: 100vh !important;
|
|
|
-
|
|
|
|
|
- scrollbar-width: none; /* Firefox */
|
|
|
|
|
- -ms-overflow-style: none; /* Internet Explorer 10+ */
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 在现有样式中添加 */
|
|
/* 在现有样式中添加 */
|