刘向辉 3 years ago
parent
commit
76df87659d
  1. 1
      angular.json
  2. 14
      package-lock.json
  3. 2
      package.json
  4. 9
      src/app/app-routing.module.ts
  5. 2
      src/app/app.module.ts
  6. 39
      src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
  7. 27
      src/app/navigation/navigation.component.html
  8. 152
      src/app/navigation/navigation.component.scss
  9. 25
      src/app/navigation/navigation.component.spec.ts
  10. 107
      src/app/navigation/navigation.module.ts
  11. 159
      src/app/pages/criminal-records-admin/criminal-records-admin.component.html
  12. 176
      src/app/pages/criminal-records-admin/criminal-records-admin.component.scss
  13. 131
      src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
  14. 28
      src/app/pages/criminal-records/criminal-records.component.scss
  15. 2
      src/app/pages/home/home.component.html
  16. 4
      src/app/pages/pages-routing.module.ts
  17. 7
      src/app/pages/pages.module.ts
  18. 1
      src/app/pages/plan/plan.component.html
  19. 12
      src/app/pages/plan/plan.component.scss
  20. 34
      src/app/pages/plan/plan.component.ts
  21. 2
      src/app/pages/today-warning-admin/today-warning-admin.component.html
  22. 6
      src/app/pages/today-warning-admin/today-warning-admin.component.scss
  23. 6
      src/app/pages/today-warning-admin/today-warning-admin.component.ts
  24. 6
      src/app/pages/today-warning/today-warning.component.scss
  25. 1
      src/app/system-management/navigation/navigation.component.html
  26. 0
      src/app/system-management/navigation/navigation.component.scss
  27. 6
      src/app/system-management/navigation/navigation.component.ts
  28. 1
      src/app/system-management/organization/organization.component.html
  29. 0
      src/app/system-management/organization/organization.component.scss
  30. 15
      src/app/system-management/organization/organization.component.ts
  31. 1
      src/app/system-management/role/role.component.html
  32. 0
      src/app/system-management/role/role.component.scss
  33. 15
      src/app/system-management/role/role.component.ts
  34. 18
      src/app/system-management/system-management-routing.module.ts
  35. 18
      src/app/system-management/system-management.module.ts
  36. 1
      src/app/system-management/user/user.component.html
  37. 0
      src/app/system-management/user/user.component.scss
  38. 15
      src/app/system-management/user/user.component.ts
  39. 6
      src/app/ui/changepassword/changepassword.component.ts
  40. 1
      src/app/ui/tabbar/tabbar.component.html
  41. 11
      src/app/ui/tabbar/tabbar.component.ts
  42. 71
      src/app/ui/userdata/userdata.component.ts
  43. BIN
      src/assets/images/AnXinQQ.jpg
  44. BIN
      src/assets/images/AnXinWX.jpg
  45. BIN
      src/assets/images/flower.png
  46. BIN
      src/assets/images/upload2.png
  47. 20
      src/theme.less

1
angular.json

@ -40,7 +40,6 @@
"src/theme.less"
],
"scripts": [
"node_modules/echarts/dist/echarts.js",
"./node_modules/swiper/js/swiper.min.js"
]
},

14
package-lock.json generated

@ -7106,11 +7106,11 @@
}
},
"echarts": {
"version": "4.6.0",
"resolved": "https://registry.npm.taobao.org/echarts/download/echarts-4.6.0.tgz?cache=0&sync_timestamp=1577438297540&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fecharts%2Fdownload%2Fecharts-4.6.0.tgz",
"integrity": "sha1-taR6EEbOyTzu75VPnuVHUTQFWOw=",
"version": "4.9.0",
"resolved": "https://registry.npmmirror.com/echarts/download/echarts-4.9.0.tgz?cache=0&sync_timestamp=1635741929711&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fecharts%2Fdownload%2Fecharts-4.9.0.tgz",
"integrity": "sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0=",
"requires": {
"zrender": "4.2.0"
"zrender": "4.3.2"
}
},
"ee-first": {
@ -17940,9 +17940,9 @@
"integrity": "sha1-Z8oISzEW/DP8QENeDV6kCiB+OS4="
},
"zrender": {
"version": "4.2.0",
"resolved": "https://registry.npm.taobao.org/zrender/download/zrender-4.2.0.tgz?cache=0&sync_timestamp=1576159866096&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fzrender%2Fdownload%2Fzrender-4.2.0.tgz",
"integrity": "sha1-0AEwLhVfKN4fn8f81cJUutKEcc8="
"version": "4.3.2",
"resolved": "https://registry.nlark.com/zrender/download/zrender-4.3.2.tgz",
"integrity": "sha1-7HQy+UFcgsc1hLa3uMR+GwFiCcY="
}
}
}

2
package.json

@ -37,7 +37,7 @@
"class-transformer": "^0.4.0",
"e-ngx-cesium": "^6.3.2",
"earcut": "^2.2.3",
"echarts": "^4.6.0",
"echarts": "^4.9.0",
"firebase": "^7.6.2",
"install": "^0.13.0",
"ng-zorro-antd": "^9.3.0",

9
src/app/app-routing.module.ts

@ -2,11 +2,11 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { LoginComponent } from './pages/login/login.component';
import { RegisterComponent } from './pages/register/register.component';
import { NavigationComponent } from './navigation/navigation.component';
//路由守卫
import { AuthGuard } from './auth.guard'
import { HomeComponent } from './pages/home/home.component';
import { NavigationComponent } from './system-management/navigation/navigation.component';
@ -18,7 +18,12 @@ const routes: Routes = [
path: '', component: HomeComponent, children: [
{ path: 'home', loadChildren: () => import('./pages/pages.module').then(m => m.PagesModule) }
]
} //首页
}, //首页
{
path: '', component: NavigationComponent, children: [
{ path: 'system', loadChildren: () => import('./system-management/system-management.module').then(m => m.SystemManagementModule) }
]
}//系统管理
];
@NgModule({

2
src/app/app.module.ts

@ -7,7 +7,6 @@ import { MatButtonModule } from '@angular/material/button';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatIconModule } from '@angular/material/icon';
import { MatSidenavModule } from '@angular/material/sidenav';
import { NavigationModule } from './navigation/navigation.module';
import { PagesModule } from './pages/pages.module';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
@ -29,7 +28,6 @@ import { NzMessageModule } from 'ng-zorro-antd/message';
MatButtonModule,
MatCheckboxModule,
MatSidenavModule,
NavigationModule,
MatIconModule,
PagesModule,
FormsModule,

39
src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts

@ -151,30 +151,21 @@ export class FacilityInfoInSceneWindow extends UIBase {
//选中,通知前端
selectFacilityItemToThree(facilityInfoUIItem: FacilityInfoUIItem[], isChecked?: boolean) {
this.three = PlanComponent.instance;
// if (this.isMultiselect) { // 多选
// if (isChecked) { //选中
// facilityInfoUIItem.forEach(element => {
// element.isChecked = isChecked
// let isFind = this.three.beforeOnefacilityInfoList.find(item => { return item === element.getID() })
// isFind == undefined || isFind == null ? this.three.beforeOnefacilityInfoList.push(element.getID()) : null
// })
// } else { //取消选中
// this.three.isShowRightNature = false
// facilityInfoUIItem.forEach(element => {
// element.isChecked = isChecked
// let index = this.three.beforeOnefacilityInfoList.findIndex(value => value === element.getID())
// index != undefined && index != null ? this.three.beforeOnefacilityInfoList.splice(index, 1) : null
// })
// }
// } else { // 单选
// if (isChecked) { //选中
// this.three.beforeOnefacilityInfo = facilityInfoUIItem[0].getID();
// this.three.getPropertyData(facilityInfoUIItem[0])
// } else { //取消选中
// this.three.isShowRightNature = false
// this.three.beforeOnefacilityInfo = null
// }
// }
if (this.isMultiselect) { // 多选
if (isChecked) { //选中
} else { //取消选中
}
} else { // 单选
if (isChecked) { //选中
this.three.beforeOnefacilityInfo = facilityInfoUIItem[0].getID();
this.three.getPropertyData(facilityInfoUIItem[0])
} else { //取消选中
// this.three.isShowRightNature = false
this.three.beforeOnefacilityInfo = null
}
}
}
/**

27
src/app/navigation/navigation.component.html

@ -1,27 +0,0 @@
<mat-sidenav-container class="example-container" autosize>
<mat-sidenav #drawer class="example-sidenav" mode="side" opened="true" color="primary" style="overflow-x: hidden;">
<div class="biglogobox">
<img src="../../assets/images/logo2.png" alt="">
</div>
<div class="navbox">
<ul>
<!-- basicinfo -->
<!-- <li [routerLink]="['/datacollection/basicinfo']" routerLinkActive="router-link-active">基本信息</li> -->
<li>基本信息</li>
</ul>
</div>
</mat-sidenav>
<button type="button" mat-button (click)="drawer.toggle()" class="shownav">
<mat-icon>menu</mat-icon>
</button>
<div class="example-sidenav-content">
<div style="height: 64px;">
<app-tabbar></app-tabbar>
</div>
<div style="flex: 1; overflow: hidden;">
<router-outlet></router-outlet>
</div>
</div>
</mat-sidenav-container>

152
src/app/navigation/navigation.component.scss

@ -1,152 +0,0 @@
.example-container {
width: 100%;
height:100%;
border: 1px solid rgba(0, 0, 0, 0.5);
overflow: hidden;
}
mat-accordion{
height: 100%;
}
mat-sidenav{
box-shadow: 2px 0px 5px #888888;
color: white;
background-color: #3c4252;
width: 240px;
overflow-x: hidden;
p{
height: 48px;
cursor: pointer;
font-size: 16px;
line-height: 48px;
}
ul{
width: 100%;
li{
list-style: none;
height: 48px;
line-height: 48px;
cursor: pointer;
background: white;
padding-left: 55px;
background-color: #3c4252;
color: white;
border: none;
outline: none;
}
.superli{
padding-left: 66px;
}
}
}
.logobox{
border-radius: 50%;
width: 64px;
height: 64px;
background:url("https://img5.tianyancha.com/logo/lll/cce72488294fb8f4bc670a5bb7f0cc4d.png@!f_200x200") no-repeat;
background-size: 100%;
margin: 0px auto;
img{
width: 100%;
height: 100%;
}
}
.shownav{
position: absolute;
top: 13px;
z-index: 200;
}
.mat-accordion .mat-expansion-panel:first-of-type {
border-top-right-radius:0px;
border-top-left-radius:0px;
}
.mat-accordion .mat-expansion-panel:last-of-type {
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
}
.mat-expansion-panel{
border-radius: 0px;
}
.mat-expansion-panel-spacing {
margin: 0px;
}
.superdiv{
padding-left: 31px;
}
mat-icon{
color: white;
}
.navbox{
position: absolute;
left: 0px;
top: 153px;
right: -18px;
bottom: 0px;
overflow-y: scroll;
}
mat-sidenav-container.myapp-dark-theme{
background-color: #fafafa;
color: black;
mat-panel-title{
color: black;
}
ul li{
background-color: white;
color: black;
}
.biglogobox{
background-color: #d50000;
}
color: black;
}
.biglogobox{
width: 250px;
background-color: #42a5f5;
padding-top: 15px;
display: block;
text-align: center;
line-height:40px;
position: relative;
color: #FFF;
font-size: 2em;
margin: 0 auto;
margin-bottom: 100px;
img{
margin-right: 11px;
}
}
mat-panel-title mat-icon{
color: #afb2bb;
font-size: 16px;
line-height: 24px;
margin-right: 6px;
}
mat-expansion-panel{
background-color: #3c4252;
mat-panel-title{
color: white;
}
}
.mat-expansion-indicator::after {
color: white;
}
.example-container .navbox .router-link-active {
background-color: rgba(225,225,225,.5);
border:0
}
.example-sidenav-content{
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
}

25
src/app/navigation/navigation.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NavigationComponent } from './navigation.component';
describe('NavigationComponent', () => {
let component: NavigationComponent;
let fixture: ComponentFixture<NavigationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NavigationComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NavigationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

107
src/app/navigation/navigation.module.ts

@ -1,107 +0,0 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NavigationComponent } from './navigation.component';
import { MatIconModule } from '@angular/material/icon';
import { MatSidenavModule } from '@angular/material/sidenav';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { UiModule } from '../ui/ui.module';
import {A11yModule} from '@angular/cdk/a11y';
import {DragDropModule} from '@angular/cdk/drag-drop';
import {PortalModule} from '@angular/cdk/portal';
import {ScrollingModule} from '@angular/cdk/scrolling';
import {CdkStepperModule} from '@angular/cdk/stepper';
import {CdkTableModule} from '@angular/cdk/table';
import {CdkTreeModule} from '@angular/cdk/tree';
import {MatAutocompleteModule} from '@angular/material/autocomplete';
import {MatBadgeModule} from '@angular/material/badge';
import {MatBottomSheetModule} from '@angular/material/bottom-sheet';
import {MatButtonModule} from '@angular/material/button';
import {MatButtonToggleModule} from '@angular/material/button-toggle';
import {MatCardModule} from '@angular/material/card';
import {MatCheckboxModule} from '@angular/material/checkbox';
import {MatChipsModule} from '@angular/material/chips';
import {MatStepperModule} from '@angular/material/stepper';
import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatDialogModule} from '@angular/material/dialog';
import {MatDividerModule} from '@angular/material/divider';
import {MatExpansionModule} from '@angular/material/expansion';
import {MatGridListModule} from '@angular/material/grid-list';
import {MatInputModule} from '@angular/material/input';
import {MatListModule} from '@angular/material/list';
import {MatMenuModule} from '@angular/material/menu';
import {MatNativeDateModule, MatRippleModule} from '@angular/material/core';
import {MatPaginatorModule} from '@angular/material/paginator';
import {MatProgressBarModule} from '@angular/material/progress-bar';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatRadioModule} from '@angular/material/radio';
import {MatSelectModule} from '@angular/material/select';
import {MatSliderModule} from '@angular/material/slider';
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
import {MatSnackBarModule} from '@angular/material/snack-bar';
import {MatSortModule} from '@angular/material/sort';
import {MatTableModule} from '@angular/material/table';
import {MatTabsModule} from '@angular/material/tabs';
import {MatToolbarModule} from '@angular/material/toolbar';
import {MatTooltipModule} from '@angular/material/tooltip';
import {MatTreeModule} from '@angular/material/tree';
@NgModule({
declarations: [
NavigationComponent
],
imports: [
CommonModule,
MatSidenavModule,
RouterModule,
MatIconModule,
FormsModule,
UiModule,
A11yModule,
CdkStepperModule,
CdkTableModule,
CdkTreeModule,
DragDropModule,
MatAutocompleteModule,
MatBadgeModule,
MatBottomSheetModule,
MatButtonModule,
MatButtonToggleModule,
MatCardModule,
MatCheckboxModule,
MatChipsModule,
MatStepperModule,
MatDatepickerModule,
MatDialogModule,
MatDividerModule,
MatExpansionModule,
MatGridListModule,
MatIconModule,
MatInputModule,
MatListModule,
MatMenuModule,
MatNativeDateModule,
MatPaginatorModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatRadioModule,
MatRippleModule,
MatSelectModule,
MatSidenavModule,
MatSliderModule,
MatSlideToggleModule,
MatSnackBarModule,
MatSortModule,
MatTableModule,
MatTabsModule,
MatToolbarModule,
MatTooltipModule,
MatTreeModule,
PortalModule,
ScrollingModule,
],
exports: [
NavigationComponent
]
})
export class NavigationModule { }

159
src/app/pages/criminal-records-admin/criminal-records-admin.component.html

@ -0,0 +1,159 @@
<div class="recordsbox">
<div class="search">
<form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select id="level" formControlName="level" nzPlaceHolder="请选择级别">
<nz-option nzValue="1" nzLabel="一级"></nz-option>
<nz-option nzValue="2" nzLabel="二级"></nz-option>
<nz-option nzValue="3" nzLabel="三级"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select id="type" formControlName="type" nzPlaceHolder="请选择事件类型">
<nz-option nzValue="1" nzLabel="一级"></nz-option>
<nz-option nzValue="2" nzLabel="二级"></nz-option>
<nz-option nzValue="3" nzLabel="三级"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select id="site" formControlName="site" nzPlaceHolder="请选择地点">
<nz-option nzValue="1" nzLabel="一级"></nz-option>
<nz-option nzValue="2" nzLabel="二级"></nz-option>
<nz-option nzValue="3" nzLabel="三级"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-control>
<nz-range-picker formControlName="datePicker"></nz-range-picker>
<br />
</nz-form-control>
</nz-form-item>
<nz-form-item class="btn">
<nz-form-control>
<button nz-button type="submit" class="submit"><i nz-icon [nzType]="'search'"></i>查询</button>
</nz-form-control>
</nz-form-item>
<nz-form-item class="btn">
<nz-form-control>
<button nz-button type="button" class="reset" (click)="resetForm($event)"><i nz-icon
[nzType]="'sync'"></i>重置</button>
</nz-form-control>
</nz-form-item>
</form>
</div>
<div class="content">
<div class="title">
<app-title [name]="'违规类型统计'"></app-title>
</div>
<div class="chartsbox">
<div class="chart">
<div class="leftbox">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
违规事件统计
</span>
<div class="centerContent">
<div class="numname">违规事件总数</div>
<div class="num">206</div>
</div>
<div class="piechart" id="piechart">
</div>
</div>
<div class="rightbox">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
违规趋势
</span>
<div class="barchart" id="barchart">
</div>
</div>
</div>
</div>
<div class="title">
<app-title [name]="'违规类型统计'"></app-title>
</div>
<div class="tablebox">
<div class="table">
<div nz-row class="th">
<div nz-col nzSpan="4" style="box-sizing: border-box;padding-left: 18px;">
事件编号
</div>
<div nz-col nzSpan="2">
事件级别
</div>
<div nz-col nzSpan="4">
事件类型
</div>
<div nz-col nzSpan="2">
区域
</div>
<div nz-col nzSpan="1">
</div>
<div nz-col nzSpan="4">
加油站
</div>
<div nz-col nzSpan="3">
地点
</div>
<div nz-col nzSpan="3">
违规时间
</div>
<div nz-col nzSpan="1">
操作
</div>
</div>
<div class="tbody">
<div nz-row class="tr" *ngFor="let item of list">
<div nz-col nzSpan="4" style="box-sizing: border-box;padding-left: 18px;">
{{item.id}}
</div>
<div nz-col nzSpan="2">
{{item.level}}
</div>
<div nz-col nzSpan="4">
{{item.type}}
</div>
<div nz-col nzSpan="2">
山东淄博
</div>
<div nz-col nzSpan="1" style="text-align: right;box-sizing: border-box;padding-right: 8px;">
自营
</div>
<div nz-col nzSpan="4">
{{item.name}}
</div>
<div nz-col nzSpan="3">
{{item.site}}
</div>
<div nz-col nzSpan="3">
{{item.time}}
</div>
<div nz-col nzSpan="1" >
<span (click)="look()">查看</span>
</div>
</div>
</div>
</div>
<div class="pagination">
<nz-pagination [nzPageIndex]="1" [nzTotal]="85" [nzPageSize]="20" [nzShowTotal]="totalTemplate"
nzShowQuickJumper></nz-pagination>
<ng-template #totalTemplate let-total> 16条/页,共100条 </ng-template>
</div>
</div>
</div>
</div>

176
src/app/pages/criminal-records-admin/criminal-records-admin.component.scss

@ -0,0 +1,176 @@
.recordsbox {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.search {
box-sizing: border-box;
padding: 0 36px;
width: 100%;
height: 32px;
margin-top: 14px;
form {
width: 100%;
height: 32px;
display: flex;
justify-content: space-around;
.searchParams {
width: 22%;
}
.btn {
width: 5%;
}
nz-select {
color: rgba(145, 204, 255, 0.95);
}
nz-range-picker {
background-color: rgba(0, 0, 0, 0);
width: 97%;
}
}
}
.content {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
.title {
width: 100%;
height: 64px;
box-sizing: border-box;
padding: 0 28px;
margin: 13px 0;
}
.chartsbox {
width: 100%;
display: flex;
justify-content: center;
.chart {
width: 97%;
height: 360px;
border: 0px;
box-shadow: 0 0 26px 0px #1a7fd7 inset;
box-sizing: border-box;
padding: 18px 26px;
display: flex;
div {
display: flex;
flex-direction: column;
span {
font-family: titlefont;
display: flex;
align-items: center;
height: 28px;
color: #bee1ff;
font-size: 16px;
}
div {
flex: 1;
}
.piechart {}
.barchart {
border: 1px solid rgba(145, 204, 255, 0.95);
}
}
.leftbox {
width: 360px;
position: relative;
.centerContent {
position: absolute;
top: 42%;
left: 11%;
width: 170px;
div {
text-align: center;
}
.numname {
font-family: titlefont;
color: #bee1ff;
}
.num {
color: #FFFFFF;
font-size: 42px;
text-shadow: 0px 0px 16px #3A9AFF;
font-weight: bold;
height: 49px;
line-height: 50px;
}
}
}
.rightbox {
flex: 1;
}
}
}
.tablebox {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
.table {
color: white;
flex: 1;
width: 96%;
display: flex;
flex-direction: column;
overflow: hidden;
.th {
height: 38px;
line-height: 38px;
background: #054783;
}
.tbody {
flex: 1;
overflow-y: auto;
.tr {
height: 38px;
line-height: 38px;
border-bottom: 1px solid #0d3761;
}
}
}
.pagination {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: center;
}
::-webkit-scrollbar {
width: 0px;
}
}
}

131
src/app/pages/criminal-records-admin/criminal-records-admin.component.ts

@ -0,0 +1,131 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router'
import * as echarts from 'echarts';
@Component({
selector: 'app-criminal-records-admin',
templateUrl: './criminal-records-admin.component.html',
styleUrls: ['./criminal-records-admin.component.scss']
})
export class CriminalRecordsAdminComponent implements OnInit {
validateForm!: FormGroup;
constructor(private fb: FormBuilder, private router: Router) { }
ngOnInit(): void {
this.validateForm = this.fb.group({
level: [null],
type: [null],
site: [null],
datePicker: [null]
});
// 基于准备好的dom,初始化echarts实例
let myChart = echarts.init(document.getElementById('piechart'));
let option = {
color: ['#FF4B65', '#23D9FF', '#608AFF', '#B2FF6D', '#FFFF99', '#C4E2FC', '#FF7F00', '#0090FF', '#FFD634', '#105597', '#FF4B65', '#23D9FF', '#71FFF5', '#B2FF6D'],
tooltip: {
trigger: 'item'//触发类型
},
series: [
{
// name: 'Access From',
type: 'pie',
radius: [85, 112],//内半径外,外半径
left: '-30%',
avoidLabelOverlap: false,//防止标签重叠策略
label: {//每一个标签外网延伸的引导说明
show: false,
position: 'outside'
},
labelLine: {//引导线
show: true,
showAbove: true
},
emphasis: {//中间高亮区域
label: {
show: false,
fontSize: '40',
fontWeight: 'bold'
}
},
data: [
{ value: 26, name: '工作人员倚靠加油机或者立柱1' },
{ value: 86, name: '工作人员倚靠加油机或者立柱2' },
{ value: 34, name: '工作人员倚靠加油机或者立柱3' },
{ value: 55, name: '工作人员倚靠加油机或者立柱4' },
{ value: 60, name: '工作人员倚靠加油机或者立柱5' },
{ value: 26, name: '工作人员倚靠加油机或者立柱6' },
{ value: 86, name: '工作人员倚靠加油机或者立柱7' },
{ value: 34, name: '工作人员倚靠加油机或者立柱8' },
{ value: 55, name: '工作人员倚靠加油机或者立柱9' },
{ value: 60, name: '工作人员倚靠加油机或者立柱10' },
{ value: 26, name: '工作人员倚靠加油机或者立柱11' },
{ value: 86, name: '工作人员倚靠加油机或者立柱12' },
{ value: 34, name: '工作人员倚靠加油机或者立柱13' },
{ value: 55, name: '工作人员倚靠加油机或者立柱14' },
{ value: 60, name: '工作人员倚靠加油机或者立柱15' },
{ value: 26, name: '工作人员倚靠加油机或者立柱16' },
{ value: 86, name: '工作人员倚靠加油机或者立柱17' },
{ value: 34, name: '工作人员倚靠加油机或者立柱18' },
{ value: 55, name: '工作人员倚靠加油机或者立柱19' },
{ value: 60, name: '工作人员倚靠加油机或者立柱20' }
],
tooltip: {//鼠标移入提示
position: 'right',
padding: [14, 19],
backgroundColor: 'rgba(28, 129, 218, 0.4)',
textStyle: {
color: '#fff',
fontSize: 12
}
}
}
]
};
// 绘制图表
myChart.setOption(option);
}
submitForm(): void {
for (const i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
console.log(this.validateForm)
}
resetForm(e: MouseEvent): void {
e.preventDefault();
this.validateForm.reset();
for (const key in this.validateForm.controls) {
this.validateForm.controls[key].markAsPristine();
this.validateForm.controls[key].updateValueAndValidity();
}
}
list: any = [
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' },
{ id: 'SDFFDCDC484C8DCCCDGG', level: 'Ⅰ级', type: '工作人员倚靠加油机或立柱', name: '中化山东省淄博市第6加油站', site: '加油区2号摄像头', time: '2021-10-12 09:28:13' }
]
look() {
this.router.navigate(['home/records/petrolStation'])
}
}

28
src/app/pages/criminal-records/criminal-records.component.scss

@ -27,16 +27,17 @@
}
nz-select {
color: #fff;
color: rgba(145, 204, 255, 0.95);
}
nz-range-picker {
background-color: #002552;
background-color: rgba(0, 0, 0, 0);
width: 97%;
}
}
}
.content {
@ -44,6 +45,7 @@
display: flex;
flex-direction: column;
overflow: hidden;
.title {
margin-bottom: 15px;
width: 100%;
@ -69,38 +71,44 @@
display: flex;
flex-direction: column;
align-items: center;
overflow:hidden;
.table{
overflow: hidden;
.table {
color: white;
flex: 1;
width: 96%;
display: flex;
flex-direction: column;
overflow: hidden;
.th{
.th {
height: 38px;
line-height: 38px;
background: #054783;
}
.tbody{
.tbody {
flex: 1;
overflow-y: auto;
.tr{
.tr {
height: 38px;
line-height: 38px;
border-bottom: 1px solid #0d3761;
}
}
}
.pagination{
.pagination {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: center;
}
::-webkit-scrollbar {
width: 0px;
}
}
}

2
src/app/pages/home/home.component.html

@ -9,7 +9,7 @@
<li [routerLink]="['/home/warning/admin']" routerLinkActive="router-link-active">
今日预警
</li>
<li [routerLink]="['/home/records/petrolStation']" routerLinkActive="router-link-active">
<li [routerLink]="['/home/records/admin']" routerLinkActive="router-link-active">
违规记录
</li>
</div>

4
src/app/pages/pages-routing.module.ts

@ -5,12 +5,14 @@ import { TodayWarningComponent } from './today-warning/today-warning.component';
import { CriminalRecordsComponent } from './criminal-records/criminal-records.component';
import {AuthGuard} from '../auth.guard'
import { TodayWarningAdminComponent } from './today-warning-admin/today-warning-admin.component';
import { CriminalRecordsAdminComponent } from './criminal-records-admin/criminal-records-admin.component';
const routes: Routes = [
{ path: 'plan', component: PlanComponent , data: { permission: 'xxxx' },canActivate: [AuthGuard]},
{ path: 'warning/petrolStation', component: TodayWarningComponent },
{ path: 'warning/admin', component: TodayWarningAdminComponent },
{ path: 'records/petrolStation', component: CriminalRecordsComponent }
{ path: 'records/petrolStation', component: CriminalRecordsComponent },
{ path: 'records/admin', component: CriminalRecordsAdminComponent }
];
@NgModule({

7
src/app/pages/pages.module.ts

@ -28,9 +28,11 @@ import { NzModalModule } from 'ng-zorro-antd/modal';
import { NzPaginationModule } from 'ng-zorro-antd/pagination';
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
import { NzMessageModule } from 'ng-zorro-antd/message';
import { NzSpinModule } from 'ng-zorro-antd/spin';
import { TodayWarningAdminComponent } from './today-warning-admin/today-warning-admin.component';
import { CriminalRecordsAdminComponent } from './criminal-records-admin/criminal-records-admin.component';
@NgModule({
declarations: [LoginComponent, RegisterComponent, HomeComponent, PlanComponent, TodayWarningComponent, CriminalRecordsComponent, TodayWarningAdminComponent,],
declarations: [LoginComponent, RegisterComponent, HomeComponent, PlanComponent, TodayWarningComponent, CriminalRecordsComponent, TodayWarningAdminComponent, CriminalRecordsAdminComponent,],
imports: [
PagesRoutingModule,
CommonModule,
@ -55,7 +57,8 @@ import { TodayWarningAdminComponent } from './today-warning-admin/today-warning-
NzModalModule,
NzPaginationModule,
NzDropDownModule,
NzMessageModule
NzMessageModule,
NzSpinModule
]
})
export class PagesModule { }

1
src/app/pages/plan/plan.component.html

@ -1,3 +1,4 @@
<div class="loading" *ngIf="isShowLoading"><nz-spin nzSimple [nzSize]="'large'"></nz-spin></div>
<div class="content">
<canvas id="center"></canvas>

12
src/app/pages/plan/plan.component.scss

@ -5,6 +5,18 @@
position: relative;
canvas{ width: 100%; height: 100%; border: none; outline: none; }
}
.loading{ //loading
position: fixed;
left: 0;
top: 0;
z-index: 99999;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
display: flex;
justify-content: center;
align-items: center;
}
.anticon{ font-size: 16px; cursor: pointer; } //字体图标
//文本溢出
.overflowText{

34
src/app/pages/plan/plan.component.ts

@ -14,6 +14,9 @@ import { BuildingType } from 'src/app/babylon/model/data/institution/building/bu
import { BuildingWindow } from 'src/app/babylon/view/building-window/building-window';
import { FacilityUIItem } from 'src/app/babylon/view/facility-window/facility-ui-item';
import { FacilityWindow } from 'src/app/babylon/view/facility-window/facility-window';
import { FacilityInfoUIItem } from 'src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item';
import { EventManager } from '@angular/platform-browser';
import { NzMessageService } from 'ng-zorro-antd/message';
@ -24,18 +27,29 @@ import { FacilityWindow } from 'src/app/babylon/view/facility-window/facility-wi
})
export class PlanComponent implements OnInit {
constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService) { }
constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService, private eventManager: EventManager, private message: NzMessageService) { }
static instance: PlanComponent;
public game: Game = new Game();
public beforeOneSatus; //当前 satus
public canvas: HTMLCanvasElement; //canvas 实例
public isShowLoading: boolean = false; //显隐 loading加载条
ngOnInit(): void {
PlanComponent.instance = this;
ServeManager.Init(this.buildingBISrv, this.objectsSrv);
this.canvas = this.element.nativeElement.querySelector('#center') as HTMLCanvasElement;
this.game.init(this.canvas);
//监听 delete键盘事件
this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
if (event.keyCode == 46) { //delete
if (this.beforeOnePropertyData) {
let isDelete = confirm("是否删除已选择模型?");
if (isDelete) { this.beforeOnePropertyData.askDelete(false) };
}
}
})
//监听 delete键盘事件
}
ngAfterViewInit(): void {
@ -179,6 +193,14 @@ export class PlanComponent implements OnInit {
e == 0 ? bootomDiv.scrollLeft = bootomDiv.scrollLeft + 50 : bootomDiv.scrollLeft = bootomDiv.scrollLeft - 50
}
beforeOnePropertyData: FacilityInfoUIItem = null; //当前选择 设备
beforeOnefacilityInfo: string = null; //当前选择 设备ID
//获取选择设备 属性
getPropertyData(e: FacilityInfoUIItem) {
this.beforeOnePropertyData = e
}
selectRightTopFast: number = 0; //当前选择功能 快捷栏
selectAdsorb: boolean = false; //吸附状态
topLevelView: boolean = false; //顶视图状态
@ -190,7 +212,10 @@ export class PlanComponent implements OnInit {
//清空设备
clearDevice() {
ToolbarWindow.instance.clearHomeLessFacilityData()
let isClear = confirm('您确定要清空吗?')
if (isClear) {
ToolbarWindow.instance.clearHomeLessFacilityData()
}
}
//平移
@ -232,6 +257,11 @@ export class PlanComponent implements OnInit {
ToolbarWindow.instance.onBtnSave();
}
//通用 消息通知栏
openSnackBar(title: string) {
this.message.info(title);
}
}

2
src/app/pages/today-warning-admin/today-warning-admin.component.html

@ -145,7 +145,7 @@
2021-10-12 09:28:13
</div>
<div nz-col nzSpan="2">
<button nz-button>查看</button>
<button nz-button (click)="look()">查看</button>
<img style="margin-left: 24px;cursor: pointer;" src="../../../assets/images/excel.png" alt="">
</div>
</div>

6
src/app/pages/today-warning-admin/today-warning-admin.component.scss

@ -35,14 +35,14 @@
}
nz-select {
color: #fff;
color: rgba(145, 204, 255, 0.95);;
}
nz-date-picker {
background-color: #002552;
background-color: rgba(0, 0, 0, 0);
width: 145%;
}
}
}

6
src/app/pages/today-warning-admin/today-warning-admin.component.ts

@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router'
@Component({
selector: 'app-today-warning-admin',
templateUrl: './today-warning-admin.component.html',
@ -8,7 +9,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
export class TodayWarningAdminComponent implements OnInit {
validateForm!: FormGroup;
constructor(private fb: FormBuilder) { }
constructor(private fb: FormBuilder, private router: Router) { }
ngOnInit(): void {
this.validateForm = this.fb.group({
@ -66,4 +67,7 @@ export class TodayWarningAdminComponent implements OnInit {
this.isVisible = false;
}
look() {
this.router.navigate(['home/warning/petrolStation'])
}
}

6
src/app/pages/today-warning/today-warning.component.scss

@ -35,11 +35,11 @@
}
nz-select {
color: #fff;
color: rgba(145, 204, 255, 0.95);
}
nz-date-picker {
background-color: #002552;
background-color: rgba(0, 0, 0, 0);
width: 145%;
}
@ -79,12 +79,14 @@
color: #91CCFF;
margin-bottom: 12px;
background: linear-gradient(180deg, rgba(3, 0, 0, 0) 0%, rgba(0, 46, 91, 0.68) 100%);
div {
font-size: 15px;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
button {
font-size: 15px;
background-color: #013064;

1
src/app/system-management/navigation/navigation.component.html

@ -0,0 +1 @@
<p>系统管理页面</p>

0
src/app/system-management/navigation/navigation.component.scss

6
src/app/navigation/navigation.component.ts → src/app/system-management/navigation/navigation.component.ts

@ -1,5 +1,4 @@
import { Component, OnInit } from '@angular/core';
import {CacheTokenService} from '../service/cache-token.service'//引入服务
@Component({
selector: 'app-navigation',
@ -7,11 +6,10 @@ import {CacheTokenService} from '../service/cache-token.service'//引入服务
styleUrls: ['./navigation.component.scss']
})
export class NavigationComponent implements OnInit {
constructor(public navmenus:CacheTokenService) { }
ngOnInit() {
constructor() { }
ngOnInit(): void {
}
}

1
src/app/system-management/organization/organization.component.html

@ -0,0 +1 @@
<p>organization works!</p>

0
src/app/system-management/organization/organization.component.scss

15
src/app/system-management/organization/organization.component.ts

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-organization',
templateUrl: './organization.component.html',
styleUrls: ['./organization.component.scss']
})
export class OrganizationComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

1
src/app/system-management/role/role.component.html

@ -0,0 +1 @@
<p>role works!</p>

0
src/app/system-management/role/role.component.scss

15
src/app/system-management/role/role.component.ts

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-role',
templateUrl: './role.component.html',
styleUrls: ['./role.component.scss']
})
export class RoleComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

18
src/app/system-management/system-management-routing.module.ts

@ -0,0 +1,18 @@
import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import {AuthGuard} from '../auth.guard'
const routes: Routes = [
// { path: 'plan', component: PlanComponent },
// { path: 'warning/petrolStation', component: TodayWarningComponent },
// { path: 'warning/admin', component: TodayWarningAdminComponent },
// { path: 'records/petrolStation', component: CriminalRecordsComponent },
// { path: 'records/admin', component: CriminalRecordsAdminComponent }
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class SystemRoutingModule { }

18
src/app/system-management/system-management.module.ts

@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SystemRoutingModule } from './system-management-routing.module';
import { OrganizationComponent } from './organization/organization.component';
import { UserComponent } from './user/user.component';
import { RoleComponent } from './role/role.component';
import { NavigationComponent } from './navigation/navigation.component';
@NgModule({
declarations: [OrganizationComponent, UserComponent, RoleComponent, NavigationComponent],
imports: [
CommonModule,
SystemRoutingModule
]
})
export class SystemManagementModule { }

1
src/app/system-management/user/user.component.html

@ -0,0 +1 @@
<p>user works!</p>

0
src/app/system-management/user/user.component.scss

15
src/app/system-management/user/user.component.ts

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-user',
templateUrl: './user.component.html',
styleUrls: ['./user.component.scss']
})
export class UserComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

6
src/app/ui/changepassword/changepassword.component.ts

@ -1,6 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { MatDialogRef } from '@angular/material/dialog';
import { NzMessageService } from 'ng-zorro-antd/message';
@ -12,8 +11,7 @@ import { NzMessageService } from 'ng-zorro-antd/message';
export class ChangepasswordComponent implements OnInit {
constructor(private http: HttpClient,
public dialogRef: MatDialogRef<ChangepasswordComponent>, private message: NzMessageService) { }
constructor(private http: HttpClient, private message: NzMessageService) { }
ngOnInit() {
}
@ -27,7 +25,7 @@ export class ChangepasswordComponent implements OnInit {
password: e.password
}
).subscribe(data => {
this.dialogRef.close(data);
// this.dialogRef.close(data);
this.message.create('success', `密码修改成功`);
}, (err) => { this.errmsg = err }
)

1
src/app/ui/tabbar/tabbar.component.html

@ -16,6 +16,7 @@
</a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="system()">系统管理</li>
<li nz-menu-item (click)="signOut()">退出系统</li>
</ul>
</nz-dropdown-menu>

11
src/app/ui/tabbar/tabbar.component.ts

@ -2,7 +2,6 @@ import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { Router, ActivatedRoute } from '@angular/router'
import { CacheTokenService } from '../../service/cache-token.service' //引入服务
import { MatDialog } from '@angular/material/dialog';
import { ChangepasswordComponent } from '../changepassword/changepassword.component'
import { CookieService } from 'ngx-cookie-service';
import { NzMessageService } from 'ng-zorro-antd/message';
@ -15,7 +14,7 @@ import { NzMessageService } from 'ng-zorro-antd/message';
})
export class TabbarComponent implements OnInit {
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, public token: CacheTokenService, public dialog: MatDialog,
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, public token: CacheTokenService,
private cookieService: CookieService, private message: NzMessageService) { }
ngOnInit() {
@ -60,11 +59,13 @@ export class TabbarComponent implements OnInit {
this.cookieService.set("refreshToken", '', new Date(new Date().getTime() + 1), '/');
this.router.navigate(['/login'])
}
system(){
this.router.navigate(['/system'])
}
//修改密码
changpsw() {
let dialogRef = this.dialog.open(ChangepasswordComponent, { width: '348.000051px' });
dialogRef.afterClosed().subscribe();
// let dialogRef = this.dialog.open(ChangepasswordComponent, { width: '348.000051px' });
// dialogRef.afterClosed().subscribe();
}

71
src/app/ui/userdata/userdata.component.ts

@ -1,5 +1,4 @@
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import { HttpClient,HttpHeaders } from '@angular/common/http';
@ -11,7 +10,7 @@ import { HttpClient,HttpHeaders } from '@angular/common/http';
})
export class UserdataComponent implements OnInit {
constructor(private http: HttpClient,public dialog: MatDialog) { }
constructor(private http: HttpClient) { }
userInfo:any={}; // 用户信息
@ -29,12 +28,12 @@ export class UserdataComponent implements OnInit {
//修改资料弹窗
edit () {
let data = this.userInfo
let dialogRef = this.dialog.open(EditUser,{data});
dialogRef.afterClosed().subscribe(
(data)=>{
if (data) {this.getUserInfo()}
}
);
// let dialogRef = this.dialog.open(EditUser,{data});
// dialogRef.afterClosed().subscribe(
// (data)=>{
// if (data) {this.getUserInfo()}
// }
// );
}
@ -49,34 +48,34 @@ export class UserdataComponent implements OnInit {
styleUrls: ['./userdata.component.scss']
})
export class EditUser {
constructor(private http: HttpClient,public dialogRef: MatDialogRef<EditUser>,@Inject(MAT_DIALOG_DATA) public data) {}
ngOnInit() {
this.tel = this.data.phone
this.companyName = this.data.companyName
this.usci = this.data.usci
}
tel:any; //联系电话
companyName:any; //单位名称
usci:any; //统一社会信用代码
errMsg:any; //错误信息
//提交表单修改信息
onSubmit (e) {
this.http.put('/api/CompanyAccount/Profiles',{
name:this.data.name,
phone:e.tel,
enabled:this.data.enabled,
creationTime:this.data.creationTime,
usci:e.usci,
companyId:this.data.companyId,
companyName:e.companyName
}).subscribe(data=>{
this.dialogRef.close('success')
},(err) =>
{this.errMsg = err})
}
constructor(private http: HttpClient) {}
// ngOnInit() {
// this.tel = this.data.phone
// this.companyName = this.data.companyName
// this.usci = this.data.usci
// }
// tel:any; //联系电话
// companyName:any; //单位名称
// usci:any; //统一社会信用代码
// errMsg:any; //错误信息
// //提交表单修改信息
// onSubmit (e) {
// this.http.put('/api/CompanyAccount/Profiles',{
// name:this.data.name,
// phone:e.tel,
// enabled:this.data.enabled,
// creationTime:this.data.creationTime,
// usci:e.usci,
// companyId:this.data.companyId,
// companyName:e.companyName
// }).subscribe(data=>{
// this.dialogRef.close('success')
// },(err) =>
// {this.errMsg = err})
// }

BIN
src/assets/images/AnXinQQ.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

BIN
src/assets/images/AnXinWX.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

BIN
src/assets/images/flower.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/images/upload2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

20
src/theme.less

@ -4,7 +4,7 @@
@border-color-base: #8aacce;
@border-color-base: #91CCFF;
@select-background: transparent;
@ -13,25 +13,25 @@
.ant-btn {
border-radius: 0px;
}
.ant-btn:hover, .ant-btn:focus, .ant-btn:active, .ant-btn.active{
// background: #083461;
}
//select picker 小剪头
.ant-select-arrow,
.ant-picker-separator {
color: #478bcf;
color: #36A2FF;
}
//日期选择器
@input-placeholder-color: #8aacce;
.ant-picker-suffix {
color: #8aacce;
}
@input-placeholder-color: #345d85;
.ant-picker-suffix,
.ant-picker-input>input {
color: #fff;
color: rgba(145, 204, 255, 0.95);
}
//弹窗遮罩层
.ant-modal-mask {
background: rgba(0, 0, 0, 0.05);
@ -55,6 +55,8 @@
background: #107495;
}
//查询重置按钮
.submit {
background: rgba(0, 129, 255, 0.61);
border: 1px solid #36A2FF;

Loading…
Cancel
Save