|  |  |  | 
|---|
|  |  |  | // 监听设备数据变化 | 
|---|
|  |  |  | onMounted(() => { | 
|---|
|  |  |  | eventBus.on('locationData', eventData => { | 
|---|
|  |  |  | console.log(eventData) | 
|---|
|  |  |  | if (eventData.deviceName === "静置输送线") { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (devices.length <= 0) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | eventBus.on('stackerData', eventData => { | 
|---|
|  |  |  | if (eventData.deviceName == "静置1号堆垛机") { | 
|---|
|  |  |  | if (eventData.deviceName.indexOf("静置") != -1) { | 
|---|
|  |  |  | if (Stackers.length == 0) { | 
|---|
|  |  |  | Stackers.push({ deviceName: eventData.deviceName, data: eventData.data }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // if (eventData.deviceName == "陈化1号堆垛机") { | 
|---|
|  |  |  | //   StackerOne.deviceName = eventData.deviceName; | 
|---|
|  |  |  | //   StackerOne.data = eventData.data | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | </script> | 
|---|