|
@@ -6,6 +6,7 @@ import { Button, DatePicker, Empty, Form, Spin } from 'antd';
|
|
|
import dayjs from 'dayjs';
|
|
|
import { useEffect, useState } from 'react';
|
|
|
import styles from './index.less';
|
|
|
+import { ChartContent } from './predictionAnalysis/PredictionDetail';
|
|
|
|
|
|
const { RangePicker } = DatePicker;
|
|
|
const tabs = [
|
|
@@ -35,9 +36,8 @@ const ChartPage = (props) => {
|
|
|
|
|
|
const { projectId } = useParams();
|
|
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
|
- const type = searchParams.get('type') || 2;
|
|
|
const data = searchParams.get('data');
|
|
|
- const deviceCode = searchParams.get('device_code');
|
|
|
+ const isPredictionAnalysis = searchParams.get('title') == '跨膜压差';
|
|
|
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
const [options, setOptions] = useState({});
|
|
@@ -215,4 +215,22 @@ const ChartPage = (props) => {
|
|
|
</PageContent>
|
|
|
);
|
|
|
};
|
|
|
-export default ChartPage;
|
|
|
+
|
|
|
+export default () => {
|
|
|
+ const [searchParams, setSearchParams] = useSearchParams();
|
|
|
+ const { projectId } = useParams();
|
|
|
+ const isPredictionAnalysis = searchParams.get('title') == '跨膜压差';
|
|
|
+
|
|
|
+ if (isPredictionAnalysis) {
|
|
|
+ return (
|
|
|
+ <PageContent closeable={false}>
|
|
|
+ <ChartContent
|
|
|
+ deviceCode={searchParams.get('device_code')}
|
|
|
+ projectId={projectId}
|
|
|
+ />
|
|
|
+ </PageContent>
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return <ChartPage />;
|
|
|
+ }
|
|
|
+};
|