project.model.ts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. // 项目模型
  2. export interface Project {
  3. id: string;
  4. name: string;
  5. customerName: string;
  6. customerTags: CustomerTag[];
  7. highPriorityNeeds: string[];
  8. status: ProjectStatus;
  9. currentStage: ProjectStage;
  10. createdAt: Date;
  11. deadline: Date;
  12. assigneeId: string;
  13. assigneeName: string;
  14. skillsRequired: string[];
  15. }
  16. // 客户标签
  17. export interface CustomerTag {
  18. source: '朋友圈' | '信息流';
  19. needType: '硬装' | '软装';
  20. preference: '现代' | '宋式' | '欧式';
  21. colorAtmosphere: string;
  22. }
  23. // 项目状态
  24. export type ProjectStatus = '进行中' | '已完成' | '已暂停' | '已延期';
  25. // 项目阶段
  26. export type ProjectStage = '前期沟通' | '建模' | '软装' | '渲染' | '后期' | '完成';
  27. // 任务模型
  28. // 修复 Task 接口,将 completedAt 改为 completedDate(与实际代码保持一致)
  29. export interface Task {
  30. priority: any;
  31. assignee: any;
  32. description: any;
  33. id: string;
  34. projectId: string;
  35. projectName: string;
  36. title: string;
  37. stage: ProjectStage;
  38. deadline: Date;
  39. isOverdue: boolean;
  40. isCompleted: boolean;
  41. completedDate?: Date; // 修正为 completedDate
  42. }
  43. // 添加 Milestone 接口定义
  44. export interface Milestone {
  45. id: string;
  46. title: string;
  47. description: string;
  48. dueDate: Date;
  49. completedDate?: Date | null;
  50. isCompleted: boolean;
  51. }
  52. // 添加 Message 接口定义
  53. export interface Message {
  54. id: string;
  55. sender: string;
  56. content: string;
  57. timestamp: Date;
  58. isRead: boolean;
  59. type: 'text' | 'image' | 'file';
  60. }
  61. // 添加 FileItem 接口定义
  62. export interface FileItem {
  63. id: string;
  64. name: string;
  65. type: 'document' | 'image' | 'spreadsheet' | 'other';
  66. size: string;
  67. url: string;
  68. uploadedBy: string;
  69. uploadedAt: Date;
  70. downloadCount: number;
  71. }
  72. // 渲染进度
  73. export interface RenderProgress {
  74. id: string;
  75. projectId: string;
  76. completionRate: number; // 百分比
  77. estimatedTimeRemaining: number; // 小时
  78. status: '进行中' | '已完成' | '已失败';
  79. updatedAt: Date;
  80. }
  81. // 模型误差检查项
  82. export interface ModelCheckItem {
  83. id: string;
  84. name: string;
  85. isPassed: boolean;
  86. notes?: string;
  87. }
  88. // 客户反馈
  89. export interface CustomerFeedback {
  90. id: string;
  91. projectId: string;
  92. content: string;
  93. isSatisfied: boolean;
  94. problemLocation?: string;
  95. expectedEffect?: string;
  96. referenceCase?: string;
  97. status: '待处理' | '处理中' | '已解决';
  98. createdAt: Date;
  99. updatedAt?: Date;
  100. tag?: string;
  101. // 添加模板中使用的属性
  102. customerName?: string;
  103. rating?: number;
  104. response?: string;
  105. }
  106. // 设计师变更记录
  107. export interface DesignerChange {
  108. id: string;
  109. projectId: string;
  110. oldDesignerId: string;
  111. oldDesignerName: string;
  112. newDesignerId: string;
  113. newDesignerName: string;
  114. changeTime: Date;
  115. acceptanceTime?: Date;
  116. historicalAchievements: string[];
  117. completedWorkload: number; // 百分比
  118. }
  119. // 结算记录
  120. export interface Settlement {
  121. id: string;
  122. projectId: string;
  123. stage: ProjectStage;
  124. amount: number;
  125. percentage: number;
  126. status: '待结算' | '已结算';
  127. createdAt: Date;
  128. settledAt?: Date;
  129. completionTime?: Date;
  130. projectName?: string;
  131. }
  132. // 技能标签
  133. export interface SkillTag {
  134. id: string;
  135. name: string;
  136. level: number; // 1-5
  137. count: number; // 完成项目数量
  138. }
  139. // 绩效数据
  140. export interface PerformanceData {
  141. month: string;
  142. projectCompletionRate: number;
  143. customerSatisfaction: number;
  144. deliveryOnTimeRate: number;
  145. }
  146. // 匹配订单
  147. export interface MatchingOrder {
  148. id: string;
  149. projectName: string;
  150. requiredSkills: string[];
  151. matchRate: number;
  152. customerLevel: '优质' | '普通';
  153. }