浏览代码

加入选择点位自动填写单位

valentichu 1 年之前
父节点
当前提交
3ddfb79d93
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 0 0
      lib/index.js
  2. 8 1
      src/pages/Alarm/components/easy.jsx

文件差异内容过多而无法显示
+ 0 - 0
lib/index.js


+ 8 - 1
src/pages/Alarm/components/easy.jsx

@@ -382,6 +382,7 @@ const Easy = (props, ref) => {
     form.setFieldsValue({
       name: e.value.split("<==>")[0],
       point_id: e.key,
+      unit: e.value.split("<==>")[3],
     });
   };
 
@@ -494,7 +495,13 @@ const Easy = (props, ref) => {
             return (
               <Select.Option
                 value={
-                  item.name + "<==>" + item.defer_unit + "<==>" + item.point_id
+                  item.name +
+                  "<==>" +
+                  item.defer_unit +
+                  "<==>" +
+                  item.point_id +
+                  "<==>" +
+                  item.unit
                 }
                 key={item.point_id}
               >

部分文件因为文件数量过多而无法显示