page-crm-image.ts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. import { Component } from '@angular/core';
  2. import { CommonModule } from '@angular/common';
  3. import { FormsModule } from '@angular/forms';
  4. @Component({
  5. selector: 'app-page-crm-image',
  6. standalone: true,
  7. imports: [CommonModule, FormsModule],
  8. templateUrl: './page-crm-image.html',
  9. styleUrls: ['./page-crm-image.scss']
  10. })
  11. export class PageCrmImage {
  12. clientId = '';
  13. clientName = '';
  14. chatData = '';
  15. clients = [
  16. {
  17. id: 'C1001',
  18. name: '张明远',
  19. type: '企业客户',
  20. date: '06-28'
  21. },
  22. {
  23. id: 'P2003',
  24. name: '李思琪',
  25. type: '个人客户',
  26. date: '06-27'
  27. },
  28. {
  29. id: 'C1002',
  30. name: '王建国',
  31. type: '企业客户',
  32. date: '06-25'
  33. },
  34. {
  35. id: 'P2004',
  36. name: '陈晓薇',
  37. type: '个人客户',
  38. date: '06-24'
  39. }
  40. ];
  41. recommendations = [
  42. {
  43. icon: 'fas fa-user-friends',
  44. title: '相似客户推荐',
  45. content: '根据张明远的画像特征,发现3位相似客户,沟通策略可复用率85%',
  46. tag: '高匹配度',
  47. buttonText: '查看客户',
  48. iconColor: 'rgba(74, 143, 231, 0.15)',
  49. iconTextColor: '#4a8fe7'
  50. },
  51. {
  52. icon: 'fas fa-clock',
  53. title: '最佳接触时机',
  54. content: '李思琪的下次最佳联系时间:明天上午10:00-11:30,接通率预测92%',
  55. tag: '高接通率',
  56. buttonText: '加入日程',
  57. iconColor: 'rgba(94, 114, 228, 0.15)',
  58. iconTextColor: '#5e72e4'
  59. }
  60. ];
  61. searchTerm = '';
  62. onClientClick(client: any) {
  63. alert(`进入客户详情页:${client.name}`);
  64. }
  65. analyze() {
  66. if (!this.clientId || !this.clientName || !this.chatData) {
  67. alert('请填写完整的客户信息和聊天记录');
  68. return;
  69. }
  70. alert(`开始分析客户 ${this.clientName} (${this.clientId}) 的聊天记录...`);
  71. }
  72. save() {
  73. if (!this.clientId || !this.clientName || !this.chatData) {
  74. alert('请填写完整的客户信息和聊天记录');
  75. return;
  76. }
  77. alert(`已保存客户 ${this.clientName} (${this.clientId}) 的信息和聊天记录`);
  78. }
  79. }