mes-web/src/views/device/components/DeviceLogicConfig/LoadVehicleConfig.vue
@@ -32,16 +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"
            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-col :span="12">
@@ -173,7 +173,7 @@
        >
          <el-input
            v-model="item.key"
            placeholder="位置代码(如900/901)"
            placeholder="位置代码(如1001/1002)"
            size="small"
            style="width: 150px; margin-right: 10px;"
            @change="handlePositionKeyChange(index)"
@@ -221,7 +221,7 @@
const config = ref({
  vehicleCapacity: 6000,
  vehicleSpeed: 1.0,
  glassIntervalMs: 1000,
  glassGap: 200,
  defaultGlassLength: 2000,
  homePosition: 0,
  minRange: 1,
@@ -270,7 +270,6 @@
syncPositionListFromConfig()
// 时间字段(秒)- 用于前端显示和输入
const glassIntervalSeconds = ref(1.0)
const idleMonitorIntervalSeconds = ref(2.0)
const taskMonitorIntervalSeconds = ref(1.0)
const mesConfirmTimeoutSeconds = ref(30)
@@ -282,7 +281,7 @@
    config.value = {
      vehicleCapacity: newVal.vehicleCapacity ?? 6000,
      vehicleSpeed: newVal.vehicleSpeed ?? 1.0,
      glassIntervalMs: newVal.glassIntervalMs ?? 1000,
      glassGap: newVal.glassGap ?? 200,
      defaultGlassLength: newVal.defaultGlassLength ?? 2000,
      homePosition: newVal.homePosition ?? 0,
      minRange: newVal.minRange ?? 1,
@@ -295,7 +294,6 @@
      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 +303,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()