Commit 48841480b5570ea3291f5a33e2fd97510fc656dd

Authored by 黄 x
1 parent 884180c6

fix(front): 地理位置列表加入告警状态

... ... @@ -28,6 +28,7 @@ export interface DeviceModel {
28 28 deviceInfo: any;
29 29 activeTime: string;
30 30 deviceState: DeviceState;
  31 + alarmStatus: number;
31 32 profileId: string;
32 33 label: string;
33 34 lastConnectTime: string;
... ...
... ... @@ -79,18 +79,24 @@ export const columns: BasicColumn[] = [
79 79 {
80 80 title: '名称',
81 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 91 title: '位置',
86 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 23 }}
24 24 </Tag>
25 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 31 </BasicTable>
27 32 </div>
28 33 <BasicModal
... ... @@ -223,7 +228,7 @@
223 228 const { longitude, latitude, address } = record.deviceInfo;
224 229 const point = new BMap.Point(longitude, latitude);
225 230 let options = {
226   - width: 300, // 信息窗口宽度
  231 + width: 330, // 信息窗口宽度
227 232 height: 230, // 信息窗口高度
228 233 };
229 234 map.centerAndZoom(point, 15);
... ... @@ -438,7 +443,7 @@
438 443 }
439 444 .right-wrap {
440 445 padding-top: 10px;
441   - width: 22%;
  446 + width: 28%;
442 447 height: 95%;
443 448 position: absolute;
444 449 right: 5%;
... ...