瀏覽代碼

工况管理样式修改

xujunjie 1 年之前
父節點
當前提交
c99834ba0a

+ 7 - 0
src/global.less

@@ -97,6 +97,13 @@ input[type='reset'] {
   outline: none;
 }
 
+.card-box {
+  border-radius: 8px;
+  box-shadow: 2px 0 8px 0 rgba(0, 0, 0, 0.3);
+  border: 1px solid #eee;
+  background: rgba(255, 255, 255, 0.6);
+}
+
 .password-eye {
   display: inline-block;
   vertical-align: middle;

+ 10 - 14
src/pages/Smart/ConditionDetection.js

@@ -4,11 +4,13 @@ import {
   queryRealEstimate,
   queryRealEstimateChart,
 } from '@/services/SmartOps';
-import { useParams, useRequest, history } from '@umijs/max';
-import { Button, Col, Row } from 'antd';
+import { useParams, useRequest } from '@umijs/max';
+import { Col, Row } from 'antd';
 import * as echarts from 'echarts';
 import { useEffect, useMemo, useRef } from 'react';
 
+import PageContent from '@/components/PageContent';
+import PageTitle from '@/components/PageTitle';
 import styles from './ConditionDetection.less';
 import CircleScore from './components/CircleScore';
 
@@ -53,14 +55,8 @@ const ConditionDetection = (props) => {
   }, [data]);
 
   return (
-    <div>
-      <Button
-        type="primary"
-        style={{ marginBottom: 20 }}
-        onClick={() => history.go(-1)}
-      >
-        返回
-      </Button>
+    <PageContent closeable={false}>
+      <PageTitle returnable>工况检测</PageTitle>
       <div className={styles.circle}>
         <CircleScore>
           <span className={styles.circleText}>{score}</span>
@@ -70,7 +66,7 @@ const ConditionDetection = (props) => {
       </div>
       <Row gutter={16}>
         <Col span={12}>
-          <div className={styles.card}>
+          <div className={`${styles.card} card-box`}>
             <h3>
               实时工况 <span>{real.score}分</span>
             </h3>
@@ -94,7 +90,7 @@ const ConditionDetection = (props) => {
           </div>
         </Col>
         <Col span={12}>
-          <div className={styles.card2}>
+          <div className={`${styles.card2} card-box`}>
             <h3>
               目标工况 <span>{best.score}分</span>
             </h3>
@@ -119,7 +115,7 @@ const ConditionDetection = (props) => {
         </Col>
       </Row>
       <ChartContent projectId={pid} />
-    </div>
+    </PageContent>
   );
 };
 
@@ -219,7 +215,7 @@ const ChartContent = ({ projectId }) => {
     };
   }, []);
   return (
-    <div className={styles.card}>
+    <div className={`${styles.card} card-box`}>
       <div className={styles.title}>近一日工况统计</div>
       <div ref={domRef} style={{ height: '40vh' }}></div>
     </div>

+ 63 - 66
src/pages/Smart/OptimizationTasks.js

@@ -12,7 +12,6 @@ import { Button, Col, Row, Table } from 'antd';
 import dayjs from 'dayjs';
 import { useMemo } from 'react';
 import styles from './OptimizationTasks.less';
-import Panel from './components/Panel';
 
 const OptimizationTasks = (props) => {
   const { projectId } = useParams();
@@ -27,7 +26,7 @@ const OptimizationTasks = (props) => {
 
   const ResponsiblePeople = useMemo(() => {
     if (!data || !userList) return '-';
-    let user = userList.data.find((item) => item.ID == data.ResponsiblePeople);
+    let user = userList.find((item) => item.ID == data.ResponsiblePeople);
     return user?.CName || '-';
   }, [data, userList]);
 
@@ -36,39 +35,37 @@ const OptimizationTasks = (props) => {
   return (
     <PageContent closeable={false}>
       <PageTitle returnable>优化任务</PageTitle>
-      <Produce
-        projectId={projectId}
-        score={score}
-        queryMandate={run}
-        mandate={data}
-      />
-      <Cost projectId={projectId} />
-
-      {data && (
-        <div
-          style={{ backgroundColor: '#a0bcda54', padding: 10, height: '100%' }}
-        >
-          <Row
-            gutter={16}
-            className={styles.detail}
-            style={{ marginBottom: 0 }}
-          >
-            <Col span={8}>
-              <div style={{ textAlign: 'center' }}>任务类型:系统发送</div>
-            </Col>
-            <Col span={8}>
-              <div style={{ textAlign: 'center' }}>
-                任务负责人:{ResponsiblePeople}
-              </div>
-            </Col>
-            <Col span={8}>
-              <div style={{ textAlign: 'center' }}>
-                任务状态:{status[data?.Status]}
-              </div>
-            </Col>
-          </Row>
+      <div className={styles.pageCard}>
+        <div style={{ padding: 20 }}>
+          <Produce
+            projectId={projectId}
+            score={score}
+            queryMandate={run}
+            mandate={data}
+          />
+          <Cost projectId={projectId} />
         </div>
-      )}
+
+        {data && (
+          <div className={styles.bottom}>
+            <Row gutter={16}>
+              <Col span={8}>
+                <div className={styles.bottomText}>任务类型:系统发送</div>
+              </Col>
+              <Col span={8}>
+                <div className={styles.bottomText}>
+                  任务负责人:{ResponsiblePeople}
+                </div>
+              </Col>
+              <Col span={8}>
+                <div className={styles.bottomText}>
+                  任务状态:{status[data?.Status]}
+                </div>
+              </Col>
+            </Row>
+          </div>
+        )}
+      </div>
     </PageContent>
   );
 };
@@ -102,38 +99,38 @@ const Produce = ({ projectId, queryMandate }) => {
   });
 
   return (
-    <div style={{ marginBottom: 20, overflow: 'hidden', position: 'relative' }}>
+    <div style={{ marginBottom: 20 }}>
       <h3 className={styles.title}>
         <i />
         生产调度类
       </h3>
       {data?.length > 0 && (
         <>
+          <div className={styles.orderIcon}>任务已发送</div>
           <div
-            style={{
-              background: '#12CEB3',
-              width: 200,
-              position: 'absolute',
-              top: 30,
-              right: -55,
-              textAlign: 'center',
-              fontSize: 18,
-              transform: 'rotate(45deg)',
-              padding: '4px 0',
-            }}
+            className={styles.content}
+            style={{ backgroundColor: '#B1D2F3' }}
           >
-            任务已发送
+            <h3 className={styles.left}>任务总结</h3>
+            <div className={styles.desc}>
+              根据水质相关数艍.建议您调节以下参数,水厂运行可达较优状态
+            </div>
           </div>
-          <h3 className={styles.title}>任务总结</h3>
-          <div className={styles.desc}>
-            根据水质相关数艍.建议您调节以下参数,水厂运行可达较优状态
+          <div
+            className={styles.content}
+            style={{ backgroundColor: '#EDF5FC' }}
+          >
+            <h3 className={styles.left}>任务内容</h3>
+            <Table
+              style={{ width: '100%' }}
+              columns={columns}
+              dataSource={data}
+            />
           </div>
-          <Table columns={columns} dataSource={data} />
         </>
       )}
       {!data?.length && (
-        <div className={styles.content}>
-          <h3 className={styles.left}>任务总结</h3>
+        <div className={styles.content} style={{ backgroundColor: '#B1D2F3' }}>
           <div className={styles.desc}>
             当前进水数据稳定,产水数据稳定,暂无需调节任务,继续保持哦~
           </div>
@@ -181,35 +178,35 @@ const Cost = ({ projectId }) => {
     ],
   });
   return (
-    <Panel
-      title="成本节约类"
-      style={{ marginBottom: 20 }}
-      btns={
+    <div style={{ marginBottom: 20 }}>
+      <h3 className={styles.title}>
+        <i style={{ background: '#F5A623' }} />
+        成本节约类
         <Button
+          style={{ float: 'right' }}
           type="primary"
           onClick={() => history.push(`/smart/simulate/${projectId}`)}
         >
           模拟评估
         </Button>
-      }
-    >
+      </h3>
       {data?.length > 0 && (
-        <>
-          <h3 className={styles.title}>任务总结</h3>
+        <div className={styles.content} style={{ backgroundColor: '#FBDEAE' }}>
+          <h3 className={styles.left}>任务总结</h3>
           <div className={styles.desc}>
             通过能耗/药耗数据模拟仿真预计未来一日可节省
             <span>{profit || '-'}</span>元
           </div>
           <Table columns={columns} dataSource={data} />
-        </>
+        </div>
       )}
       {!data?.length && (
-        <>
-          <h3 className={styles.title}>任务总结</h3>
+        <div className={styles.content} style={{ backgroundColor: '#FBDEAE' }}>
+          <h3 className={styles.left}>任务总结</h3>
           <div className={styles.desc}>暂无可降低成本,继续保持哦~</div>
-        </>
+        </div>
       )}
-    </Panel>
+    </div>
   );
 };
 

+ 70 - 5
src/pages/Smart/OptimizationTasks.less

@@ -1,12 +1,77 @@
 .title {
   font-size: 24px;
-  margin-bottom: 10px;
+  margin-bottom: 20px;
+  font-weight: bold;
+  i {
+    display: inline-block;
+    vertical-align: middle;
+    width: 12px;
+    height: 12px;
+    border-radius: 50%;
+    background-color: #4a90e2;
+    margin-right: 10px;
+  }
 }
 .desc {
   font-size: 22px;
-  margin-bottom: 20px;
 }
-.detail {
-  font-size: 20px;
-  margin-bottom: 10px;
+
+.content {
+  display: flex;
+  padding: 20px;
+  align-items: center;
+  .left {
+    width: 120px;
+    font-size: 22px;
+    margin: 0;
+    font-size: 18px;
+  }
+  .right {
+    flex: 1;
+  }
+}
+.orderIcon {
+  background: #12ceb3;
+  width: 200px;
+  position: absolute;
+  top: 30px;
+  right: -55px;
+  text-align: center;
+  font-size: 18px;
+  transform: rotate(45deg);
+  padding: 8px 0;
+  color: #fff;
+}
+.pageCard {
+  margin-top: 30px;
+  overflow: hidden;
+  border-radius: 8px;
+  box-shadow: 2px 0 8px 0 rgba(0, 0, 0, 0.3);
+  border: 1px solid #eee;
+  position: relative;
+  background: rgba(255, 255, 255, 0.6);
+}
+.bottom {
+  border-top: 1px solid #333;
+  padding: 24px;
+  height: 100%;
+  .bottomText {
+    font-size: 22px;
+    text-align: center;
+  }
+}
+:global {
+  .ant-table,
+  .ant-table-cell,
+  .ant-table-placeholder {
+    background: transparent !important;
+  }
+  .ant-table-thead {
+    background: #cbe0f6;
+  }
+  .ant-table-thead > tr > th,
+  .ant-table-tbody > tr > td {
+    padding: 8px !important;
+    font-size: 22px;
+  }
 }

+ 7 - 9
src/pages/Smart/Simulate.js

@@ -1,19 +1,17 @@
+import PageContent from '@/components/PageContent';
+import PageTitle from '@/components/PageTitle';
 import { useParams } from '@umijs/max';
 import SimulateDetail from './components/SimulateDetail';
 import SimulatePie from './components/SimulatePie';
-import styles from './index.less';
 
 const Simulate = (props) => {
   const { projectId } = useParams();
   return (
-    <div>
-      <div className={styles.Row} style={{ marginBottom: 20 }}>
-        <SimulatePie projectId={projectId} />
-      </div>
-      <div className={styles.Row}>
-        <SimulateDetail projectId={projectId} />
-      </div>
-    </div>
+    <PageContent closeable={false}>
+      <PageTitle returnable>模拟仿真</PageTitle>
+      <SimulatePie projectId={projectId} />
+      <SimulateDetail projectId={projectId} />
+    </PageContent>
   );
 };
 

+ 127 - 161
src/pages/Smart/components/SimulateDetail.js

@@ -12,23 +12,11 @@ import {
   queryMembraneList,
   queryProjectConfig,
 } from '@/services/SmartOps';
-import { history, useParams, useRequest } from '@umijs/max';
-import {
-  Button,
-  Col,
-  DatePicker,
-  Empty,
-  Form,
-  Icon,
-  List,
-  Modal,
-  Row,
-  Spin,
-} from 'antd';
-import * as echarts from 'echarts';
+import { useRequest } from '@umijs/max';
+import { DatePicker, Icon, Modal, Select, Spin } from 'antd';
 import dayjs from 'dayjs';
+import * as echarts from 'echarts';
 import { useEffect, useMemo, useRef, useState } from 'react';
-import Panel from './Panel';
 import styles from './SimulateDetail.less';
 
 const { RangePicker } = DatePicker;
@@ -106,110 +94,58 @@ const SimulateDetail = (props) => {
   };
 
   return (
-    <Panel
-      title={'模拟记录'}
-      style={{ width: '100%' }}
-      btns={
-        <div className={styles.tabs}>
-          <div className={styles.left} onClick={onLeftClick}></div>
-          <div id="content" className={styles.content}>
-            {data?.map((item) => (
-              <div
-                key={item}
-                className={`${styles.item} ${
-                  active == item ? styles.active : ''
-                }`}
-                onClick={() => {
-                  setActive(item);
-                  setCurrent(null);
-                }}
-              >
-                {TYPE[item]?.name}
-              </div>
-            ))}
-          </div>
-          <div className={styles.right} onClick={onRightClick}></div>
+    <div>
+      <div className={styles.tabs}>
+        <div className={styles.left} onClick={onLeftClick}></div>
+        <div id="content" className={styles.content}>
+          {data?.map((item) => (
+            <div
+              key={item}
+              className={`${styles.item} ${
+                active == item ? styles.active : ''
+              }`}
+              onClick={() => {
+                setActive(item);
+                setCurrent(null);
+              }}
+            >
+              {TYPE[item]?.name}
+            </div>
+          ))}
         </div>
-      }
-    >
-      <div className={styles.box}>
-        <ListContent
+        <div className={styles.right} onClick={onRightClick}></div>
+      </div>
+      <div className={`${styles.box} card-box`}>
+        <ChartContent
           active={active}
           projectId={projectId}
           current={current}
-          onClick={setCurrent}
+          setCurrent={setCurrent}
         />
-        <ChartContent active={active} projectId={projectId} current={current} />
       </div>
-    </Panel>
-  );
-};
-
-const ListContent = (props) => {
-  const { current, onClick, projectId, active } = props;
-
-  const { data, loading, run } = useRequest(
-    () => {
-      let params = {
-        page: 1,
-        page_size: 99999,
-        project_id: projectId,
-      };
-      return TYPE[active]?.device(params);
-    },
-    {
-      manual: true,
-      onSuccess(data) {
-        if (data.list?.[0]) {
-          onClick(data.list[0]);
-        } else {
-          onClick(null);
-        }
-      },
-    },
-  );
-
-  useEffect(() => {
-    if (active) run();
-  }, [active]);
-
-  return (
-    <div className={styles.listBox}>
-      <div className={styles.title}>设备列表</div>
-      <List
-        split={false}
-        className={styles.list}
-        dataSource={data?.list || []}
-        renderItem={(item, idx) => (
-          <List.Item
-            className={
-              item == current ? styles.listItemActive : styles.listItem
-            }
-            style={
-              idx % 2 == 0
-                ? {
-                    background:
-                      'linear-gradient(to right, rgba(153, 231, 255, 0.1), rgba(96, 168, 255, 0.1))',
-                  }
-                : {
-                    background:
-                      'linear-gradient(to right, rgba(153, 231, 255, 0.2), rgba(96, 168, 255, 0.2))',
-                  }
-            }
-            onClick={() => onClick(item)}
-          >
-            {item.device_code}
-          </List.Item>
-        )}
-      />
     </div>
   );
 };
 
+const DateTab = [
+  {
+    value: 'day',
+    label: '今日',
+  },
+  {
+    value: 'week',
+    label: '本周',
+  },
+  {
+    value: 'month',
+    label: '本月',
+  },
+];
 const ChartContent = (props) => {
-  const { current, projectId, active } = props;
+  const { current, projectId, active, setCurrent } = props;
   const [visible, setVisible] = useState(false);
   const [params, setParams] = useState(null);
+  const [dateActive, setDateActive] = useState('day');
   const [time, setTime] = useState([dayjs().startOf('day'), dayjs()]);
   const timerRef = useRef({
     s_time: time[0].format('YYYY-MM-DD HH:mm:ss'),
@@ -218,7 +154,7 @@ const ChartContent = (props) => {
   const domRef = useRef(null);
   const chartRef = useRef(null);
 
-  const { data, loading, run } = useRequest(
+  const { data, run } = useRequest(
     () => {
       let params = {
         device_code: current.device_code,
@@ -227,6 +163,7 @@ const ChartContent = (props) => {
         project_id: projectId,
         ...timerRef.current,
       };
+      setParams(params);
       return TYPE[active].chart(params);
     },
     {
@@ -254,6 +191,7 @@ const ChartContent = (props) => {
   }, [data]);
 
   const searchTime = (type) => {
+    setDateActive(type);
     let time = [dayjs().startOf(type), dayjs()];
     onSearch?.(time);
   };
@@ -288,62 +226,45 @@ const ChartContent = (props) => {
 
   return (
     <div className={styles.chartBox}>
-      <div className={styles.title}>
-        优化建议
-        {active == 1 && (
-          <Icon
-            type="area-chart"
-            style={{ float: 'right', lineHeight: '56px', marginRight: 20 }}
-            onClick={() => setVisible(true)}
-          />
-        )}
-      </div>
-      {/* <SearchModule style={{ margin: '20px 0' }} onSearch={onSearch} type={2} /> */}
-      <Form layout="inline" style={{ margin: '10px 0' }}>
-        <Row gutter={24}>
-          <Col span={14}>
-            <Form.Item
-              label="时间"
-              labelCol={{ span: 4 }}
-              wrapperCol={{ span: 20 }}
-            >
-              <RangePicker
-                allowClear={false}
-                value={time}
-                onChange={onSearch}
-              ></RangePicker>
-            </Form.Item>
-          </Col>
-          <Col span={10}>
-            <div>
-              <Button
-                type="primary"
-                onClick={() => searchTime('day')}
-                style={{ marginRight: 10 }}
-              >
-                今日
-              </Button>
-              <Button
-                type="primary"
-                onClick={() => searchTime('week')}
-                style={{ marginRight: 10 }}
+      <div className={styles.chartBoxTop}>
+        <DeviceList
+          active={active}
+          projectId={projectId}
+          current={current}
+          onClick={setCurrent}
+        />
+
+        <div style={{ display: 'flex' }}>
+          <div className={styles.dateTabs}>
+            {DateTab.map((item) => (
+              <div
+                key={item.value}
+                className={`${styles.dateTabsItem} ${
+                  item.value == dateActive ? styles.active : ''
+                }`}
+                onClick={() => searchTime(item.value)}
               >
-                本周
-              </Button>
-              <Button type="primary" onClick={() => searchTime('month')}>
-                本月
-              </Button>
-            </div>
-          </Col>
-        </Row>
-      </Form>
-      <Spin spinning={loading}>
+                {item.label}
+              </div>
+            ))}
+          </div>
+          {active == 1 && (
+            <Icon
+              type="area-chart"
+              style={{ float: 'right', lineHeight: '56px', marginRight: 20 }}
+              onClick={() => setVisible(true)}
+            />
+          )}
+        </div>
+      </div>
+
+      {/* <Spin spinning={loading} wrapperClassName={styles.loadingBox}>
         {!loading && !data?.list && <Empty style={{ height: 195 }} />}
-        <div
-          ref={domRef}
-          style={{ height: '100%', display: !data?.list ? 'none' : 'block' }}
-        />
-      </Spin>
+      </Spin> */}
+      <div
+        ref={domRef}
+        style={{ height: '100%', display: !data?.list ? 'none' : 'block' }}
+      />
       {optimization && (
         <div
           style={{
@@ -367,6 +288,51 @@ const ChartContent = (props) => {
   );
 };
 
+const DeviceList = (props) => {
+  const { current, onClick, projectId, active } = props;
+
+  const { data, loading, run } = useRequest(
+    () => {
+      let params = {
+        page: 1,
+        page_size: 99999,
+        project_id: projectId,
+      };
+      return TYPE[active]?.device(params);
+    },
+    {
+      manual: true,
+      onSuccess(data) {
+        if (data.list?.[0]) {
+          onClick(data.list[0]);
+        } else {
+          onClick(null);
+        }
+      },
+    },
+  );
+
+  const handleChange = (value) => {
+    let current = data.list.find((item) => item.device_code == value);
+    onClick(current);
+  };
+
+  useEffect(() => {
+    if (active) run();
+  }, [active]);
+
+  return (
+    <Select
+      style={{ width: 200 }}
+      onChange={handleChange}
+      value={current?.device_code}
+    >
+      {data?.list.map((item) => (
+        <Option key={item.device_code}>{item.device_code}</Option>
+      ))}
+    </Select>
+  );
+};
 function getOption(data = [], active) {
   let formatter,
     yAxisName = '',

+ 24 - 0
src/pages/Smart/components/SimulateDetail.less

@@ -100,3 +100,27 @@
   display: flex;
   flex-direction: column;
 }
+
+.chartBoxTop {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 20px;
+}
+
+.dateTabs {
+  display: flex;
+  border: 1px solid #999;
+  border-radius: 5px;
+  .dateTabsItem {
+    padding: 14px 0;
+    width: 140px;
+    text-align: center;
+    font-size: 22px;
+    cursor: pointer;
+    &.active {
+      background: #4a90e2;
+      color: #fff;
+    }
+  }
+}

+ 14 - 23
src/pages/Smart/components/SimulatePie.js

@@ -1,12 +1,10 @@
-import * as echarts from 'echarts';
-import React, { useEffect, useRef, useState } from 'react';
-import Panel from './Panel';
 import { querySimulationProfit } from '@/services/SmartOps';
-import { history, useParams, useRequest } from '@umijs/max';
+import { useRequest } from '@umijs/max';
 import dayjs from 'dayjs';
-import { Button } from 'antd';
+import * as echarts from 'echarts';
+import { useEffect, useRef } from 'react';
 
-const SimulatePie = props => {
+const SimulatePie = (props) => {
   const { projectId } = props;
   const domRef = useRef(null);
   const chartRef = useRef(null);
@@ -15,9 +13,7 @@ const SimulatePie = props => {
     defaultParams: [
       {
         project_id: projectId,
-        s_time: dayjs()
-          .subtract(1, 'day')
-          .format('YYYY-MM-DD HH:mm:ss'),
+        s_time: dayjs().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'),
         e_time: dayjs().format('YYYY-MM-DD HH:mm:ss'),
       },
     ],
@@ -33,7 +29,10 @@ const SimulatePie = props => {
   const getProfit = () => {
     if (!data?.info) return '-';
 
-    return Object.values(data.info).reduce((total, currentValue) => total + currentValue, 0);
+    return Object.values(data.info).reduce(
+      (total, currentValue) => total + currentValue,
+      0,
+    );
   };
 
   useEffect(() => {
@@ -46,21 +45,13 @@ const SimulatePie = props => {
   }, []);
 
   return (
-    <Panel
-      title={'模拟预估'}
-      style={{ width: '100%' }}
-      btns={
-        <Button type="primary" onClick={() => history.go(-1)}>
-          返回
-        </Button>
-      }
-    >
-      <h2 style={{ textAlign: 'center', fontSize: 24, }}>
+    <div className="card-box" style={{ padding: 20, marginTop: 20 }}>
+      <h2 style={{ textAlign: 'center', fontSize: 24 }}>
         通过模拟仿真预计未来一日可省 &nbsp;
-        <span style={{ fontSize: 28, color: '#FFFF00' }}>{getProfit()}元</span>
+        <span style={{ fontSize: 28, color: '#F5A623' }}>{getProfit()}元</span>
       </h2>
       <div ref={domRef} style={{ height: '25vh' }}></div>
-    </Panel>
+    </div>
   );
 };
 
@@ -80,7 +71,7 @@ function getOption(data) {
     10: 'RO冲洗周期优化',
   };
   Object.entries(data.info).map(([key, value]) => {
-    if(value > 0) {
+    if (value > 0) {
       seriesData.push({
         value,
         name: type[key],

+ 71 - 47
src/services/SmartOps.js

@@ -1,13 +1,15 @@
-import { request } from 'umi';
 import { stringify } from 'qs';
+import { request } from 'umi';
 
 export async function queryProcessSection(projectId) {
-  const res = await request(`/api/v1/process-section/${projectId}?page_size=999`);
+  const res = await request(
+    `/api/v1/process-section/${projectId}?page_size=999`,
+  );
   return res?.data?.list;
 }
 
 export async function queryUserList(param) {
-  return request(`/api/v1/user/project/${param.projectId}`)
+  return request(`/api/v1/user/project/${param.projectId}`);
 }
 /**
  * 最优工况列表
@@ -21,7 +23,7 @@ export async function queryBaseList(data) {
     dataType: 'formData',
     data: data,
   });
-  return res
+  return res;
 }
 
 /**
@@ -36,7 +38,7 @@ export async function queryOptimum(data) {
     dataType: 'formData',
     data: data,
   });
-  return res
+  return res;
 }
 
 /**
@@ -54,7 +56,7 @@ export async function addOptimum(data) {
     dataType: 'formData',
     data: data,
   });
-  return res
+  return res;
 }
 
 /**
@@ -70,7 +72,7 @@ export async function addBaseParams(data) {
     dataType: 'formData',
     data: data,
   });
-  return res
+  return res;
 }
 
 /**
@@ -88,7 +90,7 @@ export async function editOptimum(data) {
     dataType: 'formData',
     data: data,
   });
-  return res
+  return res;
 }
 
 export async function updateBase(data) {
@@ -97,7 +99,7 @@ export async function updateBase(data) {
     dataType: 'formData',
     data: data,
   });
-  return res
+  return res;
 }
 
 /**
@@ -110,7 +112,7 @@ export async function updateBase(data) {
  */
 export async function queryPacList(data) {
   let res = await request(`/api/simulations/v1/pac/list?${stringify(data)}`);
-  return res
+  return res;
 }
 
 /**
@@ -125,7 +127,7 @@ export async function queryPacList(data) {
  */
 export async function queryPacDosing(data) {
   let res = await request(`/api/simulations/v1/pac/dosing?${stringify(data)}`);
-  return res
+  return res;
 }
 
 /**
@@ -143,7 +145,7 @@ export async function addPac(data) {
     method: 'POST',
     data: data,
   });
-  return res
+  return res;
 }
 /**
  * PAC配置:编辑
@@ -162,7 +164,7 @@ export async function updatePac(data) {
     method: 'PUT',
     data: data,
   });
-  return res
+  return res;
 }
 
 export async function conditionChart(params) {
@@ -170,7 +172,7 @@ export async function conditionChart(params) {
     method: 'POST',
     data: params,
   });
-  return res
+  return res;
 }
 
 /**
@@ -182,8 +184,10 @@ export async function conditionChart(params) {
  * @returns
  */
 export async function queryBackwashList(data) {
-  let res = await request(`/api/simulations/v1/design/backwash/list?${stringify(data)}`);
-  return res
+  let res = await request(
+    `/api/simulations/v1/design/backwash/list?${stringify(data)}`,
+  );
+  return res;
 }
 
 /**
@@ -197,8 +201,10 @@ export async function queryBackwashList(data) {
  * @returns
  */
 export async function queryMembraneConditions(data) {
-  let res = await request(`/api/simulations/v1/membrane/conditions?${stringify(data)}`);
-  return res
+  let res = await request(
+    `/api/simulations/v1/membrane/conditions?${stringify(data)}`,
+  );
+  return res;
 }
 /**
  * 反洗记录
@@ -212,8 +218,10 @@ export async function queryMembraneConditions(data) {
  * @returns
  */
 export async function queryBackwash(data) {
-  let res = await request(`/api/simulations/v1/record/backwash?${stringify(data)}`);
-  return res
+  let res = await request(
+    `/api/simulations/v1/record/backwash?${stringify(data)}`,
+  );
+  return res;
 }
 
 /**
@@ -230,7 +238,7 @@ export async function addBackwash(data) {
     method: 'POST',
     data: data,
   });
-  return res
+  return res;
 }
 /**
  * 反洗:编辑
@@ -247,7 +255,7 @@ export async function updateBackwash(data) {
     method: 'PUT',
     data: data,
   });
-  return res
+  return res;
 }
 
 /**
@@ -258,45 +266,53 @@ export async function updateBackwash(data) {
  * @returns
  */
 export async function querySimulationProfit(data) {
-  let res = await request(`/api/simulations/v1/profit/summary?${stringify(data)}`);
-  return res
+  let res = await request(
+    `/api/simulations/v1/profit/summary?${stringify(data)}`,
+  );
+  return res;
 }
 export async function conditionEstimate(params) {
   let res = await request(`/api/energy/v1/condition/estimate`, {
     method: 'POST',
     data: params,
   });
-  return res
+  return res;
 }
 
 // 项目大水量冲洗设计:拉取设计列表
 export async function queryDesignWashList(data) {
-  let res = await request(`/api/simulations/v1/design/wash/list?${stringify(data)}`);
-  return res
+  let res = await request(
+    `/api/simulations/v1/design/wash/list?${stringify(data)}`,
+  );
+  return res;
 }
 
 // 运行记录:拉取大水量冲洗
 export async function queryDesignWash(data) {
   let res = await request(`/api/simulations/v1/record/wash?${stringify(data)}`);
-  return res
+  return res;
 }
 
 // 项目拉取非氧化杀菌列表
 export async function queryDesignNobList(data) {
-  let res = await request(`/api/simulations/v1/design/nob/list?${stringify(data)}`);
-  return res
+  let res = await request(
+    `/api/simulations/v1/design/nob/list?${stringify(data)}`,
+  );
+  return res;
 }
 
 // 运行记录:拉取非氧化杀菌运行记录
 export async function queryDesignNob(data) {
   let res = await request(`/api/simulations/v1/record/nob?${stringify(data)}`);
-  return res
+  return res;
 }
 
 // 水厂工况
 export async function queryConditionSnapshot(data) {
-  let res = await request(`/api/energy/v1/condition/snapshot?${stringify(data)}`);
-  return res
+  let res = await request(
+    `/api/energy/v1/condition/snapshot?${stringify(data)}`,
+  );
+  return res;
 }
 
 // 工况评估
@@ -307,7 +323,7 @@ export async function queryRealEstimate(project_id) {
       project_id,
     },
   });
-  return res
+  return res;
 }
 
 // 工况图表
@@ -316,50 +332,58 @@ export async function queryRealEstimateChart(project_id) {
     method: 'POST',
     data: {
       project_id,
-      hour: 24
+      hour: 24,
     },
   });
-  return res
+  return res;
 }
 
 // 项目配置:获取所有拥有配置的项目
 export async function queryProjectConfig(projectId) {
-  let res = await request(`/api/simulations/v1/project?project_id=${projectId}`);
-  return res.data.info.technologys;
+  let res = await request(
+    `/api/simulations/v1/project?project_id=${projectId}`,
+  );
+  return { data: res.data.info.technologys };
 }
 
 // 项目膜设计:拉取设计列表  type膜类型 mf | uf | nf | ro
 export async function queryMembraneList(data) {
-  let res = await request(`/api/simulations/v1/design/membrane/list?${stringify(data)}`);
-  return res
+  let res = await request(
+    `/api/simulations/v1/design/membrane/list?${stringify(data)}`,
+  );
+  return res;
 }
 
 // 运行记录:拉取非氧化杀菌运行记录  type膜类型 mf | uf | nf | ro
 export async function queryMembrane(data) {
-  let res = await request(`/api/simulations/v1/record/membrane?${stringify(data)}`);
-  return res
+  let res = await request(
+    `/api/simulations/v1/record/membrane?${stringify(data)}`,
+  );
+  return res;
 }
 
 // 项目药剂设计:拉取设计列表  药剂类型 pac|nob|hci|sbs|anti
 export async function queryDrugList(data) {
-  let res = await request(`/api/simulations/v1/design/drug/list?${stringify(data)}`);
-  return res
+  let res = await request(
+    `/api/simulations/v1/design/drug/list?${stringify(data)}`,
+  );
+  return res;
 }
 
 // 运行记录:拉取药剂记录  药剂类型 pac|nob|hci|sbs|anti
 export async function queryDrug(data) {
   let res = await request(`/api/simulations/v1/record/drug?${stringify(data)}`);
-  return res
+  return res;
 }
 
 // 子任务列表
 export async function queryMandateChildList(data) {
   let res = await request(`/api/v1/mandate-child/list?${stringify(data)}`);
-  return res
+  return res;
 }
 
 // 任务详情
 export async function queryMandate(data) {
   let res = await request(`/api/v1/mandate/info?${stringify(data)}`);
-  return res
+  return res;
 }