|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
import { HttpClient } from '@angular/common/http'; |
|
|
|
|
import { Component, Input, OnInit } from '@angular/core'; |
|
|
|
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
|
|
|
|
import { NzModalRef } from 'ng-zorro-antd/modal'; |
|
|
|
|
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; |
|
|
|
|
import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; |
|
|
|
|
import Viewer from 'viewerjs'; |
|
|
|
|
@Component({ |
|
|
|
@ -12,7 +12,7 @@ import Viewer from 'viewerjs';
|
|
|
|
|
export class UploadComponent implements OnInit { |
|
|
|
|
@Input() data?: any; |
|
|
|
|
validateForm!: FormGroup; |
|
|
|
|
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService) { } |
|
|
|
|
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService, private modal2: NzModalService) { } |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log(this.data) |
|
|
|
@ -124,4 +124,16 @@ export class UploadComponent implements OnInit {
|
|
|
|
|
node.click(); |
|
|
|
|
}, 0); |
|
|
|
|
} |
|
|
|
|
delete(fileList, key) { |
|
|
|
|
this.modal2.confirm({ |
|
|
|
|
nzTitle: `确定要删除这个文件吗?`, |
|
|
|
|
nzOkText: '确定', |
|
|
|
|
nzOkType: 'primary', |
|
|
|
|
nzOnOk: () => { |
|
|
|
|
fileList.splice(key, 1) |
|
|
|
|
}, |
|
|
|
|
nzCancelText: '取消' |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|