This commit is contained in:
‘937886381’
2025-01-08 16:10:46 +08:00
parent 00f54f3de6
commit 04a5359eda
10 changed files with 155 additions and 151 deletions

View File

@@ -61,9 +61,9 @@ function getTodayStart(today) {
/** 颜色配置 */
const types = [
{ name: '运行', color: '#288AFF' },
{ name: '故障', color: '#FC9C91' },
{ name: '运行', color: '#288AFF' },
{ name: '计划停机', color: '#FFDC94' },
{ name: '故障', color: '#FC9C91' },
{ name: '空白', color: '#F2F4F9' },
];
@@ -86,7 +86,7 @@ export default class GanttGraph {
<span class="eq-name" style="margin-left: 4px;">${params.seriesName}</span>
</div>
<span class="run-status" style="margin-left: 8px; opacity: 0.6">${params.name}</span>
</div>
</div>
`
}
}
@@ -251,7 +251,7 @@ export default class GanttGraph {
y: 0,
},
data: arr.map(item => ({
name: ['运行', '故障', '计划停机'][item.status],
name: ['运行', '计划停机', '故障'][item.status],
value: [0, item.startTime, item.startTime + item.duration * 60 * 1000, 0],
itemStyle: {
color: types[item.status].color,
@@ -325,4 +325,4 @@ export default class GanttGraph {
console.log(JSON.stringify(this.option, null, 2));
}
}
}