valentichu 1 jaar geleden
bovenliggende
commit
eec2c5608c

File diff suppressed because it is too large
+ 0 - 0
lib/index.js


+ 1 - 1
src/App.jsx

@@ -45,7 +45,7 @@ function Home(props) {
         ref={compRef}
         // pointId="ZWB_ALARM_chr_2_AQ"
         // readonly
-        editId={94}
+        editId={-1}
       ></Alarm.EasyConfig>
     </>
   );

+ 3 - 3
src/entry.module.scss

@@ -1,5 +1,5 @@
-:global{
-  :local(.App){
+:global {
+  :local(.App) {
     height: 100%;
   }
-}
+}

+ 4 - 4
src/pages/Alarm/components/complex.jsx

@@ -106,13 +106,13 @@ const Complex = (props, ref) => {
         defer_unit: 2,
       };
 
-      const { state, data } = await API2.addRule(obj);
+      const { state, data, state_info } = await API2.addRule(obj);
       if (state === 0) {
         props?.onConfirm?.(data?.id);
         form.resetFields();
         message.success("保存成功");
       } else {
-        message.error("保存失败");
+        message.error(state_info);
       }
     } else {
       const value = await form.validateFields();
@@ -123,13 +123,13 @@ const Complex = (props, ref) => {
         formula: formuRef.current.getFinalStr(),
         ext_notify_list: [],
       };
-      const { state } = await API2.editRule(obj);
+      const { state, state_info } = await API2.editRule(obj);
       if (state === 0) {
         props?.onConfirm?.(data.id);
         form.resetFields();
         message.success("保存成功");
       } else {
-        message.error("保存失败");
+        message.error(state_info);
       }
     }
   });

+ 1 - 1
src/pages/Alarm/components/components/AlarmDetail/index.jsx

@@ -298,7 +298,7 @@ const Index = (props) => {
   return (
     <>
       <div className={styles.desc}>
-        <Descriptions column={4} style={{ margin: 20 }}>
+        <Descriptions column={4} style={{ margin: '20px 20px 0px' }}>
           <Descriptions.Item span={2} label="告警名称">
             {props.data?.data?.name}
           </Descriptions.Item>

+ 2 - 2
src/pages/Alarm/components/easy.jsx

@@ -144,7 +144,7 @@ const Easy = (props, ref) => {
             message.success("保存成功");
             props.onConfirm();
           } else {
-            message.error("保存失败");
+            message.error(res?.state_info);
           }
         })
         .finally(() => {
@@ -237,7 +237,7 @@ const Easy = (props, ref) => {
             message.success("保存成功");
             props.onConfirm();
           } else {
-            message.error("保存失败");
+            message.error(res?.state_info);
           }
         })
         .finally(() => {

Some files were not shown because too many files changed in this diff