-
+
diff --git a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts
index 3701930..825b327 100644
--- a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts
+++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts
@@ -23,12 +23,14 @@ export class EditFileCategoryComponent implements OnInit {
type: [null, [Validators.required]]
});
this.data2 = JSON.parse(JSON.stringify(this.data))
+ this.validatyType = (this.data2.validatyType).toString()
+ console.log(this.data2)
}
+ validatyType: string
isLongTerm = false
imageUrl = '/api/Objects/sinochemweb/stationPhotos/175/timg.jpg'
validityChange($event) {
- console.log($event)
this.isLongTerm = $event
}
@@ -70,6 +72,7 @@ export class EditFileCategoryComponent implements OnInit {
let dataObj = data as any;
let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName;
this.imageUrl = filePath
+ this.data2.imageUrl = filePath
console.log('上传成功', filePath)
resolve('success')
});
@@ -85,6 +88,7 @@ export class EditFileCategoryComponent implements OnInit {
let dataObj = value as any;
let filePath = dataObj.filePath
this.imageUrl = filePath
+ this.data2.imageUrl = filePath
console.log('上传成功', filePath)
});
diff --git a/src/app/pages/license/file-category/file-category.component.html b/src/app/pages/license/file-category/file-category.component.html
index 3839e04..2d5eec8 100644
--- a/src/app/pages/license/file-category/file-category.component.html
+++ b/src/app/pages/license/file-category/file-category.component.html
@@ -17,19 +17,30 @@
- 证件名称
+ {{item.licenseTypeName || ''}}
+ |
+
+ 有
+ 无
+ 不适用
+ |
+
+
|
- 有效期类型 |
+ {{item.committedTime | date:"yyyy/MM/dd"}}未提交审核 |
-
+ 无
+ 审核中
+ 审核通过
+ 审核驳回
+ 未提交审核
+ 审核完成
|
- 提交时间 |
- 审核状态 |
编辑
详情
- 提交审核
+ 撤销审核
+ 提交审核
|
diff --git a/src/app/pages/license/file-category/file-category.component.ts b/src/app/pages/license/file-category/file-category.component.ts
index 052d489..4af5b3e 100644
--- a/src/app/pages/license/file-category/file-category.component.ts
+++ b/src/app/pages/license/file-category/file-category.component.ts
@@ -17,7 +17,7 @@ export class FileCategoryComponent implements OnInit {
constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { }
tableSpin = false
- list = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ list = []; //tabelData
tableScrollHeight
ngOnInit(): void {
@@ -26,10 +26,21 @@ export class FileCategoryComponent implements OnInit {
fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
});
+ this.getStationList()
}
+
+ //获取当前油站档案类证照
+ getStationList() {
+ let data = JSON.parse(sessionStorage.getItem('userdataOfgasstation'));
+ let params = { orgId: data.organization.id || "" }
+ this.http.get(`/api/services/app/StationFileLicense/GetStationList`,{params}).subscribe((info: any)=>{
+ this.list = info.result
+ console.log(info.result)
+ })
+ }
+
//查看图片
viewImg(url) {
- // url.split('?')[0]
let dom = document.getElementById(`viewerjs`)
let pObjs = dom.childNodes;
let node = document.createElement("img")
@@ -49,11 +60,10 @@ export class FileCategoryComponent implements OnInit {
}
dispose() {
- console.log('处置')
+
}
edit(item) {
- console.log('item', item)
const modal = this.modal.create({
nzContent: EditFileCategoryComponent,
nzViewContainerRef: this.viewContainerRef,
@@ -71,34 +81,21 @@ export class FileCategoryComponent implements OnInit {
nzFooter: null,
nzClosable: false,
nzOnOk: async () => {
- if (instance.validateForm.valid) {
- await new Promise(resolve => {
- let body = {
- id: item.id,
- name: instance.validateForm.value.name,
- storageLocation: instance.validateForm.value.storageLocation,
- productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'),
- maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'),
- validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'),
- organizationUnitId: item.organizationUnitId
- }
- // this.http.put('/api/services/app/FireEquipment/Update', body).subscribe(data => {
- // resolve(data)
- // this.message.create('success', '修改成功!');
- // return true
- // })
+ await new Promise(resolve => {
+ instance.data2.validatyType = Number(instance.validatyType)
+ this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe(data => {
+ resolve(data);
+ this.getStationList();
+ this.message.create('success', '修改成功!');
+ return true
})
- } else {
- this.message.create('warning', '请填写完整!');
- return false
- }
+ })
}
});
const instance = modal.getContentComponent();
modal.afterClose.subscribe(result => { });
}
details(item) {
- console.log('item', item)
const modal = this.modal.create({
nzContent: DetailsFileCategoryComponent,
nzViewContainerRef: this.viewContainerRef,
@@ -122,4 +119,23 @@ export class FileCategoryComponent implements OnInit {
const instance = modal.getContentComponent();
modal.afterClose.subscribe(result => { });
}
+
+ //提交审核
+ submitReview(item){
+ let params = { id: item.id }
+ this.http.post('/api/services/app/StationFileLicense/Commit', {},{params}).subscribe(data => {
+ this.message.create('success', '提交审核成功!');
+ this.getStationList();
+ })
+ }
+
+ //撤销审核
+ cancelReview(item){
+ let params = { id: item.id }
+ this.http.post('/api/services/app/StationFileLicense/Uncommit', {},{params}).subscribe(data => {
+ this.message.create('success', '撤销审核成功!');
+ this.getStationList();
+ })
+ }
+
}