From a96e571b174fa30697f3aa6fdb22b3cf93d21b71 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期三, 14 五月 2025 17:32:06 +0800 Subject: [PATCH] 动态溯源 1. 添加websocket逻辑 --- src/constant/device-type.js | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git a/src/constant/device-type.js b/src/constant/device-type.js index 8d163f8..350c85b 100644 --- a/src/constant/device-type.js +++ b/src/constant/device-type.js @@ -9,4 +9,38 @@ // 鐢ㄧ數閲� const TYPE4 = '31'; -export { TYPE0, TYPE1, TYPE2, TYPE3, TYPE4 }; +function typeList() { + if (import.meta.env.VITE_DATA_MODE == 'jingan') { + return [ + { + label: '杞﹁浇', + value: '0a' + } + ]; + } else { + return [ + { + label: '杞﹁浇', + value: '0a' + }, + { + label: '鏃犱汉鏈�', + value: '0b' + }, + { + label: '鏃犱汉鑸�', + value: '0c' + }, + { + label: '缃戞牸鍖�', + value: '0d' + } + ]; + } +} + +function typeName(type) { + return typeList().find((v) => v.value == type).label; +} + +export { TYPE0, TYPE1, TYPE2, TYPE3, TYPE4, typeList, typeName }; -- Gitblit v1.9.3