|
@@ -1,9 +1,9 @@
|
|
|
-import { Component, OnInit, Input } from '@angular/core';
|
|
|
+import { Component, OnInit, Input, inject } from '@angular/core';
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
import { FormsModule } from '@angular/forms';
|
|
|
import { ActivatedRoute } from '@angular/router';
|
|
|
import { FmodeObject, FmodeParse } from 'fmode-ng/parse';
|
|
|
-import { ProjectUploadService } from '../../../services/upload.service';
|
|
|
+import { NovaUploadService } from 'fmode-ng/storage';
|
|
|
|
|
|
const Parse = FmodeParse.with('nova');
|
|
|
|
|
@@ -84,9 +84,11 @@ export class StageAftercareComponent implements OnInit {
|
|
|
generating: boolean = false;
|
|
|
saving: boolean = false;
|
|
|
|
|
|
+ // 注入上传服务
|
|
|
+ private uploadService = inject(NovaUploadService);
|
|
|
+
|
|
|
constructor(
|
|
|
- private route: ActivatedRoute,
|
|
|
- private uploadService:ProjectUploadService
|
|
|
+ private route: ActivatedRoute
|
|
|
) {}
|
|
|
|
|
|
async ngOnInit() {
|
|
@@ -182,7 +184,9 @@ export class StageAftercareComponent implements OnInit {
|
|
|
try {
|
|
|
this.uploading = true;
|
|
|
|
|
|
- let url = await this.uploadService?.uploadFile(file)
|
|
|
+ // 使用 NovaUploadService 上传文件
|
|
|
+ const fileResult = await this.uploadService.upload(file);
|
|
|
+ const url = fileResult.url;
|
|
|
|
|
|
// 暂时不使用OCR,需要手动输入金额和支付方式
|
|
|
this.finalPayment.paymentVouchers.push({
|