Browse Source

轨迹地图节点显示修改

zhongxiaoyu 2 years ago
parent
commit
3b44be4674
1 changed files with 9 additions and 6 deletions
  1. 9 6
      src/views/realTime/trackMap/index.vue

+ 9 - 6
src/views/realTime/trackMap/index.vue

@@ -259,11 +259,14 @@ const getTrackNodes = async () => {
         const sameNode = trackNodes.find(node => node.nodeCode === nodeCode)
         if (sameNode) {
           Object.assign(sameNode, {
-            value: `${execPosition ?? ' '}/${String(
-              ConsignmentItemPackagingQuantityQuantity ?? ' '
-            )}\n${!!Number(execResult) ? '通过' : '未通过'}/${
-              String(execTime ?? '').split('T')[1] ?? ' '
-            }`,
+            value:
+              execResult ?? '' !== ''
+                ? `${execPosition ?? ' '}/${String(
+                    ConsignmentItemPackagingQuantityQuantity ?? ' '
+                  )}\n${!!Number(execResult) ? '通过' : '未通过'}/${
+                    String(execTime ?? '').split('T')[1] ?? ' '
+                  }`
+                : '',
           })
           if (!Number(execResult)) {
             Object.assign(sameNode, {
@@ -293,7 +296,7 @@ const getTrackNodes = async () => {
       }
       if (!resultNode.value) {
         Object.assign(resultNode, {
-          value: ' / \n未通过/ ',
+          value: '',
           label: {
             backgroundColor: inActiveColor,
           },