Commit 6ad503d14ddfc3a6d997c0a168648bcd7e58502c
Merge branch 'fix/edge/08-07' into 'main_dev'
perf: 边缘实例详情,新增状态显示 See merge request yunteng/thingskit-front!1442
Showing
2 changed files
with
20 additions
and
1 deletions
| ... | ... | @@ -26,6 +26,21 @@ export const descSchema = (): DescItem[] => { | 
| 26 | 26 | }, | 
| 27 | 27 | }, | 
| 28 | 28 | { | 
| 29 | + field: 'active', | |
| 30 | + label: '状态', | |
| 31 | + render: (record) => { | |
| 32 | + const color = record?.active ? 'success' : 'error'; | |
| 33 | + const textStr = record?.active ? ' 在线' : '离线'; | |
| 34 | + return h( | |
| 35 | + Tag, | |
| 36 | + { | |
| 37 | + color, | |
| 38 | + }, | |
| 39 | + textStr | |
| 40 | + ); | |
| 41 | + }, | |
| 42 | + }, | |
| 43 | + { | |
| 29 | 44 | field: 'routingKey', | 
| 30 | 45 | label: '边缘键', | 
| 31 | 46 | render: (text) => { | ... | ... | 
| ... | ... | @@ -71,7 +71,11 @@ | 
| 71 | 71 | <div class="!flex flex-col justify-between"> | 
| 72 | 72 | <Description v-if="recordData" @register="register" :data="recordData" :contentStyle="CS" /> | 
| 73 | 73 | <div class="!flex mt-3"> | 
| 74 | - <a-button :loading="loadStatus" type="primary" @click="handleEventIsSyncEdge" | |
| 74 | + <a-button | |
| 75 | + :disabled="!recordData.active" | |
| 76 | + :loading="loadStatus" | |
| 77 | + type="primary" | |
| 78 | + @click="handleEventIsSyncEdge" | |
| 75 | 79 | >同步边缘</a-button | 
| 76 | 80 | > | 
| 77 | 81 | <!-- <a-button class="ml-4" type="primary" @click="handleEventIsOpenEdgeDevice" | ... | ... |