From ca767633a3e8414661138720a68cc41a435a4afe Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 14 三月 2024 13:42:32 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/utils.js |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js
index a1ca052..61a231a 100644
--- a/zy-asrs-flow/src/pages/map/utils.js
+++ b/zy-asrs-flow/src/pages/map/utils.js
@@ -21,8 +21,8 @@
 })
 
 export const SENSOR_TYPE = Object.freeze({
-    AGV: "AGV",
     SHELF: "SHELF",
+    AGV: "AGV",
 })
 
 export const getRealPosition = (x, y, mapContainer) => {
@@ -248,4 +248,28 @@
     } else {
         return '';
     }
+}
+
+export const sensorTypeSelectOptions = (intl) => {
+    let options = [];
+    Object.entries(SENSOR_TYPE).forEach(([key, value]) => {
+        switch (key) {
+            case SENSOR_TYPE.SHELF:
+                options.push({
+                    value: value,
+                    label: intl.formatMessage({ id: 'map.sensor.type.shelf', defaultMessage: '璐ф灦' })
+                })
+                break;
+            case SENSOR_TYPE.AGV:
+                options.push({
+                    value: value,
+                    label: intl.formatMessage({ id: 'map.sensor.type.agv', defaultMessage: '鏃犱汉灏忚溅' })
+                })
+                break;
+            default:
+                break;
+        }
+
+    })
+    return options;
 }
\ No newline at end of file

--
Gitblit v1.9.1