huang
2025-11-20 366ba040d2447bacd3455299425e3166f1f992bb
mes-web/src/views/device/DeviceEditDialog.vue
@@ -284,11 +284,25 @@
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="默认玻璃长度(mm)">
                <el-input-number
                  v-model="deviceLogicParams.defaultGlassLength"
                  :min="100"
                  :max="10000"
                  :step="100"
                  style="width: 100%;"
                />
                <span class="form-tip">当玻璃未提供长度时使用的默认值</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="自动上料">
                <el-switch v-model="deviceLogicParams.autoFeed" />
                <span class="form-tip">是否自动触发上料请求</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="最大重试次数">
                <el-input-number
@@ -524,6 +538,7 @@
  // 上大车参数
  vehicleCapacity: 6000,
  glassIntervalMs: 1000,
  defaultGlassLength: 2000,
  autoFeed: true,
  maxRetryCount: 5,
  positionMapping: {},
@@ -812,6 +827,7 @@
  if (deviceType === '上大车') {
    deviceLogicParams.vehicleCapacity = deviceLogic.vehicleCapacity ?? 6000
    deviceLogicParams.glassIntervalMs = deviceLogic.glassIntervalMs ?? 1000
    deviceLogicParams.defaultGlassLength = deviceLogic.defaultGlassLength ?? 2000
    deviceLogicParams.autoFeed = deviceLogic.autoFeed ?? true
    deviceLogicParams.maxRetryCount = deviceLogic.maxRetryCount ?? 5
    deviceLogicParams.positionMapping = deviceLogic.positionMapping || {}
@@ -860,6 +876,7 @@
  // 重置设备逻辑参数
  deviceLogicParams.vehicleCapacity = 6000
  deviceLogicParams.glassIntervalMs = 1000
  deviceLogicParams.defaultGlassLength = 2000
  deviceLogicParams.autoFeed = true
  deviceLogicParams.maxRetryCount = 5
  deviceLogicParams.positionMapping = {}
@@ -951,6 +968,7 @@
    if (deviceForm.deviceType === '上大车') {
      deviceLogic.vehicleCapacity = deviceLogicParams.vehicleCapacity
      deviceLogic.glassIntervalMs = deviceLogicParams.glassIntervalMs
      deviceLogic.defaultGlassLength = deviceLogicParams.defaultGlassLength
      deviceLogic.autoFeed = deviceLogicParams.autoFeed
      deviceLogic.maxRetryCount = deviceLogicParams.maxRetryCount
      deviceLogic.positionMapping = deviceLogicParams.positionMapping