| @@ -1,9 +1,11 @@ | |||||
| <div class="card-content"> | <div class="card-content"> | ||||
| <!-- <img src="assets/dashboard/dashboard_card_bg.jpg" style="width: 100%;" /> --> | <!-- <img src="assets/dashboard/dashboard_card_bg.jpg" style="width: 100%;" /> --> | ||||
| <div class="card-content-title"> | |||||
| <div class="card-content-l">{{ title }}</div> | |||||
| </div> | |||||
| <div class="card-top-content"> | |||||
| <div class="card-content-title"> | |||||
| <div class="card-content-l">{{ title }}</div> | |||||
| </div> | |||||
| <span nz-icon nzType="setting" nzTheme="outline"></span | |||||
| ></div> | |||||
| <ng-content /> | <ng-content /> | ||||
| </div> | </div> | ||||
| @@ -1,4 +1,7 @@ | |||||
| .card-content-title { | .card-content-title { | ||||
| display: flex; | |||||
| align-items: center; /* 确保子元素垂直居中 */ | |||||
| justify-content: space-between; | |||||
| width:fit-content; | width:fit-content; | ||||
| height:fit-content; | height:fit-content; | ||||
| padding: 5px 20px 0; /* 文本的内边距 */ | padding: 5px 20px 0; /* 文本的内边距 */ | ||||
| @@ -12,6 +15,15 @@ | |||||
| box-shadow: inset 0 0 10px #1f6f97; /* 内阴影效果 */ | box-shadow: inset 0 0 10px #1f6f97; /* 内阴影效果 */ | ||||
| } | } | ||||
| .card-top-content{ | |||||
| display: grid; | |||||
| grid-template-columns: auto auto; | |||||
| align-items: center; | |||||
| justify-content: space-between; | |||||
| } | |||||
| .card-content { | .card-content { | ||||
| overflow: hidden; | overflow: hidden; | ||||
| margin-bottom: 0.5rem; | margin-bottom: 0.5rem; | ||||
| @@ -23,9 +35,7 @@ | |||||
| background-position: center; | background-position: center; | ||||
| // background-position: top; | // background-position: top; | ||||
| background-size: 100% 100%; | background-size: 100% 100%; | ||||
| // background-size: cover; | |||||
| // background-size: cover; | |||||
| // background-size: contain; /* 保证背景图片完整显示 */ | |||||
| .card-content-title { | .card-content-title { | ||||
| display: flex; | display: flex; | ||||
| @@ -5,6 +5,7 @@ | |||||
| // flex-flow: row wrap; /* 允许换行 */ | // flex-flow: row wrap; /* 允许换行 */ | ||||
| flex-wrap: nowrap; /* 不允许换行 */ | flex-wrap: nowrap; /* 不允许换行 */ | ||||
| // width: 100%; | // width: 100%; | ||||
| margin-top:10px; | |||||
| padding-left: 2rem; | padding-left: 2rem; | ||||
| white-space: nowrap; /* 防止菜单项换行 */ | white-space: nowrap; /* 防止菜单项换行 */ | ||||
| // white-space: normal; | // white-space: normal; | ||||
| @@ -126,22 +126,22 @@ export class DataVNavigationComponent implements OnInit { | |||||
| // 设置当前菜单为选中状态 | // 设置当前菜单为选中状态 | ||||
| menu.selected = true; | menu.selected = true; | ||||
| this.selectedParentMenu = menu; | this.selectedParentMenu = menu; | ||||
| if (menu.link) | |||||
| this.router.navigate([menu.link, menu.id], { | |||||
| state: { menu: menu.children } | |||||
| }); | |||||
| this.router.navigate([menu.link ?? '/404', menu.id], { | |||||
| state: { menu: menu.children } | |||||
| }); | |||||
| } else if (menu.menuCode == 'Home') { | } else if (menu.menuCode == 'Home') { | ||||
| menu.selected = true; | menu.selected = true; | ||||
| this.selectedParentMenu = menu; | this.selectedParentMenu = menu; | ||||
| if (menu.link) this.router.navigateByUrl(menu.link); | |||||
| this.router.navigateByUrl(menu.link ?? '/404'); | |||||
| } else { | } else { | ||||
| menu.selected = true; | menu.selected = true; | ||||
| console.log('路由'); | console.log('路由'); | ||||
| console.log(menu.link); | console.log(menu.link); | ||||
| if (menu.link) | |||||
| this.router.navigate([menu.link, menu.id], { | |||||
| state: { menu: menu.children } | |||||
| }); | |||||
| this.router.navigate([menu.link ?? '/404', menu.id], { | |||||
| state: { menu: menu.children } | |||||
| }); | |||||
| } | } | ||||
| // 根据新的选中项更新要显示的菜单列表 | // 根据新的选中项更新要显示的菜单列表 | ||||
| this.updateVisibleMenuList(); | this.updateVisibleMenuList(); | ||||
| @@ -1,5 +1,5 @@ | |||||
| <!-- <label class="custom-label">Your Label</label> --> | <!-- <label class="custom-label">Your Label</label> --> | ||||
| <lj-data-v-card nz-col nzSpan="24" nzXs="24" nzSm="24" nzMd="12" nzLg="12" nzXl="12" nzXXl="12" title="待办任务"> | |||||
| <lj-data-v-card nz-col nzSpan="24" nzXs="24" nzSm="24" nzMd="12" nzLg="12" nzXl="12" nzXXl="12" title="{{ title }}"> | |||||
| <ag-grid-angular | <ag-grid-angular | ||||
| #myGrid | #myGrid | ||||
| [class]="gridThemeClass" | [class]="gridThemeClass" | ||||
| @@ -11,6 +11,7 @@ | |||||
| [defaultColDef]="defaultColDef" | [defaultColDef]="defaultColDef" | ||||
| [rowData]="rowData" | [rowData]="rowData" | ||||
| [columnDefs]="columnDefs" | [columnDefs]="columnDefs" | ||||
| [rowHeight]="38" | |||||
| /> | /> | ||||
| <br /> | <br /> | ||||
| @@ -15,4 +15,10 @@ | |||||
| font-size: 16px; | font-size: 16px; | ||||
| font-weight: bold; | font-weight: bold; | ||||
| } | } | ||||
| .ag-header-center .ag-header-group-cell-label, | |||||
| .ag-header-center .ag-header-cell-label { | |||||
| display: grid; | |||||
| width: 100%; | |||||
| text-align: center; | |||||
| } | |||||
| @@ -14,7 +14,8 @@ import { LJDataVCardComponent } from '../../lj-card/lj-card.component'; | |||||
| export class LjAgGridComponentComponent implements OnInit { | export class LjAgGridComponentComponent implements OnInit { | ||||
| [x: string]: any; | [x: string]: any; | ||||
| @ViewChild('myGrid') grid!: AgGridAngular; | @ViewChild('myGrid') grid!: AgGridAngular; | ||||
| public title = ''; | |||||
| public showSetting = true; | |||||
| /**每页数 */ | /**每页数 */ | ||||
| public pageSize!: number; | public pageSize!: number; | ||||
| /**当前页 */ | /**当前页 */ | ||||
| @@ -26,7 +27,9 @@ export class LjAgGridComponentComponent implements OnInit { | |||||
| @Input() defaultColDef: ColDef = { | @Input() defaultColDef: ColDef = { | ||||
| width: 130, | width: 130, | ||||
| editable: false, | editable: false, | ||||
| cellStyle: { 'font-weight': 'bold' } | |||||
| headerClass: 'ag-header-center', | |||||
| cellStyle: { 'font-weight': 'bold', textAlign: 'center', 'justify-content': 'center', 'line-height': '38px' } | |||||
| }; | }; | ||||
| /** 列头 */ | /** 列头 */ | ||||
| @Input() columnDefs: ColDef[] = []; | @Input() columnDefs: ColDef[] = []; | ||||
| @@ -40,6 +43,7 @@ export class LjAgGridComponentComponent implements OnInit { | |||||
| /**初始化 */ | /**初始化 */ | ||||
| ngOnInit() { | ngOnInit() { | ||||
| console.log('-----表格初始化-----'); | console.log('-----表格初始化-----'); | ||||
| this.title = '代办任务'; | |||||
| this.pageSize = 10; | this.pageSize = 10; | ||||
| this.pageIndex = 1; | this.pageIndex = 1; | ||||
| this.pageRowTotal = this.rowData.length; | this.pageRowTotal = this.rowData.length; | ||||
| @@ -51,16 +51,18 @@ export class DataVWorkstationComponent implements OnInit, AfterViewInit { | |||||
| return parseInt(params.node.id) + 1; | return parseInt(params.node.id) + 1; | ||||
| }, | }, | ||||
| width: 90, | width: 90, | ||||
| // flex: 2, | |||||
| sortable: true, | sortable: true, | ||||
| unSortIcon: true, | unSortIcon: true, | ||||
| field: 'xh' | field: 'xh' | ||||
| }, | }, | ||||
| { headerName: '任务名称', unSortIcon: true, field: 'rwmc' }, | |||||
| { headerName: '任务描述', unSortIcon: true, field: 'rwms', minWidth: 170, flex: 1 }, | |||||
| { headerName: '开始时间', unSortIcon: true, field: 'kssj', minWidth: 170, flex: 1 }, | |||||
| { headerName: '计划完成时间', unSortIcon: true, field: 'jhwcsj', minWidth: 170, flex: 1 }, | |||||
| { headerName: '超期', width: 80, field: 'sfcq' }, | |||||
| { headerName: '操作', autoHeight: true, width: 110, field: 'cz', cellRenderer: GridButtonValueRenderer } | |||||
| { headerName: '任务名称', unSortIcon: true, width: 120, field: 'rwmc' }, | |||||
| { headerName: '任务描述', unSortIcon: true, field: 'rwms', width: 120 }, | |||||
| { headerName: '开始时间', unSortIcon: true, field: 'kssj', width: 180 }, | |||||
| { headerName: '计划完成时间', unSortIcon: true, field: 'jhwcsj', width: 180 }, | |||||
| { headerName: '超期', width: 70, field: 'sfcq' }, | |||||
| { headerName: '操作', width: 90, autoHeaderHeight: true, field: 'cz', cellRenderer: GridButtonValueRenderer } | |||||
| ]; | ]; | ||||
| colDefs2: ColDef[] = [ | colDefs2: ColDef[] = [ | ||||