From bc4a4d841b3ee5d61026d5a885b75a115655e68b Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Tue, 23 Nov 2021 10:52:07 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=8E=A8=E9=80=81=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../criminal-records-admin.component.ts | 3 - .../analysis-of-the-host.component.ts | 9 +- .../navigation/navigation.component.html | 1 + .../organization/organization.component.ts | 9 +- .../edit-push-item.component.html | 1 + .../edit-push-item.component.scss | 0 .../edit-push-item.component.spec.ts | 25 ++++++ .../edit-push-item.component.ts | 15 ++++ .../push/push.component.html | 46 ++++++++++ .../push/push.component.scss | 81 ++++++++++++++++++ .../system-management/push/push.component.ts | 46 ++++++++++ .../system-management-routing.module.ts | 4 +- .../system-management.module.ts | 4 +- .../user/adduser/adduser.component.ts | 9 +- .../user/edituser/edituser.component.ts | 9 +- src/assets/images/icon/push.png | Bin 0 -> 441 bytes 16 files changed, 253 insertions(+), 9 deletions(-) create mode 100644 src/app/system-management/push/edit-push-item/edit-push-item.component.html create mode 100644 src/app/system-management/push/edit-push-item/edit-push-item.component.scss create mode 100644 src/app/system-management/push/edit-push-item/edit-push-item.component.spec.ts create mode 100644 src/app/system-management/push/edit-push-item/edit-push-item.component.ts create mode 100644 src/app/system-management/push/push.component.html create mode 100644 src/app/system-management/push/push.component.scss create mode 100644 src/app/system-management/push/push.component.ts create mode 100644 src/assets/images/icon/push.png diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts index d477142..33eee80 100644 --- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts +++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts @@ -303,9 +303,6 @@ export class CriminalRecordsAdminComponent implements OnInit { this.mybarChart.setOption(this.baroption); this.warningType() - - console.log('当前日期', enddate) - console.log('三十天前日期', startdate) } diff --git a/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts b/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts index e9921ac..e0c7ef5 100644 --- a/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts +++ b/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts @@ -26,7 +26,14 @@ export class AnalysisOfTheHostComponent implements OnInit { nzExpandAll = false; totalCount: string getAllOrganization() { - this.http.get('/api/services/app/Organization/GetAll').subscribe((data: any) => { + let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id + let params = { + OrganizationUnitId: OrganizationUnitId, + IsContainsChildren: "true" + } + this.http.get('/api/services/app/Organization/GetAll', { + params: params + }).subscribe((data: any) => { this.totalCount = data.result.totalCount data.result.items.forEach(element => { element.key = element.id diff --git a/src/app/system-management/navigation/navigation.component.html b/src/app/system-management/navigation/navigation.component.html index 43a4f69..02cd2a6 100644 --- a/src/app/system-management/navigation/navigation.component.html +++ b/src/app/system-management/navigation/navigation.component.html @@ -17,6 +17,7 @@
  • 用户管理
  • 角色管理
  • 分析主机管理
  • +
  • 推送管理
  • diff --git a/src/app/system-management/organization/organization.component.ts b/src/app/system-management/organization/organization.component.ts index 65ba6a8..88c42df 100644 --- a/src/app/system-management/organization/organization.component.ts +++ b/src/app/system-management/organization/organization.component.ts @@ -36,7 +36,14 @@ export class OrganizationComponent implements OnInit { nzExpandAll = false; totalCount: string getAllOrganization() { - this.http.get('/api/services/app/Organization/GetAll').subscribe((data: any) => { + let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id + let params = { + OrganizationUnitId: OrganizationUnitId, + IsContainsChildren: "true" + } + this.http.get('/api/services/app/Organization/GetAll', { + params: params + }).subscribe((data: any) => { this.totalCount = data.result.totalCount // console.log('组织机构',data.result.totalCount) data.result.items.forEach(element => { diff --git a/src/app/system-management/push/edit-push-item/edit-push-item.component.html b/src/app/system-management/push/edit-push-item/edit-push-item.component.html new file mode 100644 index 0000000..6302b64 --- /dev/null +++ b/src/app/system-management/push/edit-push-item/edit-push-item.component.html @@ -0,0 +1 @@ +

    edit-push-item works!

    diff --git a/src/app/system-management/push/edit-push-item/edit-push-item.component.scss b/src/app/system-management/push/edit-push-item/edit-push-item.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/system-management/push/edit-push-item/edit-push-item.component.spec.ts b/src/app/system-management/push/edit-push-item/edit-push-item.component.spec.ts new file mode 100644 index 0000000..4a3f2cd --- /dev/null +++ b/src/app/system-management/push/edit-push-item/edit-push-item.component.spec.ts @@ -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; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EditPushItemComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EditPushItemComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/system-management/push/edit-push-item/edit-push-item.component.ts b/src/app/system-management/push/edit-push-item/edit-push-item.component.ts new file mode 100644 index 0000000..d6ab49f --- /dev/null +++ b/src/app/system-management/push/edit-push-item/edit-push-item.component.ts @@ -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 { + } + +} diff --git a/src/app/system-management/push/push.component.html b/src/app/system-management/push/push.component.html new file mode 100644 index 0000000..f30a031 --- /dev/null +++ b/src/app/system-management/push/push.component.html @@ -0,0 +1,46 @@ +
    +
    +
    + 通知推送权限配置 +
    +
    +
    + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + + + + + + + +
    预警类别预警/分析事件预警推送范围预警处置范围操作
    {{item.violationType}}{{item.violationName}}34 + 编辑 +
    +
    + +
    \ No newline at end of file diff --git a/src/app/system-management/push/push.component.scss b/src/app/system-management/push/push.component.scss new file mode 100644 index 0000000..27686f2 --- /dev/null +++ b/src/app/system-management/push/push.component.scss @@ -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%; + } + } +} diff --git a/src/app/system-management/push/push.component.ts b/src/app/system-management/push/push.component.ts new file mode 100644 index 0000000..5bd9804 --- /dev/null +++ b/src/app/system-management/push/push.component.ts @@ -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(); + } + } +} diff --git a/src/app/system-management/system-management-routing.module.ts b/src/app/system-management/system-management-routing.module.ts index c0bbef7..c21a207 100644 --- a/src/app/system-management/system-management-routing.module.ts +++ b/src/app/system-management/system-management-routing.module.ts @@ -6,12 +6,14 @@ import { RoleComponent } from './role/role.component'; import { OrganizationComponent } from './organization/organization.component'; import { UserComponent } from './user/user.component'; import { AnalysisOfTheHostComponent } from './analysis-of-the-host/analysis-of-the-host.component'; +import { PushComponent } from './push/push.component'; const routes: Routes = [ { path: 'organization', component: OrganizationComponent }, { path: 'user', component: UserComponent }, { path: 'role', component: RoleComponent }, - { path: 'host', component: AnalysisOfTheHostComponent } + { path: 'host', component: AnalysisOfTheHostComponent }, + { path: 'push', component: PushComponent } ]; @NgModule({ diff --git a/src/app/system-management/system-management.module.ts b/src/app/system-management/system-management.module.ts index 77f63bb..58a2bda 100644 --- a/src/app/system-management/system-management.module.ts +++ b/src/app/system-management/system-management.module.ts @@ -32,8 +32,10 @@ import { AddhostComponent } from './analysis-of-the-host/addhost/addhost.compone import { EdithostComponent } from './analysis-of-the-host/edithost/edithost.component'; import { AddcameraComponent } from './analysis-of-the-host/addcamera/addcamera.component'; import { EditcameraComponent } from './analysis-of-the-host/editcamera/editcamera.component'; +import { PushComponent } from './push/push.component'; +import { EditPushItemComponent } from './push/edit-push-item/edit-push-item.component'; @NgModule({ - declarations: [OrganizationComponent, UserComponent, RoleComponent, NavigationComponent, AdduserComponent, EdituserComponent, AddroleComponent, EditroleComponent, AddorComponent, EditorComponent, AnalysisOfTheHostComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent], + declarations: [OrganizationComponent, UserComponent, RoleComponent, NavigationComponent, AdduserComponent, EdituserComponent, AddroleComponent, EditroleComponent, AddorComponent, EditorComponent, AnalysisOfTheHostComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent, PushComponent, EditPushItemComponent], imports: [ CommonModule, SystemRoutingModule, diff --git a/src/app/system-management/user/adduser/adduser.component.ts b/src/app/system-management/user/adduser/adduser.component.ts index 4320adf..ed57586 100644 --- a/src/app/system-management/user/adduser/adduser.component.ts +++ b/src/app/system-management/user/adduser/adduser.component.ts @@ -43,7 +43,14 @@ export class AdduserComponent implements OnInit { //获取所有组织机构 nodes:any = [] getAllOrganization() { - this.http.get('/api/services/app/Organization/GetAll').subscribe((data: any) => { + let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id + let params = { + OrganizationUnitId: OrganizationUnitId, + IsContainsChildren: "true" + } + this.http.get('/api/services/app/Organization/GetAll', { + params: params + }).subscribe((data: any) => { data.result.items.forEach(element => { element.key = element.id element.title = element.displayName diff --git a/src/app/system-management/user/edituser/edituser.component.ts b/src/app/system-management/user/edituser/edituser.component.ts index c39c449..c20d1c4 100644 --- a/src/app/system-management/user/edituser/edituser.component.ts +++ b/src/app/system-management/user/edituser/edituser.component.ts @@ -45,7 +45,14 @@ export class EdituserComponent implements OnInit { //获取所有组织机构 nodes:any = [] getAllOrganization() { - this.http.get('/api/services/app/Organization/GetAll').subscribe((data: any) => { + let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id + let params = { + OrganizationUnitId: OrganizationUnitId, + IsContainsChildren: "true" + } + this.http.get('/api/services/app/Organization/GetAll', { + params: params + }).subscribe((data: any) => { data.result.items.forEach(element => { element.key = element.id element.title = element.displayName diff --git a/src/assets/images/icon/push.png b/src/assets/images/icon/push.png new file mode 100644 index 0000000000000000000000000000000000000000..f52e81823b903de6009c5bcbef356af45d6d7efe GIT binary patch literal 441 zcmV;q0Y?6bP)m@2SNp62cZIE1?z0)p7{jGV7M7(Nb8U{sUlj1g=S40GN`TBwztplDz5*EXj92_X0~g2XMA8 z0m24DbS_^(z-ngeh} zPb6pA)LxP-C5>Z>-`kAylD^Y;W~@A=gH%OUp{KU+`7lG()e0Z1g~)*IppxWJlE3*m z3Ai9x#EKZSfpZ^^NjCO}Bn#!qJO%L6GP|epCf=|6_IR^wS`}HmM*y!0*i0