Browse Source

优化修改

master
wenlele 2 years ago
parent
commit
1b4b699c39
  1. 18
      api/app/lib/controllers/bigScreen/index .js
  2. 117
      api/app/lib/models/pump_information.js
  3. 3
      api/app/lib/routes/organization/index.js
  4. 25
      scripts/0.1/data/pump_information.sql
  5. 11
      web/client/src/sections/bigScreen/actions/bigScreen.js
  6. 27
      web/client/src/sections/bigScreen/components/basis.js
  7. 20
      web/client/src/sections/bigScreen/components/basis/right_1.js
  8. 4
      web/client/src/sections/bigScreen/components/basis/right_2.js
  9. 31
      web/client/src/sections/bigScreen/components/capacity.js
  10. 7
      web/client/src/sections/bigScreen/components/electrical.js
  11. 4
      web/client/src/sections/bigScreen/components/electrity/levelTrend.js
  12. 2
      web/client/src/sections/bigScreen/components/electrity/lineBoxStatus.js
  13. 6
      web/client/src/sections/bigScreen/components/electrity/voltageTrend.js
  14. 6
      web/client/src/sections/bigScreen/components/realTime/below.js
  15. 6
      web/client/src/sections/bigScreen/components/realTime/general.js
  16. 2
      web/client/src/sections/bigScreen/components/realTime/softStart.js
  17. 1
      web/client/src/utils/webapi.js

18
api/app/lib/controllers/bigScreen/index .js

@ -54,8 +54,25 @@ async function axyData (ctx, next) {
}
const pumpInformation = async function (ctx) {
let errMsg = { message: '获取泵站信息失败' }
try {
const models = ctx.fs.dc.models;
const { page, limit, name } = ctx.query;
const res = await models.PumpInformation.findAll();
ctx.status = 200;
ctx.body = res;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = errMsg
}
}
@ -64,4 +81,5 @@ async function axyData (ctx, next) {
module.exports = {
axyData,
pumpInformation
}

117
api/app/lib/models/pump_information.js

@ -0,0 +1,117 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const PumpInformation = sequelize.define("pumpInformation", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "t_pump_information_id_uindex"
},
structureId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "structure_id",
autoIncrement: false
},
area: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "area",
autoIncrement: false
},
scale: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "scale",
autoIncrement: false
},
waterType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "water_type",
autoIncrement: false
},
elcType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "elc_type",
autoIncrement: false
},
byType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "by_type",
autoIncrement: false
},
num: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "num",
autoIncrement: false
},
startTime: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "start_time",
autoIncrement: false
},
reinforceTime: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "reinforce_time",
autoIncrement: false
},
func: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "func",
autoIncrement: false
},
}, {
tableName: "t_pump_information",
comment: "",
indexes: []
});
dc.models.PumpInformation = PumpInformation;
return PumpInformation;
};

3
api/app/lib/routes/organization/index.js

@ -6,4 +6,7 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['POST/axyData'] = { content: '获取安心云数据', visible: true };
router.post('/axyData', data.axyData);
app.fs.api.logAttr['GET/pumpInformation'] = { content: '获取泵站信息', visible: true };
router.get('/pumpInformation', data.pumpInformation);
};

25
scripts/0.1/data/pump_information.sql

@ -0,0 +1,25 @@
INSERT INTO public.t_pump_information (id, structure_id, area, scale, water_type, elc_type, by_type, func, num, start_time, reinforce_time) VALUES (DEFAULT,
3569, '东新乡', 840,'1000ZLB—4轴流泵','JSL12—14','S91000KVA','排灌结合',4,'1974年','2009年');
INSERT INTO public.t_pump_information (id, structure_id, area, scale, water_type, elc_type, by_type, func, num, start_time, reinforce_time) VALUES (DEFAULT,
3592, '富山乡', 2010,'','6台180、6台155','1250、1650','排涝',12,'1983年','2008年');
INSERT INTO public.t_pump_information (id, structure_id, area, scale, water_type, elc_type, by_type, func, num, start_time, reinforce_time) VALUES (DEFAULT,
3594, '东新乡', 60 ,'ZLB28—70轴流泵','Y—200T—4','80KVA箱式变压器','纯排',2,'2013年','');
INSERT INTO public.t_pump_information (id, structure_id, area, scale, water_type, elc_type, by_type, func, num, start_time, reinforce_time) VALUES (DEFAULT,
3595, '东新乡',260,'20ZLB—70轴流泵','Y67—130kw','315KVA箱式变压器','纯排',2,'2014年','');
INSERT INTO public.t_pump_information (id, structure_id, area, scale, water_type, elc_type, by_type, func, num, start_time, reinforce_time) VALUES (DEFAULT,
3593, '东新乡',240, 'ZLB28—70轴流泵','Y—200T—4','S9315KVA','排灌结合',3,'1974年','1992年');
INSERT INTO public.t_pump_information (id, structure_id, area, scale, water_type, elc_type, by_type, func, num, start_time, reinforce_time) VALUES (DEFAULT,
3598, '东新乡', 340,'ZLB28—70轴流泵','Y—200T—4','S9315KVA','排灌结合',3,'1974年','1988年');
INSERT INTO public.t_pump_information (id, structure_id, area, scale, water_type, elc_type, by_type, func, num, start_time, reinforce_time) VALUES (DEFAULT,
3597, '东新乡',260,'20ZLB—70轴流泵','Y67—130kw','S9_315KVA变压器','灌溉',2,'2014年','');
INSERT INTO public.t_pump_information (id, structure_id, area, scale, water_type, elc_type, by_type, func, num, start_time, reinforce_time) VALUES (DEFAULT,
3599, '富山乡',390, '','','','排涝',3,'1973年','2008年');

11
web/client/src/sections/bigScreen/actions/bigScreen.js

@ -14,6 +14,17 @@ export function axyData (data = {}) {
});
}
export function pumpInformation (query = {}) {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
actionType: 'GET_PUMP_INFORMATION',
url: `${ApiTable.pumpInformation}`,
query,
msg: { error: '获取泵站基本信息失败' }
});
}
export default {
axyData
}

27
web/client/src/sections/bigScreen/components/basis.js

@ -21,20 +21,33 @@ const Basis = ({ actions, dispatch, setshowData, siteList, siteData }) => {
const [pageRefresh3, setPageRefresh3] = useState(0)
const [depthWater, setDepthWater] = useState([])
const [information, setInformation] = useState({})
const [pumpInformation, setPumpInformation] = useState([])
const left1Data = useRef([])
const left2Data = useRef([])
const pumpNumber = useRef(0)
useEffect(() => {
dispatch(bigScreen.pumpInformation({})).then(res => {
if (res.success) {
setPumpInformation(res.payload.data || [])
}
})
}, [])
useEffect(() => {
if (pumpInformation?.length && strucId) {
setInformation(pumpInformation?.find(v => v.structureId == strucId) || {})
}
}, [pumpInformation, strucId])
useEffect(async () => {
if (siteData) {
setStrucId(siteData[0]?.id)
for (let key in POWER_STATIONS) {
if (POWER_STATIONS[key]?.name == siteData[0]?.name) {
setInformation(POWER_STATIONS[key])
}
}
//获取所有泵站的集水池液位
siteData?.map(async v => {
await dispatch(bigScreen.axyData({ type: 'get', url: `structures/${v.id}/factors` })).then(async r => {
@ -131,7 +144,7 @@ const Basis = ({ actions, dispatch, setshowData, siteList, siteData }) => {
type: 'get', url: `stations/theme/data`, params: {
query: {
stations: p.payload.data[0]?.groups[0]?.stations[0]?.id,
startTime: moment().add(-12, 'hours').format('YYYY-MM-DD HH:mm:ss'),
startTime: moment().add(-6, 'hours').format('YYYY-MM-DD HH:mm:ss'),
endTime: moment().format('YYYY-MM-DD HH:mm:ss'),
limit: 1440
}
@ -193,7 +206,7 @@ const Basis = ({ actions, dispatch, setshowData, siteList, siteData }) => {
</div >
<div className='super-screen-card right'>
<Right_1 data={information} siteList={siteList} strucId={strucId} setStrucId={setStrucId} setInformation={setInformation} POWER_STATIONS={POWER_STATIONS} />
<Right_1 pumpInformation={pumpInformation} setPumpInformation={setPumpInformation} data={information} siteList={siteList} strucId={strucId} setStrucId={setStrucId} setInformation={setInformation} POWER_STATIONS={POWER_STATIONS} />
<Right_2 depthWater={depthWater} />
</div>
<div style={{ width: '40%', height: 30, display: 'flex', justifyContent: 'space-around', position: 'absolute', left: 'calc(30%)', bottom: 30, zIndex: 7 }}>

20
web/client/src/sections/bigScreen/components/basis/right_1.js

@ -4,7 +4,7 @@ import { Select } from 'antd';
import '../basis.less';
import './right_1.less';
export default function Right_1 ({ data, siteList, strucId, setStrucId, POWER_STATIONS, setInformation }) {
export default function Right_1 ({ data, siteList, pumpInformation, setPumpInformation, strucId, setStrucId, POWER_STATIONS, setInformation }) {
const renderSelect = () => {
return <Select
@ -15,11 +15,7 @@ export default function Right_1 ({ data, siteList, strucId, setStrucId, POWER_ST
options={siteList}
onSelect={(v, option) => {
setStrucId(v);
for (let key in POWER_STATIONS) {
if (POWER_STATIONS[key]?.name == option?.label) {
setInformation(POWER_STATIONS[key])
}
}
setInformation(pumpInformation?.map(f => f.structureId == v) || {})
}}
/>
}
@ -33,21 +29,21 @@ export default function Right_1 ({ data, siteList, strucId, setStrucId, POWER_ST
<div className='detail'>
<div className='detail-item'>
<div className='item pump-models'>
<div className='pump-models-value'>{data?.water_type}</div>
<div className='pump-models-value'>{data?.waterType}</div>
<div className='pump-models-key' >水泵型号</div>
</div>
</div>
<div className='detail-item'>
<div className='item'>
<div className='key'>电动机型号:</div>
<div className='value'>{data?.elc_type}</div>
<div className='value'>{data?.elcType}</div>
</div>
<div className='line' />
</div>
<div className='detail-item'>
<div className='item'>
<div className='key'>变压器型号</div>
<div className='value'>{data?.by_type}</div>
<div className='value'>{data?.byType}</div>
</div>
<div className='line' />
</div>
@ -62,7 +58,7 @@ export default function Right_1 ({ data, siteList, strucId, setStrucId, POWER_ST
<div className='vertical-line' />
<div className='item'>
<div className='key'>泵站规模:</div>
<div className='value'>{data?.power} (kw)</div>
<div className='value'>{data?.scale} (kw)</div>
</div>
</div>
<div className='bottom-item'>
@ -73,13 +69,13 @@ export default function Right_1 ({ data, siteList, strucId, setStrucId, POWER_ST
<div className='vertical-line' />
<div className='item'>
<div className='key'>泵站建成时间</div>
<div className='value'>{data?.year?.split(',')[0]}</div>
<div className='value'>{data?.startTime}</div>
</div>
</div>
<div className='bottom-item'>
<div className='item'>
<div className='key'>泵站除险加固时间</div>
<div className='value'>{data?.year?.split(',')[1]}</div>
<div className='value'>{data?.reinforceTime}</div>
</div>
<div className='vertical-line' />
<div className='item'>

4
web/client/src/sections/bigScreen/components/basis/right_2.js

@ -26,11 +26,11 @@ export default function Right_2 ({ depthWater }) {
dataZoom: [
{
type: 'slider',
// startValue: depthWater?.map(v=>v.time)
showDetail: false
},
{
type: 'inside',
showDetail:false
},
],
tooltip: {

31
web/client/src/sections/bigScreen/components/capacity.js

@ -367,13 +367,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => {
}
})).then(d => {
if (d.success) {
// let trend = []
// d.payload.data?.stations[0]?.data?.map((s, i) => {
// trend.push({ time: s.time, eMotor_A_A: s.eMotor_A_A })
// })
setElectricityTrend(d.payload.data?.stations)
}
})
@ -502,7 +496,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => {
<div style={{ width: "100%", height: 90, padding: '10px 25px', display: 'flex', flexDirection: 'column', justifyContent: 'space-around', color: 'white' }}>
<div style={{ display: 'flex' }}>
<div style={{ width: 90, textAlign: 'end' }}>总用电量:</div>
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00', fontFamily: "D-DIN-Italic" }}>{v.data[0]?.eMotor_EQ?.toFixed(2)} kwh</div>
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00', fontFamily: "D-DIN-Italic" }}>{v.data[0]?.eMotor_EQ?.toFixed(2)} kWh</div>
</div>
<div style={{ display: 'flex' }}>
<div style={{ width: 90, textAlign: 'end' }}>单次运行时间:</div>
@ -732,19 +726,19 @@ const Capacity = ({ actions, dispatch, siteList, }) => {
<div style={{ width: "100%", height: 160, padding: '10px 25px', display: 'flex', flexDirection: 'column', justifyContent: 'space-around', color: 'white' }}>
<div style={{ display: 'flex' }}>
<div style={{ width: 90, textAlign: 'end' }}>当日用电:</div>
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00', fontFamily: "D-DIN-Italic" }}>{isNaN(v.today) ? v.today : v.today?.toFixed(2)} kwh</div>
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00', fontFamily: "D-DIN-Italic" }}>{isNaN(v.today) ? v.today : v.today?.toFixed(2)} kWh</div>
</div>
<div style={{ display: 'flex' }}>
<div style={{ width: 90, textAlign: 'end' }}>当月用电:</div>
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00', fontFamily: "D-DIN-Italic" }}>{isNaN(v.sameMonth) ? v.sameMonth : v.sameMonth?.toFixed(2)} kwh</div>
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00', fontFamily: "D-DIN-Italic" }}>{isNaN(v.sameMonth) ? v.sameMonth : v.sameMonth?.toFixed(2)} kWh</div>
</div>
<div style={{ display: 'flex' }}>
<div style={{ width: 90, textAlign: 'end' }}>今年用电:</div>
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00', fontFamily: "D-DIN-Italic" }}>{isNaN(v.thisYear) ? v.thisYear : v.thisYear?.toFixed(2)} kwh</div>
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00', fontFamily: "D-DIN-Italic" }}>{isNaN(v.thisYear) ? v.thisYear : v.thisYear?.toFixed(2)} kWh</div>
</div>
<div style={{ display: 'flex' }}>
<div style={{ width: 90, textAlign: 'end' }}>总用电量:</div>
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00', fontFamily: "D-DIN-Italic" }}>{v.eQF_EQ?.toFixed(2) || '--'} kwh</div>
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00', fontFamily: "D-DIN-Italic" }}>{v.eQF_EQ?.toFixed(2) || '--'} kWh</div>
</div>
</div>
</div>
@ -784,11 +778,11 @@ const Capacity = ({ actions, dispatch, siteList, }) => {
dataZoom: [
{
type: 'slider',
// startValue: depthWater?.map(v=>v.time)
showDetail: false
},
{
type: 'inside',
showDetail: false
},
],
tooltip: {
@ -868,6 +862,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => {
</div>
{
(() => {
console.log(electricityTrend);
let timeSet = new Set()
electricityTrend?.map(p => {
p.data?.map(s => {
@ -888,11 +883,11 @@ const Capacity = ({ actions, dispatch, siteList, }) => {
dataZoom: [
{
type: 'slider',
// startValue: depthWater?.map(v=>v.time)
showDetail: false
},
{
type: 'inside',
showDetail: false
},
],
tooltip: {
@ -987,11 +982,11 @@ const Capacity = ({ actions, dispatch, siteList, }) => {
dataZoom: [
{
type: 'slider',
// startValue: depthWater?.map(v=>v.time)
showDetail: false
},
{
type: 'inside',
showDetail: false
},
],
tooltip: {
@ -1008,7 +1003,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => {
type: 'category',
// name: "时间",
boundaryGap: false,
data: time?.map(v => moment(v.time).format('MM-DD HH:mm'))
data: time?.map(v => moment(v).format('MM-DD HH:mm'))
},
yAxis: {
type: 'value',

7
web/client/src/sections/bigScreen/components/electrical.js

@ -104,7 +104,7 @@ const Electrical = ({ dispatch, actions, siteList }) => {
type: 'get', url: `stations/theme/data`, params: {
query: {
stations: p.payload.data[0]?.groups[0]?.stations[0]?.id,
startTime: moment().add(-12, 'hours').format('YYYY-MM-DD HH:mm:ss'),
startTime: moment().add(-6, 'hours').format('YYYY-MM-DD HH:mm:ss'),
endTime: moment().format('YYYY-MM-DD HH:mm:ss'),
limit: 1440
}
@ -170,7 +170,7 @@ const Electrical = ({ dispatch, actions, siteList }) => {
type: 'get', url: `stations/theme/data`, params: {
query: {
stations: voltagePumpId?.join(),
startTime: moment().add(-12, 'hours').format('YYYY-MM-DD HH:mm:ss'),
startTime: moment().add(-6, 'hours').format('YYYY-MM-DD HH:mm:ss'),
endTime: moment().format('YYYY-MM-DD HH:mm:ss'),
limit: 1440
}
@ -211,7 +211,8 @@ const Electrical = ({ dispatch, actions, siteList }) => {
}}>
<div style={{ fontSize: 20, color: '#E2F8FF', fontWeight: 600 }}>
环境温度
<span style={{color: '#00FFF8',fontFamily:"D-DIN-Italic"}}>{depthWater[depthWater.length-1]?.sTEMP || "--"} </span></div>
</div>
<span style={{color: '#00FFF8',fontFamily:"D-DIN-Italic"}}>{depthWater[depthWater.length-1]?.sTEMP || "--"} </span>
</div>
<div style={{
backgroundImage: 'url(/assets/images/monitor/pedestal.png)',

4
web/client/src/sections/bigScreen/components/electrity/levelTrend.js

@ -35,11 +35,11 @@ const LevelTrend = ({ user, voltagePumpId, pumpList, setVoltagePumpId, depthWate
dataZoom: [
{
type: 'slider',
// startValue: depthWater?.map(v=>v.time)
showDetail:false
},
{
type: 'inside',
showDetail:false
},
],
tooltip: {

2
web/client/src/sections/bigScreen/components/electrity/lineBoxStatus.js

@ -53,7 +53,7 @@ const LineBoxStatus = ({ user, cabinetId, cabinetList, setCabinetId, cabinetOne
display: 'flex', alignItems: "center", justifyContent: 'space-between',
}}>
<div style={{ marginLeft: 6 }}>总用电量</div>
<div style={{ marginRight: 6 }}>{cabinetOne?.data[0]?.eQF_EQ} kwh</div>
<div style={{ marginRight: 6 }}>{cabinetOne?.data[0]?.eQF_EQ} kWh</div>
</div>
</div>
</div>

6
web/client/src/sections/bigScreen/components/electrity/voltageTrend.js

@ -62,11 +62,11 @@ const VoltageTrend = ({ user, voltagePumpId, pumpList, setVoltagePumpId, data })
dataZoom: [
{
type: 'slider',
// startValue: depthWater?.map(v=>v.time)
showDetail:false
},
{
type: 'inside',
showDetail:false
},
],
tooltip: {
@ -83,7 +83,7 @@ const VoltageTrend = ({ user, voltagePumpId, pumpList, setVoltagePumpId, data })
type: 'category',
// name: "时间",
boundaryGap: false,
data: time?.map(v => moment(v.time).format('MM-DD HH:mm')) || []
data: time?.map(v => moment(v).format('MM-DD HH:mm')) || []
},
yAxis: {
type: 'value',

6
web/client/src/sections/bigScreen/components/realTime/below.js

@ -225,11 +225,11 @@ const Below = ({ dispatch, actions, stations, level }) => {
dataZoom: [
{
type: 'slider',
// startValue: depthWater?.map(v=>v.time)
showDetail: false
},
{
type: 'inside',
showDetail: false
},
],
tooltip: {
@ -424,7 +424,7 @@ const Below = ({ dispatch, actions, stations, level }) => {
},
yAxis: {
type: 'value',
name: "单位:kwh",
name: "单位:kWh",
areaStyle: {
color: '#FFF',
},

6
web/client/src/sections/bigScreen/components/realTime/general.js

@ -187,7 +187,7 @@ const General = ({ dispatch, actions, stations }) => {
<div style={{ lineHeight: "36px", color: '#E2F8FF', fontSize: 20., textIndent: 20, fontFamily: 'YouSheBiaoTiHei', fontSizeL: '1rem' }}>用电概况</div>
<div style={{ display: "flex", justifyContent: 'space-between', width: 200 }}>
{['本日', "本月", '本年'].map(v => <div style={{
width: 60, height: 20, color: interval == v ? "#24DCF7" : '#00A9FF', border: '1px solid',
width: 60, height: 20, lineHeight: "18px", color: interval == v ? "#24DCF7" : '#00A9FF', border: '1px solid',
background: interval == v ? "#5bc1ff33" : "#236cfe4d", textAlign: "center", cursor: 'pointer'
}} onClick={() => {
setInterval(v)
@ -206,7 +206,7 @@ const General = ({ dispatch, actions, stations }) => {
"当日用电" : interval == '本月' ?
"当月用电" : interval == '本年' ?
"当年用电" : ""}</div>
<div style={{ fontFamily: 'D-DIN-Italic' }}>{electro?.now.toFixed(2)} kwh</div>
<div style={{ fontFamily: 'D-DIN-Italic' }}>{electro?.now.toFixed(2)} kWh</div>
</div>
</div>
<div style={{ width: 150, height: 56, display: "flex", background: 'linear-gradient(90deg, #023E70 0%, #023e7000 100%)' }}>
@ -216,7 +216,7 @@ const General = ({ dispatch, actions, stations }) => {
"昨日用电" : interval == '本月' ?
"上月用电" : interval == '本年' ?
"上年用电" : ""}</div>
<div style={{ fontFamily: 'D-DIN-Italic' }}>{electro?.before?.toFixed(2)} kwh</div>
<div style={{ fontFamily: 'D-DIN-Italic' }}>{electro?.before?.toFixed(2)} kWh</div>
</div>
</div>
</div>

2
web/client/src/sections/bigScreen/components/realTime/softStart.js

@ -23,7 +23,7 @@ const SoftStart = ({ user, softStartData }) => {
<div style={{ lineHeight: "36px", color: '#E2F8FF', fontSize: 20., textIndent: 20, fontFamily: 'YouSheBiaoTiHei', fontSizeL: '1rem' }}>软启动总用电量</div>
</div>
<div style={{ width: '100%', height: 'calc(100% - 36px)', backgroundImage: "linear-gradient(180deg, #000e28e6 1%, #021f48cc 100%)" }}>
<div style={{ padding: "16px 20px" }}>单位kwh</div>
<div style={{ padding: "16px 20px" }}>单位kWh</div>
<div style={{ display: "flex", alignItems: "center", justifyContent: 'center', width: '100%', height: "calc(100% - 54px)" }}>
{softStartData?.length > 0 && <>
<img style={{ width: 24, height: 24 }} src="/assets/images/realTime/left-p.png"

1
web/client/src/utils/webapi.js

@ -22,6 +22,7 @@ export const ApiTable = {
axyData: 'axyData', //安心云数据
pumpInformation:'pumpInformation'
};

Loading…
Cancel
Save