Commit 82d8e9ad by sunchao

薪资单页面简单优化

parent 958a2359
...@@ -78,7 +78,7 @@ const myRoutes: Routes = [ ...@@ -78,7 +78,7 @@ const myRoutes: Routes = [
{ path: 'scoreDeatil/:practitionerId', component: ScoreDetailsComponent, canActivate: [AuthGuard] }, { path: 'scoreDeatil/:practitionerId', component: ScoreDetailsComponent, canActivate: [AuthGuard] },
{ path: 'businessCard', component: BusinessCardComponent, canActivate: [AuthGuard] }, { path: 'businessCard', component: BusinessCardComponent, canActivate: [AuthGuard] },
{ path: 'orderDetail', component: OrderDetailComponent, canActivate: [AuthGuard] }, { path: 'orderDetail', component: OrderDetailComponent, canActivate: [AuthGuard] },
{ path: 'salary', component: SalaryComponent, canActivate: [AuthGuard] }, { path: 'salary', component: SalaryComponent, canActivate: [AuthGuard],data:[{title:'我的薪资'}] },
{ path: 'todo', component: TodoListComponent, canActivate: [AuthGuard] }, { path: 'todo', component: TodoListComponent, canActivate: [AuthGuard] },
{ path: 'addtask',component:AddTaskComponent,canActivate:[AuthGuard]}, { path: 'addtask',component:AddTaskComponent,canActivate:[AuthGuard]},
{ path: 'medical_service',component:MedicalServiceComponent,canActivate:[AuthGuard]}, { path: 'medical_service',component:MedicalServiceComponent,canActivate:[AuthGuard]},
......
<div class="salesWrapper"> <div class="salesWrapper">
<ul class="tab">
<li class="selected" *ngFor="let tabItem of tabList" (click)="selectTab(tabItem.id)"
[ngClass]="{selected:selectedId === tabItem.id}"
>
<div style="position: relative;">
<h3>{{tabItem.name}}</h3>
</div>
</li>
</ul>
<div class="salesContent"> <div class="salesContent">
<div class="salesItem" *ngFor="let payScaleItem of payScaleInfos" (click)="getPdf(payScaleItem.monShId,payScaleItem.pdfOssPath)"> <div class="salesItem" *ngFor="let payScaleItem of payScaleInfos" (click)="getPdf(payScaleItem.monShId,payScaleItem.pdfOssPath)">
<div class="icon_bolck"><span class="iconfont icon-xinzidan"></span></div> <div class="icon_bolck"><span class="iconfont icon-xinzidan"></span></div>
......
...@@ -2,41 +2,31 @@ ...@@ -2,41 +2,31 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
.top{ background: #f5f5f5;
.tab {
display: flex; display: flex;
justify-content: space-between; list-style: none;
align-items: center; justify-content: space-around;
.tab{ background:#fff;
display: flex; margin-bottom: 10px;
list-style: none; li {
/* margin-bottom: 5px; */ line-height: 50px;
margin: 10px 0px; height: 50px;
padding:0 2%; text-align: center;
justify-content: space-between; h3 {
li { font-weight: normal;
text-align: center; font-size: 16px;
// border: 1px #a9aabb solid;
// border-radius: 20px;
font-size: 16px;
} }
li.selected{
// background-color: #ff5a32;
// color: #fff;
// border: 1px #f0f0f0 solid;
// border: 1px #e10d0d solid;
border-bottom: 2px #e10d0d solid;
font-weight: bold;
}
}
.tab:nth-child(1){
width: 50%;
} }
.tab:nth-child(2){ li.selected {
width: 28%; border-bottom: 3px #e10d0d solid;
h3{
color: #e10d0d;
}
} }
} }
.salesContent{ .salesContent{
background: #fff;
.salesItem{ .salesItem{
border-bottom: 1px #dcdcdc solid; border-bottom: 1px #dcdcdc solid;
padding: 10px; padding: 10px;
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { MyService } from '../my.service'; import { MyService } from '../my.service';
import { LifeCommonService } from '../../common/life-common.service'; import { LifeCommonService } from '../../common/life-common.service';
import { ActivatedRoute,Router } from "@angular/router";
@Component({ @Component({
selector: 'ydlife-salary', selector: 'ydlife-salary',
...@@ -14,12 +15,21 @@ export class SalaryComponent implements OnInit { ...@@ -14,12 +15,21 @@ export class SalaryComponent implements OnInit {
//控制弹框 //控制弹框
toastDialog: boolean; toastDialog: boolean;
toastInfo: any; toastInfo: any;
constructor(private myService: MyService, public lifeCommonService: LifeCommonService) { } tabList:Array<any>;
selectedId:any = 1;
constructor(private activatedRoute: ActivatedRoute,private myService: MyService,
public lifeCommonService: LifeCommonService) { }
ngOnInit() { ngOnInit() {
const title = this.activatedRoute.snapshot.data[0]['title'];
this.lifeCommonService.setTitle(title);
this.practitionerIdEG = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerIdEG']; this.practitionerIdEG = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerIdEG'];
this.practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'] this.practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId']
this.payScaleListQuery(); this.payScaleListQuery();
this.tabList = [
{name:'2021年',id:1},
{name:'历史薪资',id:2}
]
} }
payScaleListQuery() { payScaleListQuery() {
...@@ -58,4 +68,8 @@ export class SalaryComponent implements OnInit { ...@@ -58,4 +68,8 @@ export class SalaryComponent implements OnInit {
} }
} }
selectTab(tabId){
this.selectedId = tabId;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment