|
@@ -316,7 +316,7 @@ interface ProductContent {
|
|
|
name: string;
|
|
|
url: string;
|
|
|
size?: string;
|
|
|
- fileCategory: string; // 'delivery' | 'reference' | 'other'
|
|
|
+ category: string; // 'delivery' | 'reference' | 'other'
|
|
|
reviewStatus?: 'pending' | 'approved' | 'rejected';
|
|
|
synced?: boolean; // 是否已同步到客户端
|
|
|
uploadTime: Date; // 上传时间
|
|
@@ -411,7 +411,7 @@ class ProductDeliveryService {
|
|
|
name: file.get("fileName"),
|
|
|
url: file.get("fileUrl"),
|
|
|
size: this.formatFileSize(file.get("fileSize")),
|
|
|
- fileCategory: file.get("fileCategory"),
|
|
|
+ category: file.get("category"),
|
|
|
reviewStatus: file.get("data")?.reviewStatus || "pending",
|
|
|
uploadTime: file.get("createdAt"),
|
|
|
uploadedBy: file.get("uploadedBy")?.get("name")
|
|
@@ -438,7 +438,7 @@ class ProductDeliveryService {
|
|
|
async getProductDeliveryFiles(productId: string, stage: string): Promise<Parse.Object[]> {
|
|
|
const fileQuery = new Parse.Query("ProjectFile");
|
|
|
fileQuery.equalTo("product", { __type: "Pointer", className: "Product", objectId: productId });
|
|
|
- fileQuery.equalTo("fileCategory", "delivery");
|
|
|
+ fileQuery.equalTo("category", "delivery");
|
|
|
fileQuery.equalTo("stage", stage);
|
|
|
fileQuery.notEqualTo("isDeleted", true);
|
|
|
fileQuery.descending("createdAt");
|
|
@@ -726,7 +726,7 @@ class BatchOperationService {
|
|
|
async batchUploadFiles(
|
|
|
productIds: string[],
|
|
|
files: File[],
|
|
|
- fileCategory: string,
|
|
|
+ category: string,
|
|
|
stage: string,
|
|
|
uploaderId: string
|
|
|
): Promise<BatchUploadResult> {
|
|
@@ -746,7 +746,7 @@ class BatchOperationService {
|
|
|
for (const productId of productIds) {
|
|
|
const projectFile = new Parse.Object("ProjectFile");
|
|
|
projectFile.set("product", { __type: "Pointer", className: "Product", objectId: productId });
|
|
|
- projectFile.set("fileCategory", fileCategory);
|
|
|
+ projectFile.set("category", category);
|
|
|
projectFile.set("stage", stage);
|
|
|
projectFile.set("uploadedBy", { __type: "Pointer", className: "Profile", objectId: uploaderId });
|
|
|
|
|
@@ -1527,7 +1527,7 @@ export class ProgressTrackerComponent {
|
|
|
|
|
|
#### 3.4.1 文件分类结构
|
|
|
```typescript
|
|
|
-interface FileCategory {
|
|
|
+interface category {
|
|
|
id: 'white_model' | 'soft_decor' | 'rendering' | 'post_process';
|
|
|
name: string;
|
|
|
icon: string;
|
|
@@ -1536,7 +1536,7 @@ interface FileCategory {
|
|
|
maxSize: number; // MB
|
|
|
}
|
|
|
|
|
|
-export const FILE_CATEGORIES: FileCategory[] = [
|
|
|
+export const FILE_CATEGORIES: category[] = [
|
|
|
{
|
|
|
id: 'white_model',
|
|
|
name: '白模建模',
|
|
@@ -1975,7 +1975,7 @@ export const TEAM_ROLES: TeamRole[] = [
|
|
|
<div class="upload-options">
|
|
|
<div class="form-group">
|
|
|
<label>文件分类:</label>
|
|
|
- <select v-model="batchUploadOptions.fileCategory">
|
|
|
+ <select v-model="batchUploadOptions.category">
|
|
|
<option value="delivery">交付物文件</option>
|
|
|
<option value="reference">参考文件</option>
|
|
|
<option value="document">文档资料</option>
|