xujunjie 1 gadu atpakaļ
vecāks
revīzija
6b34f0a59d

+ 18 - 10
src/pages/EqSelfInspection/index.js

@@ -191,16 +191,24 @@ const EqSelfInspection = (props) => {
               />
             ))}
           </Item>
-          <div className={styles.btnContainer}>
-            <Button
-              className={styles.reportBtn}
-              type="primary"
-              onClick={() => {
-                openTaskModal();
-              }}
-            >
-              查看任务
-            </Button>
+          <div
+            className={styles.btnContainer}
+            style={{
+              justifyContent:
+                autoReport?.Status == 0 ? 'center' : 'space-between',
+            }}
+          >
+            {autoReport?.Status != 0 && (
+              <Button
+                className={styles.reportBtn}
+                type="primary"
+                onClick={() => {
+                  openTaskModal();
+                }}
+              >
+                查看任务
+              </Button>
+            )}
             <Button
               className={styles.reportBtn}
               type="primary"

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

@@ -243,7 +243,11 @@ const Scada = () => {
     >
       <div className={styles.scada}>
         {data?.map((url) => (
-          <iframe style={{ width: '450px', height: '270px' }} src={url} />
+          <iframe
+            style={{ width: '450px', height: '270px' }}
+            src={url}
+            onClick={() => UnityAction.sendMsg('menuItem', '工艺监控')}
+          />
         ))}
       </div>
     </Box>

+ 13 - 13
src/pages/SmartOps/Analysis.js

@@ -176,19 +176,19 @@ const Analysis = (props) => {
             label: `${item.name}(${item.data?.length || 0})`,
             key: item.type,
             children: (
-            <Table
-              dataSource={item.data}
-              columns={columns}
-              // rowKey={'DeviceCode'}
-              // rowSelection={rowSelection}
-              rowClassName={setRowClassName}
-              onRow={(record, index) => ({
-                onClick: () => onSelectRow(record, index),
-              })}
-              pagination={false}
-              scroll={{ y: document.body.clientHeight - 730 }}
-            />
-          ),
+              <Table
+                dataSource={item.data}
+                columns={columns}
+                rowKey={'index'}
+                // rowSelection={rowSelection}
+                rowClassName={setRowClassName}
+                onRow={(record, index) => ({
+                  onClick: () => onSelectRow(record, index),
+                })}
+                pagination={false}
+                scroll={{ y: document.body.clientHeight - 730 }}
+              />
+            ),
           };
         })}
         onChange={onTabChange}

+ 17 - 16
src/pages/SmartOps/index.js

@@ -39,7 +39,7 @@ function SmartOps(props) {
   const time = searchParams.get('time');
   const idList = searchParams.get('idList');
   const patrolId = searchParams.get('patrolId');
-  
+
   const [tab, setTab] = useState('1');
   const [videoNum, setVideoNum] = useState(0);
 
@@ -264,7 +264,7 @@ function SmartOps(props) {
 
   return (
     <PageContent>
-      <PageTitle returnable={time}>智慧分析</PageTitle>
+      <PageTitle returnable={time}>智慧运营</PageTitle>
       <div className={`card-box ${styles.topContent}`}>
         <div className={styles.titleContent}>
           <span className={styles.time}>{showTime}</span>
@@ -309,18 +309,19 @@ function SmartOps(props) {
       <div className={styles.tabContent}>
         <TabsContent
           defaultActiveKey="1"
+          small
           items={[
             {
               label: `工况分析(${loadingWork ? '-' : optimizationNumber})`,
-            key: '1',
+              key: '1',
               children: (
-              <WorkAnalysis
-                workAnalysisRequest={workAnalysisRequest}
-                projectId={projectId}
-                loading={loadingWork}
-                eTime={eTime}
-              />
-            ),
+                <WorkAnalysis
+                  workAnalysisRequest={workAnalysisRequest}
+                  projectId={projectId}
+                  loading={loadingWork}
+                  eTime={eTime}
+                />
+              ),
             },
             {
               label: `设备分析(${
@@ -338,12 +339,12 @@ function SmartOps(props) {
               label: `感知分析(${loadingVideo ? '-' : videoNum})`,
               key: '3',
               children: (
-              <VideoAnalysis
-                videoNum={videoNum}
-                videoData={videoData}
-                loading={loadingVideo}
-              />
-            ),
+                <VideoAnalysis
+                  videoNum={videoNum}
+                  videoData={videoData}
+                  loading={loadingVideo}
+                />
+              ),
             },
           ]}
           onChange={onChangeTab}

+ 2 - 1
src/pages/SmartOps/models/smartOps.js

@@ -29,7 +29,8 @@ export default {
         const analysisDict = yield call(queryAnalysisDict, { pageSize: 9999 });
         const response = yield call(queryListNew, payload);
         if (response) {
-          response?.data?.list?.map((item) => {
+          response?.data?.list?.map((item,index) => {
+            item.index = index;
             var reason = analysisDict?.data?.find(
               (reason) => reason.id == item.Reason,
             );