Parcourir la source

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

valentichu il y a 1 an
Parent
commit
3ddfb79d93
2 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 0 0
      lib/index.js
  2. 8 1
      src/pages/Alarm/components/easy.jsx

Fichier diff supprimé car celui-ci est trop grand
+ 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}
               >

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff