foodRight.vue
3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<template>
<div class="stacker-status-container">
<!-- 顶部标题栏 -->
<div class="status-header">
<span class="div-span-title">当天报警信息(超10分钟)</span>
</div>
<!-- 主体内容区 -->
<div class="status-content">
<dv-scroll-board :config="getList" style="width:100%;height:17vw; margin-left: 0vw" />
</div>
</div>
</template>
<script>
export default {
data() {
return {
sysData: {},
getList: {
header: ['名称', '故障信息', '开始时间'],
data: [
// ['1号焊机', '电流过大', '01-09 15:33/1'],
// ['4号焊机', '电压过冲', '01-09 13:08/1'],
// ['7号焊机', '电压过冲', '01-09 10:54/1'],
// ['带锯床', '未匹配到该管径信息', '01-09 09:22/0'],
// ['1号焊机', '电流过大', '01-09 15:33/1'],
// ['4号焊机', '电压过冲', '01-09 13:08/1'],
// ['7号焊机', '电压过冲', '01-09 10:54/1'],
// ['带锯床', '未匹配到该管径信息', '01-09 09:22/0'],
// ['带锯床', '未匹配到该管径信息', '01-09 09:22/0'],
],
align: ['left'],
headerBGC: '#201e1e', //表头
oddRowBGC: '#021c66',
evenRowBGC: '#65,105,225',
rowNum: 6,
columnWidth: [78, 150, 100],
headerHeight: 25,
carousel: 'page',
waitTime: 8000,
},
}
},
methods: {
// 生产情况
getData(data) {
let tempList = []
data.equipmentAlarmsToDay.forEach((item) => {
const hms = item.startTime.slice(-8)
tempList.push([item.code, item.msg, hms])
})
let tableData = {
header: ['设备', '故障信息', '开始时间'],
data: tempList,
align: ['left'],
headerBGC: '#201e1e', //表头
oddRowBGC: '#021c66',
evenRowBGC: '#65,105,225',
rowNum: 6,
columnWidth: [78, 150, 100],
headerHeight: 25,
carousel: 'page',
waitTime: 8000,
}
this.getList = tableData
},
},
mounted() {
//eslint-disable-next-line no-debugger
debugger
},
}
</script>
<style scoped>
/* 最外层容器:深色背景,和截图一致 */
.stacker-status-container {
width: 32vw;
height: 22vw;
border: 1px solid #1e3a7a;
border-radius: 0.3vw;
/* padding: 1.5vw; */
position: relative;
overflow: hidden;
}
/* 顶部标题栏 */
.status-header {
width: 100%;
height: 3vw;
display: flex;
padding: 0.2vw 0 0 0.5vw;
}
/* 主体内容区:左右分栏 */
.status-content {
width: 100%;
height: calc(100% - 3.5vw);
display: flex;
align-items: center;
}
/* 左侧:堆垛机图片容器 */
.stacker-img-box {
width: 30%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.stacker-img {
max-width: 90%;
max-height: 90%;
width: auto;
height: auto;
}
.status-arrow {
width: 5vw;
height: 1vw;
background-color: #0066cc;
position: relative;
}
.status-arrow::after {
content: '';
position: absolute;
right: -1vw;
top: 50.5%;
transform: translateY(-50%);
width: 0;
height: 0;
border-top: 0.8vw solid transparent;
border-bottom: 0.8vw solid transparent;
border-left: 1.2vw solid #0066cc;
}
/* 右侧:状态信息区 */
.status-info-box {
width: 48%;
height: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
gap: 0.5vw;
margin-left: 2vw;
}
/* 状态图标(运行/待机/故障) */
.status-icon {
width: 8vw;
height: 8vw;
margin-bottom: 1vw;
}
.icon-run {
fill: #00e068;
}
.icon-idle {
fill: #ffb800;
}
.icon-error {
fill: #ff3333;
}
.icon-offline {
fill: #888888;
}
.lamp {
width: 100%;
height: 10vw;
}
.information {
width: 100%;
height: 60%;
font-size: 1.2vw;
line-height: 2vw;
}
/* 状态信息文本 */
.info-item {
font-size: 1.2vw;
color: #ffffff;
/* line-height: 2.2vw; */
}
/* 底部报警信息 */
.alarm-info {
position: absolute;
bottom: 2.2vw;
left: 1vw;
font-size: 1vw;
font-weight: bold;
color: #ff0000;
}
</style>