From 000fb7689e4540396df089fe5325862fdcdb108f Mon Sep 17 00:00:00 2001
From: jingna <1264204245@qq.com>
Date: Tue, 19 May 2026 09:19:51 +0800
Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BF=A1=E6=81=AF=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/views/aiQuantity/index.vue | 12 +--
frontend/src/views/analogQuantity/index.vue | 6 +-
frontend/src/views/switchQuantity/index.vue | 93 +++++++++++----------
3 files changed, 57 insertions(+), 54 deletions(-)
diff --git a/frontend/src/views/aiQuantity/index.vue b/frontend/src/views/aiQuantity/index.vue
index 9d35bf3..ed591aa 100644
--- a/frontend/src/views/aiQuantity/index.vue
+++ b/frontend/src/views/aiQuantity/index.vue
@@ -102,12 +102,12 @@ onMounted(() => {
报警信息
-
{{ index + 1 }}
-
{{ item.name }}
-
{{ item.typeName }}
-
{{ item.level }}
-
{{ item.content }}
-
{{ item.time }}
+
{{ index + 1 }}
+
{{ item.name }}
+
{{ item.typeName }}
+
{{ item.level }}
+
{{ item.content }}
+
{{ item.time }}
diff --git a/frontend/src/views/analogQuantity/index.vue b/frontend/src/views/analogQuantity/index.vue
index ec0968a..e3c7774 100644
--- a/frontend/src/views/analogQuantity/index.vue
+++ b/frontend/src/views/analogQuantity/index.vue
@@ -220,10 +220,10 @@ onMounted(() => {
{{ index + 1 }}
-
{{ item.name }}
+
{{ item.name }}
{{ item.typeName }}
-
{{ item.level }}
-
{{ item.content }}
+
{{ item.level }}
+
{{ item.content }}
{{ item.time }}
diff --git a/frontend/src/views/switchQuantity/index.vue b/frontend/src/views/switchQuantity/index.vue
index b875200..534c45c 100644
--- a/frontend/src/views/switchQuantity/index.vue
+++ b/frontend/src/views/switchQuantity/index.vue
@@ -5,54 +5,54 @@ import { usePlatformStore } from '../../stores/platform'
const { state, bootstrap } = usePlatformStore()
const inputStates = computed(() => {
- if (!state.realtime?.switch) {
- return [true, false, true, false, true, false, true, false, true, false, true, false]
- }
- return Array.from({ length: 12 }, (_, i) => {
- const key = `di${i + 1}`
- return state.realtime!.switch[key] === 1
- })
+ if (!state.realtime?.switch) {
+ return [true, false, true, false, true, false, true, false, true, false, true, false]
+ }
+ return Array.from({ length: 12 }, (_, i) => {
+ const key = `di${i + 1}`
+ return state.realtime!.switch[key] === 1
+ })
})
const outputStates = computed(() => {
- if (!state.realtime?.switch) {
- return [false, true, false, true, false, true, false, true, false, true, false, true]
- }
- return Array.from({ length: 12 }, (_, i) => {
- const key = `do${i + 1}`
- return state.realtime!.switch[key] === 1
- })
+ if (!state.realtime?.switch) {
+ return [false, true, false, true, false, true, false, true, false, true, false, true]
+ }
+ return Array.from({ length: 12 }, (_, i) => {
+ const key = `do${i + 1}`
+ return state.realtime!.switch[key] === 1
+ })
})
function formatTime(dateStr: string): string {
- const date = new Date(dateStr)
- const year = date.getFullYear()
- const month = String(date.getMonth() + 1).padStart(2, '0')
- const day = String(date.getDate()).padStart(2, '0')
- const hours = String(date.getHours()).padStart(2, '0')
- const minutes = String(date.getMinutes()).padStart(2, '0')
- const seconds = String(date.getSeconds()).padStart(2, '0')
- return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+ const date = new Date(dateStr)
+ const year = date.getFullYear()
+ const month = String(date.getMonth() + 1).padStart(2, '0')
+ const day = String(date.getDate()).padStart(2, '0')
+ const hours = String(date.getHours()).padStart(2, '0')
+ const minutes = String(date.getMinutes()).padStart(2, '0')
+ const seconds = String(date.getSeconds()).padStart(2, '0')
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
}
const tableData = computed(() => {
- const list = state.alarms[state.alarms.length - 1] || {}
- const arr = []
- let reslist:any = {}
- if(list.alarm_type == 'line_alarm'){
- reslist.name = `线路${list?.no || 1}`
- }else if(list.alarm_type == 'ai_alarm'){
- reslist.name = `通道${list?.no || 1}`
- } else if(list.alarm_type == 'operate_alarm'){
- reslist.name = ''
- }
- reslist.typeName = list.type
- reslist.content = list.content
- reslist.time = list.time ? formatTime(list.time) : ''
- reslist.level = list.level || ''
- return [reslist]
+ const list = state.alarms[state.alarms.length - 1] || {}
+ const arr = []
+ let reslist: any = {}
+ if (list.alarm_type == 'line_alarm') {
+ reslist.name = `线路${list?.no || 1}`
+ } else if (list.alarm_type == 'ai_alarm') {
+ reslist.name = `通道${list?.no || 1}`
+ } else if (list.alarm_type == 'operate_alarm') {
+ reslist.name = ''
+ }
+ reslist.typeName = list.type
+ reslist.content = list.content
+ reslist.time = list.time ? formatTime(list.time) : ''
+ reslist.level = list.level || ''
+ return [reslist]
})
onMounted(() => {
- void bootstrap()
+ void bootstrap()
})
@@ -70,7 +70,8 @@ onMounted(() => {
@@ -97,12 +98,12 @@ onMounted(() => {
报警信息
-
{{ index + 1 }}
-
{{ item.name }}
-
{{ item.typeName }}
-
{{ item.level }}
-
{{ item.content }}
-
{{ item.time }}
+
{{ index + 1 }}
+
{{ item.name }}
+
{{ item.typeName }}
+
{{ item.level }}
+
{{ item.content }}
+
{{ item.time }}
@@ -180,6 +181,7 @@ onMounted(() => {
align-items: center;
justify-content: space-between;
height: 65px;
+
.label {
font-size: 14px;
color: #363636;
@@ -208,6 +210,7 @@ onMounted(() => {
box-shadow: 0px 0px 10px rgba(219, 225, 236, 1);
border-radius: 4px;
overflow: auto;
+
.container-bottom-box-line1 {
display: flex;
align-items: center;