From 14763d895151f3ddad09906f2233057b8b967881 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期五, 19 十二月 2025 17:06:18 +0800
Subject: [PATCH] 添加plc通讯协议工厂,支持后续多种plc协议
---
mes-web/src/views/device/components/DeviceLogicConfig/LoadVehicleConfig.vue | 57 +++++++++------------------------------------------------
1 files changed, 9 insertions(+), 48 deletions(-)
diff --git a/mes-web/src/views/device/components/DeviceLogicConfig/LoadVehicleConfig.vue b/mes-web/src/views/device/components/DeviceLogicConfig/LoadVehicleConfig.vue
index 3bdf568..e1b672b 100644
--- a/mes-web/src/views/device/components/DeviceLogicConfig/LoadVehicleConfig.vue
+++ b/mes-web/src/views/device/components/DeviceLogicConfig/LoadVehicleConfig.vue
@@ -32,29 +32,16 @@
<el-row :gutter="20">
<el-col :span="12">
- <el-form-item label="鐜荤拑闂撮殧(绉�)">
+ <el-form-item label="鐜荤拑闂撮殭(mm)">
<el-input-number
- v-model="glassIntervalSeconds"
- :min="0.1"
- :max="10"
- :step="0.1"
- :precision="1"
- style="width: 100%;"
- />
- <span class="form-tip">鐜荤拑涓婃枡闂撮殧鏃堕棿锛堢锛�</span>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="榛樿鐜荤拑闀垮害(mm)">
- <el-input-number
- v-model="config.defaultGlassLength"
- :min="100"
- :max="10000"
- :step="100"
+ v-model="config.glassGap"
+ :min="0"
+ :max="1000"
+ :step="10"
style="width: 100%;"
@change="emitConfigUpdate"
/>
- <span class="form-tip">褰撶幓鐠冩湭鎻愪緵闀垮害鏃朵娇鐢ㄧ殑榛樿鍊�</span>
+ <span class="form-tip">澶氬潡鐜荤拑涔嬮棿鐨勭墿鐞嗛棿闅旂┖闅欙紝榛樿200mm</span>
</el-form-item>
</el-col>
</el-row>
@@ -149,21 +136,6 @@
</el-col>
</el-row>
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鏈�澶ч噸璇曟鏁�">
- <el-input-number
- v-model="config.maxRetryCount"
- :min="0"
- :max="10"
- :step="1"
- style="width: 100%;"
- @change="emitConfigUpdate"
- />
- </el-form-item>
- </el-col>
- </el-row>
-
<el-form-item label="浣嶇疆鏄犲皠">
<div class="position-mapping">
<div
@@ -173,7 +145,7 @@
>
<el-input
v-model="item.key"
- placeholder="浣嶇疆浠g爜锛堝900/901锛�"
+ placeholder="浣嶇疆浠g爜锛堝1001/1002锛�"
size="small"
style="width: 150px; margin-right: 10px;"
@change="handlePositionKeyChange(index)"
@@ -221,8 +193,7 @@
const config = ref({
vehicleCapacity: 6000,
vehicleSpeed: 1.0,
- glassIntervalMs: 1000,
- defaultGlassLength: 2000,
+ glassGap: 200,
homePosition: 0,
minRange: 1,
maxRange: 100,
@@ -230,7 +201,6 @@
taskMonitorIntervalMs: 1000,
mesConfirmTimeoutMs: 30000,
autoFeed: true,
- maxRetryCount: 5,
positionMapping: {}
})
@@ -270,7 +240,6 @@
syncPositionListFromConfig()
// 鏃堕棿瀛楁锛堢锛�- 鐢ㄤ簬鍓嶇鏄剧ず鍜岃緭鍏�
-const glassIntervalSeconds = ref(1.0)
const idleMonitorIntervalSeconds = ref(2.0)
const taskMonitorIntervalSeconds = ref(1.0)
const mesConfirmTimeoutSeconds = ref(30)
@@ -282,8 +251,7 @@
config.value = {
vehicleCapacity: newVal.vehicleCapacity ?? 6000,
vehicleSpeed: newVal.vehicleSpeed ?? 1.0,
- glassIntervalMs: newVal.glassIntervalMs ?? 1000,
- defaultGlassLength: newVal.defaultGlassLength ?? 2000,
+ glassGap: newVal.glassGap ?? 200,
homePosition: newVal.homePosition ?? 0,
minRange: newVal.minRange ?? 1,
maxRange: newVal.maxRange ?? 100,
@@ -291,11 +259,9 @@
taskMonitorIntervalMs: newVal.taskMonitorIntervalMs ?? 1000,
mesConfirmTimeoutMs: newVal.mesConfirmTimeoutMs ?? 30000,
autoFeed: newVal.autoFeed ?? true,
- maxRetryCount: newVal.maxRetryCount ?? 5,
positionMapping: newVal.positionMapping || {}
}
// 灏嗘绉掕浆鎹负绉掔敤浜庢樉绀�
- glassIntervalSeconds.value = (config.value.glassIntervalMs ?? 1000) / 1000
idleMonitorIntervalSeconds.value = (config.value.idleMonitorIntervalMs ?? 2000) / 1000
taskMonitorIntervalSeconds.value = (config.value.taskMonitorIntervalMs ?? 1000) / 1000
mesConfirmTimeoutSeconds.value = (config.value.mesConfirmTimeoutMs ?? 30000) / 1000
@@ -305,11 +271,6 @@
}, { immediate: true, deep: true })
// 鐩戝惉绉掑瓧娈靛彉鍖栵紝杞崲涓烘绉掑苟鏇存柊config
-watch(glassIntervalSeconds, (val) => {
- config.value.glassIntervalMs = Math.round(val * 1000)
- emitConfigUpdate()
-})
-
watch(idleMonitorIntervalSeconds, (val) => {
config.value.idleMonitorIntervalMs = Math.round(val * 1000)
emitConfigUpdate()
--
Gitblit v1.8.0