Parcourir la source

Merge branch 'develop' of http://120.55.44.4:10080/xujunjie/gt_client_pad into develop

ZhaoJun il y a 1 an
Parent
commit
4c0a5c5792
2 fichiers modifiés avec 5 ajouts et 6 suppressions
  1. 4 5
      src/pages/Controller/Device.js
  2. 1 1
      src/pages/Home/index.js

+ 4 - 5
src/pages/Controller/Device.js

@@ -34,7 +34,9 @@ function Hardware() {
 
     return `${styles.icon} ${statusClassName}`;
   });
-
+  const onHandleClick = item => {
+    UnityAction.sendMsg('SingleDevLocate', JSON.stringify([item]));
+  };
   useEffect(() => {
     if (!draw) return;
     run(projectId);
@@ -44,10 +46,6 @@ function Hardware() {
     return () => clearInterval(timer);
   }, [draw]);
 
-  const onHandleClick = (item) => {
-    UnityAction.sendMsg('SingleDevLocate', JSON.stringify([item]));
-  };
-
   return (
     <PageContent closeable={false}>
       <PageTitle onReturn={() => UnityAction.sendMsg('menuItem', '智能管控')}>
@@ -60,6 +58,7 @@ function Hardware() {
           key={item.id}
           className={`card-box ${styles.item}`}
           style={{ justifyContent: 'space-between' }}
+          onClick={() => onHandleClick(item)}
         >
           <div>
             <i

+ 1 - 1
src/pages/Home/index.js

@@ -225,7 +225,7 @@ const Scada = () => {
     defaultParams: [{ project_id: projectId }],
     formatResult: (res) => {
       let domain = location.host.includes('pad.greentech.com.cn')
-        ? 'https://120.55.44.4:8900/'
+        ? 'https://metawant.greentech.com.cn/'
         : 'http://47.96.12.136:8788/';
       const token = getToken();
       const pageList = res?.filter((item) => item.hide);