huang
2025-11-18 1566e4c7604d85737ea67fe6757e71b8185fa48e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<template>
  <div class="multi-device-workbench">
    <div class="main-grid">
      <div class="left-panel">
        <GroupList @select="handleGroupSelect" />
      </div>
      <div class="right-panel">
        <TaskOrchestration :group="selectedGroup" @task-started="refreshMonitor" />
        <ExecutionMonitor ref="monitorRef" :group-id="selectedGroupId" class="monitor-panel" />
      </div>
    </div>
  </div>
</template>
 
<script setup>
import { computed, ref } from 'vue'
import GroupList from './components/DeviceGroup/GroupList.vue'
import TaskOrchestration from './components/MultiDeviceTest/TaskOrchestration.vue'
import ExecutionMonitor from './components/MultiDeviceTest/ExecutionMonitor.vue'
 
const selectedGroup = ref(null)
const monitorRef = ref(null)
 
const selectedGroupId = computed(() => {
  if (!selectedGroup.value) return null
  return selectedGroup.value.id || selectedGroup.value.groupId
})
 
const handleGroupSelect = (group) => {
  selectedGroup.value = group
}
 
const refreshMonitor = () => {
  monitorRef.value?.fetchTasks?.()
}
</script>
 
<style scoped>
.multi-device-workbench {
  padding: 24px;
  min-height: 100%;
  background: linear-gradient(180deg, #f6f9ff 0%, #f4f6fb 100%);
}
 
.main-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}
 
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
 
.monitor-panel {
  flex: 1;
}
 
@media (max-width: 1200px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}
</style>