sun-chaochao 3 лет назад
Родитель
Сommit
0a14a357eb

+ 0 - 1
src/pages/device/Instance/Detail/Diagnose/Message/index.tsx

@@ -302,7 +302,6 @@ const Message = observer(() => {
       FSelect,
       FDatePicker,
       NumberPicker,
-      DataTypeComponent,
     },
   });
 

+ 9 - 0
src/pages/device/components/Metadata/Base/Edit/index.tsx

@@ -1078,6 +1078,15 @@ const Edit = observer((props: Props) => {
           return;
       }
     };
+    if (params?.id) {
+      const result1 = await DB.getDB().table(`${type}`).where('id').equals(params.id).toArray();
+
+      if (result1.length > 0) {
+        message.error('标识已存在');
+        setLoading(false);
+        return;
+      }
+    }
 
     const _data = updateMetadata(type, [params], typeMap.get(props.type), updateDB);