| @@ -17,7 +17,7 @@ | |||||
| <div class="rounded-border" style="color: #ff0200">#1</div> | <div class="rounded-border" style="color: #ff0200">#1</div> | ||||
| <lj-car-ag-grid-component | <lj-car-ag-grid-component | ||||
| style="width: 100%; height: 14.5rem" | |||||
| style="width: 100%; height: 13.5rem" | |||||
| [defaultColDef]="defaultColDef" | [defaultColDef]="defaultColDef" | ||||
| [rowData]="rowData1" | [rowData]="rowData1" | ||||
| [columnDefs]="colDefs1" | [columnDefs]="colDefs1" | ||||
| @@ -27,7 +27,7 @@ | |||||
| <div class="grid-item"> | <div class="grid-item"> | ||||
| <div class="rounded-border" style="color: #25f551">#2</div> | <div class="rounded-border" style="color: #25f551">#2</div> | ||||
| <lj-car-ag-grid-component | <lj-car-ag-grid-component | ||||
| style="width: 100%; height: 14.5rem" | |||||
| style="width: 100%; height: 13.5rem" | |||||
| [defaultColDef]="defaultColDef" | [defaultColDef]="defaultColDef" | ||||
| [rowData]="rowData1" | [rowData]="rowData1" | ||||
| [columnDefs]="colDefs1" | [columnDefs]="colDefs1" | ||||
| @@ -37,7 +37,7 @@ | |||||
| <div class="grid-item"> | <div class="grid-item"> | ||||
| <div class="rounded-border" style="color: #ff0200">#3</div> | <div class="rounded-border" style="color: #ff0200">#3</div> | ||||
| <lj-car-ag-grid-component | <lj-car-ag-grid-component | ||||
| style="width: 100%; height: 14.5rem" | |||||
| style="width: 100%; height: 13.5rem" | |||||
| [defaultColDef]="defaultColDef" | [defaultColDef]="defaultColDef" | ||||
| [rowData]="rowData1" | [rowData]="rowData1" | ||||
| [columnDefs]="colDefs1" | [columnDefs]="colDefs1" | ||||
| @@ -47,7 +47,7 @@ | |||||
| <div class="grid-item"> | <div class="grid-item"> | ||||
| <div class="rounded-border" style="color: #bbbbbb">#4</div> | <div class="rounded-border" style="color: #bbbbbb">#4</div> | ||||
| <lj-car-ag-grid-component | <lj-car-ag-grid-component | ||||
| style="width: 100%; height: 14.5rem" | |||||
| style="width: 100%; height: 13.5rem" | |||||
| [defaultColDef]="defaultColDef" | [defaultColDef]="defaultColDef" | ||||
| [rowData]="rowData1" | [rowData]="rowData1" | ||||
| [columnDefs]="colDefs1" | [columnDefs]="colDefs1" | ||||
| @@ -1,4 +1,4 @@ | |||||
| <div class="card-content"> | |||||
| <div class="card-content" style="overflow: hidden"> | |||||
| <div class="card-top-content"> | <div class="card-top-content"> | ||||
| <div class="card-content-title"> | <div class="card-content-title"> | ||||
| <div class="card-content-l">{{ title }}</div> | <div class="card-content-l">{{ title }}</div> | ||||
| @@ -7,15 +7,14 @@ | |||||
| [defaultColDef]="defaultColDef" | [defaultColDef]="defaultColDef" | ||||
| [rowData]="runInfoRowData" | [rowData]="runInfoRowData" | ||||
| [columnDefs]="colDefs0" | [columnDefs]="colDefs0" | ||||
| [gridThemeClass]="gridThemedClass" | |||||
| /> | /> | ||||
| <lj-app-ag-grid-component | <lj-app-ag-grid-component | ||||
| style="width: 100%" | style="width: 100%" | ||||
| [heightNum]="11" | |||||
| title="系统报警信息" | title="系统报警信息" | ||||
| [defaultColDef]="defaultColDef" | [defaultColDef]="defaultColDef" | ||||
| [rowData]="systemWarnInfoRowData" | [rowData]="systemWarnInfoRowData" | ||||
| [columnDefs]="colDefs1" | [columnDefs]="colDefs1" | ||||
| [gridThemeClass]="gridThemedClass" | |||||
| /> | /> | ||||
| </div> | </div> | ||||
| @@ -67,7 +66,6 @@ | |||||
| [defaultColDef]="defaultColDef" | [defaultColDef]="defaultColDef" | ||||
| [rowData]="todayRowData" | [rowData]="todayRowData" | ||||
| [columnDefs]="colDefs2" | [columnDefs]="colDefs2" | ||||
| [gridThemeClass]="gridThemedClass" | |||||
| /> | /> | ||||
| </div> | </div> | ||||
| @@ -25,154 +25,154 @@ | |||||
| @import "../../../..//styles/variables.less"; | @import "../../../..//styles/variables.less"; | ||||
| /* 分页器 */ | /* 分页器 */ | ||||
| .ag-header-center .ag-header-group-cell-label, | |||||
| .ag-header-center .ag-header-cell-label { | |||||
| // .ag-header-center .ag-header-group-cell-label, | |||||
| // .ag-header-center .ag-header-cell-label { | |||||
| justify-content: center; | |||||
| color: #000; | |||||
| text-align: center; | |||||
| background: #000; | |||||
| // justify-content: center; | |||||
| // color: #000; | |||||
| // text-align: center; | |||||
| // background: #000; | |||||
| } | |||||
| // } | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-row-selected .ag-ltr .ag-cell { | |||||
| color: red !important; | |||||
| } | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-row-selected .ag-ltr .ag-cell { | |||||
| // color: red !important; | |||||
| // } | |||||
| // 选中行样式 | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-ltr .ag-row-focus { | |||||
| font-weight: 600; | |||||
| color: red; | |||||
| // // 选中行样式 | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-ltr .ag-row-focus { | |||||
| // font-weight: 600; | |||||
| // color: red; | |||||
| .ag-cell-focus { | |||||
| border: #74FAFB; | |||||
| } | |||||
| // .ag-cell-focus { | |||||
| // border: #74FAFB; | |||||
| // } | |||||
| .ag-grid-button-style { | |||||
| color: red; | |||||
| border-color: red; | |||||
| } | |||||
| } | |||||
| // .ag-grid-button-style { | |||||
| // color: red; | |||||
| // border-color: red; | |||||
| // } | |||||
| // } | |||||
| ::ng-deep .ag-theme-datav { | |||||
| // ::ng-deep .ag-theme-datav { | |||||
| --ag-border-color: #74FAFB; | |||||
| --ag-foreground-color: #74FAFB; | |||||
| --ag-background-color: #0A1632; | |||||
| --ag-header-foreground-color: #74FAFB; | |||||
| --ag-header-background-color: #0A1632; | |||||
| --ag-odd-row-background-color: #0A1632; | |||||
| --ag-header-column-resize-handle-color: rgb(126 46 132); | |||||
| .px2rem(12,--ag-font-size); | |||||
| --ag-font-family: monospace; | |||||
| // --ag-border-color: #74FAFB; | |||||
| // --ag-foreground-color: #74FAFB; | |||||
| // --ag-background-color: #0A1632; | |||||
| // --ag-header-foreground-color: #74FAFB; | |||||
| // --ag-header-background-color: #0A1632; | |||||
| // --ag-odd-row-background-color: #0A1632; | |||||
| // --ag-header-column-resize-handle-color: rgb(126 46 132); | |||||
| // .px2rem(12,--ag-font-size); | |||||
| // --ag-font-family: monospace; | |||||
| height: 17rem; | |||||
| font-weight: 700; | |||||
| //竖线颜色 | |||||
| .px2rem(3,border-width); | |||||
| &:extend(.ag-theme-material); | |||||
| // height: 17rem; | |||||
| // font-weight: 700; | |||||
| // //竖线颜色 | |||||
| // .px2rem(3,border-width); | |||||
| // &:extend(.ag-theme-material); | |||||
| //标题间的 竖线 | |||||
| ::ng-deep .ag-header-cell-resize { | |||||
| --ag-header-column-resize-handle-color: transparent; | |||||
| } | |||||
| // //标题间的 竖线 | |||||
| // ::ng-deep .ag-header-cell-resize { | |||||
| // --ag-header-column-resize-handle-color: transparent; | |||||
| // } | |||||
| ::ng-deep .ag-header-row { | |||||
| .px2rem(13.5,font-size); | |||||
| font-weight: 700; | |||||
| } | |||||
| // ::ng-deep .ag-header-row { | |||||
| // .px2rem(13.5,font-size); | |||||
| // font-weight: 700; | |||||
| // } | |||||
| //外边框去掉圆角 | |||||
| ::ng-deep .ag-root-wrapper { | |||||
| border-radius: 0; | |||||
| } | |||||
| } | |||||
| // //外边框去掉圆角 | |||||
| // ::ng-deep .ag-root-wrapper { | |||||
| // border-radius: 0; | |||||
| // } | |||||
| // } | |||||
| /* 设置滚动条的宽度 */ | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar { | |||||
| width: 12em; | |||||
| // /* 设置滚动条的宽度 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar { | |||||
| // width: 12em; | |||||
| } | |||||
| // } | |||||
| /* 设置滚动条滑块的样式 */ | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb { | |||||
| .px2rem(40, margin-left); | |||||
| background-color: #00eff8; | |||||
| // /* 设置滚动条滑块的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb { | |||||
| // .px2rem(40, margin-left); | |||||
| // background-color: #00eff8; | |||||
| /* 圆角 */ | |||||
| border: solid #00eff8; | |||||
| .px2rem(2,border-width) ; | |||||
| /* 滚动条滑块的背景颜色 */ | |||||
| // /* 圆角 */ | |||||
| // border: solid #00eff8; | |||||
| // .px2rem(2,border-width) ; | |||||
| // /* 滚动条滑块的背景颜色 */ | |||||
| /* 滚动条滑块的边框 */ | |||||
| } | |||||
| // /* 滚动条滑块的边框 */ | |||||
| // } | |||||
| /* 设置滚动条轨道的样式 */ | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-track { | |||||
| background-color: transparent; | |||||
| border-color: #00eff8; | |||||
| // /* 设置滚动条轨道的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-track { | |||||
| // background-color: transparent; | |||||
| // border-color: #00eff8; | |||||
| /* 滚动条轨道的背景颜色 */ | |||||
| } | |||||
| // /* 滚动条轨道的背景颜色 */ | |||||
| // } | |||||
| /* 设置滚动条滑块悬浮时的样式 */ | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb:hover { | |||||
| .px2rem(40,margin-left); | |||||
| background-color: #00eff8; | |||||
| // /* 设置滚动条滑块悬浮时的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb:hover { | |||||
| // .px2rem(40,margin-left); | |||||
| // background-color: #00eff8; | |||||
| /* 滚动条滑块悬浮时的背景颜色 */ | |||||
| } | |||||
| // /* 滚动条滑块悬浮时的背景颜色 */ | |||||
| // } | |||||
| /* 设置滚动条滑块激活(即正在拖动滑块)时的样式 */ | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb:active { | |||||
| background-color: #00eff8; | |||||
| // /* 设置滚动条滑块激活(即正在拖动滑块)时的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb:active { | |||||
| // background-color: #00eff8; | |||||
| /* 滚动条滑块激活时的背景颜色 */ | |||||
| } | |||||
| // /* 滚动条滑块激活时的背景颜色 */ | |||||
| // } | |||||
| //竖向 | |||||
| ::ng-deep .ag-body-vertical-scroll-viewport { | |||||
| scrollbar-color: auto; | |||||
| } | |||||
| // //竖向 | |||||
| // ::ng-deep .ag-body-vertical-scroll-viewport { | |||||
| // scrollbar-color: auto; | |||||
| // } | |||||
| //横向 | |||||
| ::ng-deep .ag-body-horizontal-scroll-viewport { | |||||
| scrollbar-color: auto; | |||||
| } | |||||
| // //横向 | |||||
| // ::ng-deep .ag-body-horizontal-scroll-viewport { | |||||
| // scrollbar-color: auto; | |||||
| // } | |||||
| /* 设置滚动条的宽度 */ | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar { | |||||
| height: 14em; | |||||
| color: #000; | |||||
| } | |||||
| // /* 设置滚动条的宽度 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar { | |||||
| // height: 14em; | |||||
| // color: #000; | |||||
| // } | |||||
| /* 设置横向滚动条轨道的样式 */ | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track { | |||||
| background-color: transparent; | |||||
| border-color: #00eff8; | |||||
| } | |||||
| // /* 设置横向滚动条轨道的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track { | |||||
| // background-color: transparent; | |||||
| // border-color: #00eff8; | |||||
| // } | |||||
| /* 设置横向滚动条滑块悬浮时的样式 */ | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:hover { | |||||
| background-color: #00eff8; | |||||
| } | |||||
| // /* 设置横向滚动条滑块悬浮时的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:hover { | |||||
| // background-color: #00eff8; | |||||
| // } | |||||
| /* 设置横向滚动条滑块激活时的样式 */ | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:active { | |||||
| background-color: #00eff8; | |||||
| } | |||||
| // /* 设置横向滚动条滑块激活时的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:active { | |||||
| // background-color: #00eff8; | |||||
| // } | |||||
| /* 设置横向滚动条滑块的颜色 */ | |||||
| ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb { | |||||
| background-color: #00eff8; | |||||
| } | |||||
| // /* 设置横向滚动条滑块的颜色 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb { | |||||
| // background-color: #00eff8; | |||||
| // } | |||||
| /* button-component.component.css */ | /* button-component.component.css */ | ||||
| .button-container { | .button-container { | ||||
| @@ -93,9 +93,9 @@ export class DataVSecond1Component implements OnInit { | |||||
| headerClass: 'head-class', | headerClass: 'head-class', | ||||
| field: 'time', | field: 'time', | ||||
| autoHeaderHeight: true, | autoHeaderHeight: true, | ||||
| width: 130, | |||||
| // width: 130, | |||||
| // flex: 1, | |||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'text-align': 'start', | 'text-align': 'start', | ||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| @@ -108,9 +108,8 @@ export class DataVSecond1Component implements OnInit { | |||||
| field: 'option', | field: 'option', | ||||
| headerClass: 'head-class', | headerClass: 'head-class', | ||||
| autoHeaderHeight: true, | autoHeaderHeight: true, | ||||
| width: 70, | |||||
| // width: 70, | |||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'text-align': 'start', | 'text-align': 'start', | ||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| @@ -120,11 +119,10 @@ export class DataVSecond1Component implements OnInit { | |||||
| }, | }, | ||||
| { | { | ||||
| headerName: '操作描述', | headerName: '操作描述', | ||||
| width: 130, | |||||
| // width: 130, | |||||
| autoHeaderHeight: true, | autoHeaderHeight: true, | ||||
| field: 'optionDesc', | field: 'optionDesc', | ||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'text-align': 'start', | 'text-align': 'start', | ||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| @@ -134,11 +132,10 @@ export class DataVSecond1Component implements OnInit { | |||||
| }, | }, | ||||
| { | { | ||||
| headerName: '操作人员', | headerName: '操作人员', | ||||
| width: 130, | |||||
| // width: 130, | |||||
| field: 'optionMan', | field: 'optionMan', | ||||
| autoHeaderHeight: true, | autoHeaderHeight: true, | ||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'text-align': 'start', | 'text-align': 'start', | ||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| @@ -152,9 +149,8 @@ export class DataVSecond1Component implements OnInit { | |||||
| { | { | ||||
| headerName: '序号', | headerName: '序号', | ||||
| field: 'sort', | field: 'sort', | ||||
| width: 70, | |||||
| // width: 70, | |||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'text-align': 'start', | 'text-align': 'start', | ||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| @@ -165,9 +161,8 @@ export class DataVSecond1Component implements OnInit { | |||||
| { | { | ||||
| headerName: '时间', | headerName: '时间', | ||||
| field: 'time', | field: 'time', | ||||
| width: 140, | |||||
| // width: 140, | |||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'text-align': 'start', | 'text-align': 'start', | ||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| @@ -178,10 +173,9 @@ export class DataVSecond1Component implements OnInit { | |||||
| { | { | ||||
| headerName: '任务描述', | headerName: '任务描述', | ||||
| width: 130, | |||||
| // width: 130, | |||||
| field: 'taskDesc', | field: 'taskDesc', | ||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'text-align': 'start', | 'text-align': 'start', | ||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| @@ -191,11 +185,10 @@ export class DataVSecond1Component implements OnInit { | |||||
| }, | }, | ||||
| { | { | ||||
| headerName: '等级', | headerName: '等级', | ||||
| width: 70, | |||||
| // width: 70, | |||||
| field: 'level', | field: 'level', | ||||
| autoHeaderHeight: true, | autoHeaderHeight: true, | ||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'text-align': 'start', | 'text-align': 'start', | ||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| @@ -208,26 +201,23 @@ export class DataVSecond1Component implements OnInit { | |||||
| { | { | ||||
| headerName: '', | headerName: '', | ||||
| minWidth: 130, | |||||
| // minWidth: 130, | |||||
| field: 'rwmc', | field: 'rwmc', | ||||
| flex: 1, | |||||
| cellStyle: { | |||||
| 'font-size': '0.9rem', | |||||
| 'padding-top': '0px', | |||||
| 'padding-right': '0px', | |||||
| 'padding-bottom': '0px', | |||||
| 'padding-left': '18px', | |||||
| color: '#75F9FD' | |||||
| } | |||||
| flex: 1 | |||||
| // cellStyle: { | |||||
| // 'padding-top': '0px', | |||||
| // 'padding-right': '0px', | |||||
| // 'padding-bottom': '0px', | |||||
| // 'padding-left': '18px', | |||||
| // color: '#75F9FD' | |||||
| // } | |||||
| }, | }, | ||||
| { | { | ||||
| headerName: '1#重磅', | headerName: '1#重磅', | ||||
| minWidth: 60, | |||||
| // minWidth: 60, | |||||
| field: 'one', | field: 'one', | ||||
| flex: 1, | flex: 1, | ||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| 'padding-bottom': '0px', | 'padding-bottom': '0px', | ||||
| @@ -237,11 +227,10 @@ export class DataVSecond1Component implements OnInit { | |||||
| }, | }, | ||||
| { | { | ||||
| headerName: '2#重磅', | headerName: '2#重磅', | ||||
| minWidth: 60, | |||||
| // minWidth: 60, | |||||
| field: 'two', | field: 'two', | ||||
| flex: 1, | flex: 1, | ||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| 'padding-bottom': '0px', | 'padding-bottom': '0px', | ||||
| @@ -250,11 +239,10 @@ export class DataVSecond1Component implements OnInit { | |||||
| }, | }, | ||||
| { | { | ||||
| headerName: '3#重磅', | headerName: '3#重磅', | ||||
| minWidth: 60, | |||||
| // minWidth: 60, | |||||
| field: 'three', | field: 'three', | ||||
| flex: 1, | flex: 1, | ||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| 'padding-bottom': '0px', | 'padding-bottom': '0px', | ||||
| @@ -263,11 +251,10 @@ export class DataVSecond1Component implements OnInit { | |||||
| }, | }, | ||||
| { | { | ||||
| headerName: '4#重磅', | headerName: '4#重磅', | ||||
| minWidth: 60, | |||||
| // minWidth: 60, | |||||
| field: 'four', | field: 'four', | ||||
| flex: 1, | flex: 1, | ||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| 'padding-bottom': '0px', | 'padding-bottom': '0px', | ||||
| @@ -276,12 +263,11 @@ export class DataVSecond1Component implements OnInit { | |||||
| }, | }, | ||||
| { | { | ||||
| headerName: '汇总', | headerName: '汇总', | ||||
| minWidth: 60, | |||||
| // minWidth: 60, | |||||
| autoHeaderHeight: true, | autoHeaderHeight: true, | ||||
| field: 'all', | field: 'all', | ||||
| flex: 1, | flex: 1, | ||||
| cellStyle: { | cellStyle: { | ||||
| 'font-size': '0.9rem', | |||||
| 'padding-top': '0px', | 'padding-top': '0px', | ||||
| 'padding-right': '0px', | 'padding-right': '0px', | ||||
| 'padding-bottom': '0px', | 'padding-bottom': '0px', | ||||
| @@ -16,15 +16,20 @@ | |||||
| <ag-grid-angular | <ag-grid-angular | ||||
| #myGrid | #myGrid | ||||
| [ngStyle]="{ height: heightNum == 0 ? 'none' : heightNum + 'rem', flex: heightNum == 0 ? '1' : 'none' }" | [ngStyle]="{ height: heightNum == 0 ? 'none' : heightNum + 'rem', flex: heightNum == 0 ? '1' : 'none' }" | ||||
| [class]="gridThemeClass" | |||||
| (gridReady)="onGridReady($event)" | |||||
| class="ag-theme-quartz ag-theme-acmecorp" | |||||
| [suppressPaginationPanel]="true" | [suppressPaginationPanel]="true" | ||||
| domLayout="print" | |||||
| [suppressPaginationPanel]="true" | [suppressPaginationPanel]="true" | ||||
| [suppressScrollOnNewData]="true" | [suppressScrollOnNewData]="true" | ||||
| [paginationAutoPageSize]="true" | |||||
| [paginationPageSize]="pageSize" | [paginationPageSize]="pageSize" | ||||
| [paginationPageSizeSelector]="paginationPageSizeSelector" | |||||
| [pagination]="true" | |||||
| [defaultColDef]="defaultColDef" | [defaultColDef]="defaultColDef" | ||||
| [rowHeight]="38" | |||||
| [gridOptions]="gridOptions" | [gridOptions]="gridOptions" | ||||
| domLayout="autoHeight" | |||||
| (gridSizeChanged)="onGridSizeChanged($event)" | |||||
| (gridReady)="onGridReady($event)" | |||||
| /> | /> | ||||
| <!-- <app-data-v-lj-table [columns]="tableColumns" [data]="tableData" /> --> | <!-- <app-data-v-lj-table [columns]="tableColumns" [data]="tableData" /> --> | ||||
| <br /> | <br /> | ||||
| @@ -1,9 +1,182 @@ | |||||
| /* Core Grid CSS */ | /* Core Grid CSS */ | ||||
| @import 'ag-grid-community/styles/ag-grid.css'; | @import 'ag-grid-community/styles/ag-grid.css'; | ||||
| @import 'ag-grid-community/styles/ag-theme-quartz.css'; | |||||
| // @import 'ag-grid-community/styles/ag-theme-quartz.css'; | |||||
| @import "../../../../../styles/variables.less"; | @import "../../../../../styles/variables.less"; | ||||
| /* change the font style of a single UI component */ | |||||
| // .ag-theme-quartz .ag-header-cell-label { | |||||
| // font-style: italic; | |||||
| // } | |||||
| // .ag-theme-quartz, .ag-theme-quartz-dark, .ag-theme-quartz-auto-dark { | |||||
| // --ag-active-color: #2196f3; | |||||
| // --ag-background-color: #ADD8E6; /* 淡蓝色背景 */ | |||||
| // } | |||||
| // .ag-header-center .ag-header-group-cell-label, | |||||
| // .ag-header-center .ag-header-cell-label { | |||||
| // justify-content: center; | |||||
| // color: #000; | |||||
| // text-align: center; | |||||
| // background: #000; | |||||
| // } | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-row-selected .ag-ltr .ag-cell { | |||||
| // color: red !important; | |||||
| // } | |||||
| // // 选中行样式 | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-ltr .ag-row-focus { | |||||
| // font-weight: 600; | |||||
| // color: red; | |||||
| // .ag-cell-focus { | |||||
| // border: #74FAFB; | |||||
| // } | |||||
| // .ag-grid-button-style { | |||||
| // color: red; | |||||
| // border-color: red; | |||||
| // } | |||||
| // } | |||||
| .ag-header-center .ag-header-group-cell-label, | |||||
| .ag-header-center .ag-header-cell-label { | |||||
| justify-content: center; | |||||
| color: #000; | |||||
| text-align: center; | |||||
| background: #000; | |||||
| } | |||||
| .head-class { | |||||
| .px2rem(18,font-size); | |||||
| text-align: center; | |||||
| justify-content: center; | |||||
| } | |||||
| .red-background { | |||||
| background-color: red; | |||||
| } | |||||
| // ::ng-deep .ag-theme-datav { | |||||
| // --ag-border-color: #74FAFB; | |||||
| // --ag-foreground-color: #74FAFB; | |||||
| // --ag-background-color: #0A1632; | |||||
| // --ag-header-foreground-color: #74FAFB; | |||||
| // --ag-header-background-color: #0A1632; | |||||
| // --ag-odd-row-background-color: #0A1632; | |||||
| // --ag-header-column-resize-handle-color: rgb(126 46 132); | |||||
| // .px2rem(12,--ag-font-size); | |||||
| // --ag-font-family: monospace; | |||||
| // height: 17rem; | |||||
| // font-weight: 700; | |||||
| // //竖线颜色 | |||||
| // .px2rem(3,border-width); | |||||
| // &:extend(.ag-theme-material); | |||||
| // //标题间的 竖线 | |||||
| // ::ng-deep .ag-header-cell-resize { | |||||
| // --ag-header-column-resize-handle-color: transparent; | |||||
| // } | |||||
| // ::ng-deep .ag-header-row { | |||||
| // .px2rem(13.5,font-size); | |||||
| // font-weight: 700; | |||||
| // } | |||||
| // //外边框去掉圆角 | |||||
| // ::ng-deep .ag-root-wrapper { | |||||
| // border-radius: 0; | |||||
| // } | |||||
| // } | |||||
| // /* 设置滚动条的宽度 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar { | |||||
| // width: 12em; | |||||
| // } | |||||
| // /* 设置滚动条滑块的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb { | |||||
| // .px2rem(40, margin-left); | |||||
| // background-color: #00eff8; | |||||
| // /* 圆角 */ | |||||
| // border: solid #00eff8; | |||||
| // .px2rem(2,border-width) ; | |||||
| // /* 滚动条滑块的背景颜色 */ | |||||
| // /* 滚动条滑块的边框 */ | |||||
| // } | |||||
| // /* 设置滚动条轨道的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-track { | |||||
| // background-color: transparent; | |||||
| // border-color: #00eff8; | |||||
| // /* 滚动条轨道的背景颜色 */ | |||||
| // } | |||||
| // /* 设置滚动条滑块悬浮时的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb:hover { | |||||
| // .px2rem(40,margin-left); | |||||
| // background-color: #00eff8; | |||||
| // /* 滚动条滑块悬浮时的背景颜色 */ | |||||
| // } | |||||
| // /* 设置滚动条滑块激活(即正在拖动滑块)时的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb:active { | |||||
| // background-color: #00eff8; | |||||
| // /* 滚动条滑块激活时的背景颜色 */ | |||||
| // } | |||||
| // //竖向 | |||||
| // ::ng-deep .ag-body-vertical-scroll-viewport { | |||||
| // scrollbar-color: auto; | |||||
| // } | |||||
| // //横向 | |||||
| // ::ng-deep .ag-body-horizontal-scroll-viewport { | |||||
| // scrollbar-color: auto; | |||||
| // } | |||||
| // /* 设置滚动条的宽度 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar { | |||||
| // height: 14em; | |||||
| // color: #000; | |||||
| // } | |||||
| // /* 设置横向滚动条轨道的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track { | |||||
| // background-color: transparent; | |||||
| // border-color: #00eff8; | |||||
| // } | |||||
| // /* 设置横向滚动条滑块悬浮时的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:hover { | |||||
| // background-color: #00eff8; | |||||
| // } | |||||
| // /* 设置横向滚动条滑块激活时的样式 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:active { | |||||
| // background-color: #00eff8; | |||||
| // } | |||||
| // /* 设置横向滚动条滑块的颜色 */ | |||||
| // ::ng-deep .ag-theme-datav ::ng-deep .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb { | |||||
| // background-color: #00eff8; | |||||
| // } | |||||
| .custom-label { | .custom-label { | ||||
| display: inline-block; | display: inline-block; | ||||
| padding: 10px 20px; /* 内边距 */ | padding: 10px 20px; /* 内边距 */ | ||||
| @@ -43,3 +216,62 @@ | |||||
| // .paginationThemeClass{ | // .paginationThemeClass{ | ||||
| // width: 100%; | // width: 100%; | ||||
| // } | // } | ||||
| .ag-theme-acmecorp { | |||||
| --ag-grid-size: 5px; | |||||
| --ag-list-item-height: 20px; | |||||
| // --ag-odd-row-background-color: #aaa; | |||||
| // --ag-subheader-background-color:red !important; | |||||
| --ag-foreground-color: #75F9FD; | |||||
| /* Changes the color of the grid background */ | |||||
| --ag-background-color: #041f3d; | |||||
| --ag-background-color: #041f3d; | |||||
| --ag-header-foreground-color: #75F9FD; | |||||
| --ag-header-background-color: #041f3d; | |||||
| --ag-odd-row-background-color: #041f3d; | |||||
| --ag-header-column-resize-handle-color:#041f3d; | |||||
| //边框 | |||||
| .px2rem(3,border-width); | |||||
| --ag-border-color: #74FAFB; | |||||
| // --ag-font-size: 17px; | |||||
| .px2rem(14,--ag-font-size); | |||||
| --ag--font--color:#75F9FD; | |||||
| color: rgb(117, 249, 253); | |||||
| --ag-font-family: monospace; | |||||
| .ag-header-cell { | |||||
| .px2rem(16,--ag-font-size);; /* 字体大小 */ | |||||
| .ag-body-horizontal-scroll-viewport | |||||
| { | |||||
| margin-right: -8px; | |||||
| } | |||||
| } | |||||
| } | |||||
| .ag-body-horizontal-scroll-viewport | |||||
| { | |||||
| margin-right: -8px; | |||||
| } | |||||
| // 、、滚动条 | |||||
| .my-grid .ag-body-viewport { | |||||
| overflow-y: scroll !important; /* 强制显示滚动条 */ | |||||
| } | |||||
| .my-grid .ag-root-wrapper { | |||||
| overflow: hidden; /* 隐藏根容器的滚动条 */ | |||||
| } | |||||
| .my-grid .ag-body-viewport::-webkit-scrollbar { | |||||
| width: 10px; /* 设置滚动条宽度 */ | |||||
| } | |||||
| .my-grid .ag-body-viewport::-webkit-scrollbar-thumb { | |||||
| background-color: #888; /* 设置滚动条颜色 */ | |||||
| } | |||||
| .my-grid .ag-body-viewport::-webkit-scrollbar-track { | |||||
| background: #f1f1f1; /* 设置滚动条轨道颜色 */ | |||||
| } | |||||
| @@ -1,16 +1,18 @@ | |||||
| import { CommonModule } from '@angular/common'; | import { CommonModule } from '@angular/common'; | ||||
| import { Component, OnInit, ViewChild, Input } from '@angular/core'; | import { Component, OnInit, ViewChild, Input } from '@angular/core'; | ||||
| import { AgGridAngular } from 'ag-grid-angular'; | import { AgGridAngular } from 'ag-grid-angular'; | ||||
| import { ColDef, GridApi, GridOptions } from 'ag-grid-community'; | |||||
| import { ColDef, GridApi, GridOptions, GridSizeChangedEvent } from 'ag-grid-community'; | |||||
| import { NzPaginationModule } from 'ng-zorro-antd/pagination'; | import { NzPaginationModule } from 'ng-zorro-antd/pagination'; | ||||
| // eslint-disable-next-line import/no-unassigned-import | |||||
| import 'ag-grid-community/styles/ag-theme-quartz.css'; | |||||
| import { LJDataVCardComponent } from '../../lj-card/lj-card.component'; | import { LJDataVCardComponent } from '../../lj-card/lj-card.component'; | ||||
| import { TableColumn, DataVLjTableComponent } from '../../lj-table/lj-table.component'; | import { TableColumn, DataVLjTableComponent } from '../../lj-table/lj-table.component'; | ||||
| @Component({ | @Component({ | ||||
| selector: 'lj-app-ag-grid-component', | selector: 'lj-app-ag-grid-component', | ||||
| standalone: true, | standalone: true, | ||||
| templateUrl: './lj-ag-grid-component.component.html', | templateUrl: './lj-ag-grid-component.component.html', | ||||
| styleUrls: ['./pagination-style/pagination.less'], | |||||
| styleUrls: ['./pagination-style/pagination.less', './lj-ag-grid-component.component.less'], | |||||
| imports: [CommonModule, AgGridAngular, NzPaginationModule, LJDataVCardComponent, DataVLjTableComponent] | imports: [CommonModule, AgGridAngular, NzPaginationModule, LJDataVCardComponent, DataVLjTableComponent] | ||||
| }) | }) | ||||
| export class LjAgGridComponentComponent implements OnInit { | export class LjAgGridComponentComponent implements OnInit { | ||||
| @@ -36,12 +38,44 @@ export class LjAgGridComponentComponent implements OnInit { | |||||
| @Input() showSetting: boolean = false; | @Input() showSetting: boolean = false; | ||||
| @Input() showPageTurning: boolean = true; | @Input() showPageTurning: boolean = true; | ||||
| /**每页数 */ | /**每页数 */ | ||||
| public pageSize!: number; | public pageSize!: number; | ||||
| public paginationPageSizeSelector!: [number, number, number]; | |||||
| /**当前页 */ | /**当前页 */ | ||||
| public pageIndex!: number; | public pageIndex!: number; | ||||
| /**总数 */ | /**总数 */ | ||||
| public pageRowTotal!: number; | public pageRowTotal!: number; | ||||
| onGridSizeChanged(params: GridSizeChangedEvent) { | |||||
| // get the current grids width | |||||
| var gridWidth = document.querySelector('.ag-body-viewport')!.clientWidth; | |||||
| // keep track of which columns to hide/show | |||||
| var columnsToShow = []; | |||||
| var columnsToHide = []; | |||||
| // iterate over all columns (visible or not) and work out | |||||
| // now many columns can fit (based on their minWidth) | |||||
| var totalColsWidth = 0; | |||||
| var allColumns = params.api.getColumns(); | |||||
| if (allColumns && allColumns.length > 0) { | |||||
| for (var i = 0; i < allColumns.length; i++) { | |||||
| var column = allColumns[i]; | |||||
| totalColsWidth += column.getMinWidth() || 0; | |||||
| if (totalColsWidth > gridWidth) { | |||||
| columnsToHide.push(column.getColId()); | |||||
| } else { | |||||
| columnsToShow.push(column.getColId()); | |||||
| } | |||||
| } | |||||
| } | |||||
| // show/hide columns based on current grid width | |||||
| params.api.setColumnsVisible(columnsToShow, true); | |||||
| params.api.setColumnsVisible(columnsToHide, false); | |||||
| // wait until columns stopped moving and fill out | |||||
| // any available space to ensure there are no gaps | |||||
| window.setTimeout(() => { | |||||
| params.api.sizeColumnsToFit(); | |||||
| }, 10); | |||||
| } | |||||
| //默认列配置 | //默认列配置 | ||||
| @Input() defaultColDef: ColDef = { | @Input() defaultColDef: ColDef = { | ||||
| @@ -61,17 +95,6 @@ export class LjAgGridComponentComponent implements OnInit { | |||||
| /** 构造函数 */ | /** 构造函数 */ | ||||
| constructor() {} | constructor() {} | ||||
| // 在父组件的类中 | // 在父组件的类中 | ||||
| tableColumns: TableColumn[] = [ | |||||
| { key: 'sort', title: '序号' }, | |||||
| { key: 'time', title: '时间' }, | |||||
| { key: 'option', title: '操作' }, | |||||
| { key: 'optionDesc', title: '操作描述' }, | |||||
| { key: 'optionMan', title: '操作人员' }, | |||||
| { key: 'mark', title: '备注' }, | |||||
| { key: 'edit', title: '编辑' } | |||||
| // 其他列配置... | |||||
| ]; | |||||
| /**初始化 */ | /**初始化 */ | ||||
| ngOnInit() { | ngOnInit() { | ||||
| @@ -88,10 +111,10 @@ export class LjAgGridComponentComponent implements OnInit { | |||||
| } | } | ||||
| console.log('-----表格初始化-----'); | console.log('-----表格初始化-----'); | ||||
| // this.title = ''; | // this.title = ''; | ||||
| this.pageSize = 10; | |||||
| this.pageSize = 3; | |||||
| this.pageIndex = 1; | this.pageIndex = 1; | ||||
| this.pageRowTotal = this.rowData.length; | this.pageRowTotal = this.rowData.length; | ||||
| this.paginationPageSizeSelector = [200, 500, 1000]; | |||||
| this.gridOptions = { | this.gridOptions = { | ||||
| headerHeight: 0, | headerHeight: 0, | ||||
| rowData: this.rowData, | rowData: this.rowData, | ||||
| @@ -102,9 +125,10 @@ export class LjAgGridComponentComponent implements OnInit { | |||||
| onGridReady(params: any) { | onGridReady(params: any) { | ||||
| console.log('onGridReady'); | console.log('onGridReady'); | ||||
| console.log(params); | console.log(params); | ||||
| setTimeout(() => { | |||||
| params.api.sizeColumnsToFit(); | |||||
| }, 100); | |||||
| // setTimeout(() => { | |||||
| // params.api.sizeColumnsToFit(); | |||||
| // }, 100); | |||||
| params.api.resetRowHeights(); | |||||
| } | } | ||||
| nzPageSizeChange(_pageSize: any) { | nzPageSizeChange(_pageSize: any) { | ||||
| this.pageSize = _pageSize; | this.pageSize = _pageSize; | ||||
| @@ -59,7 +59,7 @@ | |||||
| ::ng-deep .ag-theme-datav { | ::ng-deep .ag-theme-datav { | ||||
| --ag-border-color: #74FAFB; | --ag-border-color: #74FAFB; | ||||
| --ag-foreground-color: #74FAFB; | --ag-foreground-color: #74FAFB; | ||||
| --ag-background-color: #0A1632; | |||||
| // --ag-background-color: #0A1632; | |||||
| --ag-header-foreground-color: #74FAFB; | --ag-header-foreground-color: #74FAFB; | ||||
| --ag-header-background-color: #0A1632; | --ag-header-background-color: #0A1632; | ||||
| --ag-odd-row-background-color: #0A1632; | --ag-odd-row-background-color: #0A1632; | ||||