Browse Source

[完善]更新类证照管理 增加统一字段

beijing
邵佳豪 3 years ago
parent
commit
7b5d1b0de6
  1. 3
      src/app/http-interceptors/base-interceptor.ts
  2. 24
      src/app/pages/audit/audit-ing/audit-ing.component.ts
  3. 2
      src/app/pages/audit/audit-record/audit-record.component.html
  4. 2
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html
  5. 30
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts
  6. 20
      src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html
  7. 14
      src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts
  8. 16
      src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html
  9. 15
      src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts
  10. 4
      src/app/system-management/update-of-license/update-of-license.component.html
  11. 36
      src/app/system-management/update-of-license/update-of-license.component.ts

3
src/app/http-interceptors/base-interceptor.ts

@ -86,6 +86,9 @@ export class BaseInterceptor implements HttpInterceptor {
if (error.status === 500) {
this.message.create('error', `状态500,服务器错误!${error.error.message}`);
}
if (error.status === 404) {
this.message.create('error', `实体未找到!`);
}
if (error.error instanceof ErrorEvent) {
// 发生客户端或网络错误。相应处理。
console.error('An error occurred:', error.error.message);

24
src/app/pages/audit/audit-ing/audit-ing.component.ts

@ -103,19 +103,19 @@ export class AuditIngComponent implements OnInit {
nzClosable: false,
nzOnOk: async () => {
await new Promise(resolve => {
let url
if (item.auditType == 0) {
url = '/api/services/app/GasStation/Audit'
} else if (item.auditType == 1) {
url = '/api/services/app/OrganizationValidityLicenseRule/Audit'
} else if (item.auditType == 2) {
url = '/api/services/app/StationValidityLicense/Audit'
} else if (item.auditType) {
url = '/api/services/app/StationFileLicense/Audit'
}
let url = '/api/services/app/ContentAuditLog/Audit'
// if (item.auditType == 0) {
// url = '/api/services/app/GasStation/Audit'
// } else if (item.auditType == 1) {
// url = '/api/services/app/OrganizationValidityLicenseRule/Audit'
// } else if (item.auditType == 2) {
// url = '/api/services/app/StationValidityLicense/Audit'
// } else if (item.auditType) {
// url = '/api/services/app/StationFileLicense/Audit'
// }
let params = {
id: item.auditType == 0 ? item.gasStation.id : item.getData.id,
remark: instance.textarea
id: item.id,
rejectReason: instance.textarea
}
let body = instance.isPass ? 2 : 3;
this.http.post(url, body, { params }).subscribe(data => {

2
src/app/pages/audit/audit-record/audit-record.component.html

@ -123,7 +123,7 @@
</ng-template>
</td>
<td>{{item.creatorUser.name}}</td>
<td>{{item.committedTime | date:"yyyy/MM/dd HH:mm:ss"}}</td>
<td>{{item.auditTime | date:"yyyy/MM/dd HH:mm:ss"}}</td>
<td>{{item.auditUser.name}}</td>
<!-- <td>{{item.auditStatusDesc}}</td> -->
<td class="operation">

2
src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html

@ -36,7 +36,7 @@
<div class="rightbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
近30天卸油作业总数走势
近30天卸油作业走势
</span>
<div class="barchart" id="barchart">

30
src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts

@ -235,7 +235,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
barWidth: '25%'
},
{
name: '卸油事件',
name: '卸油预警',
data: [],
type: 'line',
symbol: 'circle',
@ -254,17 +254,17 @@ export class OilUnloadingProcessListComponent implements OnInit {
}
}
],
// legend: {
// selectedMode: false, // 是否允许点击
// data: ['卸油事件'],
// textStyle: {
// color: '#fff'
// },
// right: 28,
// top: 18,
// itemWidth: 8,
// itemHeight: 8,
// },
legend: {
selectedMode: false, // 是否允许点击
data: ['卸油事件','卸油预警'],
textStyle: {
color: '#fff'
},
right: 28,
top: 18,
itemWidth: 8,
itemHeight: 8,
},
grid: {
left: '42px',
right: '30px',
@ -495,13 +495,17 @@ export class OilUnloadingProcessListComponent implements OnInit {
//柱状图
let monthArr = []
let valuedata = []
let valuedata2 = []
data.list.forEach(element => {
monthArr.push(moment(element.key).format('MM.DD'))
valuedata.push(element.totalCount)
let item = Number(element.proccessBeforeCount + element.proccessingCount)
valuedata2.push(item)
});
// console.log('卸油预警',valuedata2)
this.oilchartbarOption.xAxis.data = monthArr
this.oilchartbarOption.series[0].data = valuedata
this.oilchartbarOption.series[1].data = valuedata
this.oilchartbarOption.series[1].data = valuedata2
this.mybarChart.setOption(this.oilchartbarOption);
}
refreshEchartsData2(data) {

20
src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html

@ -24,9 +24,27 @@
</nz-input-group>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="办理类型">办理类型</nz-form-label>
<nz-form-control nzErrorTip="请选择办理类型">
<nz-select formControlName="handleType" nzMode="multiple">
<nz-option [nzValue]="item.value" [nzLabel]="item.name" *ngFor="let item of handleTypeList">
</nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="是否上传副本">是否上传副本</nz-form-label>
<nz-form-control>
<label nz-checkbox formControlName="isEctype"></label>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="是否年检">是否年检</nz-form-label>
<nz-form-control nzErrorTip="请输入临期提醒时间">
<nz-form-control>
<label nz-checkbox formControlName="isYearlyCheck"></label>
</nz-form-control>
</nz-form-item>

14
src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts

@ -13,12 +13,26 @@ export class AddUpdateOfLicenseComponent implements OnInit {
validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { }
handleTypeList = [
{ value: 0, name: "无" },
{ value: 1, name: "年度公示" },
{ value: 2, name: "年检" },
{ value: 3, name: "到期换证" },
{ value: 4, name: "年度执行报告" },
{ value: 5, name: "到期检测" },
{ value: 6, name: "年度复训" },
{ value: 7, name: "年度检测" },
{ value: 8, name: "到期备案" },
{ value: 9, name: "到期评价" },
]
ngOnInit(): void {
this.validateForm = this.fb.group({
name: [null, [Validators.required]],
handleRemindDays: [90, [Validators.required]],
closingRemindDays: [30, [Validators.required]],
handleType: [null, [Validators.required]],
isEctype: [true, [Validators.required]],
isYearlyCheck: [true, [Validators.required]]
});
}

16
src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html

@ -24,6 +24,22 @@
</nz-input-group>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="办理类型">办理类型</nz-form-label>
<nz-form-control nzErrorTip="请选择办理类型">
<nz-select formControlName="handleType" nzMode="multiple">
<nz-option [nzValue]="item.value" [nzLabel]="item.name" *ngFor="let item of handleTypeList">
</nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="是否上传副本">是否上传副本</nz-form-label>
<nz-form-control>
<label nz-checkbox formControlName="isEctype"></label>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="是否年检">是否年检</nz-form-label>
<nz-form-control nzErrorTip="请输入临期提醒时间">

15
src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts

@ -13,12 +13,25 @@ export class EditUpdateOfLicenseComponent implements OnInit {
@Input() data?: any;
validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { }
handleTypeList = [
{ value: 0, name: "无" },
{ value: 1, name: "年度公示" },
{ value: 2, name: "年检" },
{ value: 3, name: "到期换证" },
{ value: 4, name: "年度执行报告" },
{ value: 5, name: "到期检测" },
{ value: 6, name: "年度复训" },
{ value: 7, name: "年度检测" },
{ value: 8, name: "到期备案" },
{ value: 9, name: "到期评价" },
]
ngOnInit(): void {
this.validateForm = this.fb.group({
name: [this.data.licenseName, [Validators.required]],
handleRemindDays: [this.data.handleRemindDays, [Validators.required]],
closingRemindDays: [this.data.closingRemindDays, [Validators.required]],
handleType: [this.data.handleTypes, [Validators.required]],
isEctype: [this.data.hasAttachment, [Validators.required]],
isYearlyCheck: [this.data.isYearlyCheck, [Validators.required]]
});
}

4
src/app/system-management/update-of-license/update-of-license.component.html

@ -16,6 +16,8 @@
<th style="padding-left: 40px;">更新类证件</th>
<th>办理提醒时间</th>
<th>临期提醒时间</th>
<th>办理类型</th>
<th>是否上传副本</th>
<th>是否年检</th>
<th>操作</th>
</tr>
@ -25,6 +27,8 @@
<td>{{data.licenseName}}</td>
<td>{{data.handleRemindDays}}天</td>
<td>{{data.closingRemindDays}}天</td>
<td>{{getHandleTypes(data.handleTypes)}}</td>
<td>{{data.hasAttachment ? '是' : '否'}}</td>
<td>{{data.isYearlyCheck ? '是' : '否'}}</td>
<td class="operation">
<a (click)="edit(data)">编辑</a>

36
src/app/system-management/update-of-license/update-of-license.component.ts

@ -15,6 +15,9 @@ export class UpdateOfLicenseComponent implements OnInit {
constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { }
ngOnInit(): void {
this.getLicense()
}
@ -53,6 +56,8 @@ export class UpdateOfLicenseComponent implements OnInit {
licenseName: instance.validateForm.value.name,
handleRemindDays: instance.validateForm.value.handleRemindDays,
closingRemindDays: instance.validateForm.value.closingRemindDays,
hasAttachment: instance.validateForm.value.isEctype,
handleTypes: instance.validateForm.value.handleType,
isYearlyCheck: instance.validateForm.value.isYearlyCheck
}
this.http.post('/api/services/app/ValidityLicenseType/Create', body).subscribe(data => {
@ -93,6 +98,8 @@ export class UpdateOfLicenseComponent implements OnInit {
licenseName: instance.validateForm.value.name,
handleRemindDays: instance.validateForm.value.handleRemindDays,
closingRemindDays: instance.validateForm.value.closingRemindDays,
hasAttachment: instance.validateForm.value.isEctype,
handleTypes: instance.validateForm.value.handleType,
isYearlyCheck: instance.validateForm.value.isYearlyCheck
}
this.http.put('/api/services/app/ValidityLicenseType/Update', body).subscribe(data => {
@ -136,6 +143,31 @@ export class UpdateOfLicenseComponent implements OnInit {
}
});
}
handleTypeList = [
{ value: 0, name: "无" },
{ value: 1, name: "年度公示" },
{ value: 2, name: "年检" },
{ value: 3, name: "到期换证" },
{ value: 4, name: "年度执行报告" },
{ value: 5, name: "到期检测" },
{ value: 6, name: "年度复训" },
{ value: 7, name: "年度检测" },
{ value: 8, name: "到期备案" },
{ value: 9, name: "到期评价" },
]
//获取办理类型
getHandleTypes(handleTypes: any[]): string {
if (!handleTypes || !handleTypes.length) {
return
}
let names: string[] = []
let handleTypeList = JSON.parse(JSON.stringify(handleTypes));
let list = this.handleTypeList;
handleTypeList.forEach(item => {
list.find(element => {
item == element.value ? names.push(element.name) : null
})
})
return names.join(',')
}
}

Loading…
Cancel
Save