project.model.ts 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. // 需求项目接口
  2. export interface RequirementItem {
  3. id: string;
  4. description: string;
  5. status: string;
  6. priority: 'high' | 'medium' | 'low';
  7. }
  8. // 客户信息接口
  9. export interface CustomerInfo {
  10. colorPreference?: string;
  11. spaceRequirements?: string;
  12. materialPreference?: string;
  13. }
  14. // 项目模型
  15. export interface Project {
  16. id: string;
  17. name: string;
  18. customerName: string;
  19. customerPhone?: string;
  20. customerWechat?: string;
  21. customerType?: string;
  22. customerSource?: string;
  23. customerRemark?: string;
  24. customerInfo?: CustomerInfo;
  25. customerTags: CustomerTag[];
  26. highPriorityNeeds: string[];
  27. requirements?: RequirementItem[];
  28. status: ProjectStatus;
  29. currentStage: ProjectStage;
  30. stage: ProjectStage; // 添加stage属性,与currentStage保持一致
  31. createdAt: Date;
  32. deadline: Date;
  33. assigneeId: string;
  34. assigneeName: string;
  35. skillsRequired: string[];
  36. finalPaymentAmount?: number; // 添加尾款金额属性
  37. customerReviewCompleted?: boolean; // 客户评价是否完成
  38. customerReviewCompletedAt?: Date; // 客户评价完成时间
  39. }
  40. // 客户标签
  41. export interface CustomerTag {
  42. source: '朋友圈' | '信息流';
  43. needType: '硬装' | '软装';
  44. preference: '现代' | '宋式' | '欧式';
  45. colorAtmosphere: string;
  46. }
  47. // 项目状态
  48. export type ProjectStatus = '进行中' | '已完成' | '已暂停' | '已延期';
  49. // 项目阶段
  50. export type ProjectStage = '订单创建' | '需求沟通' | '方案确认' | '建模' | '软装' | '渲染' | '后期' | '尾款结算' | '客户评价' | '投诉处理';
  51. // 任务模型
  52. // 修复 Task 接口,将 completedAt 改为 completedDate(与实际代码保持一致)
  53. export interface Task {
  54. priority: any;
  55. assignee: any;
  56. description: any;
  57. id: string;
  58. projectId: string;
  59. projectName: string;
  60. title: string;
  61. stage: ProjectStage;
  62. deadline: Date;
  63. isOverdue: boolean;
  64. isCompleted: boolean;
  65. completedDate?: Date; // 修正为 completedDate
  66. }
  67. // 添加 Milestone 接口定义
  68. export interface Milestone {
  69. id: string;
  70. title: string;
  71. description: string;
  72. dueDate: Date;
  73. completedDate?: Date | null;
  74. isCompleted: boolean;
  75. }
  76. // 添加 Message 接口定义
  77. export interface Message {
  78. id: string;
  79. sender: string;
  80. content: string;
  81. timestamp: Date;
  82. isRead: boolean;
  83. type: 'text' | 'image' | 'file';
  84. }
  85. // 添加 FileItem 接口定义
  86. export interface FileItem {
  87. id: string;
  88. name: string;
  89. type: 'document' | 'image' | 'spreadsheet' | 'other';
  90. size: string;
  91. url: string;
  92. uploadedBy: string;
  93. uploadedAt: Date;
  94. downloadCount: number;
  95. }
  96. // 渲染进度
  97. export interface RenderProgress {
  98. id: string;
  99. projectId: string;
  100. completionRate: number; // 百分比
  101. estimatedTimeRemaining: number; // 小时
  102. status: '进行中' | '已完成' | '已失败';
  103. stage?: string; // 添加渲染阶段属性
  104. updatedAt: Date;
  105. }
  106. // 模型误差检查项
  107. export interface ModelCheckItem {
  108. id: string;
  109. name: string;
  110. isPassed: boolean;
  111. notes?: string;
  112. }
  113. // 客户反馈
  114. export interface CustomerFeedback {
  115. id: string;
  116. projectId: string;
  117. content: string;
  118. isSatisfied: boolean;
  119. problemLocation?: string;
  120. expectedEffect?: string;
  121. referenceCase?: string;
  122. status: '待处理' | '处理中' | '已解决';
  123. createdAt: Date;
  124. updatedAt?: Date;
  125. tag?: string;
  126. // 添加模板中使用的属性
  127. customerName?: string;
  128. rating?: number;
  129. response?: string;
  130. }
  131. // 设计师变更记录
  132. export interface DesignerChange {
  133. id: string;
  134. projectId: string;
  135. oldDesignerId: string;
  136. oldDesignerName: string;
  137. newDesignerId: string;
  138. newDesignerName: string;
  139. changeTime: Date;
  140. acceptanceTime?: Date;
  141. historicalAchievements: string[];
  142. completedWorkload: number; // 百分比
  143. reason?: string; // 添加变更原因属性
  144. }
  145. // 结算记录
  146. export interface Settlement {
  147. id: string;
  148. projectId: string;
  149. stage?: ProjectStage;
  150. type?: 'deposit' | 'progress' | 'final_payment';
  151. amount: number;
  152. percentage?: number;
  153. status: '待结算' | '已结算' | '逾期' | 'pending' | 'completed';
  154. createdAt: Date;
  155. settledAt?: Date;
  156. completionTime?: Date;
  157. projectName?: string;
  158. dueDate?: Date;
  159. initiatedBy?: string;
  160. initiatedAt?: Date;
  161. notifiedCustomerService?: boolean;
  162. paymentReceived?: boolean;
  163. paymentReceivedAt?: Date;
  164. imagesUnlocked?: boolean;
  165. imagesUnlockedAt?: Date;
  166. }
  167. // 技能标签
  168. export interface SkillTag {
  169. id: string;
  170. name: string;
  171. level: number; // 1-5
  172. count: number; // 完成项目数量
  173. }
  174. // 绩效数据
  175. export interface PerformanceData {
  176. month: string;
  177. projectCompletionRate: number;
  178. customerSatisfaction: number;
  179. deliveryOnTimeRate: number;
  180. }
  181. // 匹配订单
  182. export interface MatchingOrder {
  183. id: string;
  184. projectName: string;
  185. requiredSkills: string[];
  186. matchRate: number;
  187. customerLevel: '优质' | '普通';
  188. }
  189. // 全景合成相关接口
  190. // 空间图像
  191. export interface SpaceImage {
  192. id: string;
  193. name: string;
  194. url: string;
  195. thumbnailUrl: string;
  196. type: 'living_room' | 'bedroom' | 'kitchen' | 'bathroom' | 'dining_room' | 'study' | 'balcony';
  197. size: number;
  198. width: number;
  199. height: number;
  200. format: 'jpg' | 'png' | 'webp';
  201. uploadDate: Date;
  202. isPrimary: boolean;
  203. }
  204. // 全景空间
  205. export interface PanoramicSpace {
  206. id: string;
  207. name: string;
  208. type: 'living_room' | 'bedroom' | 'kitchen' | 'bathroom' | 'dining_room' | 'study' | 'balcony';
  209. images: SpaceImage[];
  210. thumbnailUrl: string;
  211. createdAt: Date;
  212. updatedAt: Date;
  213. status: 'pending' | 'processing' | 'completed' | 'failed';
  214. progress?: number;
  215. }
  216. // 全景合成空间类型
  217. export type PanoramicSpaceType = 'living_room' | 'bedroom' | 'kitchen' | 'bathroom' | 'dining_room' | 'study' | 'balcony';
  218. // 全景合成
  219. export interface PanoramicSynthesis {
  220. id: string;
  221. projectId: string;
  222. projectName: string;
  223. spaces: Array<{
  224. id: string;
  225. name: string;
  226. type: PanoramicSpaceType;
  227. imageCount: number;
  228. viewAngle?: string;
  229. }>;
  230. status: 'draft' | 'processing' | 'completed' | 'published';
  231. createdAt: Date;
  232. updatedAt: Date;
  233. completedAt?: Date;
  234. previewUrl?: string;
  235. downloadUrl?: string;
  236. shareLink?: string;
  237. quality: 'standard' | 'high' | 'ultra';
  238. renderTime?: number;
  239. fileSize?: number;
  240. progress?: number;
  241. }