Renxy vor 1 Jahr
Ursprung
Commit
2d7ed8b9a7

+ 7 - 1
src/pages/DeviceManager/index.js

@@ -36,11 +36,17 @@ const DeviceManager = () => {
     // 重置默认显示tab
     localStorage.deviceTab = '1';
   }, []);
+
+  const onChange = (tab) => {
+    setDefaultActiveKey(tab);
+    UnityAction.sendMsg('SparePart');
+  };
+
   return (
     <PageContent tabs>
       <TabsContent
         defaultActiveKey={defaultActiveKey}
-        onChange={setDefaultActiveKey}
+        onChange={onChange}
         items={[
           {
             label: `设备管理`,

+ 2 - 2
src/pages/MessageCenter/index.js

@@ -37,11 +37,11 @@ const MessageCenter = () => {
 
   const handlerSeeClick = (item) => {
     if (tab === '1') {
-      UnityAction.sendMsg('notiZiJian', item.ID);
-    } else {
       if (item?.MandateId) {
         UnityAction.sendMsg('OpenTaskModal', `mandate_id=${item.MandateId}`);
       }
+    } else {
+      UnityAction.sendMsg('notiZiJian', item.ID);
     }
   };
 

+ 1 - 2
src/pages/SafetyManagement/index.js

@@ -124,8 +124,7 @@ const DeviceManager = () => {
     </PageContent>
   );
 };
-const Video = ({ data, dataOnline, loading }) => {
-  const [selected, setSelected] = useState();
+const Video = ({ data, dataOnline, loading, selected, setSelected }) => {
   const renderRed = (item) => {
     return (
       <div className={styles.cardItem}>