forked from CITKParus/P8-Panels
WEB APP: Панель "Графики проектов" - адаптивная верстка на всю площадь экрана, стили полос прокрутки по-умолчанию
This commit is contained in:
parent
97472bec14
commit
b490e07d19
@ -9,6 +9,8 @@
|
||||
|
||||
import React, { useState, useContext, useCallback, useEffect } from "react"; //Классы React
|
||||
import { Grid, Box } from "@mui/material"; //Интерфейсные элементы
|
||||
import { APP_BAR_HEIGHT } from "../../components/p8p_app_workspace"; //Заголовок страницы
|
||||
import { APP_STYLES } from "../../../app.styles"; //Типовые стили
|
||||
import { P8PDataGrid, P8P_DATA_GRID_SIZE } from "../../components/p8p_data_grid"; //Таблица данных
|
||||
import { P8P_DATA_GRID_CONFIG_PROPS } from "../../config_wrapper"; //Подключение компонентов к настройкам приложения
|
||||
import { ApplicationСtx } from "../../context/application"; //Контекст приложения
|
||||
@ -21,7 +23,7 @@ import { dataCellRender, groupCellRender } from "./layouts"; //Дополнит
|
||||
|
||||
//Стили
|
||||
const STYLES = {
|
||||
DATA_GRID_CONTAINER: { minWidth: "95vw", maxWidth: "95vw", minHeight: "87vh", maxHeight: "87vh" }
|
||||
DATA_GRID_CONTAINER: { height: `calc(100vh - ${APP_BAR_HEIGHT})`, width: "100vw", ...APP_STYLES.SCROLL }
|
||||
};
|
||||
|
||||
//-----------
|
||||
@ -71,32 +73,30 @@ const PrjGraph = () => {
|
||||
|
||||
//Генерация содержимого
|
||||
return (
|
||||
<div>
|
||||
<Grid container spacing={1}>
|
||||
<Grid item xs={12}>
|
||||
<Box pt={1} display="flex" justifyContent="center" alignItems="center">
|
||||
{dataGrid.dataLoaded ? (
|
||||
<P8PDataGrid
|
||||
{...P8P_DATA_GRID_CONFIG_PROPS}
|
||||
columnsDef={dataGrid.columnsDef}
|
||||
groups={dataGrid.groups}
|
||||
rows={dataGrid.rows}
|
||||
size={P8P_DATA_GRID_SIZE.LARGE}
|
||||
reloading={dataGrid.reload}
|
||||
fixedHeader={dataGrid.fixedHeader}
|
||||
fixedColumns={dataGrid.fixedColumns}
|
||||
dataCellRender={prms => dataCellRender({ ...prms, pOnlineShowDocument })}
|
||||
groupCellRender={prms => groupCellRender({ ...prms, pOnlineShowDocument })}
|
||||
containerComponentProps={{
|
||||
elevation: 3,
|
||||
sx: STYLES.DATA_GRID_CONTAINER
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
</Box>
|
||||
</Grid>
|
||||
<Grid container>
|
||||
<Grid item xs={12}>
|
||||
<Box display="flex" justifyContent="center" alignItems="center">
|
||||
{dataGrid.dataLoaded ? (
|
||||
<P8PDataGrid
|
||||
{...P8P_DATA_GRID_CONFIG_PROPS}
|
||||
columnsDef={dataGrid.columnsDef}
|
||||
groups={dataGrid.groups}
|
||||
rows={dataGrid.rows}
|
||||
size={P8P_DATA_GRID_SIZE.LARGE}
|
||||
reloading={dataGrid.reload}
|
||||
fixedHeader={dataGrid.fixedHeader}
|
||||
fixedColumns={dataGrid.fixedColumns}
|
||||
dataCellRender={prms => dataCellRender({ ...prms, pOnlineShowDocument })}
|
||||
groupCellRender={prms => groupCellRender({ ...prms, pOnlineShowDocument })}
|
||||
containerComponentProps={{
|
||||
elevation: 0,
|
||||
sx: STYLES.DATA_GRID_CONTAINER
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
</Box>
|
||||
</Grid>
|
||||
</div>
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user