Browse Source

[完善]完善油站信息录入

dev
邵佳豪 3 years ago
parent
commit
9e07113fd9
  1. 2
      src/app/pages/equipment-info/equipment-info.component.ts
  2. 4
      src/app/pages/home-page/home-page.component.html
  3. 5
      src/app/pages/home-page/home-page.component.scss
  4. 8
      src/app/pages/home-page/home-page.component.ts
  5. 2
      src/app/pages/login/login.component.ts
  6. 33
      src/app/pages/oil-station-info/oil-station-info.component.html
  7. 5
      src/app/pages/oil-station-info/oil-station-info.component.scss
  8. 16
      src/app/pages/oil-station-info/oil-station-info.component.ts
  9. 2
      src/app/pages/plan-admin/plan-admin.component.ts

2
src/app/pages/equipment-info/equipment-info.component.ts

@ -162,6 +162,6 @@ export class EquipmentInfoComponent implements OnInit {
} }
goback() { goback() {
this.router.navigate(['/warning/petrolStation']) this.router.navigate(['/todaywarning/petrolStation'])
} }
} }

4
src/app/pages/home-page/home-page.component.html

@ -198,14 +198,14 @@
<div class="numlistbox"> <div class="numlistbox">
<img src="../../../assets/images/licenseNum.png" alt=""> <img src="../../../assets/images/licenseNum.png" alt="">
<div class="content"> <div class="content">
<span class="lightspan lightspan3">{{HomeAggregatioData.dev.cameraCount}}</span> <span class="lightspan lightspan3">{{HomeAggregatioData.licenseViolationCount}}</span>
<span>证照预警数量</span> <span>证照预警数量</span>
</div> </div>
</div> </div>
<div class="numlistbox"> <div class="numlistbox">
<img src="../../../assets/images/fireNum.png" alt=""> <img src="../../../assets/images/fireNum.png" alt="">
<div class="content"> <div class="content">
<span class="lightspan lightspan3">{{HomeAggregatioData.dev.cameraCount}}</span> <span class="lightspan lightspan3">{{HomeAggregatioData.deviceViolationCount}}</span>
<span>消防设备预警数量</span> <span>消防设备预警数量</span>
</div> </div>
</div> </div>

5
src/app/pages/home-page/home-page.component.scss

@ -417,6 +417,9 @@
span { span {
color: white; color: white;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.lightspan { .lightspan {
@ -1214,7 +1217,7 @@
padding: 8px 0; padding: 8px 0;
.numlistbox { .numlistbox {
height:40px; height: 40px;
width: 80%; width: 80%;
display: flex; display: flex;
align-items: center; align-items: center;

8
src/app/pages/home-page/home-page.component.ts

@ -376,7 +376,7 @@ export class HomePageComponent implements OnInit {
left: '40px', left: '40px',
right: '30px', right: '30px',
bottom: '38px', bottom: '38px',
top: '26px' top: '36px'
} }
}; };
@ -452,7 +452,9 @@ export class HomePageComponent implements OnInit {
stationCount: '', stationCount: '',
violationCount: '', violationCount: '',
cameraCount: '' cameraCount: ''
} },
deviceViolationCount: '',
licenseViolationCount: ''
} }
totalCount totalCount
isSpin: boolean = false isSpin: boolean = false
@ -477,7 +479,7 @@ export class HomePageComponent implements OnInit {
{ name: '摄像头数量', value: data.result.dev.cameraCount }, { name: '摄像头数量', value: data.result.dev.cameraCount },
{ name: '预警模型数量', value: data.result.dev.violationCount } { name: '预警模型数量', value: data.result.dev.violationCount }
] ]
// console.log('图表信息', data.result) console.log('图表信息', data.result)
this.isSpin = false this.isSpin = false
this.eventEcharts(data.result) this.eventEcharts(data.result)
}) })

2
src/app/pages/login/login.component.ts

@ -123,7 +123,7 @@ export class LoginComponent implements OnInit {
} else { } else {
if (data.result.user.organization.isGasStation) { if (data.result.user.organization.isGasStation) {
sessionStorage.setItem("isGasStation", 'true'); sessionStorage.setItem("isGasStation", 'true');
this.router.navigate(['/warning/petrolStation']) this.router.navigate(['/todaywarning/petrolStation'])
this.message.create('success', `登录成功`); this.message.create('success', `登录成功`);
} else { } else {
sessionStorage.setItem("isGasStation", 'false'); sessionStorage.setItem("isGasStation", 'false');

33
src/app/pages/oil-station-info/oil-station-info.component.html

@ -316,15 +316,15 @@
<input (change)="filechange($event,key)" class="fileinput" type="file" name="" id=""> <input (change)="filechange($event,key)" class="fileinput" type="file" name="" id="">
<button nz-button [nzLoading]=""><i nz-icon nzType="upload" nzTheme="outline"></i>重新上传</button> <button nz-button [nzLoading]=""><i nz-icon nzType="upload" nzTheme="outline"></i>重新上传</button>
</div> </div>
<div class="timeDiv" style="min-width: 454px;"> <div class="timeDiv" style="width: 500px;">
<div class="timeDivflex"> <div class="timeDivflex">
<nz-form-item style="border: 1px solid #91CCFF"> <nz-form-item style="border: 1px solid #91CCFF" title="证照有效期开始时间">
<nz-form-control> <nz-form-control>
<nz-date-picker required [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'开始时间'" <nz-date-picker required [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'开始时间'"
[(ngModel)]="item.startTime" (ngModelChange)="onChange($event)"></nz-date-picker> [(ngModel)]="item.startTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item style="border: 1px solid #91CCFF"> <nz-form-item style="border: 1px solid #91CCFF" title="证照有效期结束时间">
<nz-form-control> <nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'结束时间'" <nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'结束时间'"
[(ngModel)]="item.endTime" (ngModelChange)="onChange($event)"></nz-date-picker> [(ngModel)]="item.endTime" (ngModelChange)="onChange($event)"></nz-date-picker>
@ -332,42 +332,45 @@
</nz-form-item> </nz-form-item>
</div> </div>
<div class="timeDivflex" style="margin: 6px 0;"> <div class="timeDivflex" style="margin: 6px 0;">
<nz-form-item style="border: 1px solid #91CCFF"> <nz-form-item style="border: 1px solid #91CCFF" title="证照到期第一次提醒时间">
<nz-form-control> <nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'一次提醒时间'" <nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'一次提醒时间'"
[(ngModel)]="item.firstWarnTime" (ngModelChange)="onChange($event)"></nz-date-picker> [(ngModel)]="item.firstWarnTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item style="border: 1px solid #91CCFF"> <nz-form-item style="border: 1px solid #91CCFF" title="证照到期第二次提醒时间">
<nz-form-control> <nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'二次提醒时间'" <nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'二次提醒时间'"
[(ngModel)]="item.secondWarnTime" (ngModelChange)="onChange($event)"></nz-date-picker> [(ngModel)]="item.secondWarnTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div class="timeDivflex timeDivflex2"> <div class="timeDivflex" style="margin-bottom: 6px;">
<!-- <nz-form-item style="margin-right: 10px;color: white;">
<nz-form-control>
<nz-input-group>
</nz-input-group>
</nz-form-control>
</nz-form-item> -->
<label style="color: white;" [ngModelOptions]="{standalone: true}" nz-checkbox <label style="color: white;" [ngModelOptions]="{standalone: true}" nz-checkbox
[(ngModel)]="item.hasAnnualInspection">是否年检</label> [(ngModel)]="item.hasAnnualInspection">是否年检</label>
<nz-form-item *ngIf="item.hasAnnualInspection" style="border: 1px solid #91CCFF"> </div>
<div class="timeDivflex timeDivflex2" *ngIf="item.hasAnnualInspection">
<nz-form-item style="border: 1px solid #91CCFF" title="年检时间">
<nz-form-control> <nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'年检时间'" <nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'年检时间'"
[(ngModel)]="item.annualInspectionTime" (ngModelChange)="onChange($event)"></nz-date-picker> [(ngModel)]="item.annualInspectionTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="item.hasAnnualInspection" style="border: 1px solid #91CCFF"> <nz-form-item style="border: 1px solid #91CCFF" title="年检提醒时间">
<nz-form-control> <nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'年检提醒时间'" <nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'年检提醒时间'"
[(ngModel)]="item.annualInspectionWarnTime" (ngModelChange)="onChange($event)"> [(ngModel)]="item.annualInspectionWarnTime" (ngModelChange)="onChange($event)">
</nz-date-picker> </nz-date-picker>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item title="年检机构">
<nz-form-control>
<nz-input-group>
<input style="border: 1px solid #91CCFF" [ngModelOptions]="{standalone: true}" placeholder="年检机构"
[(ngModel)]="item.annualInspectionOrganizationName" nz-input type="text" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
</div> </div>
</div> </div>
</div> </div>

5
src/app/pages/oil-station-info/oil-station-info.component.scss

@ -92,7 +92,7 @@
tr, tr,
td { td {
height: 138px; height: 155px;
} }
.imgbox { .imgbox {
@ -167,9 +167,8 @@
.timeDivflex2 { .timeDivflex2 {
align-items: center; align-items: center;
nz-form-item { nz-form-item {
width: 36%; width: 30%;
margin-right: 9px; margin-right: 9px;
} }
} }

16
src/app/pages/oil-station-info/oil-station-info.component.ts

@ -94,9 +94,9 @@ export class OilStationInfoComponent implements OnInit {
} }
if (this.httpBody.licenses.length == 0) { if (this.httpBody.licenses.length == 0) {
this.httpBody.licenses = [ this.httpBody.licenses = [
{ name: '营业执照', startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', type: 1, hasAnnualInspection: true }, { name: '营业执照', startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 1, hasAnnualInspection: true },
{ name: '危险化学品', startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', type: 3, hasAnnualInspection: false }, { name: '危险化学品', startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 3, hasAnnualInspection: false },
{ name: '成品油零售', startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', type: 2, hasAnnualInspection: true } { name: '成品油零售', startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 2, hasAnnualInspection: true }
] ]
} }
this.httpBody.stationType ? this.httpBody.stationType = String(this.httpBody.stationType) : null this.httpBody.stationType ? this.httpBody.stationType = String(this.httpBody.stationType) : null
@ -193,7 +193,7 @@ export class OilStationInfoComponent implements OnInit {
handleOk(): void { handleOk(): void {
this.isVisible = false; this.isVisible = false;
if(this.addName){ if (this.addName) {
this.addTr() this.addTr()
} }
} }
@ -204,15 +204,15 @@ export class OilStationInfoComponent implements OnInit {
} }
addTr() { addTr() {
this.httpBody.licenses.push( this.httpBody.licenses.push(
{ name: this.addName, startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', type: -1, hasAnnualInspection: false }, { name: this.addName, startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: -1, hasAnnualInspection: false },
) )
} }
deleteTrConfirm(key){ deleteTrConfirm(key) {
console.log(key) console.log(key)
this.httpBody.licenses.splice(key, 1); this.httpBody.licenses.splice(key, 1);
} }
goback() { goback() {
this.router.navigate(['/warning/petrolStation']) this.router.navigate(['/todaywarning/petrolStation'])
} }
submitForm() { submitForm() {

2
src/app/pages/plan-admin/plan-admin.component.ts

@ -113,7 +113,7 @@ export class PlanAdminComponent implements OnInit {
} }
} }
sessionStorage.setItem('userdataOfgasstation', JSON.stringify(gastionobj)) sessionStorage.setItem('userdataOfgasstation', JSON.stringify(gastionobj))
this.router.navigate(['/warning/petrolStation']) this.router.navigate(['/todaywarning/petrolStation'])
let obj = { let obj = {
name: 'oilstation' name: 'oilstation'
} }

Loading…
Cancel
Save