From e9844524882b472f867d0e25a2ebcf4dbd3c3b66 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Wed, 22 Jul 2026 15:26:27 +0800
Subject: [PATCH] feat:维护状态改成报废预警
---
applications/drone-command/src/views/basicManage/deviceStock/index.vue | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/applications/drone-command/src/views/basicManage/deviceStock/index.vue b/applications/drone-command/src/views/basicManage/deviceStock/index.vue
index 9e17863..8fd28ee 100644
--- a/applications/drone-command/src/views/basicManage/deviceStock/index.vue
+++ b/applications/drone-command/src/views/basicManage/deviceStock/index.vue
@@ -1,9 +1,9 @@
<template>
<basic-container>
<div class="chart">
- <DeviceChart1 :key="updateKey"/>
- <DeviceChart2 :key="updateKey"/>
- <DeviceChart3 :key="updateKey"/>
+ <DeviceChart1 :key="updateKey" />
+ <DeviceChart2 :key="updateKey" />
+ <DeviceChart3 :key="updateKey" />
</div>
<el-form ref="queryParamsRef" :model="searchParams" class="command-page-history-search">
@@ -91,9 +91,11 @@
{{ getDictLabel(row.trackStatus, trackStatusOptions) }}
</template>
</el-table-column>
- <el-table-column prop="maintenanceStatus" show-overflow-tooltip width="96" label="维护状态">
+ <el-table-column prop="maintenanceStatus" show-overflow-tooltip width="96" label="报废预警">
<template v-slot="{ row }">
- {{ row.maintenanceStatus === 0 ? '否' : '是' }}
+ <span :style="{ color: row.maintenanceStatus === 0 ? 'inherit' : 'red' }">
+ {{ row.maintenanceStatus === 0 ? '正常' : '临近报废' }}
+ </span>
</template>
</el-table-column>
<el-table-column label="操作" class-name="operation-btns" width="196" fixed="right">
@@ -177,7 +179,7 @@
// 出库状态
const trackStatusOptions = ref([
{ dictKey: 0, dictValue: '未出库' },
- { dictKey: 1, dictValue: '已出库' }
+ { dictKey: 1, dictValue: '已出库' },
])
const updateKey = ref(0)
@@ -237,7 +239,7 @@
cancelButtonClass: 'command-message-box-cancel',
})
const payload = {
- deviceId: row.id
+ deviceId: row.id,
}
await fwDeviceUpdateTrackStatusApi(payload)
ElMessage.success('归还成功')
@@ -346,4 +348,7 @@
}
}
}
+.danger-text {
+ color: red; /* 或者直接用 red */
+}
</style>
--
Gitblit v1.9.3