From 16f4bb3c28fc85cffcc511718c903ada9fdab134 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期五, 26 十二月 2025 16:59:45 +0800
Subject: [PATCH] 调用mes导入工程参数修改,Excel表数据流程卡号一致;增加读取层号/工程号方法; 工程号一致覆盖更新
---
mes-web/src/views/device/DeviceGroupList.vue | 42 ++++++++++++++++++++++++++++++++++++++++--
1 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/mes-web/src/views/device/DeviceGroupList.vue b/mes-web/src/views/device/DeviceGroupList.vue
index d629cfd..27365c7 100644
--- a/mes-web/src/views/device/DeviceGroupList.vue
+++ b/mes-web/src/views/device/DeviceGroupList.vue
@@ -208,7 +208,7 @@
</el-tag>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" width="200" fixed="right">
+ <el-table-column label="鎿嶄綔" width="280" fixed="right">
<template #default="scope">
<el-button
v-if="scope.row.isOnline"
@@ -227,6 +227,13 @@
:loading="scope.row.statusUpdating"
>
璁句负鍦ㄧ嚎
+ </el-button>
+ <el-button
+ type="danger"
+ size="small"
+ @click="removeSingleDevice(scope.row)"
+ >
+ 绉婚櫎璁惧
</el-button>
</template>
</el-table-column>
@@ -761,6 +768,37 @@
}
}
+// 绉婚櫎鍗曚釜璁惧
+const removeSingleDevice = async (device) => {
+ try {
+ await ElMessageBox.confirm(
+ `纭畾瑕佷粠璁惧缁勪腑绉婚櫎璁惧"${device.deviceName || device.deviceCode}"鍚楋紵`,
+ '绉婚櫎璁惧纭',
+ {
+ confirmButtonText: '纭畾绉婚櫎',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }
+ )
+
+ const deviceId = device.id || device.deviceId
+ await deviceGroupApi.batchRemoveDevicesFromGroup({
+ groupId: currentGroup.value.id || currentGroup.value.groupId,
+ deviceIds: [deviceId]
+ })
+ ElMessage.success('璁惧绉婚櫎鎴愬姛')
+ const groupId = currentGroup.value.id || currentGroup.value.groupId
+ await loadGroupDevices(groupId)
+ await loadAvailableDevices()
+ emit('refresh-statistics')
+ } catch (error) {
+ if (error !== 'cancel') {
+ console.error('绉婚櫎璁惧澶辫触:', error)
+ ElMessage.error('绉婚櫎璁惧澶辫触: ' + (error.response?.data?.message || error.message))
+ }
+ }
+}
+
// 鏇存柊璁惧鍦ㄧ嚎鐘舵��
const updateDeviceOnlineStatus = async (device, status) => {
try {
@@ -774,7 +812,7 @@
}
await deviceStatusApi.updateDeviceOnlineStatus({
- deviceId: deviceId,
+ id: deviceId,
status: status
})
--
Gitblit v1.8.0