workstationMaterialBox_there.vue
2.77 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
<template>
<div class="app-body">
<Header title="工位料箱看板3" ></Header>
<div class="dv-content-body">
<dv-scroll-board :config="pickup" style="width: 100%;" />
</div>
</div>
</template>
<script>
import Header from '@/layout/appHead'
export default {
data() {
return {
baseUrlOff: 'http://127.0.0.1:6001/api/BulletinBoard/Mes/V1/ReadData1',
baseUrlOnLine: window.appConfig.workstationMaterialBox_one,
sysData: {},
sysInitTimeNum: window.appConfig.sysTimeNum,
sysTimeNum: window.appConfig.sysTimeNum,
pickup: window.pickup_chenPin,
}
},
components: {
Header,
},
methods: {
getECSData() {
let opt = {
urlSuffix: window.baseOnLineOrOff ? this.baseUrlOnLine : this.baseUrlOff,
logTitle: '工位料箱看板2',
isUrlALL: true,
headers: window.baseOnLineOrOff,
isHanderAjaxSuccessActionLoad: true,
}
let callBackFn = (res) => {
if (!this.ajaxSuccessDataBefore(res, opt.logTitle)) return
let data = this.sysData.topData
let tempList = []
data.forEach((item) => {
var Material = `<span style="text-decoration: underline;color:hsl(201, 86%, 50%)">${item.workstationCode} </span>`
var eleIsstackdata = `<span style="display: block;width:40px;height:20px;border:1px solid #00c860;text-align:center;line-height:20px;margin-top:12px;color:#00c860">是</span>`
if (item.materialBox == '否') {
eleIsstackdata = `<span style="display: block;width:40px;height:20px;border:1px solid red;text-align:center;line-height:20px;margin-top:12px;color:red">否</span>`
}
tempList.push([Material, item.workstationName, eleIsstackdata, item.remarks])
})
let tableData = {
header: window.pickup_chenPin.header,
data: tempList,
align: window.pickup_chenPin.align,
columnWidth: window.pickup_chenPin.columnWidth,
headerHeight: window.pickup_chenPin.headerHeight,
rowNum: window.pickup_chenPin.rowNum,
index: window.pickup_chenPin.index,
}
this.pickup = tableData
}
''.ajax(this, opt, callBackFn)
},
ajaxSuccessDataBefore(res, title) {
if (res.data == null) {
''.Log(title + '无数据', 'getData')
return false
}
return true
},
getAllWMSData() {},
intInterval: function() {
''.intInterval(this, this.sysInitTimeNum, () => {
this.getECSData()
})
},
},
mounted() {
//eslint-disable-next-line no-debugger
debugger
this.getECSData()
// 【发布的时候要取消注释】
this.intInterval()
},
}
</script>
<style lang="scss" scoped>
.app-body {
height: 100%;
width: 100%;
.dv-content-body {
height: 90%;
width: 100%;
// background: rebeccapurple;
}
}
</style>
<style>
.dv-scroll-board .header .header-item {
font-size: 19px !important;
}
.dv-scroll-board .rows div.ceil {
font-size: 17px !important;
}
</style>