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) { if (error.status === 500) {
this.message.create('error', `状态500,服务器错误!${error.error.message}`); this.message.create('error', `状态500,服务器错误!${error.error.message}`);
} }
if (error.status === 404) {
this.message.create('error', `实体未找到!`);
}
if (error.error instanceof ErrorEvent) { if (error.error instanceof ErrorEvent) {
// 发生客户端或网络错误。相应处理。 // 发生客户端或网络错误。相应处理。
console.error('An error occurred:', error.error.message); 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, nzClosable: false,
nzOnOk: async () => { nzOnOk: async () => {
await new Promise(resolve => { await new Promise(resolve => {
let url let url = '/api/services/app/ContentAuditLog/Audit'
if (item.auditType == 0) { // if (item.auditType == 0) {
url = '/api/services/app/GasStation/Audit' // url = '/api/services/app/GasStation/Audit'
} else if (item.auditType == 1) { // } else if (item.auditType == 1) {
url = '/api/services/app/OrganizationValidityLicenseRule/Audit' // url = '/api/services/app/OrganizationValidityLicenseRule/Audit'
} else if (item.auditType == 2) { // } else if (item.auditType == 2) {
url = '/api/services/app/StationValidityLicense/Audit' // url = '/api/services/app/StationValidityLicense/Audit'
} else if (item.auditType) { // } else if (item.auditType) {
url = '/api/services/app/StationFileLicense/Audit' // url = '/api/services/app/StationFileLicense/Audit'
} // }
let params = { let params = {
id: item.auditType == 0 ? item.gasStation.id : item.getData.id, id: item.id,
remark: instance.textarea rejectReason: instance.textarea
} }
let body = instance.isPass ? 2 : 3; let body = instance.isPass ? 2 : 3;
this.http.post(url, body, { params }).subscribe(data => { 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> </ng-template>
</td> </td>
<td>{{item.creatorUser.name}}</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.auditUser.name}}</td>
<!-- <td>{{item.auditStatusDesc}}</td> --> <!-- <td>{{item.auditStatusDesc}}</td> -->
<td class="operation"> <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;"> <div class="rightbox" style="position: relative;">
<span class="chartname"> <span class="chartname">
<img src="../../../assets/images/flower.png" alt=""> <img src="../../../assets/images/flower.png" alt="">
近30天卸油作业总数走势 近30天卸油作业走势
</span> </span>
<div class="barchart" id="barchart"> <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%' barWidth: '25%'
}, },
{ {
name: '卸油事件', name: '卸油预警',
data: [], data: [],
type: 'line', type: 'line',
symbol: 'circle', symbol: 'circle',
@ -254,17 +254,17 @@ export class OilUnloadingProcessListComponent implements OnInit {
} }
} }
], ],
// legend: { legend: {
// selectedMode: false, // 是否允许点击 selectedMode: false, // 是否允许点击
// data: ['卸油事件'], data: ['卸油事件','卸油预警'],
// textStyle: { textStyle: {
// color: '#fff' color: '#fff'
// }, },
// right: 28, right: 28,
// top: 18, top: 18,
// itemWidth: 8, itemWidth: 8,
// itemHeight: 8, itemHeight: 8,
// }, },
grid: { grid: {
left: '42px', left: '42px',
right: '30px', right: '30px',
@ -495,13 +495,17 @@ export class OilUnloadingProcessListComponent implements OnInit {
//柱状图 //柱状图
let monthArr = [] let monthArr = []
let valuedata = [] let valuedata = []
let valuedata2 = []
data.list.forEach(element => { data.list.forEach(element => {
monthArr.push(moment(element.key).format('MM.DD')) monthArr.push(moment(element.key).format('MM.DD'))
valuedata.push(element.totalCount) valuedata.push(element.totalCount)
let item = Number(element.proccessBeforeCount + element.proccessingCount)
valuedata2.push(item)
}); });
// console.log('卸油预警',valuedata2)
this.oilchartbarOption.xAxis.data = monthArr this.oilchartbarOption.xAxis.data = monthArr
this.oilchartbarOption.series[0].data = valuedata this.oilchartbarOption.series[0].data = valuedata
this.oilchartbarOption.series[1].data = valuedata this.oilchartbarOption.series[1].data = valuedata2
this.mybarChart.setOption(this.oilchartbarOption); this.mybarChart.setOption(this.oilchartbarOption);
} }
refreshEchartsData2(data) { 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-input-group>
</nz-form-control> </nz-form-control>
</nz-form-item> </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-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="是否年检">是否年检</nz-form-label> <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> <label nz-checkbox formControlName="isYearlyCheck"></label>
</nz-form-control> </nz-form-control>
</nz-form-item> </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; validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } 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 { ngOnInit(): void {
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
name: [null, [Validators.required]], name: [null, [Validators.required]],
handleRemindDays: [90, [Validators.required]], handleRemindDays: [90, [Validators.required]],
closingRemindDays: [30, [Validators.required]], closingRemindDays: [30, [Validators.required]],
handleType: [null, [Validators.required]],
isEctype: [true, [Validators.required]],
isYearlyCheck: [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-input-group>
</nz-form-control> </nz-form-control>
</nz-form-item> </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-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="是否年检">是否年检</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="是否年检">是否年检</nz-form-label>
<nz-form-control nzErrorTip="请输入临期提醒时间"> <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; @Input() data?: any;
validateForm!: FormGroup; validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } 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 { ngOnInit(): void {
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
name: [this.data.licenseName, [Validators.required]], name: [this.data.licenseName, [Validators.required]],
handleRemindDays: [this.data.handleRemindDays, [Validators.required]], handleRemindDays: [this.data.handleRemindDays, [Validators.required]],
closingRemindDays: [this.data.closingRemindDays, [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]] 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 style="padding-left: 40px;">更新类证件</th>
<th>办理提醒时间</th> <th>办理提醒时间</th>
<th>临期提醒时间</th> <th>临期提醒时间</th>
<th>办理类型</th>
<th>是否上传副本</th>
<th>是否年检</th> <th>是否年检</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
@ -25,6 +27,8 @@
<td>{{data.licenseName}}</td> <td>{{data.licenseName}}</td>
<td>{{data.handleRemindDays}}天</td> <td>{{data.handleRemindDays}}天</td>
<td>{{data.closingRemindDays}}天</td> <td>{{data.closingRemindDays}}天</td>
<td>{{getHandleTypes(data.handleTypes)}}</td>
<td>{{data.hasAttachment ? '是' : '否'}}</td>
<td>{{data.isYearlyCheck ? '是' : '否'}}</td> <td>{{data.isYearlyCheck ? '是' : '否'}}</td>
<td class="operation"> <td class="operation">
<a (click)="edit(data)">编辑</a> <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) { } constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { }
ngOnInit(): void { ngOnInit(): void {
this.getLicense() this.getLicense()
} }
@ -53,6 +56,8 @@ export class UpdateOfLicenseComponent implements OnInit {
licenseName: instance.validateForm.value.name, licenseName: instance.validateForm.value.name,
handleRemindDays: instance.validateForm.value.handleRemindDays, handleRemindDays: instance.validateForm.value.handleRemindDays,
closingRemindDays: instance.validateForm.value.closingRemindDays, closingRemindDays: instance.validateForm.value.closingRemindDays,
hasAttachment: instance.validateForm.value.isEctype,
handleTypes: instance.validateForm.value.handleType,
isYearlyCheck: instance.validateForm.value.isYearlyCheck isYearlyCheck: instance.validateForm.value.isYearlyCheck
} }
this.http.post('/api/services/app/ValidityLicenseType/Create', body).subscribe(data => { 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, licenseName: instance.validateForm.value.name,
handleRemindDays: instance.validateForm.value.handleRemindDays, handleRemindDays: instance.validateForm.value.handleRemindDays,
closingRemindDays: instance.validateForm.value.closingRemindDays, closingRemindDays: instance.validateForm.value.closingRemindDays,
hasAttachment: instance.validateForm.value.isEctype,
handleTypes: instance.validateForm.value.handleType,
isYearlyCheck: instance.validateForm.value.isYearlyCheck isYearlyCheck: instance.validateForm.value.isYearlyCheck
} }
this.http.put('/api/services/app/ValidityLicenseType/Update', body).subscribe(data => { 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