浏览代码

1.0行李视图-报文过滤条件修改

zhongxiaoyu 1 年之前
父节点
当前提交
1abca33813
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/views/baggageManagementTemp/components/baggage/index.vue

+ 3 - 1
src/views/baggageManagementTemp/components/baggage/index.vue

@@ -791,7 +791,9 @@ export default {
         const messageList = result.reduce((list, message, currentIndex, arr) => {
           const messageObject = typeof message === 'string' ? JSON.parse(message) : message
           // 确保是当前行李的报文
-          const isCorrectBaggage = messageObject.dataContent.match(/\.N\/([0-9]{10})/)?.[1] === bagSN
+          const reg = /(?<=\.N\/|\.B\/[^\/]*\/)[0-9]{10}/
+          const matched = messageObject.dataContent.match(reg)
+          const isCorrectBaggage = matched?.[0] === bagSN
           // 相同报文去重
           const index = arr.findIndex(testMessage => {
             const testMessageObject = typeof testMessage === 'string' ? JSON.parse(testMessage) : testMessage