提交 5ba6e605 编写于 作者: nengyuangzhang's avatar nengyuangzhang

updated energy storage power station dashboard

上级 30f814da
......@@ -189,7 +189,7 @@ class Reporting:
meta_result = {"id": row[0],
"name": row[1],
"uuid": row[2],
"value": Decimal(10.0)}
"value": Decimal(0.0)}
charge_ranking.append(meta_result)
discharge_ranking = list()
......@@ -198,7 +198,7 @@ class Reporting:
meta_result = {"id": row[0],
"name": row[1],
"uuid": row[2],
"value": Decimal(10.0)}
"value": Decimal(0.0)}
discharge_ranking.append(meta_result)
revenue_ranking = list()
......@@ -207,7 +207,7 @@ class Reporting:
meta_result = {"id": row[0],
"name": row[1],
"uuid": row[2],
"value": Decimal(10.0)}
"value": Decimal(0.0)}
revenue_ranking.append(meta_result)
################################################################################################################
......@@ -253,9 +253,9 @@ class Reporting:
result['energy_storage_power_stations'] = energy_storage_power_station_list
result['charge_ranking'] = charge_ranking
result['total_charge'] = Decimal(30.0)
result['total_charge'] = Decimal(0.0)
result['discharge_ranking'] = discharge_ranking
result['total_discharge'] = Decimal(30.0)
result['total_discharge'] = Decimal(0.0)
result['revenue_ranking'] = revenue_ranking
result['total_revenue'] = Decimal(30.0)
result['total_revenue'] = Decimal(0.0)
resp.text = json.dumps(result)
......@@ -228,22 +228,22 @@ const Dashboard = ({ setRedirect, setRedirectUrl, t }) => {
<Spinner color="info" hidden={spinnerHidden} />
<Spinner color="light" hidden={spinnerHidden} />
<CardSummary rate={''} title={'Number of Power Stations'} footunit={''} color="info">
<CardSummary rate={''} title={t('Number of Power Stations')} footunit={''} color="info">
{1 && <CountUp end={energyStoragePowerStationList.length} duration={2} prefix="" separator="," decimal="." decimals={0} />}
</CardSummary>
<CardSummary rate={''} title={'Total Rated Power'} footunit={'kW'} color="info">
<CardSummary rate={''} title={t('Total Rated Power')} footunit={'kW'} color="info">
{1 && <CountUp end={totalRatedCapacity} duration={2} prefix="" separator="," decimal="." decimals={2} />}
</CardSummary>
<CardSummary rate={''} title={'Total Rated Capacity'} footunit={'kWh'} color="info">
<CardSummary rate={''} title={t('Total Rated Capacity')} footunit={'kWh'} color="info">
{1 && <CountUp end={totalRatedPower} duration={2} prefix="" separator="," decimal="." decimals={2} />}
</CardSummary>
<CardSummary rate={''} title={'Total Charge'} footunit={'kWh'} color="warning">
<CardSummary rate={''} title={t('Total Charge')} footunit={'kWh'} color="warning">
{1 && <CountUp end={totalCharge} duration={2} prefix="" separator="," decimal="." decimals={2} />}
</CardSummary>
<CardSummary rate={''} title={'Total Discharge'} footunit={'kWh'} color="warning">
<CardSummary rate={''} title={t('Total Discharge')} footunit={'kWh'} color="warning">
{1 && <CountUp end={totalDischarge} duration={2} prefix="" separator="," decimal="." decimals={2} />}
</CardSummary>
<CardSummary rate={''} title={'Total Revenue'} footunit={currency} color="success">
<CardSummary rate={''} title={t('Total Revenue')} footunit={currency} color="success">
{1 && <CountUp end={totalRevenue} duration={2} prefix="" separator="," decimal="." decimals={2} />}
</CardSummary>
</div>
......
......@@ -4,21 +4,21 @@ import BootstrapTable from 'react-bootstrap-table-next';
const columns = [
{
dataField: 'name',
text: 'Name',
text: '名称',
classes: 'border-0 align-middle',
headerClasses: 'border-0',
sort: false
},
{
dataField: 'value',
text: 'Value',
text: '数值',
classes: 'border-0 align-middle',
headerClasses: 'border-0',
sort: true,
},
{
dataField: 'unit',
text: 'Unit',
text: '单位',
classes: 'border-0 align-middle',
headerClasses: 'border-0',
sort: false,
......
......@@ -35,8 +35,6 @@ import AppContext from '../../../context/Context';
import { Link, useLocation } from 'react-router-dom';
import DateRangePickerWrapper from '../common/DateRangePickerWrapper';
const DetailedDataTable = loadable(() => import('../common/DetailedDataTable'));
const EnergyStoragePowerStationReporting = ({ setRedirect, setRedirectUrl, t }) => {
let current_moment = moment();
const location = useLocation();
......
......@@ -58,7 +58,7 @@ const powerFormatter = amount => <Fragment>{amount} kW</Fragment>;
const columns = [
{
dataField: 'name',
text: 'Name',
text: '名称',
formatter: customerFormatter,
classes: 'border-0 align-middle',
headerClasses: 'border-0',
......@@ -66,14 +66,14 @@ const columns = [
},
{
dataField: 'address',
text: 'Address',
text: '地址',
classes: 'border-0 align-middle',
headerClasses: 'border-0',
sort: true
},
{
dataField: 'rated_capacity',
text: 'Rated Capacity',
text: '额定容量',
formatter: capacityFormatter,
classes: 'border-0 align-middle',
headerClasses: 'border-0',
......@@ -81,7 +81,7 @@ const columns = [
},
{
dataField: 'rated_power',
text: 'Rated Power',
text: '额定功率',
formatter: powerFormatter,
classes: 'border-0 align-middle',
headerClasses: 'border-0',
......@@ -89,7 +89,7 @@ const columns = [
},
{
dataField: 'status',
text: 'Status',
text: '状态',
formatter: badgeFormatter,
classes: 'border-0 align-middle fs-0',
headerClasses: 'border-0',
......@@ -191,7 +191,7 @@ const EnergyStoragePowerStationTable = ({ setIsSelected, energyStoragePowerStati
className="px-0 font-weight-semi-bold"
onClick={() => handleViewAll(paginationProps, energyStoragePowerStationList.length)}
>
view all
全部
</ButtonIcon>
</Col>
<Col xs="auto" className="pr-3">
......@@ -202,7 +202,7 @@ const EnergyStoragePowerStationTable = ({ setIsSelected, energyStoragePowerStati
disabled={paginationProps.page === 1}
className="px-4"
>
Previous
前一页
</Button>
<Button
color={lastIndex >= paginationProps.totalSize ? 'light' : 'primary'}
......@@ -211,7 +211,7 @@ const EnergyStoragePowerStationTable = ({ setIsSelected, energyStoragePowerStati
disabled={lastIndex >= paginationProps.totalSize}
className="px-4 ml-2"
>
Next
下一页
</Button>
</Col>
</Row>
......
......@@ -4,12 +4,12 @@ import FalconCardHeader from '../../common/FalconCardHeader';
import { InputGroup, CustomInput, Button, Card, CardBody } from 'reactstrap';
import ButtonIcon from '../../common/ButtonIcon';
const EnergyStoragePowerStationTableCard = ({ energyStoragePowerStationList }) => {
const EnergyStoragePowerStationTableCard = ({ energyStoragePowerStationList, t }) => {
const [isSelected, setIsSelected] = useState(false);
return (
<Card className="mb-3">
<FalconCardHeader title="Energy Storage Power Station List" light={false}>
<FalconCardHeader title="储能电站列表" light={false}>
{isSelected ? (
<InputGroup size="sm" className="input-group input-group-sm">
<CustomInput type="select" id="bulk-select">
......@@ -24,7 +24,7 @@ const EnergyStoragePowerStationTableCard = ({ energyStoragePowerStationList }) =
</InputGroup>
) : (
<>
<ButtonIcon icon="plus" transform="shrink-3 down-2" color="falcon-default" size="sm">
{/* <ButtonIcon icon="plus" transform="shrink-3 down-2" color="falcon-default" size="sm">
New
</ButtonIcon>
<ButtonIcon icon="filter" transform="shrink-3 down-2" color="falcon-default" size="sm" className="mx-2">
......@@ -32,7 +32,7 @@ const EnergyStoragePowerStationTableCard = ({ energyStoragePowerStationList }) =
</ButtonIcon>
<ButtonIcon icon="external-link-alt" transform="shrink-3 down-2" color="falcon-default" size="sm">
Export
</ButtonIcon>
</ButtonIcon> */}
</>
)}
</FalconCardHeader>
......
......@@ -12354,7 +12354,7 @@ const resources = {
'Charge Start Time': 'Muat Waktu Mula',
'Charge End Time': 'Waktu Akhir Muat',
'Discharge Start Time': 'Buang Waktu Mula',
'Discharge End Time': 'Waktu Akhir Buan
'Discharge End Time': 'Waktu Akhir Buan',
'Total Rated Power': 'Total Rated Power',
'Total Rated Capacity': 'Total Rated Capacity',
'Total Charge': 'Total Charge',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册