From a53ece5036c1fa61a63fe5f9e0cd3519210ab928 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 07 Aug 2026 09:44:27 +0800
Subject: [PATCH] feat:兼容分辨率低不出现滚动条

---
 applications/drone-command/src/views/basicManage/deviceStock/index.vue |   40 +++++++++++++++++++++++++---------------
 1 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/applications/drone-command/src/views/basicManage/deviceStock/index.vue b/applications/drone-command/src/views/basicManage/deviceStock/index.vue
index 561ce69..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">
@@ -63,15 +63,15 @@
 			<div class="command-table-content command-table-content-bg">
 				<el-table class="command-table" :data="list" @selection-change="handleSelectionChange">
 					<el-table-column type="index" show-overflow-tooltip width="64" label="序号" />
-					<el-table-column prop="deviceName" show-overflow-tooltip width="130" label="设备名称" />
-					<el-table-column prop="deviceType" show-overflow-tooltip width="130" label="设备类型">
+					<el-table-column prop="deviceName" show-overflow-tooltip label="设备名称" />
+					<el-table-column prop="deviceType" show-overflow-tooltip width="100" label="设备类型">
 						<template v-slot="{ row }">
 							{{ getDictLabel(row.deviceType, dictObj.deviceType) }}
 						</template>
 					</el-table-column>
-					<el-table-column prop="deviceModel" show-overflow-tooltip width="98" label="型号" />
-					<el-table-column prop="deviceSpecification" show-overflow-tooltip width="112" label="规格" />
-					<el-table-column prop="manufacturer" show-overflow-tooltip width="130" label="生产厂商" />
+					<el-table-column prop="deviceModel" show-overflow-tooltip width="110" label="型号" />
+					<el-table-column prop="deviceSpecification" show-overflow-tooltip width="142" label="规格" />
+					<el-table-column prop="manufacturer" show-overflow-tooltip width="140" label="生产厂商" />
 					<el-table-column prop="createTime" show-overflow-tooltip width="96" label="入库时间">
 						<template v-slot="{ row }">
 							{{ dayjs(row.createTime).format('YYYY-MM-DD') }}
@@ -79,19 +79,26 @@
 					</el-table-column>
 					<el-table-column prop="source" show-overflow-tooltip width="120" label="来源" />
 					<el-table-column prop="purpose" show-overflow-tooltip width="130" label="用途" />
-					<el-table-column prop="belongDeptName" show-overflow-tooltip width="160" label="所属部门" />
-					<el-table-column prop="charger" show-overflow-tooltip width="100" label="负责人" />
-					<el-table-column prop="yxzt" show-overflow-tooltip width="116" label="运行状态">
+					<el-table-column prop="belongDeptName" show-overflow-tooltip width="130" label="所属部门" />
+					<el-table-column prop="charger" show-overflow-tooltip width="130" label="负责人" />
+					<el-table-column prop="yxzt" show-overflow-tooltip width="96" label="运行状态">
 						<template v-slot="{ row }">
 							{{ getDictLabel(row.status, dictObj.deviceStatus) }}
 						</template>
 					</el-table-column>
-					<el-table-column prop="yxzt" show-overflow-tooltip width="116" label="出库状态">
+					<el-table-column prop="yxzt" show-overflow-tooltip width="96" label="出库状态">
 						<template v-slot="{ row }">
 							{{ getDictLabel(row.trackStatus, trackStatusOptions) }}
 						</template>
 					</el-table-column>
-					<el-table-column label="操作" class-name="operation-btns" width="140">
+					<el-table-column prop="maintenanceStatus" show-overflow-tooltip width="96" label="报废预警">
+						<template v-slot="{ row }">
+							<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">
 						<template v-slot="{ row }">
 							<el-link @click="handleView(row)">查看</el-link>
 							<el-link @click="handleEdit(row)">编辑</el-link>
@@ -172,7 +179,7 @@
 // 出库状态
 const trackStatusOptions = ref([
 	{ dictKey: 0, dictValue: '未出库' },
-	{ dictKey: 1, dictValue: '已出库' }
+	{ dictKey: 1, dictValue: '已出库' },
 ])
 
 const updateKey = ref(0)
@@ -232,7 +239,7 @@
 		cancelButtonClass: 'command-message-box-cancel',
 	})
 	const payload = {
-		deviceId: row.id
+		deviceId: row.id,
 	}
 	await fwDeviceUpdateTrackStatusApi(payload)
 	ElMessage.success('归还成功')
@@ -341,4 +348,7 @@
 		}
 	}
 }
+.danger-text {
+	color: red; /* 或者直接用 red */
+}
 </style>

--
Gitblit v1.9.3