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
| <template>
| <div>
| <dv-scroll-board :config="config" style="width:100%;flex: 1;display: flex;flex-direction: column"/>
| </div>
| </template>
|
| <script>
| import signageApi from '@/api/signage'
|
| export default {
| name: 'WorkshopAlarmInfoTable',
| components: {},
| data() {
| return {
| config: {},
| dataSource: []
| }
| },
| methods: {
| getWorkshopAlarmInfoByApi() {
| const that = this
| signageApi.getWorkshopAlarmInfoApi()
| .then(res => {
| if (res.success) {
| that.dataSource = res.result
| that.initChart()
| }
| })
| },
|
| initChart() {
| this.config = {
| // indexHeader: '序号',
| header: ['设备编号', '报警时间', '报警号'],
| headerBGC: 'rgb(45, 59, 94)',
| oddRowBGC: 'transparent',
| evenRowBGC: 'transparent',
| data: this.dataSource.map(item => {
| return [item.equipmentId, item.collectTime, item.alarm]
| }),
| rowNum: 3,
| index: false,
| // columnWidth: [300, 300],
| align: ['center', 'center', 'center']
| }
| }
| }
| }
| </script>
|
| <style scoped lang="less">
| table {
| width: 100%;
|
| th, td {
| text-align: center;
| }
| }
|
| /deep/ .header, /deep/ .row-item {
| border-bottom: 0.1vw solid #79b2e2;
| & > div {
| width: 33.33% !important;
| font-size: 0.9vw;
| color: #eee;
| border-left: 0.1vw solid #79b2e2;
| border-right: 0.1vw solid #79b2e2;
| }
| }
|
| /deep/ .header {
| & > div {
| height: 2vw !important;
| line-height: 2vw !important;
| }
| }
| </style>
|
|