liulijun
2025-11-17 da4257bc32483409af02a06dd342c6981ec786ec
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
<template>
    <div id="index" ref="appRef">
        <div class="bg">
            <div class="myhead"></div>
            <dv-loading v-if="loading">Loading...</dv-loading>
            <div v-else class="host-body">
 
                <div class="react-right" style="margin-left: 1510px">
                    <span class="text" style="width: 400px">{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span>
                </div>
                <div class="body-box">
 
                    <div class="content-box">
                        <div class="boxOrderHeight"
                            style="margin-left: 0px; display: flex; align-items: center; position: relative; width: 100%;">
                            <span style="
                    width: 5px;
                    height: 40px;
                    background-color: #FF4500;
                    display: block;
                  "></span>
                            <span style="
                    padding-left: 15px;
                    font-size: 50px;
                    font-weight: bold;
                    color: #90EE90;
                  ">立库输送轨道原纸信息(共 卷)</span>
                            //时间
                            <div style="position: absolute; right: 20px;">
                                <p style="
                      display: inline-block;
                      font-size: 50px;
                      font-weight: bold;
                      color: #f7b500;
                      margin: 0;
                      padding: 5px 15px;
                    ">{{ currentTime }}</p>
                            </div>
                        </div>
                        <!-- 工单信息模块 -->
                        <dv-border-box-8 :reverse="true"
                            style="width: 100%; height: 950px; margin-top: 5px; margin-left: auto; margin-right: auto;">
                            <dv-scroll-board :config="config" ref="scrollBoard"
                                style="width: 100%; height: 950px; padding: 5px" />
                        </dv-border-box-8>
                    </div>
 
                </div>
            </div>
        </div>
    </div>
</template>
 
<script>
import drawMixin from "../utils/drawMixin";
import { formatTime } from "../utils/index.js";
import centerView1 from "./centerView1.vue";
import bottomView1 from "./bottomView1.vue";
import axios from "@/api/ajax.js";
// import{GetDateForLED} from "@/api/http.js"
 
export default {
    mixins: [drawMixin],
    data() {
        return {
            timing: null,
            loading: true,
            dateDay: null,
            dateYear: null,
            dateWeek: null,
            currentTime: '',
            weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
            config: {
                header: [
                    '<span style="font-size:50px;">纸卷条码</span>',
                    '<span style="font-size:50px;">工单号</span>',
                    '<span style="font-size:50px;">代码</span>',
                    '<span style="font-size:50px;">上机位</span>',
                    '<span style="font-size:50px;">宽幅</span>',
                    '<span style="font-size:50px;">纸卷长</span>',
                    '<span style="font-size:50px;">需用纸长</span>'
                ],
                data: [
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">1</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">2</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">3</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">4</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">5</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">6</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">7</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">8</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">9</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">10</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">11</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">12</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">13</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">14</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                    [
                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
                        '<span style="color:#FF4500; font-size:75px;">15</span>',
                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
                        '<span style="color:#FF4500; font-size:75px;">180</span>',
                    ],
                ],
                headerHeight: 60,
                oddRowBGC: "rgba(0, 0, 0, 0.6)",
                evenRowBGC: "rgba(0, 0, 0, 0.6)",
                headerBGC: "rgba(0, 0, 0, 0.6)",
                waitTime: 5000,
                columnWidth: [350, 350, 200, 200, 250, 250, 350],
                rowNum: 10,
                align: ["center", "center", "center", "center", "center", "center", "center"],
            },
            IsDetail: true,
            OrderCreator: {},
        };
    },
    components: {
        centerView1,
        bottomView1,
    },
    mounted() {
        this.updateTime(); // 初始化时间
        this.timing = setInterval(() => {
            this.updateTime(); // 每秒更新时间
        }, 1000);
        this.cancelLoading();
        // this.GetOrderDetail();
    },
    beforeDestroy() {
        clearInterval(this.timing);
    },
    methods: {
        // 更新北京时间
        updateTime() {
            const now = new Date();
            const year = now.getFullYear();
            const month = String(now.getMonth() + 1).padStart(2, '0');
            const day = String(now.getDate()).padStart(2, '0');
            const hours = String(now.getHours()).padStart(2, '0');
            const minutes = String(now.getMinutes()).padStart(2, '0');
            const seconds = String(now.getSeconds()).padStart(2, '0');
            const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
            const weekday = weekdays[now.getDay()];
 
            this.currentTime = `${year}-${month}-${day} ${weekday} ${hours}:${minutes}:${seconds}`;
        },
        //刷新时间
        timeFn() {
            this.timing = setInterval(() => {
                axios.post("/api/dt_WorkOrder/GetCurrentTime", null, "").then((x) => {
                    if (x.data.status) {
                        var data = x.data.data;
                        this.dateDay = formatTime(data, "HH: mm: ss");
                        this.dateYear = formatTime(data, "yyyy-MM-dd");
                    }
                });
            }, 1000);
        },
        cancelLoading() {
            setTimeout(() => {
                this.loading = false;
            }, 1000);
        },
        GetOrderDetail() {
            axios.post("/api/dt_WorkOrder/getWorkOrderInfo", null, "").then((res) => {
                if (res.data.status) {
                    if (res.data.data == null) {
                        return;
                    }
                    var sp = '</span>';
                    var arr = [];
                    res.data.data.dt_WorkOrderDetail.forEach((x) => {
                        var item = [
                            '<span style="color:#67e0e3;">' + x.layer + '层' + sp,
                            '<span style="color:#9fe6b8;">' + (x.lj_hight == null ? '无需测量' : x.lj_hight + 'mm') + sp,
                            '<span style="color:#fb7503;">' + (x.measure_hight == null ? '无需测量' : x.measure_hight + 'mm') + sp,
                            '<span style="color:#fb7503;">' + x.lj_is_tolerance + sp,
                        ];
                        arr.push(item);
                    });
                    this.OrderCreator = res.data.data;
                    if (this.IsDetail) {
                        this.config = {
                            header: [
                                '<span style="font-size:18px;">层数</span>',
                                '<span style="font-size:18px;">累计标准饼厚</span>',
                                '<span style="font-size:18px;">累计饼厚</span>',
                                '<span style="font-size:18px;">测高结果</span>'
                            ],
                            data: arr,
                            waitTime: 10000,
                            rowNum: 15,
                            columnWidth: [75, 150, 110, 110],
                            align: ["center", "center", "center", "center"]
                        };
                    } else {
                        this.$refs["scrollBoard"].updateRows(arr)
                    }
                    if (this.IsDetail) {
                        setInterval(() => {
                            this.GetOrderDetail();
                        }, 10000);
                        this.IsDetail = false;
                    }
                }
            });
        }
    },
};
</script>
 
<style lang="scss">
@import "../assets/scss/index.scss";
</style>
 
<style lang="css" scoped>
.myhead {
    position: absolute;
    width: 100%;
    height: 100px;
    /* background-color: red; */
    top: 0;
    left: 0;
    z-index: 999;
    background-size: cover;
    background-position: center center;
}
 
.b-color {
    width: 1420px;
}
 
.boxOrderHeight {
    height: 40px;
    line-height: 40px;
    width: 400px;
    display: flex;
}
 
.body-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
}
 
.content-box {
    width: 100%;
}
 
.rows {
    display: flex;
    background-color: rgb(0, 0, 0);
    color: #fff;
    height: 30px;
    line-height: 30px;
    font-size: 18px;
}
 
.cell {
    width: 160px;
    border-right: #fff 1px solid;
    text-align: center;
}
 
.bodys {
    display: flex;
    background-color: rgb(0, 59, 81);
    color: #fff;
    height: 32px;
    line-height: 40px;
}
</style>