|
@@ -18,8 +18,11 @@ |
|
@@ -18,8 +18,11 @@ |
18
|
import { useGlobSetting } from '/@/hooks/setting';
|
18
|
import { useGlobSetting } from '/@/hooks/setting';
|
19
|
import moment from 'moment';
|
19
|
import moment from 'moment';
|
20
|
import { EdgeInstanceItemType } from '/@/api/edgeManage/model/edgeInstance';
|
20
|
import { EdgeInstanceItemType } from '/@/api/edgeManage/model/edgeInstance';
|
21
|
- import { isArray } from '/@/utils/is';
|
21
|
+ import { isArray, isNumber } from '/@/utils/is';
|
22
|
import { formatSizeUnits } from '/@/utils';
|
22
|
import { formatSizeUnits } from '/@/utils';
|
|
|
23
|
+ import cpuSvg from '/@/assets/icons/cpu.svg';
|
|
|
24
|
+ import diskSvg from '/@/assets/icons/disk.svg';
|
|
|
25
|
+ import memorySvg from '/@/assets/icons/memory.svg';
|
23
|
|
26
|
|
24
|
interface ChartInstance {
|
27
|
interface ChartInstance {
|
25
|
name: string;
|
28
|
name: string;
|
|
@@ -30,6 +33,7 @@ |
|
@@ -30,6 +33,7 @@ |
30
|
text: string;
|
33
|
text: string;
|
31
|
xAxisData: string[];
|
34
|
xAxisData: string[];
|
32
|
seriesData: number[];
|
35
|
seriesData: number[];
|
|
|
36
|
+ icon: any;
|
33
|
}
|
37
|
}
|
34
|
|
38
|
|
35
|
enum DeviceInfoOfEdge {
|
39
|
enum DeviceInfoOfEdge {
|
|
@@ -67,11 +71,11 @@ |
|
@@ -67,11 +71,11 @@ |
67
|
cmdId: 11,
|
71
|
cmdId: 11,
|
68
|
entityType: 'EDGE',
|
72
|
entityType: 'EDGE',
|
69
|
keys: `${DeviceInfoOfEdge.CPU_USAGE_OF_EDGE},${DeviceInfoOfEdge.DISC_USAGE_OF_EDGE},${DeviceInfoOfEdge.MEMORY_USAGE_OF_EDGE},${DeviceInfoOfEdge.CPU_COUNT_OF_EDGE},${DeviceInfoOfEdge.TOTAL_MEMORY_OF_EDGE},${DeviceInfoOfEdge.TOTAL_DISC_SPACE_OF_EDGE}`,
|
73
|
keys: `${DeviceInfoOfEdge.CPU_USAGE_OF_EDGE},${DeviceInfoOfEdge.DISC_USAGE_OF_EDGE},${DeviceInfoOfEdge.MEMORY_USAGE_OF_EDGE},${DeviceInfoOfEdge.CPU_COUNT_OF_EDGE},${DeviceInfoOfEdge.TOTAL_MEMORY_OF_EDGE},${DeviceInfoOfEdge.TOTAL_DISC_SPACE_OF_EDGE}`,
|
70
|
- startTs: moment(moment().subtract(1, 'hours')).valueOf(),
|
74
|
+ startTs: moment(moment().subtract(1, 'minute')).valueOf(),
|
71
|
timeWindow: 3600000,
|
75
|
timeWindow: 3600000,
|
72
|
interval: 10000,
|
76
|
interval: 10000,
|
73
|
intervalType: 'MILLISECONDS',
|
77
|
intervalType: 'MILLISECONDS',
|
74
|
- limit: 360,
|
78
|
+ // limit: 360,
|
75
|
timeZoneId: 'Asia/Shanghai',
|
79
|
timeZoneId: 'Asia/Shanghai',
|
76
|
agg: 'AVG',
|
80
|
agg: 'AVG',
|
77
|
unsubscribe: false,
|
81
|
unsubscribe: false,
|
|
@@ -90,6 +94,7 @@ |
|
@@ -90,6 +94,7 @@ |
90
|
type: DeviceInfoOfEdge.CPU_USAGE_OF_EDGE,
|
94
|
type: DeviceInfoOfEdge.CPU_USAGE_OF_EDGE,
|
91
|
xAxisData: [],
|
95
|
xAxisData: [],
|
92
|
seriesData: [],
|
96
|
seriesData: [],
|
|
|
97
|
+ icon: cpuSvg,
|
93
|
},
|
98
|
},
|
94
|
{
|
99
|
{
|
95
|
name: '内存',
|
100
|
name: '内存',
|
|
@@ -100,6 +105,7 @@ |
|
@@ -100,6 +105,7 @@ |
100
|
type: DeviceInfoOfEdge.MEMORY_USAGE_OF_EDGE,
|
105
|
type: DeviceInfoOfEdge.MEMORY_USAGE_OF_EDGE,
|
101
|
xAxisData: [],
|
106
|
xAxisData: [],
|
102
|
seriesData: [],
|
107
|
seriesData: [],
|
|
|
108
|
+ icon: memorySvg,
|
103
|
},
|
109
|
},
|
104
|
{
|
110
|
{
|
105
|
name: '磁盘',
|
111
|
name: '磁盘',
|
|
@@ -110,17 +116,18 @@ |
|
@@ -110,17 +116,18 @@ |
110
|
type: DeviceInfoOfEdge.DISC_USAGE_OF_EDGE,
|
116
|
type: DeviceInfoOfEdge.DISC_USAGE_OF_EDGE,
|
111
|
xAxisData: [],
|
117
|
xAxisData: [],
|
112
|
seriesData: [],
|
118
|
seriesData: [],
|
|
|
119
|
+ icon: diskSvg,
|
113
|
},
|
120
|
},
|
114
|
]);
|
121
|
]);
|
115
|
|
122
|
|
116
|
const chartsInstance = shallowReactive<{ [key: string]: echarts.ECharts }>({});
|
123
|
const chartsInstance = shallowReactive<{ [key: string]: echarts.ECharts }>({});
|
117
|
|
124
|
|
118
|
- const cacheUsedSpace = (total, percentage) => {
|
|
|
119
|
- if (!total) return;
|
|
|
120
|
- const takeValue = total.split('.')[0];
|
|
|
121
|
- const takeUnit = total.split('.')[1];
|
|
|
122
|
- return `${(takeValue * (percentage / 100)).toFixed(1)}${takeUnit}`;
|
|
|
123
|
- };
|
125
|
+ // const cacheUsedSpace = (total, percentage) => {
|
|
|
126
|
+ // if (!total) return;
|
|
|
127
|
+ // const takeValue = total.split('.')[0];
|
|
|
128
|
+ // const takeUnit = total.split('.')[1];
|
|
|
129
|
+ // return `${(takeValue * (percentage / 100)).toFixed(1)}${takeUnit}`;
|
|
|
130
|
+ // };
|
124
|
|
131
|
|
125
|
const { send, close, data, open } = useWebSocket(socketInfo.origin, {
|
132
|
const { send, close, data, open } = useWebSocket(socketInfo.origin, {
|
126
|
immediate: false,
|
133
|
immediate: false,
|
|
@@ -139,7 +146,8 @@ |
|
@@ -139,7 +146,8 @@ |
139
|
chartInstance.value.forEach((chartItem: ChartInstance) => {
|
146
|
chartInstance.value.forEach((chartItem: ChartInstance) => {
|
140
|
if (chartItem.type === key) {
|
147
|
if (chartItem.type === key) {
|
141
|
chartItem.xAxisData.push(moment(data[key][0][0]).format('HH:mm'));
|
148
|
chartItem.xAxisData.push(moment(data[key][0][0]).format('HH:mm'));
|
142
|
- chartItem.seriesData.push(data[key][0][1]);
|
149
|
+ // chartItem.seriesData = [];
|
|
|
150
|
+ chartItem.seriesData = data[key][0][1] ? [data[key][0][1]] : [];
|
143
|
chartItem.currentValue = Number(data[key][0][1]);
|
151
|
chartItem.currentValue = Number(data[key][0][1]);
|
144
|
}
|
152
|
}
|
145
|
if (chartItem.totalKey === key) {
|
153
|
if (chartItem.totalKey === key) {
|
|
@@ -167,50 +175,246 @@ |
|
@@ -167,50 +175,246 @@ |
167
|
},
|
175
|
},
|
168
|
});
|
176
|
});
|
169
|
|
177
|
|
170
|
- const handleRenderChartInstance = async (chartInstance: ChartInstance[]) => {
|
|
|
171
|
- await nextTick();
|
|
|
172
|
- if (!chartInstance) return;
|
|
|
173
|
- if (isArray(chartInstance) && chartInstance.length <= 0) return;
|
|
|
174
|
- for (const item of unref(chartInstance)) {
|
|
|
175
|
- const { type, xAxisData, seriesData, text } = item;
|
|
|
176
|
- chartsInstance[type] = echarts.init(document.getElementById(`chart-${type}`) as HTMLElement);
|
|
|
177
|
- const chartOption = {
|
|
|
178
|
- title: {
|
|
|
179
|
- text,
|
|
|
180
|
- textAlign: 'left',
|
|
|
181
|
- textStyle: {
|
|
|
182
|
- fontSize: 12,
|
178
|
+ function onResize(type) {
|
|
|
179
|
+ if (!chartsInstance[type]) return;
|
|
|
180
|
+ chartsInstance[type]?.resize();
|
|
|
181
|
+ }
|
|
|
182
|
+
|
|
|
183
|
+ const chartOption = {
|
|
|
184
|
+ series: [
|
|
|
185
|
+ {
|
|
|
186
|
+ data: [],
|
|
|
187
|
+ detail: {
|
|
|
188
|
+ formatter: `暂无数据`,
|
|
|
189
|
+ },
|
|
|
190
|
+ type: 'gauge',
|
|
|
191
|
+ axisLine: {
|
|
|
192
|
+ lineStyle: {
|
|
|
193
|
+ width: 10,
|
|
|
194
|
+ color: [
|
|
|
195
|
+ [0.2, '#739ded'],
|
|
|
196
|
+ [0.8, '#5f89d8'],
|
|
|
197
|
+ [1, '#377dff'],
|
|
|
198
|
+ ],
|
|
|
199
|
+ },
|
|
|
200
|
+ },
|
|
|
201
|
+ pointer: {
|
|
|
202
|
+ itemStyle: {
|
|
|
203
|
+ color: 'auto',
|
183
|
},
|
204
|
},
|
184
|
},
|
205
|
},
|
185
|
- tooltip: {
|
|
|
186
|
- trigger: 'axis',
|
|
|
187
|
- axisPointer: {
|
|
|
188
|
- type: 'cross',
|
206
|
+ axisTick: {
|
|
|
207
|
+ distance: 0,
|
|
|
208
|
+ length: 8,
|
|
|
209
|
+ lineStyle: {
|
|
|
210
|
+ color: 'auto',
|
189
|
},
|
211
|
},
|
190
|
},
|
212
|
},
|
191
|
- xAxis: {
|
|
|
192
|
- type: 'category',
|
|
|
193
|
- data: xAxisData,
|
213
|
+ splitLine: {
|
|
|
214
|
+ distance: 0,
|
|
|
215
|
+ length: 10,
|
|
|
216
|
+ lineStyle: {
|
|
|
217
|
+ color: 'auto',
|
|
|
218
|
+ width: 3,
|
|
|
219
|
+ },
|
194
|
},
|
220
|
},
|
195
|
- yAxis: {
|
|
|
196
|
- type: 'value',
|
|
|
197
|
- name: '%',
|
221
|
+ axisLabel: {
|
|
|
222
|
+ color: 'inherit',
|
|
|
223
|
+ distance: 15,
|
|
|
224
|
+ fontSize: 8,
|
198
|
},
|
225
|
},
|
199
|
- series: [
|
|
|
200
|
- {
|
|
|
201
|
- data: seriesData,
|
|
|
202
|
- type: 'line',
|
226
|
+ },
|
|
|
227
|
+ ],
|
|
|
228
|
+ };
|
|
|
229
|
+ const pieOption = {
|
|
|
230
|
+ grid: {
|
|
|
231
|
+ top: 0,
|
|
|
232
|
+ bottom: 0,
|
|
|
233
|
+ left: 0,
|
|
|
234
|
+ right: 0,
|
|
|
235
|
+ },
|
|
|
236
|
+ tooltip: {
|
|
|
237
|
+ trigger: 'item',
|
|
|
238
|
+ formatter: '{b}<br/>{d}%',
|
|
|
239
|
+ textStyle: {
|
|
|
240
|
+ fontSize: 12,
|
|
|
241
|
+ },
|
|
|
242
|
+ },
|
|
|
243
|
+ title: {
|
|
|
244
|
+ text: '磁盘容量',
|
|
|
245
|
+ subtext: '暂无数据',
|
|
|
246
|
+ textStyle: {
|
|
|
247
|
+ fontSize: 12,
|
|
|
248
|
+ color: '#72767c',
|
|
|
249
|
+ },
|
|
|
250
|
+ subtextStyle: {
|
|
|
251
|
+ fontSize: 14,
|
|
|
252
|
+ color: '#000000',
|
|
|
253
|
+ fontWeight: 500,
|
|
|
254
|
+ },
|
|
|
255
|
+ textAlign: 'center',
|
|
|
256
|
+ left: '48.5%',
|
|
|
257
|
+ top: '44%',
|
|
|
258
|
+ },
|
|
|
259
|
+ legend: {
|
|
|
260
|
+ show: true,
|
|
|
261
|
+ icon: 'circle',
|
|
|
262
|
+
|
|
|
263
|
+ bottom: '0%',
|
|
|
264
|
+ data: [{ name: '磁盘已使用' }, { name: '磁盘剩余空间' }].map((item) => ({
|
|
|
265
|
+ name: item.name,
|
|
|
266
|
+ })),
|
|
|
267
|
+ formatter(name: string) {
|
|
|
268
|
+ return `{b_style|${name}} `;
|
|
|
269
|
+ },
|
|
|
270
|
+ textStyle: {
|
|
|
271
|
+ color: '#000',
|
|
|
272
|
+ rich: {
|
|
|
273
|
+ b_style: {
|
|
|
274
|
+ color: '#8d8ea0',
|
|
|
275
|
+ fontSize: 12,
|
|
|
276
|
+ padding: [0, 5, 0, 0],
|
203
|
},
|
277
|
},
|
|
|
278
|
+ },
|
|
|
279
|
+ },
|
|
|
280
|
+ },
|
|
|
281
|
+ series: [
|
|
|
282
|
+ {
|
|
|
283
|
+ type: 'pie',
|
|
|
284
|
+ // center: ['35%', '50%'],
|
|
|
285
|
+ radius: ['40%', '67%'],
|
|
|
286
|
+ startAngle: 30,
|
|
|
287
|
+ emphasis: {
|
|
|
288
|
+ scale: false,
|
|
|
289
|
+ },
|
|
|
290
|
+ label: {
|
|
|
291
|
+ position: 'outside',
|
|
|
292
|
+ alignTo: 'labelLine',
|
|
|
293
|
+ height: 0,
|
|
|
294
|
+ width: 0,
|
|
|
295
|
+ lineHeight: 0,
|
|
|
296
|
+ distanceToLabelLine: 75,
|
|
|
297
|
+ borderRadius: 3,
|
|
|
298
|
+ borderWidth: 1,
|
|
|
299
|
+ borderColor: 'none',
|
|
|
300
|
+ padding: [20, -15, 0, -10],
|
|
|
301
|
+ rich: {
|
|
|
302
|
+ a: {
|
|
|
303
|
+ padding: [0, -80, 55, -80],
|
|
|
304
|
+ fontSize: '12px',
|
|
|
305
|
+ color: '#000000',
|
|
|
306
|
+ },
|
|
|
307
|
+ b: {
|
|
|
308
|
+ padding: [20, -80, 40, -80],
|
|
|
309
|
+ fontSize: '12px',
|
|
|
310
|
+ color: '#72767c',
|
|
|
311
|
+ },
|
|
|
312
|
+ },
|
|
|
313
|
+ // formatter: (params: any) => {
|
|
|
314
|
+ // const { data } = params;
|
|
|
315
|
+ // const { value } = data || {};
|
|
|
316
|
+
|
|
|
317
|
+ // const total = Number(totalCount.totalDisc?.split('.')[0] || 0);
|
|
|
318
|
+ // const totalUnit = totalCount.totalDisc?.split('.')[1] || 0;
|
|
|
319
|
+
|
|
|
320
|
+ // return `{a|${value && total ? value : ''}${value && total ? '%' : ''}} \n {b|${
|
|
|
321
|
+ // total ? (total * (value / 100)).toFixed(1) : ''
|
|
|
322
|
+ // }${total ? totalUnit : ''}}`;
|
|
|
323
|
+ // },
|
|
|
324
|
+ },
|
|
|
325
|
+ labelLine: {
|
|
|
326
|
+ show: false,
|
|
|
327
|
+ length: 5,
|
|
|
328
|
+ // align: 'bottom',
|
|
|
329
|
+ lineStyle: {
|
|
|
330
|
+ width: 1,
|
|
|
331
|
+ },
|
|
|
332
|
+ },
|
|
|
333
|
+ data: [
|
|
|
334
|
+ { name: '磁盘已使用', value: 0, itemStyle: { color: '#90b2f1' } },
|
|
|
335
|
+ { name: '磁盘剩余空间', value: 100, itemStyle: { color: '#377dff' } },
|
204
|
],
|
336
|
],
|
205
|
- };
|
|
|
206
|
- chartsInstance[type].setOption(chartOption);
|
337
|
+ },
|
|
|
338
|
+ ],
|
|
|
339
|
+ };
|
|
|
340
|
+
|
|
|
341
|
+ const handleRenderChartInstance = async (chartInstance: ChartInstance[]) => {
|
|
|
342
|
+ await nextTick();
|
|
|
343
|
+ if (!chartInstance) return;
|
|
|
344
|
+ if (isArray(chartInstance) && chartInstance.length <= 0) return;
|
|
|
345
|
+ for (const item of unref(chartInstance)) {
|
|
|
346
|
+ const { type, seriesData, currentValue, totalCount } = item;
|
|
|
347
|
+ // chartsInstance[type] = echarts.init(document.getElementById(`chart-${type}`) as HTMLElement);
|
|
|
348
|
+ if (type !== DeviceInfoOfEdge.DISC_USAGE_OF_EDGE) {
|
|
|
349
|
+ chartsInstance[type].setOption({
|
|
|
350
|
+ series: [
|
|
|
351
|
+ {
|
|
|
352
|
+ data: seriesData,
|
|
|
353
|
+ detail: {
|
|
|
354
|
+ formatter: `${isNumber(currentValue) ? '{value} %' : '暂无数据'}`,
|
|
|
355
|
+ },
|
|
|
356
|
+ },
|
|
|
357
|
+ ],
|
|
|
358
|
+ });
|
|
|
359
|
+ } else {
|
|
|
360
|
+ chartsInstance[type].setOption({
|
|
|
361
|
+ title: {
|
|
|
362
|
+ subtext: totalCount.totalDisc,
|
|
|
363
|
+ },
|
|
|
364
|
+ series: [
|
|
|
365
|
+ {
|
|
|
366
|
+ label: {
|
|
|
367
|
+ formatter: (params: any) => {
|
|
|
368
|
+ const { data } = params;
|
|
|
369
|
+ const { value } = data || {};
|
|
|
370
|
+
|
|
|
371
|
+ const total = Number(totalCount.totalDisc?.split('.')[0] || 0);
|
|
|
372
|
+ const totalUnit = totalCount.totalDisc?.split('.')[1] || 0;
|
|
|
373
|
+
|
|
|
374
|
+ return `{a|${value && total ? value : ''}${value && total ? '%' : ''}} \n {b|${
|
|
|
375
|
+ total ? (total * (value / 100)).toFixed(1) : ''
|
|
|
376
|
+ }${total ? totalUnit : ''}}`;
|
|
|
377
|
+ },
|
|
|
378
|
+ },
|
|
|
379
|
+ data: [
|
|
|
380
|
+ { name: '磁盘已使用', value: currentValue, itemStyle: { color: '#90b2f1' } },
|
|
|
381
|
+ {
|
|
|
382
|
+ name: '磁盘剩余空间',
|
|
|
383
|
+ value: 100 - currentValue,
|
|
|
384
|
+ itemStyle: { color: '#377dff' },
|
|
|
385
|
+ },
|
|
|
386
|
+ ],
|
|
|
387
|
+ },
|
|
|
388
|
+ ],
|
|
|
389
|
+ });
|
|
|
390
|
+ }
|
|
|
391
|
+
|
|
|
392
|
+ window.addEventListener('resize', () => onResize(type));
|
207
|
}
|
393
|
}
|
208
|
};
|
394
|
};
|
209
|
|
395
|
|
|
|
396
|
+ onUnmounted(() => {
|
|
|
397
|
+ window.removeEventListener('resize', onResize);
|
|
|
398
|
+ });
|
|
|
399
|
+
|
210
|
onMounted(() => {
|
400
|
onMounted(() => {
|
211
|
socketInfo.entityId = props.recordData?.id?.id as string;
|
401
|
socketInfo.entityId = props.recordData?.id?.id as string;
|
212
|
if (socketInfo.entityId) {
|
402
|
if (socketInfo.entityId) {
|
213
|
open();
|
403
|
open();
|
|
|
404
|
+ [
|
|
|
405
|
+ DeviceInfoOfEdge.CPU_USAGE_OF_EDGE,
|
|
|
406
|
+ DeviceInfoOfEdge.MEMORY_USAGE_OF_EDGE,
|
|
|
407
|
+ DeviceInfoOfEdge.DISC_USAGE_OF_EDGE,
|
|
|
408
|
+ ].forEach((item) => {
|
|
|
409
|
+ chartsInstance[item] = echarts.init(
|
|
|
410
|
+ document.getElementById(`chart-${item}`) as HTMLElement
|
|
|
411
|
+ );
|
|
|
412
|
+ if (item !== DeviceInfoOfEdge.DISC_USAGE_OF_EDGE) {
|
|
|
413
|
+ chartsInstance[item]?.setOption(chartOption);
|
|
|
414
|
+ } else {
|
|
|
415
|
+ chartsInstance[item]?.setOption(pieOption);
|
|
|
416
|
+ }
|
|
|
417
|
+ });
|
214
|
}
|
418
|
}
|
215
|
});
|
419
|
});
|
216
|
|
420
|
|
|
@@ -220,14 +424,18 @@ |
|
@@ -220,14 +424,18 @@ |
220
|
<template>
|
424
|
<template>
|
221
|
<div>
|
425
|
<div>
|
222
|
<a-row justify="space-around" align="middle" :gutter="{ xs: 8, sm: 16, md: 24, lg: 32 }">
|
426
|
<a-row justify="space-around" align="middle" :gutter="{ xs: 8, sm: 16, md: 24, lg: 32 }">
|
223
|
- <a-col class="gutter-row" :span="8" v-for="(item, index) in chartInstance" :key="index">
|
|
|
224
|
- <a-row justify="space-around" align="middle">
|
|
|
225
|
- <div
|
|
|
226
|
- style="background-color: #d3d3d3; border-radius: 20px"
|
|
|
227
|
- class="!flex justify-between items-center gap-8 font-bold fill-dark-900 p-2.5 mt-4"
|
|
|
228
|
- >
|
|
|
229
|
- <span>{{ item.name }}</span>
|
|
|
230
|
- <span>{{ item.currentValue }}%</span>
|
427
|
+ <a-col
|
|
|
428
|
+ class="gutter-row"
|
|
|
429
|
+ style="background: #f5f5f5; border-radius: 20px"
|
|
|
430
|
+ :span="7"
|
|
|
431
|
+ v-for="(item, index) in chartInstance"
|
|
|
432
|
+ :key="index"
|
|
|
433
|
+ >
|
|
|
434
|
+ <a-row align="middle">
|
|
|
435
|
+ <div class="!flex justify-between items-center font-bold fill-dark-900 p-2.5 mt-4">
|
|
|
436
|
+ <img :src="item.icon" />
|
|
|
437
|
+ <span class="ml-1">{{ item.text }}</span>
|
|
|
438
|
+ <!-- <span>{{ item.currentValue }}%</span>
|
231
|
<span v-if="item.type !== DeviceInfoOfEdge.DISC_USAGE_OF_EDGE"
|
439
|
<span v-if="item.type !== DeviceInfoOfEdge.DISC_USAGE_OF_EDGE"
|
232
|
>{{
|
440
|
>{{
|
233
|
item.type === DeviceInfoOfEdge.CPU_USAGE_OF_EDGE
|
441
|
item.type === DeviceInfoOfEdge.CPU_USAGE_OF_EDGE
|
|
@@ -242,25 +450,20 @@ |
|
@@ -242,25 +450,20 @@ |
242
|
>
|
450
|
>
|
243
|
<span v-if="item.type === DeviceInfoOfEdge.DISC_USAGE_OF_EDGE" style="color: #1677ff"
|
451
|
<span v-if="item.type === DeviceInfoOfEdge.DISC_USAGE_OF_EDGE" style="color: #1677ff"
|
244
|
>可用{{ item.totalCount.totalDisc }}</span
|
452
|
>可用{{ item.totalCount.totalDisc }}</span
|
245
|
- >
|
453
|
+ > -->
|
246
|
</div>
|
454
|
</div>
|
247
|
</a-row>
|
455
|
</a-row>
|
248
|
<a-row class="mt-8" justify="space-around" align="middle">
|
456
|
<a-row class="mt-8" justify="space-around" align="middle">
|
249
|
- <div
|
|
|
250
|
- :style="`border-width:${item.seriesData.length <= 0 ? 0 : 1}px`"
|
|
|
251
|
- style="border-color: #d3d3d3"
|
|
|
252
|
- class="flex items-center"
|
|
|
253
|
- >
|
457
|
+ <div class="flex w-full justify-center relative">
|
254
|
<Empty
|
458
|
<Empty
|
255
|
- v-if="item.seriesData.length <= 0"
|
|
|
256
|
description="暂无数据"
|
459
|
description="暂无数据"
|
257
|
- class="text-dark-50 m-4"
|
460
|
+ class="text-dark-50 m-4 absolute"
|
|
|
461
|
+ :style="{ display: item.seriesData.length == 0 ? 'block' : 'none' }"
|
258
|
/>
|
462
|
/>
|
259
|
<div
|
463
|
<div
|
260
|
- v-else
|
|
|
261
|
:id="`chart-${item.type}`"
|
464
|
:id="`chart-${item.type}`"
|
262
|
- style="width: 380px; height: 300px"
|
|
|
263
|
- class="m-4"
|
465
|
+ class="m-4 w-8.5/10 h-300px"
|
|
|
466
|
+ :style="{ opacity: item.seriesData.length > 0 ? 1 : 0 }"
|
264
|
></div>
|
467
|
></div>
|
265
|
</div>
|
468
|
</div>
|
266
|
</a-row>
|
469
|
</a-row>
|