Przeglądaj źródła

工况详情返回页面时发送消息

xujunjie 1 rok temu
rodzic
commit
c007c7665a

+ 4 - 2
src/components/PageTitle/index.js

@@ -14,10 +14,12 @@ export default (props) => {
   };
 
   return (
-    <div className={`${styles.titleBox} ${tabs ? styles.tabs : ''}`}>
+    <div
+      className={`${styles.titleBox} ${tabs ? styles.tabs : ''}`}
+      onClick={handleOnClick}
+    >
       {returnable || onReturn ? (
         <LeftOutlined
-          onClick={handleOnClick}
           style={{ fontSize: 36, cursor: 'pointer', marginRight: '20px' }}
         />
       ) : (

+ 2 - 2
src/pages/SmartOps/WorkAnalysisDetail.js

@@ -189,7 +189,7 @@ function WorkAnalysisDetail(props) {
 
   return (
     <PageContent closeable={false}>
-      <PageTitle returnable>返回</PageTitle>
+      <PageTitle onReturn={handleBackClick}>返回</PageTitle>
       <div className={styles.pageContent}>
         <div className={styles.title}>
           {parentName}:{name}
@@ -294,7 +294,7 @@ const ListContent = (props) => {
     // 设置当前选中行
     if (keys.length > current.length) {
       const code = keys[keys.length - 1];
-      UnityAction.sendMsg('SynDev', code.split("&&")[1]);
+      UnityAction.sendMsg('SynDev', code.split('&&')[1]);
       setSelected(code);
     } else if (current.length > 0) {
       const item = current.find(