|
|
|
@ -38,7 +38,7 @@ export class UpdateCategoryComponent implements OnInit {
|
|
|
|
|
this.tableSpin = true |
|
|
|
|
let data = JSON.parse(sessionStorage.getItem('userdataOfgasstation')); |
|
|
|
|
let params = { orgId: data.organization.id || "" } |
|
|
|
|
this.http.get(`/api/services/app/StationValidityLicense/GetCurStationLicense`,{params}).subscribe((info: any)=>{ |
|
|
|
|
this.http.get(`/api/services/app/StationValidityLicense/GetCurStationLicense`, { params }).subscribe((info: any) => { |
|
|
|
|
this.list = info.result |
|
|
|
|
this.tableSpin = false |
|
|
|
|
console.log(info.result) |
|
|
|
@ -46,29 +46,29 @@ export class UpdateCategoryComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取办理类型
|
|
|
|
|
getHandleTypes(handleTypes: any[]):string { |
|
|
|
|
getHandleTypes(handleTypes: any[]): string { |
|
|
|
|
if (!handleTypes || !handleTypes.length) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
let names: string[] = [] |
|
|
|
|
let handleTypeList = JSON.parse(JSON.stringify(handleTypes)); |
|
|
|
|
let list: handleTypeList[] = new handleType().list; |
|
|
|
|
handleTypeList.forEach(item=>{ |
|
|
|
|
list.find(element=>{ |
|
|
|
|
item == element.value? names.push(element.name) : null |
|
|
|
|
handleTypeList.forEach(item => { |
|
|
|
|
list.find(element => { |
|
|
|
|
item == element.value ? names.push(element.name) : null |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
return names.join(',') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取文件格式
|
|
|
|
|
getFileType(name: string):string { |
|
|
|
|
getFileType(name: string): string { |
|
|
|
|
let suffix |
|
|
|
|
if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) { |
|
|
|
|
if (name.substring(name.length - 4).includes('png') || name.substring(name.length - 4).includes('jpg') || name.substring(name.length - 4).includes('jpeg') || name.substring(name.length - 4).includes('webp')) { |
|
|
|
|
suffix = 'img' |
|
|
|
|
} else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) { |
|
|
|
|
} else if (name.substring(name.length - 4).includes('doc') || name.substring(name.length - 4).includes('docx')) { |
|
|
|
|
suffix = 'word' |
|
|
|
|
} else if (name.substring(name.length-4).includes('pdf')) { |
|
|
|
|
} else if (name.substring(name.length - 4).includes('pdf')) { |
|
|
|
|
suffix = 'pdf' |
|
|
|
|
} |
|
|
|
|
return suffix |
|
|
|
@ -103,7 +103,7 @@ export class UpdateCategoryComponent implements OnInit {
|
|
|
|
|
let arr = item.split('.') |
|
|
|
|
arr[arr.length - 1] = 'pdf' |
|
|
|
|
window.open(arr.join('.')) |
|
|
|
|
} else if (this.getFileType(item) == 'pdf') { |
|
|
|
|
} else if (this.getFileType(item) == 'pdf') { |
|
|
|
|
window.open(item) |
|
|
|
|
} else { |
|
|
|
|
this.message.create('warning', '暂不支持查看!'); |
|
|
|
@ -152,6 +152,12 @@ export class UpdateCategoryComponent implements OnInit {
|
|
|
|
|
body.validityStartTime = instance.isNoLongTermTime[0] || new Date() |
|
|
|
|
body.validityEndTime = instance.isNoLongTermTime[1] || new Date() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (body.imageUrl.indexOf('http') == -1) { |
|
|
|
|
let newUrl = window.location.protocol + '//' + window.location.host + body.imageUrl |
|
|
|
|
body.imageUrl = newUrl |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!instance.isSubmit) { |
|
|
|
|
this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe((data:any) => { |
|
|
|
|
this.getStationList(); |
|
|
|
@ -167,7 +173,8 @@ export class UpdateCategoryComponent implements OnInit {
|
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} //else
|
|
|
|
|
}
|
|
|
|
|
// return false;
|
|
|
|
|
} else { |
|
|
|
|
this.message.create('warning', '请填写完整!'); |
|
|
|
|
return false; |
|
|
|
@ -204,14 +211,14 @@ export class UpdateCategoryComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//提交审核
|
|
|
|
|
submitReview(item){ |
|
|
|
|
submitReview(item) { |
|
|
|
|
if (!item.id) { |
|
|
|
|
this.message.create('warning', '该证照请编辑保存后再提交审核!'); |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
return new Promise((resolve, reject)=>{ |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
let params = { id: item.id } |
|
|
|
|
this.http.post('/api/services/app/StationValidityLicense/Commit', {},{params}).subscribe(data => { |
|
|
|
|
this.http.post('/api/services/app/StationValidityLicense/Commit', {}, { params }).subscribe(data => { |
|
|
|
|
this.message.create('success', '提交审核成功!'); |
|
|
|
|
this.getStationList(); |
|
|
|
|
resolve('success'); |
|
|
|
@ -220,9 +227,9 @@ export class UpdateCategoryComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//撤销审核
|
|
|
|
|
cancelReview(item){ |
|
|
|
|
cancelReview(item) { |
|
|
|
|
let params = { id: item.id } |
|
|
|
|
this.http.post('/api/services/app/StationValidityLicense/Uncommit', {},{params}).subscribe(data => { |
|
|
|
|
this.http.post('/api/services/app/StationValidityLicense/Uncommit', {}, { params }).subscribe(data => { |
|
|
|
|
this.message.create('success', '撤销审核成功!'); |
|
|
|
|
this.getStationList(); |
|
|
|
|
}) |
|
|
|
|