|
@@ -1,3 +1,5 @@
|
|
|
+import ModuleTitle from '@/components/ManagementPage/moduleTitle';
|
|
|
+import TabsContent from '@/components/TabsContent';
|
|
|
import ThresholdDetail from '@/components/ThresholdDetail';
|
|
|
import ThresholdModal from '@/components/ThresholdDetail/ThresholdModal';
|
|
|
import { changeRecordStatus, getDumuDetail } from '@/services/eqSelfInspection';
|
|
@@ -13,7 +15,6 @@ import {
|
|
|
Select,
|
|
|
Spin,
|
|
|
Table,
|
|
|
- Tabs,
|
|
|
message,
|
|
|
} from 'antd';
|
|
|
import dayjs from 'dayjs';
|
|
@@ -102,6 +103,13 @@ function Detail(props) {
|
|
|
return (
|
|
|
<Spin spinning={loading} wrapperClassName="card-box">
|
|
|
<div className={styles.card}>
|
|
|
+ <div
|
|
|
+ className={`${styles.orderIcon} ${
|
|
|
+ data.warningTotalNum ? styles.error : ''
|
|
|
+ }`}
|
|
|
+ >
|
|
|
+ {data.warningTotalNum == 0 ? '正常' : '异常'}
|
|
|
+ </div>
|
|
|
<Row>
|
|
|
<Col span={24} className={styles.cardText}>
|
|
|
自检时间:{data?.CreatedTime}
|
|
@@ -138,11 +146,7 @@ function Detail(props) {
|
|
|
key="extend"
|
|
|
type={'extend'}
|
|
|
userList={userList}
|
|
|
- title={
|
|
|
- <div>
|
|
|
- <div className={styles.tableTitle}>设备自检报告</div>
|
|
|
- </div>
|
|
|
- }
|
|
|
+ title={<ModuleTitle title="设备自检报告" />}
|
|
|
></ReportCom>
|
|
|
|
|
|
{/* 工艺自检报告"> */}
|
|
@@ -150,7 +154,7 @@ function Detail(props) {
|
|
|
<div className={styles.tableStatus}>
|
|
|
异常({data?.FaultAnalysis?.length || 0})
|
|
|
</div>
|
|
|
- <div className={styles.tableTitle2}>工艺自检报告</div>
|
|
|
+ <ModuleTitle title="工艺自检报告" />
|
|
|
|
|
|
<AalysisTable
|
|
|
onClickItem={sendMessageToUnity}
|
|
@@ -160,7 +164,6 @@ function Detail(props) {
|
|
|
</div>
|
|
|
{/* 安全隐患自检报告"> */}
|
|
|
<div className={styles.content}>
|
|
|
- <div className={styles.tableTitle2}>安全隐患自检报告</div>
|
|
|
{/* 环境异常 */}
|
|
|
<ReportCom
|
|
|
sendMessageToUnity={sendMessageToUnity}
|
|
@@ -171,17 +174,13 @@ function Detail(props) {
|
|
|
key="sensor"
|
|
|
type={'sensor'}
|
|
|
userList={userList}
|
|
|
- title={
|
|
|
- <div style={{ color: '#1677ff', fontSize: 22 }}>环境异常</div>
|
|
|
- }
|
|
|
+ title={<ModuleTitle title="环境异常" />}
|
|
|
></ReportCom>
|
|
|
|
|
|
{/* 安防检测异常 */}
|
|
|
<ReportDumCom
|
|
|
data={dumuList}
|
|
|
- title={
|
|
|
- <div style={{ color: '#1677ff', fontSize: 22 }}>安防检测异常</div>
|
|
|
- }
|
|
|
+ title={<ModuleTitle title="安防检测异常" />}
|
|
|
/>
|
|
|
|
|
|
{/* 电器检测异常 */}
|
|
@@ -193,9 +192,7 @@ function Detail(props) {
|
|
|
key="extend"
|
|
|
type={'extend'}
|
|
|
userList={userList}
|
|
|
- title={
|
|
|
- <div style={{ color: '#1677ff', fontSize: 22 }}>电气检测异常</div>
|
|
|
- }
|
|
|
+ title={<ModuleTitle title="电气检测异常" />}
|
|
|
></ReportCom>
|
|
|
|
|
|
{/* 密闭空间检测异常 */}
|
|
@@ -207,11 +204,7 @@ function Detail(props) {
|
|
|
key="extend"
|
|
|
type={'extend'}
|
|
|
userList={userList}
|
|
|
- title={
|
|
|
- <div style={{ color: '#1677ff', fontSize: 22 }}>
|
|
|
- 密闭空间检测异常
|
|
|
- </div>
|
|
|
- }
|
|
|
+ title={<ModuleTitle title="密闭空间检测异常" />}
|
|
|
></ReportCom>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -358,7 +351,7 @@ export function DeviceTable(props) {
|
|
|
width: '12%',
|
|
|
render: (record) =>
|
|
|
record.Status == 1 && (
|
|
|
- <a style={{ color: '#7BFFFB' }} onClick={() => onClickError(record)}>
|
|
|
+ <a style={{ color: '#FE5850' }} onClick={() => onClickError(record)}>
|
|
|
异常处理
|
|
|
</a>
|
|
|
),
|
|
@@ -668,7 +661,7 @@ export function WarningTable(props) {
|
|
|
width: '12%',
|
|
|
render: (record) =>
|
|
|
record.Status == 1 && (
|
|
|
- <a style={{ color: '#7BFFFB' }} onClick={() => onClickError(record)}>
|
|
|
+ <a style={{ color: '#FE5850' }} onClick={() => onClickError(record)}>
|
|
|
异常处理
|
|
|
</a>
|
|
|
),
|
|
@@ -689,7 +682,6 @@ export function WarningTable(props) {
|
|
|
locale={{
|
|
|
emptyText: <Empty />,
|
|
|
}}
|
|
|
-
|
|
|
/>
|
|
|
<ThresholdModal
|
|
|
open={visible}
|
|
@@ -725,20 +717,23 @@ function ReportCom(props) {
|
|
|
<div className={styles.detailCard}>
|
|
|
<div className={styles.tableTop}>
|
|
|
{title}
|
|
|
- <Tabs
|
|
|
- style={{ float: 'right' }}
|
|
|
+ <TabsContent
|
|
|
defaultActiveKey="1"
|
|
|
onChange={handleTabsChange}
|
|
|
- >
|
|
|
- <Tabs.TabPane
|
|
|
- tab={`异常/警告(${waringData.length || 0})`}
|
|
|
- key="1"
|
|
|
- ></Tabs.TabPane>
|
|
|
- <Tabs.TabPane
|
|
|
- tab={`全部(${allData.length || 0})`}
|
|
|
- key="2"
|
|
|
- ></Tabs.TabPane>
|
|
|
- </Tabs>
|
|
|
+ small={true}
|
|
|
+ items={[
|
|
|
+ {
|
|
|
+ key: '1',
|
|
|
+ label: `异常/警告(${waringData.length || 0})`,
|
|
|
+ children: <div></div>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '2',
|
|
|
+ label: `全部(${allData.length || 0})`,
|
|
|
+ children: <div></div>,
|
|
|
+ },
|
|
|
+ ]}
|
|
|
+ ></TabsContent>
|
|
|
</div>
|
|
|
|
|
|
{activeKey == '1' && (
|
|
@@ -812,10 +807,8 @@ function ReportDumCom(props) {
|
|
|
return (
|
|
|
<div>
|
|
|
<div className={styles.tabBarExtraContent}>
|
|
|
- <div className={styles.text} style={{ height: 52, width: '60%' }}>
|
|
|
- <>
|
|
|
- <div>{title}</div>
|
|
|
- </>
|
|
|
+ <div className={styles.text} style={{ width: '60%' }}>
|
|
|
+ {title}
|
|
|
</div>
|
|
|
<div className={styles.abnormal}>
|
|
|
<div className={styles.text} style={{ float: 'right' }}>
|