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
| <template>
| <div id="main">
| <div class="bg-color-black">
| <div class="d-flex pt-2 pl-2">
| <span>
| <icon name="chart-line" style="background-color: #c3cbde" class="text-icon"></icon>
| </span>
| <div class="d-flex">
| <span class="fs-xl text mx-2">物料剩余</span>
| </div>
| </div>
| <dv-scroll-ranking-board class="dv-scr-rank-board mt-1" :config="ranking" />
| <dv-scroll-board class="dv-scr-board" :config="config" ifBorderBottom />
|
| </div>
| </div>
| </template>
|
| <script>
|
| export default {
| name: "left",
| data() {
| return {
| value:'',
| config: {
| header: ['工位', '油脂到期', '剩余天数'],
| data: [
| ['<span style=\'font-size: 20px\'>DOP020</span>', '<span style=\'font-size: 20px\'>20241211</span>', '<span style=\'font-size: 20px\'>365</span>'],
| ['<span style=\'font-size: 20px\'>OP050</span>', '<span style=\'font-size: 20px\'>20241211</span>', '<span style=\'font-size: 20px\'>365</span>',],
| ['<span style=\'font-size: 20px\'>BOP30/40</span>', '<span style=\'font-size: 20px\'>20241211</span>', '<span style=\'font-size: 20px\'>365</span>'],
| ],
| rowNum: 7, //表格行数
| headerHeight: 35,
| headerBGC: '#0f1325', //表头
| oddRowBGC: '#0f1325', //奇数行
| evenRowBGC: '#171c33', //偶数行
| index: true,
| columnWidth: [20],
| align: ['center'],
| },
| ranking: {
| data: [
| {
| name: '扭力传感器',
| value: 0
| },
| {
| name: 'PCB板',
| value: 0
| },
| {
| name: '齿轮盖组件',
| value: 0
| },
| {
| name: '左壳体',
| value: 0
| },
| {
| name: '齿轮盖',
| value: 0
| },
| {
| name: '右壳体',
| value: 0
| },
| {
| name: '牙盘承座组件',
| value: 0
| },
| {
| name: '牙盘承座',
| value: 0
| },
| {
| name: 'NK172312滚针轴承',
| value: 0
| },
| {
| name: '自润滑轴承',
| value: 0
| },
| {
| name: '双唇油封',
| value: 0
| },
| {
| name: '超越离合器',
| value: 0
| },
| {
| name: '输出齿轮',
| value: 0
| },
| {
| name: 'C29挡圈',
| value: 0
| },
| {
| name: '右导热硅胶片',
| value: 0
| },
| {
| name: '左壳体总成',
| value: 0
| }
| ],
| carousel: 'single',
| unit: '个'
| },
| }
| },
| mounted() {
| this.tops();
| this.changeTiming();
| // this.$bus.$on('refresh-components', (value) => {
| // // 刷新初始化方法
| // this.value = value;
| // this.tops();
| // })
| },
| methods: {
| tops(){
| // this.$http.get('http://127.0.0.1:8080/greaseBoard/bigListGreaseBoard')
| this.$http.get('http://172.20.1.10:8080/greaseBoard/bigListGreaseBoard')
| .then((response)=>{
| this.config = {
| header: ['工位', '到期时间', '剩余天数'],
| data: response.data.data,
| rowNum: 7, //表格行数
| headerHeight: 35,
| headerBGC: '#0f1325', //表头
| oddRowBGC: '#0f1325', //奇数行
| evenRowBGC: '#171c33', //偶数行
| index: true,
| columnWidth: [20],
| align: ['center'],
| }
| console.log(response.data.data)
| })
| },
| changeTiming() {
| setInterval(() => {
| this.tops();
| }, 300000)
| },
| }
| }
| </script>
|
| <style lang="scss" scoped>
| $box-width: 450px;
| $box-height: 710px;
| #main {
| padding: 5px;
| height: $box-height;
| width: $box-width;
| border-radius: 10px;
| }
| .bg-color-black{
| //margin-left: 12px;
| //height: 710px;
| height: 470px;
| width: 365px;
| }
| .text {
| color: #c3cbde;
| font-size: 20px;
| margin-top: -1px;
| }
| //.dv-scr-board{
| .row-item{
| border-bottom: 3px solid #00BAFF;
| }
| //}
|
|
| </style>
|
|