Commit 48ef909b authored by 陈龙's avatar 陈龙

feat: 新增五粮液环保智慧管理平台相关内容

parent e0c79b49
Pipeline #96194 waiting for manual action with stages
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
...@@ -326,5 +326,25 @@ ...@@ -326,5 +326,25 @@
background: url('@{imgSrc}/钦州污水泵站总览.png'); background: url('@{imgSrc}/钦州污水泵站总览.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
&[widget='SEWAGE_WORKS_OVERVIEW'] {
height: 120px;
background: url('@{imgSrc}/五粮液运营总览.png');
background-size: 100% 100%;
}
&[widget='SEWAGE_WORKS_WATER_QUALITY'] {
height: 180px;
background: url('@{imgSrc}/五粮液出水水质.png');
background-size: 100% 100%;
}
&[widget='SEWAGE_WORKS_DRUG_CONSUMPTION'] {
height: 80px;
background: url('@{imgSrc}/五粮液药耗总览.png');
background-size: 100% 100%;
}
&[widget='SEWAGE_WORKS_AERATION'] {
height: 120px;
background: url('@{imgSrc}/五粮液曝气总览.png');
background-size: 100% 100%;
}
} }
} }
import React, { useState, useRef, useContext, useMemo, useEffect } from 'react'; import React, {useState, useRef, useContext, useMemo, useEffect} from 'react';
import { Checkbox, Row, Col, Button, message, Input } from 'antd'; import {Checkbox, Row, Col, Button, message, Input} from 'antd';
import { useDrag, useDrop, DndProvider } from 'react-dnd'; import {useDrag, useDrop, DndProvider} from 'react-dnd';
import { CaretRightOutlined } from '@ant-design/icons'; import {CaretRightOutlined} from '@ant-design/icons';
import styles from './index.less'; import styles from './index.less';
import { GlobalStore } from '../index'; import {GlobalStore} from '../index';
import { getCardVersion, upgradeCardVersion } from '@/services/mobileConfig/api'; import {getCardVersion, upgradeCardVersion} from '@/services/mobileConfig/api';
const { Search } = Input; const {Search} = Input;
const cardTypes = ['管理', '执行', '运营']; const cardTypes = ['管理', '执行', '运营'];
const tabs = ['产品组件', '项目组件']; const tabs = ['产品组件', '项目组件'];
...@@ -17,60 +17,60 @@ const cards = [ ...@@ -17,60 +17,60 @@ const cards = [
title: '运营总览', title: '运营总览',
count: 1, count: 1,
children: [ children: [
{ name: '运营总览', widget: 'OVERVIEW', type: '运营' }, {name: '运营总览', widget: 'OVERVIEW', type: '运营'},
{ name: '经营概览', widget: 'MANAGE_OVERVIEW', type: '运营' }, {name: '经营概览', widget: 'MANAGE_OVERVIEW', type: '运营'},
], ],
}, },
{ {
title: '水厂', title: '水厂',
count: 3, count: 3,
children: [ children: [
{ name: '水厂总览', widget: 'WATER_OVERVIEW', type: '运营' }, {name: '水厂总览', widget: 'WATER_OVERVIEW', type: '运营'},
{ name: '供水总览', widget: 'WATER_OVERVIEW2', type: '运营' }, {name: '供水总览', widget: 'WATER_OVERVIEW2', type: '运营'},
{ name: '供水量曲线', widget: 'WATER_CHART', type: '运营' }, {name: '供水量曲线', widget: 'WATER_CHART', type: '运营'},
{ name: '水厂监控', widget: 'WATER_MONITORING', type: '运营' }, {name: '水厂监控', widget: 'WATER_MONITORING', type: '运营'},
], ],
}, },
{ {
title: '管网', title: '管网',
count: 6, count: 6,
children: [ children: [
{ name: '管网监控', widget: 'PIPEMONITORING', type: '运营' }, {name: '管网监控', widget: 'PIPEMONITORING', type: '运营'},
{ name: '巡检运维', widget: 'POLLINGMAINTENANCE', type: '运营' }, {name: '巡检运维', widget: 'POLLINGMAINTENANCE', type: '运营'},
{ name: '管网采集', widget: 'PIPEGATHER', type: '运营' }, {name: '管网采集', widget: 'PIPEGATHER', type: '运营'},
{ name: '管网资产', widget: 'PIPELINEASSETSV2', type: '运营' }, {name: '管网资产', widget: 'PIPELINEASSETSV2', type: '运营'},
{ name: '管网巡检', widget: 'PIPEINSPECTION', type: '运营' }, {name: '管网巡检', widget: 'PIPEINSPECTION', type: '运营'},
{ name: '维修工单', widget: 'MAINTENANCEORDER', type: '运营' }, {name: '维修工单', widget: 'MAINTENANCEORDER', type: '运营'},
{ name: '压力监控', widget: 'PRESSURE_MONITORING', type: '运营' }, {name: '压力监控', widget: 'PRESSURE_MONITORING', type: '运营'},
{ name: '采集工程', widget: 'PROJECT_OVERVIEW', type: '运营' }, {name: '采集工程', widget: 'PROJECT_OVERVIEW', type: '运营'},
], ],
}, },
{ {
title: '二供', title: '二供',
count: 3, count: 3,
children: [ children: [
{ name: '二供总览', widget: 'OPERATIONAL_OVERVIEW', type: '运营' }, {name: '二供总览', widget: 'OPERATIONAL_OVERVIEW', type: '运营'},
{ name: '泵房运行状态', widget: 'PUMP_STATUS', type: '运营' }, {name: '泵房运行状态', widget: 'PUMP_STATUS', type: '运营'},
{ name: '泵房维修保养', widget: 'PUMP_MAINTAIN', type: '运营' }, {name: '泵房维修保养', widget: 'PUMP_MAINTAIN', type: '运营'},
], ],
}, },
{ {
title: '营收', title: '营收',
count: 1, count: 1,
children: [{ name: '营收总览', widget: 'REVENUE_OVERVIEW', type: '运营' }], children: [{name: '营收总览', widget: 'REVENUE_OVERVIEW', type: '运营'}],
}, },
{ {
title: 'DMA', title: 'DMA',
count: 1, count: 1,
children: [{ name: '大表监控', widget: 'LARGE_MONITORING', type: '运营' }], children: [{name: '大表监控', widget: 'LARGE_MONITORING', type: '运营'}],
}, },
{ {
title: '系统统计', title: '系统统计',
count: 3, count: 3,
children: [ children: [
{ name: '实用情况统计', widget: 'USAGE_STATISTICS', type: '运营' }, {name: '实用情况统计', widget: 'USAGE_STATISTICS', type: '运营'},
{ name: '使用频次分析', widget: 'FREQUENCY_ANALYSIS', type: '运营' }, {name: '使用频次分析', widget: 'FREQUENCY_ANALYSIS', type: '运营'},
{ name: '系统使用排名', widget: 'USAGE_RANKING', type: '运营' }, {name: '系统使用排名', widget: 'USAGE_RANKING', type: '运营'},
], ],
}, },
], ],
...@@ -79,76 +79,86 @@ const cards = [ ...@@ -79,76 +79,86 @@ const cards = [
title: '江西水务集团GIS项目', title: '江西水务集团GIS项目',
count: 6, count: 6,
children: [ children: [
{ name: '运营总览', widget: 'OPERATIONSOVERVIEW', type: '运营' }, {name: '运营总览', widget: 'OPERATIONSOVERVIEW', type: '运营'},
{ name: '管网资产', widget: 'PIPELINEASSETS', type: '运营' }, {name: '管网资产', widget: 'PIPELINEASSETS', type: '运营'},
{ name: '管网采集', widget: 'PIPELINECOLLECTION', type: '运营' }, {name: '管网采集', widget: 'PIPELINECOLLECTION', type: '运营'},
{ name: '巡检运维', widget: 'INSPECTIONMAINTENANCE', type: '运营' }, {name: '巡检运维', widget: 'INSPECTIONMAINTENANCE', type: '运营'},
{ name: '事件工单', widget: 'EVENTWORKORDER', type: '运营' }, {name: '事件工单', widget: 'EVENTWORKORDER', type: '运营'},
{ name: '子公司业务排行', widget: 'SUBSIDIARYBUSINESSRANKING', type: '运营' }, {name: '子公司业务排行', widget: 'SUBSIDIARYBUSINESSRANKING', type: '运营'},
], ],
}, },
{ {
title: '新乐智慧水务项目', title: '新乐智慧水务项目',
count: 3, count: 3,
children: [ children: [
{ name: '生产概览', widget: 'PRODUCT_OVERVIEW', type: '运营' }, {name: '生产概览', widget: 'PRODUCT_OVERVIEW', type: '运营'},
{ name: '三水厂送水泵房监控', widget: 'WATER_SUPPLY_MONITORING3', type: '运营' }, {name: '三水厂送水泵房监控', widget: 'WATER_SUPPLY_MONITORING3', type: '运营'},
{ name: '四水厂送水泵房监控', widget: 'WATER_SUPPLY_MONITORING4', type: '运营' }, {name: '四水厂送水泵房监控', widget: 'WATER_SUPPLY_MONITORING4', type: '运营'},
], ],
}, },
{ {
title: '广西农投天等县智慧水务项目', title: '广西农投天等县智慧水务项目',
count: 1, count: 1,
children: [{ name: '采集总览', widget: 'ACQUISITION_OVERVIEW', type: '运营' }], children: [{name: '采集总览', widget: 'ACQUISITION_OVERVIEW', type: '运营'}],
}, },
{ {
title: '瑞云智慧水务项目', title: '瑞云智慧水务项目',
count: 6, count: 6,
children: [ children: [
{ name: '供水统计', widget: 'RUIYUN_WATERSTATISTICS', type: '运营' }, {name: '供水统计', widget: 'RUIYUN_WATERSTATISTICS', type: '运营'},
{ name: '开关阀统计', widget: 'RUIYUN_SWITCHSTATISTICS', type: '运营' }, {name: '开关阀统计', widget: 'RUIYUN_SWITCHSTATISTICS', type: '运营'},
{ name: 'DMA分区统计', widget: 'RUIYUN_AREASTATISTICS', type: '运营' }, {name: 'DMA分区统计', widget: 'RUIYUN_AREASTATISTICS', type: '运营'},
{ name: '工单运营', widget: 'RUIYUN_CASEOPERATION', type: '运营' }, {name: '工单运营', widget: 'RUIYUN_CASEOPERATION', type: '运营'},
{ name: '维修服务统计', widget: 'RUIYUN_MAINTAINSTATISTICS', type: '运营' }, {name: '维修服务统计', widget: 'RUIYUN_MAINTAINSTATISTICS', type: '运营'},
{ name: '人员业务排名', widget: 'RUIYUN_PERSONRANKING', type: '运营' }, {name: '人员业务排名', widget: 'RUIYUN_PERSONRANKING', type: '运营'},
], ],
}, },
{ {
title: '泰来县金泽自来水智慧水务建设项目', title: '泰来县金泽自来水智慧水务建设项目',
count: 6, count: 6,
children: [ children: [
{ name: '运营总览', widget: 'WATER_MONITORING_TAILAI', type: '运营' }, {name: '运营总览', widget: 'WATER_MONITORING_TAILAI', type: '运营'},
{ name: '水厂总览', widget: 'MANAGE_OVERVIEW_TAILAI', type: '运营' }, {name: '水厂总览', widget: 'MANAGE_OVERVIEW_TAILAI', type: '运营'},
{ name: '管网运营', widget: 'PIPE_MONITORING_TAILAI', type: '运营' }, {name: '管网运营', widget: 'PIPE_MONITORING_TAILAI', type: '运营'},
{ name: 'DMA总览', widget: 'DMA_OVERVIEW_TAILAI', type: '运营' }, {name: 'DMA总览', widget: 'DMA_OVERVIEW_TAILAI', type: '运营'},
{ name: '营收总览', widget: 'REVENUE_OVERVIEW_TAILAI', type: '运营' }, {name: '营收总览', widget: 'REVENUE_OVERVIEW_TAILAI', type: '运营'},
], ],
}, },
{ {
title: '新源县中西部乡镇城乡供水平台', title: '新源县中西部乡镇城乡供水平台',
count: 8, count: 8,
children: [ children: [
{ name: '运营总览', widget: 'XINYUAN_OVERVIEW', type: '运营' }, {name: '运营总览', widget: 'XINYUAN_OVERVIEW', type: '运营'},
{ name: '水量总览', widget: 'XINYUAN_WATER_OVERVIEW', type: '运营' }, {name: '水量总览', widget: 'XINYUAN_WATER_OVERVIEW', type: '运营'},
{ name: '管网维修记录', widget: 'XINYUAN_REPAIR_RECORD', type: '运营' }, {name: '管网维修记录', widget: 'XINYUAN_REPAIR_RECORD', type: '运营'},
{ name: '城区概况', widget: 'XINYUAN_CITY_OVERVIEW', type: '运营' }, {name: '城区概况', widget: 'XINYUAN_CITY_OVERVIEW', type: '运营'},
{ name: '乡镇概况', widget: 'XINYUAN_TOWN_OVERVIEW', type: '运营' }, {name: '乡镇概况', widget: 'XINYUAN_TOWN_OVERVIEW', type: '运营'},
{ name: '管网监控', widget: 'XINYUAN_PIPE_NETWORK_MONITOR', type: '运营' }, {name: '管网监控', widget: 'XINYUAN_PIPE_NETWORK_MONITOR', type: '运营'},
{ name: '水池保障率', widget: 'XINYUAN_POOL_GUARANTEE_RATE', type: '运营' }, {name: '水池保障率', widget: 'XINYUAN_POOL_GUARANTEE_RATE', type: '运营'},
{ name: '管网运维', widget: 'XINYUAN_POLLING_MAINTENANCE', type: '运营' }, {name: '管网运维', widget: 'XINYUAN_POLLING_MAINTENANCE', type: '运营'},
], ],
}, },
{ {
title: '钦州开投水务综合管理平台', title: '钦州开投水务综合管理平台',
count: 5, count: 5,
children: [ children: [
{ name: '水厂规模', widget: 'WATER_SCALE_QINZHOU', type: '运营' }, {name: '水厂规模', widget: 'WATER_SCALE_QINZHOU', type: '运营'},
{ name: '管网监控', widget: 'PIPE_MONITORING_QINZHOU', type: '运营' }, {name: '管网监控', widget: 'PIPE_MONITORING_QINZHOU', type: '运营'},
{ name: '污水总览', widget: 'WASTE_WATER_OVERVIEW_QINZHOU', type: '运营' }, {name: '污水总览', widget: 'WASTE_WATER_OVERVIEW_QINZHOU', type: '运营'},
{ name: '污水厂规模', widget: 'WASTE_WATER_SCALE_QINZHOU', type: '运营' }, {name: '污水厂规模', widget: 'WASTE_WATER_SCALE_QINZHOU', type: '运营'},
{ name: '污水泵站总览', widget: 'WASTE_STATION_OVERVIEW_QINZHOU', type: '运营' }, {name: '污水泵站总览', widget: 'WASTE_STATION_OVERVIEW_QINZHOU', type: '运营'},
], ],
}, },
{
title: '五粮液环保智慧管理平台',
count: 4,
children: [
{name: '运营总览', widget: 'SEWAGE_WORKS_OVERVIEW', type: '运营'},
{name: '出水水质', widget: 'SEWAGE_WORKS_WATER_QUALITY', type: '运营'},
{name: '药耗总览', widget: 'SEWAGE_WORKS_DRUG_CONSUMPTION', type: '运营'},
{name: '曝气总览', widget: 'SEWAGE_WORKS_AERATION', type: '运营'},
]
}
], ],
]; ];
...@@ -165,7 +175,7 @@ const Group = props => { ...@@ -165,7 +175,7 @@ const Group = props => {
const id = getNanoid(); const id = getNanoid();
const ref = useRef(null); const ref = useRef(null);
const [{ dragging }, drag, dragPreview] = useDrag({ const [{dragging}, drag, dragPreview] = useDrag({
type: 'box', type: 'box',
item: { item: {
id, id,
...@@ -190,7 +200,7 @@ const Group = props => { ...@@ -190,7 +200,7 @@ const Group = props => {
<div <div
ref={ref} ref={ref}
className={styles.group} className={styles.group}
style={{ border: dragging ? '2px solid #001bff' : '' }} style={{border: dragging ? '2px solid #001bff' : ''}}
onClick={() => boxClick()} onClick={() => boxClick()}
/> />
); );
...@@ -200,7 +210,7 @@ const Card = props => { ...@@ -200,7 +210,7 @@ const Card = props => {
const ref = useRef(null); const ref = useRef(null);
const id = getNanoid(); const id = getNanoid();
const [{ dragging }, drag] = useDrag({ const [{dragging}, drag] = useDrag({
type: 'card', type: 'card',
item: { item: {
id, id,
...@@ -221,7 +231,7 @@ const Card = props => { ...@@ -221,7 +231,7 @@ const Card = props => {
{`${props.type}组件`} {`${props.type}组件`}
</div> </div>
<div className={styles.box}> <div className={styles.box}>
<div className={styles.cardBox} widget={props.widget} /> <div className={styles.cardBox} widget={props.widget}/>
</div> </div>
<div className={styles.swiper}>{props.name}</div> <div className={styles.swiper}>{props.name}</div>
</div> </div>
...@@ -236,12 +246,12 @@ const CardGroup = props => { ...@@ -236,12 +246,12 @@ const CardGroup = props => {
<div className={styles.cardGroup}> <div className={styles.cardGroup}>
<div className={styles['g-top']} onClick={() => setShrink(!shrink)}> <div className={styles['g-top']} onClick={() => setShrink(!shrink)}>
<CaretRightOutlined <CaretRightOutlined
style={{ transition: '0.5s all', transform: !shrink ? 'rotate(90deg)' : '' }} style={{transition: '0.5s all', transform: !shrink ? 'rotate(90deg)' : ''}}
/> />
<span>{props.title}</span> <span>{props.title}</span>
<span>{`(${props.count})`}</span> <span>{`(${props.count})`}</span>
</div> </div>
<div className={styles['g-cards']} style={{ height: shrink ? '0px' : 'unset' }}> <div className={styles['g-cards']} style={{height: shrink ? '0px' : 'unset'}}>
{props.children} {props.children}
</div> </div>
</div> </div>
...@@ -249,9 +259,9 @@ const CardGroup = props => { ...@@ -249,9 +259,9 @@ const CardGroup = props => {
}; };
const Left = () => { const Left = () => {
const { shema, setShema } = useContext(GlobalStore); const {shema, setShema} = useContext(GlobalStore);
const [cardType, setCardType] = useState(cardTypes); const [cardType, setCardType] = useState(cardTypes);
const [version, setVersion] = useState({ Version: '', lastVersion: '' }); const [version, setVersion] = useState({Version: '', lastVersion: ''});
const [activeIndex, setActiveIndex] = useState(0); const [activeIndex, setActiveIndex] = useState(0);
const [inputValue, setInputValue] = useState(''); const [inputValue, setInputValue] = useState('');
...@@ -262,7 +272,7 @@ const Left = () => { ...@@ -262,7 +272,7 @@ const Left = () => {
s => cardType.includes(s.type) && (!inputValue || s.name.includes(inputValue)), s => cardType.includes(s.type) && (!inputValue || s.name.includes(inputValue)),
); );
if (children.length) { if (children.length) {
array.push({ ...v, children }); array.push({...v, children});
} }
}); });
return array; return array;
...@@ -273,7 +283,7 @@ const Left = () => { ...@@ -273,7 +283,7 @@ const Left = () => {
}; };
const update = async () => { const update = async () => {
const { code, data, msg } = await upgradeCardVersion(); const {code, data, msg} = await upgradeCardVersion();
if (code === 0) { if (code === 0) {
getData(); getData();
} else { } else {
...@@ -282,7 +292,7 @@ const Left = () => { ...@@ -282,7 +292,7 @@ const Left = () => {
}; };
const getData = async () => { const getData = async () => {
const { code, data } = await getCardVersion(); const {code, data} = await getCardVersion();
if (code === 0) { if (code === 0) {
setVersion(data); setVersion(data);
} }
...@@ -296,14 +306,14 @@ const Left = () => { ...@@ -296,14 +306,14 @@ const Left = () => {
<div className={styles.left}> <div className={styles.left}>
<div className={styles.header}> <div className={styles.header}>
<div className={styles['r-left']}> <div className={styles['r-left']}>
<span style={{ paddingRight: '3px' }}>组件库</span> <span style={{paddingRight: '3px'}}>组件库</span>
<span style={{ fontSize: '10px' }}>V{version.lastVersion}</span> <span style={{fontSize: '10px'}}>V{version.lastVersion}</span>
</div> </div>
<div className={styles['r-right']}> <div className={styles['r-right']}>
<Button <Button
size="small" size="small"
onClick={() => update()} onClick={() => update()}
style={{ display: version.Version !== version.lastVersion ? 'block' : 'none' }} style={{display: version.Version !== version.lastVersion ? 'block' : 'none'}}
> >
立即更新 立即更新
</Button> </Button>
...@@ -313,7 +323,7 @@ const Left = () => { ...@@ -313,7 +323,7 @@ const Left = () => {
<div className={styles.item}> <div className={styles.item}>
<div className={styles['g-title']}>布局</div> <div className={styles['g-title']}>布局</div>
<div className={styles['g-content']}> <div className={styles['g-content']}>
<Group /> <Group/>
</div> </div>
</div> </div>
<div className={styles.tabs}> <div className={styles.tabs}>
...@@ -333,16 +343,16 @@ const Left = () => { ...@@ -333,16 +343,16 @@ const Left = () => {
placeholder="请输入关键字搜索" placeholder="请输入关键字搜索"
value={inputValue} value={inputValue}
onChange={e => setInputValue(e.target.value)} onChange={e => setInputValue(e.target.value)}
style={{ width: 250 }} style={{width: 250}}
/> />
</div> </div>
<div className={styles['g-checks']}> <div className={styles['g-checks']}>
<Checkbox.Group style={{ width: '100%' }} value={cardType} onChange={cardTypeChange}> <Checkbox.Group style={{width: '100%'}} value={cardType} onChange={cardTypeChange}>
<Row> <Row>
{cardTypes.map(v => ( {cardTypes.map(v => (
<Col <Col
key={v} key={v}
style={{ display: 'flex', justifyContent: 'center', marginLeft: '10px' }} style={{display: 'flex', justifyContent: 'center', marginLeft: '10px'}}
> >
<Checkbox value={v}>{v}</Checkbox> <Checkbox value={v}>{v}</Checkbox>
</Col> </Col>
......
...@@ -367,6 +367,26 @@ ...@@ -367,6 +367,26 @@
background: url('@{imgSrc}/钦州污水泵站总览.png'); background: url('@{imgSrc}/钦州污水泵站总览.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
&[widget='SEWAGE_WORKS_OVERVIEW'] {
height: 80px;
background: url('@{imgSrc}/五粮液运营总览.png');
background-size: 100% 100%;
}
&[widget='SEWAGE_WORKS_WATER_QUALITY'] {
height: 120px;
background: url('@{imgSrc}/五粮液出水水质.png');
background-size: 100% 100%;
}
&[widget='SEWAGE_WORKS_DRUG_CONSUMPTION'] {
height: 80px;
background: url('@{imgSrc}/五粮液药耗总览.png');
background-size: 100% 100%;
}
&[widget='SEWAGE_WORKS_AERATION'] {
height: 80px;
background: url('@{imgSrc}/五粮液曝气总览.png');
background-size: 100% 100%;
}
} }
} }
.cardType { .cardType {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment