Showing
3 changed files
with
20 additions
and
8 deletions
| @@ -28,6 +28,7 @@ export interface DeviceModel { | @@ -28,6 +28,7 @@ export interface DeviceModel { | ||
| 28 | deviceInfo: any; | 28 | deviceInfo: any; |
| 29 | activeTime: string; | 29 | activeTime: string; |
| 30 | deviceState: DeviceState; | 30 | deviceState: DeviceState; |
| 31 | + alarmStatus: number; | ||
| 31 | profileId: string; | 32 | profileId: string; |
| 32 | label: string; | 33 | label: string; |
| 33 | lastConnectTime: string; | 34 | lastConnectTime: string; |
| @@ -79,18 +79,24 @@ export const columns: BasicColumn[] = [ | @@ -79,18 +79,24 @@ export const columns: BasicColumn[] = [ | ||
| 79 | { | 79 | { |
| 80 | title: '名称', | 80 | title: '名称', |
| 81 | dataIndex: 'name', | 81 | dataIndex: 'name', |
| 82 | - width: 100, | 82 | + width: 120, |
| 83 | + }, | ||
| 84 | + { | ||
| 85 | + title: '设备状态', | ||
| 86 | + dataIndex: 'deviceState', | ||
| 87 | + width: 80, | ||
| 88 | + slots: { customRender: 'deviceState' }, | ||
| 83 | }, | 89 | }, |
| 84 | { | 90 | { |
| 85 | title: '位置', | 91 | title: '位置', |
| 86 | dataIndex: 'deviceInfo.address', | 92 | dataIndex: 'deviceInfo.address', |
| 87 | - width: 100, | 93 | + width: 120, |
| 88 | }, | 94 | }, |
| 89 | { | 95 | { |
| 90 | - title: '状态', | ||
| 91 | - dataIndex: 'deviceState', | ||
| 92 | - width: 100, | ||
| 93 | - slots: { customRender: 'deviceState' }, | 96 | + title: '告警状态', |
| 97 | + dataIndex: 'alarmStatus', | ||
| 98 | + width: 80, | ||
| 99 | + slots: { customRender: 'alarmStatus' }, | ||
| 94 | }, | 100 | }, |
| 95 | ]; | 101 | ]; |
| 96 | 102 |
| @@ -23,6 +23,11 @@ | @@ -23,6 +23,11 @@ | ||
| 23 | }} | 23 | }} |
| 24 | </Tag> | 24 | </Tag> |
| 25 | </template> | 25 | </template> |
| 26 | + <template #alarmStatus="{ record }"> | ||
| 27 | + <Tag :color="record.alarmStatus == 1 ? 'warning' : 'success'" class="ml-2"> | ||
| 28 | + {{ record.alarmStatus == 1 ? '告警' : '正常' }} | ||
| 29 | + </Tag> | ||
| 30 | + </template> | ||
| 26 | </BasicTable> | 31 | </BasicTable> |
| 27 | </div> | 32 | </div> |
| 28 | <BasicModal | 33 | <BasicModal |
| @@ -223,7 +228,7 @@ | @@ -223,7 +228,7 @@ | ||
| 223 | const { longitude, latitude, address } = record.deviceInfo; | 228 | const { longitude, latitude, address } = record.deviceInfo; |
| 224 | const point = new BMap.Point(longitude, latitude); | 229 | const point = new BMap.Point(longitude, latitude); |
| 225 | let options = { | 230 | let options = { |
| 226 | - width: 300, // 信息窗口宽度 | 231 | + width: 330, // 信息窗口宽度 |
| 227 | height: 230, // 信息窗口高度 | 232 | height: 230, // 信息窗口高度 |
| 228 | }; | 233 | }; |
| 229 | map.centerAndZoom(point, 15); | 234 | map.centerAndZoom(point, 15); |
| @@ -438,7 +443,7 @@ | @@ -438,7 +443,7 @@ | ||
| 438 | } | 443 | } |
| 439 | .right-wrap { | 444 | .right-wrap { |
| 440 | padding-top: 10px; | 445 | padding-top: 10px; |
| 441 | - width: 22%; | 446 | + width: 28%; |
| 442 | height: 95%; | 447 | height: 95%; |
| 443 | position: absolute; | 448 | position: absolute; |
| 444 | right: 5%; | 449 | right: 5%; |