|
|
@@ -3,6 +3,11 @@ import { ModuleDataChart } from '/@/views/vent/deviceManager/configurationTable/
|
|
|
|
|
|
import { h } from 'vue'; // 引入vue的h函数用于创建VNode
|
|
|
|
|
|
+// 导入图片资源(关键步骤)
|
|
|
+import rank1 from '@/assets/images/dataCenter/infoCenter/rank-1.png';
|
|
|
+import rank2 from '@/assets/images/dataCenter/infoCenter/rank-2.png';
|
|
|
+import rank3 from '@/assets/images/dataCenter/infoCenter/rank-3.png';
|
|
|
+import rank4 from '@/assets/images/dataCenter/infoCenter/rank-4.png';
|
|
|
// 系统数据排名
|
|
|
export const sysDataColumn: BasicColumn[] = [
|
|
|
{
|
|
|
@@ -15,13 +20,13 @@ export const sysDataColumn: BasicColumn[] = [
|
|
|
const numIndex = Number(index);
|
|
|
let rankImg = '';
|
|
|
if (numIndex === 0) {
|
|
|
- rankImg = '/src/assets/images/dataCenter/infoCenter/rank-1.png';
|
|
|
+ rankImg = rank1;
|
|
|
} else if (numIndex === 1) {
|
|
|
- rankImg = '/src/assets/images/dataCenter/infoCenter/rank-2.png';
|
|
|
+ rankImg = rank2;
|
|
|
} else if (numIndex === 2) {
|
|
|
- rankImg = '/src/assets/images/dataCenter/infoCenter/rank-3.png';
|
|
|
+ rankImg = rank3;
|
|
|
} else {
|
|
|
- rankImg = '/src/assets/images/dataCenter/infoCenter/rank-4.png';
|
|
|
+ rankImg = rank4;
|
|
|
}
|
|
|
return h(
|
|
|
'div',
|
|
|
@@ -125,7 +130,32 @@ export const dailyNumOption: ModuleDataChart = {
|
|
|
type: 'bar',
|
|
|
readFrom: '',
|
|
|
legend: { show: false },
|
|
|
- xAxis: [{ show: true }],
|
|
|
+ xAxis: [
|
|
|
+ {
|
|
|
+ show: true,
|
|
|
+ axisLabel: {
|
|
|
+ rotate: 45, // 在这里配置旋转角度
|
|
|
+ interval: 0,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
yAxis: [{ show: true, name: '', position: 'left' }],
|
|
|
series: [{ readFrom: 'collectDataByDayList', xprop: 'day', yprop: 'total_count', label: '' }],
|
|
|
+ dataZoom: [
|
|
|
+ {
|
|
|
+ type: 'slider' as any,
|
|
|
+ show: true,
|
|
|
+ xAxisIndex: 0,
|
|
|
+ height: 12,
|
|
|
+ bottom: 10,
|
|
|
+ start: 0,
|
|
|
+ handleStyle: { color: '#66ffff' },
|
|
|
+ backgroundColor: 'rgba(102, 255, 255, 0.1)', // 滚动条背景色,适配UI
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'inside' as any, // 支持鼠标滚轮缩放柱子
|
|
|
+ xAxisIndex: 0,
|
|
|
+ zoomOnMouseWheel: true,
|
|
|
+ },
|
|
|
+ ] as any[],
|
|
|
};
|