소스 검색

修改表格样式

master
lijie.hu 1 년 전
부모
커밋
4ef137b5ae
9개의 변경된 파일53개의 추가작업 그리고 26개의 파일을 삭제
  1. +6
    -4
      src/app/routes/data-v/lj-card/lj-card.component.html
  2. +13
    -3
      src/app/routes/data-v/lj-card/lj-card.component.less
  3. +1
    -0
      src/app/routes/data-v/navigation/navigation.component.less
  4. +9
    -9
      src/app/routes/data-v/navigation/navigation.component.ts
  5. +2
    -1
      src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.html
  6. +7
    -1
      src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.less
  7. +6
    -2
      src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.ts
  8. +8
    -6
      src/app/routes/data-v/workstation/workstation.component.ts
  9. +1
    -0
      src/assets/dashboard/setting.svg

+ 6
- 4
src/app/routes/data-v/lj-card/lj-card.component.html 파일 보기

@@ -1,9 +1,11 @@
<div class="card-content">
<!-- <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 />
</div>

+ 13
- 3
src/app/routes/data-v/lj-card/lj-card.component.less 파일 보기

@@ -1,4 +1,7 @@
.card-content-title {
display: flex;
align-items: center; /* 确保子元素垂直居中 */
justify-content: space-between;
width:fit-content;
height:fit-content;
padding: 5px 20px 0; /* 文本的内边距 */
@@ -12,6 +15,15 @@
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 {
overflow: hidden;
margin-bottom: 0.5rem;
@@ -23,9 +35,7 @@
background-position: center;
// background-position: top;
background-size: 100% 100%;
// background-size: cover;
// background-size: cover;
// background-size: contain; /* 保证背景图片完整显示 */


.card-content-title {
display: flex;


+ 1
- 0
src/app/routes/data-v/navigation/navigation.component.less 파일 보기

@@ -5,6 +5,7 @@
// flex-flow: row wrap; /* 允许换行 */
flex-wrap: nowrap; /* 不允许换行 */
// width: 100%;
margin-top:10px;
padding-left: 2rem;
white-space: nowrap; /* 防止菜单项换行 */
// white-space: normal;


+ 9
- 9
src/app/routes/data-v/navigation/navigation.component.ts 파일 보기

@@ -126,22 +126,22 @@ export class DataVNavigationComponent implements OnInit {
// 设置当前菜单为选中状态
menu.selected = true;
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') {
menu.selected = true;
this.selectedParentMenu = menu;
if (menu.link) this.router.navigateByUrl(menu.link);
this.router.navigateByUrl(menu.link ?? '/404');
} else {
menu.selected = true;
console.log('路由');
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();


+ 2
- 1
src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.html 파일 보기

@@ -1,5 +1,5 @@
<!-- <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
#myGrid
[class]="gridThemeClass"
@@ -11,6 +11,7 @@
[defaultColDef]="defaultColDef"
[rowData]="rowData"
[columnDefs]="columnDefs"
[rowHeight]="38"
/>

<br />


+ 7
- 1
src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.less 파일 보기

@@ -15,4 +15,10 @@
font-size: 16px;
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;
}

+ 6
- 2
src/app/routes/data-v/workstation/lj-ag-grid-component/lj-ag-grid-component.component.ts 파일 보기

@@ -14,7 +14,8 @@ import { LJDataVCardComponent } from '../../lj-card/lj-card.component';
export class LjAgGridComponentComponent implements OnInit {
[x: string]: any;
@ViewChild('myGrid') grid!: AgGridAngular;

public title = '';
public showSetting = true;
/**每页数 */
public pageSize!: number;
/**当前页 */
@@ -26,7 +27,9 @@ export class LjAgGridComponentComponent implements OnInit {
@Input() defaultColDef: ColDef = {
width: 130,
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[] = [];
@@ -40,6 +43,7 @@ export class LjAgGridComponentComponent implements OnInit {
/**初始化 */
ngOnInit() {
console.log('-----表格初始化-----');
this.title = '代办任务';
this.pageSize = 10;
this.pageIndex = 1;
this.pageRowTotal = this.rowData.length;


+ 8
- 6
src/app/routes/data-v/workstation/workstation.component.ts 파일 보기

@@ -51,16 +51,18 @@ export class DataVWorkstationComponent implements OnInit, AfterViewInit {
return parseInt(params.node.id) + 1;
},
width: 90,
// flex: 2,
sortable: true,
unSortIcon: true,
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[] = [


+ 1
- 0
src/assets/dashboard/setting.svg
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


불러오는 중...
취소
저장