116
This commit is contained in:
parent
cfdceb7799
commit
d732b80b39
@ -90,6 +90,7 @@ function initSignalR() {
|
||||
}
|
||||
|
||||
try {
|
||||
console.log('初始化 SignalR PBL_bom_except消息……')
|
||||
proxy.signalr.SR.on('PBL_bom_except', handler)
|
||||
} catch (error) {
|
||||
console.error('初始化 SignalR 连接失败:', error)
|
||||
@ -207,17 +208,17 @@ function mqttMessage() {
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
mqttCreate()
|
||||
setTimeout(() => {
|
||||
mqttMessage()
|
||||
}, 1000)
|
||||
console.log('mqtt组件已挂载')
|
||||
})
|
||||
onUnmounted(() => {
|
||||
mqttClose()
|
||||
console.log('mqtt组件已卸载')
|
||||
})
|
||||
// onMounted(() => {
|
||||
// mqttCreate()
|
||||
// setTimeout(() => {
|
||||
// mqttMessage()
|
||||
// }, 1000)
|
||||
// console.log('mqtt组件已挂载')
|
||||
// })
|
||||
// onUnmounted(() => {
|
||||
// mqttClose()
|
||||
// console.log('mqtt组件已卸载')
|
||||
// })
|
||||
/// ==================================================================
|
||||
/// ======================= 自动刷新 ========================
|
||||
// 自动获取数据
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<el-row>
|
||||
<el-col :span="6" v-for="(item, index) in dataList" :key="index">
|
||||
<div class="item-box">
|
||||
<el-card :class="`card `">
|
||||
<el-card :class="`card ${getStatusClass(item)}`">
|
||||
<div :class="`card-header`">
|
||||
<span>料架号: {{ item.rackCode }}</span>
|
||||
</div>
|
||||
@ -24,7 +24,7 @@
|
||||
<div class="card-left-text">{{ item2.layerNum === 1 ? '上层' : '中层' }}</div>
|
||||
</el-col>
|
||||
<!-- 右侧物料 -->
|
||||
<el-col :span="20" :class="`border ${getStatusClass(item)}`">
|
||||
<el-col :span="20" :class="`border `">
|
||||
<el-row>
|
||||
<el-col :span="6" v-for="(item3, index3) in item2.maxCapacity" :key="index2">
|
||||
<div :class="`box ${boxSelectClass(item2.packageNum, index3)}`"></div>
|
||||
@ -152,9 +152,9 @@ function closeLight(item) {
|
||||
}
|
||||
}
|
||||
|
||||
// 灯状态
|
||||
// 灯状态(报警)
|
||||
function getStatusClass(item) {
|
||||
return item.isLight ? 'light' : ''
|
||||
return item.isFeedingMaterial ? 'light' : ''
|
||||
}
|
||||
function boxSelectClass(num, index) {
|
||||
let _index = index + 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user