yeg
2026-08-27 34c7097f5a72072f129fefea74e7dc14fe8e5b8f
设备管理-检测柜初版
2个文件已修改
18 ■■■■■ 已修改文件
src/api/deviceCabinets.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/DeviceCabinetForm.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/deviceCabinets.ts
@@ -50,7 +50,7 @@
  cabinetCode: string
  cabinetName: string
  ipAddress: string
  macAddress: string
  macAddress: string | null
  manufacturer: string
  model: string
  capacity: number
@@ -70,7 +70,11 @@
export interface DiscoveredCabinet {
  deviceCode: string
  ip: string
  mac: string
  mac: string | null
  name: string | null
  manufacturer: string | null
  model: string | null
  channelCount: number
  onlineStatus: CabinetOnlineStatus
  testStatus: CabinetTestStatus
  currentTest: string
@@ -116,7 +120,7 @@
    cabinetCode: payload.deviceCode,
    cabinetName: payload.name,
    ipAddress: payload.ip,
    macAddress: payload.mac,
    macAddress: payload.mac || null,
    manufacturer: payload.manufacturer,
    model: payload.model,
    capacity: payload.specs,
src/views/DeviceCabinetForm.vue
@@ -76,7 +76,11 @@
  Object.assign(form, {
    deviceCode: device.deviceCode,
    ip: device.ip,
    mac: device.mac,
    mac: device.mac || '',
    name: device.name || device.deviceCode,
    manufacturer: device.manufacturer || '',
    model: device.model || '',
    channelCount: device.channelCount,
    onlineStatus: device.onlineStatus,
    testStatus: device.testStatus,
    currentTest: device.currentTest,
@@ -159,7 +163,7 @@
        <table class="device-table">
          <thead><tr><th>设备编码</th><th>IP</th><th>MAC</th><th>操作</th></tr></thead>
          <tbody>
            <tr v-for="device in devices" :key="device.deviceCode"><td>{{ device.deviceCode }}</td><td>{{ device.ip }}</td><td>{{ device.mac }}</td><td><button type="button" @click="selectDevice(device)">选择</button></td></tr>
            <tr v-for="device in devices" :key="device.deviceCode"><td>{{ device.deviceCode }}</td><td>{{ device.ip }}</td><td>{{ device.mac || '-' }}</td><td><button type="button" @click="selectDevice(device)">选择</button></td></tr>
            <tr v-if="!deviceLoading && !devices.length"><td colspan="4" class="device-empty">暂无可发现设备</td></tr>
          </tbody>
        </table>