diff --git a/src/app/routes/vehicle/components/list/carauth/carauth.component.ts b/src/app/routes/vehicle/components/list/carauth/carauth.component.ts index bbd91cfb..245f172c 100644 --- a/src/app/routes/vehicle/components/list/carauth/carauth.component.ts +++ b/src/app/routes/vehicle/components/list/carauth/carauth.component.ts @@ -102,7 +102,7 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', title: '车头照照片', ui: { - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -118,6 +118,19 @@ export class CarSettleCarauthComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + console.log(args); + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/carFrontPhotoWatermark', avatar); this.detailData.carFrontPhoto = args.file.response.data.fullFilePath } }, @@ -129,11 +142,15 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); return; } + console.log(_fileList) + observer.next(isLt2M); observer.complete(); }); }, - previewFile: (file: NzUploadFile) => of(file.url), + // previewFile: (file: NzUploadFile) => of( + // file?.response?.data?.fullFilePath + // ), } }, carNo: { @@ -215,7 +232,7 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', title: '挂靠协议', ui: { - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -231,6 +248,18 @@ export class CarSettleCarauthComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/carProtocalWatermark', avatar); this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath } }, @@ -277,7 +306,7 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', title: '行驶证首页照片', ui: { - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -293,6 +322,18 @@ export class CarSettleCarauthComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/certificatePhotoFrontWatermark', avatar); this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath this.checkCarCard(args.file.response.data.fullFilePath, 'front'); } else { @@ -311,7 +352,7 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); }); }, - previewFile: (file: NzUploadFile) => of(file.url), + // previewFile: (file: NzUploadFile) => of(file.url), } }, tipsB: { @@ -326,7 +367,7 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', title: '行驶证副页照片', ui: { - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -342,6 +383,18 @@ export class CarSettleCarauthComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/certificatePhotoBackWatermark', avatar); this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath this.checkCarCard(args.file.response.data.fullFilePath, 'back'); } else { @@ -360,7 +413,7 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); }); }, - previewFile: (file: NzUploadFile) => of(file.url), + // previewFile: (file: NzUploadFile) => of(file.url), } }, driverLicenseRegisterTime: { @@ -444,7 +497,7 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', title: '道运证照片', ui: { - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -460,6 +513,18 @@ export class CarSettleCarauthComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/roadTransportPhotoWatermark', avatar); this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath this.checkTransCard(args.file.response.data.fullFilePath); } else { @@ -478,7 +543,7 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); }); }, - previewFile: (file: NzUploadFile) => of(file.url), + // previewFile: (file: NzUploadFile) => of(file.url), } }, roadImg: {