16 changed files with 253 additions and 9 deletions
@ -0,0 +1 @@ |
|||||||
|
<p>edit-push-item works!</p> |
@ -0,0 +1,25 @@ |
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||||
|
|
||||||
|
import { EditPushItemComponent } from './edit-push-item.component'; |
||||||
|
|
||||||
|
describe('EditPushItemComponent', () => { |
||||||
|
let component: EditPushItemComponent; |
||||||
|
let fixture: ComponentFixture<EditPushItemComponent>; |
||||||
|
|
||||||
|
beforeEach(async(() => { |
||||||
|
TestBed.configureTestingModule({ |
||||||
|
declarations: [ EditPushItemComponent ] |
||||||
|
}) |
||||||
|
.compileComponents(); |
||||||
|
})); |
||||||
|
|
||||||
|
beforeEach(() => { |
||||||
|
fixture = TestBed.createComponent(EditPushItemComponent); |
||||||
|
component = fixture.componentInstance; |
||||||
|
fixture.detectChanges(); |
||||||
|
}); |
||||||
|
|
||||||
|
it('should create', () => { |
||||||
|
expect(component).toBeTruthy(); |
||||||
|
}); |
||||||
|
}); |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-edit-push-item', |
||||||
|
templateUrl: './edit-push-item.component.html', |
||||||
|
styleUrls: ['./edit-push-item.component.scss'] |
||||||
|
}) |
||||||
|
export class EditPushItemComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,46 @@ |
|||||||
|
<div class="pushbox" id="pushbox"> |
||||||
|
<div class="topbox"> |
||||||
|
<div class="lefttop"> |
||||||
|
<span>通知推送权限配置</span> |
||||||
|
</div> |
||||||
|
<div class="righttop"> |
||||||
|
<form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-control> |
||||||
|
<nz-input-group nzPrefixIcon="search"> |
||||||
|
<input type="text" nz-input placeholder="请输入预案类别" formControlName="search" /> |
||||||
|
</nz-input-group> |
||||||
|
</nz-form-control> |
||||||
|
<button style="display: none;" type="submit"></button> |
||||||
|
</nz-form-item> |
||||||
|
</form> |
||||||
|
<!-- <button nz-button nzType="primary"><i nz-icon nzType="plus-circle" nzTheme="outline"></i>新增</button> --> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="tablebox"> |
||||||
|
<table> |
||||||
|
<tr> |
||||||
|
<th style="width: 20%;">预警类别</th> |
||||||
|
<th style="width: 20%;">预警/分析事件</th> |
||||||
|
<th style="width: 25%;">预警推送范围</th> |
||||||
|
<th style="width: 25%;">预警处置范围</th> |
||||||
|
<th style="width: 10%;">操作</th> |
||||||
|
</tr> |
||||||
|
<tr *ngFor="let item of list"> |
||||||
|
<td>{{item.violationType}}</td> |
||||||
|
<td>{{item.violationName}}</td> |
||||||
|
<td>3</td> |
||||||
|
<td>4</td> |
||||||
|
<td> |
||||||
|
<span style="color: #2399FF;cursor: pointer;" (click)="edititem(item)">编辑</span> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
</table> |
||||||
|
</div> |
||||||
|
<!-- <div class="pagination"> |
||||||
|
<nz-pagination [nzHideOnSinglePage]="false" [nzPageIndex]="1" [nzTotal]="usersNum" [nzPageSize]="16" |
||||||
|
[nzShowTotal]="totalTemplate" nzShowQuickJumper (nzPageIndexChange)="pageChange($event)"> |
||||||
|
</nz-pagination> |
||||||
|
<ng-template #totalTemplate let-total> 16条/页,共{{usersNum}}条 </ng-template> |
||||||
|
</div> --> |
||||||
|
</div> |
@ -0,0 +1,81 @@ |
|||||||
|
.pushbox { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
background: #FFFFFF; |
||||||
|
box-sizing: border-box; |
||||||
|
padding: 20px; |
||||||
|
overflow: hidden; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
.topbox { |
||||||
|
width: 100%; |
||||||
|
height: 36px; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: space-between; |
||||||
|
margin-bottom: 12px; |
||||||
|
|
||||||
|
.lefttop { |
||||||
|
span:nth-child(1) { |
||||||
|
color: #000D21; |
||||||
|
margin-right: 16px; |
||||||
|
} |
||||||
|
|
||||||
|
span:nth-child(2) { |
||||||
|
color: rgba(36, 36, 36, 0.24); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.righttop { |
||||||
|
display: flex; |
||||||
|
|
||||||
|
button { |
||||||
|
margin-left: 16px; |
||||||
|
} |
||||||
|
|
||||||
|
nz-input-group { |
||||||
|
height: 32px; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.tablebox { |
||||||
|
flex: 1; |
||||||
|
overflow-y: auto; |
||||||
|
|
||||||
|
//滚动条样式 |
||||||
|
::-webkit-scrollbar { |
||||||
|
display: none; |
||||||
|
} |
||||||
|
table{ |
||||||
|
width: 100%; |
||||||
|
tr{ |
||||||
|
height: 40px; |
||||||
|
line-height: 40px; |
||||||
|
font-size: 14px; |
||||||
|
} |
||||||
|
tr:nth-child(1) th{ |
||||||
|
font-weight: 600; |
||||||
|
font-size: 15px; |
||||||
|
} |
||||||
|
tr,tr th,td{ |
||||||
|
border: 0px; |
||||||
|
color: #000D21; |
||||||
|
font-family: synormal; |
||||||
|
font-weight: 400; |
||||||
|
} |
||||||
|
tr:nth-child(odd) { |
||||||
|
background-color:rgba(145, 204, 255, 0.16); |
||||||
|
} |
||||||
|
tr:nth-child(even) { |
||||||
|
background-color:#fff; |
||||||
|
} |
||||||
|
tr th:nth-child(1),td:nth-child(1){ |
||||||
|
box-sizing: border-box; |
||||||
|
padding-left: 5%; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,46 @@ |
|||||||
|
import { HttpClient } from '@angular/common/http'; |
||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
||||||
|
@Component({ |
||||||
|
selector: 'app-push', |
||||||
|
templateUrl: './push.component.html', |
||||||
|
styleUrls: ['./push.component.scss'] |
||||||
|
}) |
||||||
|
|
||||||
|
export class PushComponent implements OnInit { |
||||||
|
|
||||||
|
validateForm!: FormGroup; |
||||||
|
constructor(private fb: FormBuilder, private http: HttpClient) { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
this.validateForm = this.fb.group({ |
||||||
|
search: [null] |
||||||
|
}); |
||||||
|
this.getViolation() |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
//获取预警类型
|
||||||
|
list:any |
||||||
|
getViolation() { |
||||||
|
this.http.get('/api/services/app/Violation/GetAllList').subscribe((data:any) => { |
||||||
|
this.list = data.result |
||||||
|
console.log('预警类型', data) |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
edititem(item){ |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//搜索框提交
|
||||||
|
submitForm(): void { |
||||||
|
for (const i in this.validateForm.controls) { |
||||||
|
this.validateForm.controls[i].markAsDirty(); |
||||||
|
this.validateForm.controls[i].updateValueAndValidity(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
After Width: | Height: | Size: 441 B |
Loading…
Reference in new issue