Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

new-project-modal.component.html 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. @if (visible) {
  2. <div class="modal-overlay" (click)="close()">
  3. <div class="modal-container" (click)="$event.stopPropagation()">
  4. <div class="modal-header">
  5. <h2>新建项目</h2>
  6. <button mat-icon-button (click)="close()">
  7. <mat-icon>close</mat-icon>
  8. </button>
  9. </div>
  10. <div class="modal-content">
  11. <form #projectForm="ngForm" (ngSubmit)="createProject()">
  12. <!-- 智能体选择 -->
  13. <mat-form-field appearance="outline" class="full-width">
  14. <mat-label>选择智能体</mat-label>
  15. <mat-select [(ngModel)]="projectData.agent_name" name="agent_name" required>
  16. @for (agent of agents; track agent.value) {
  17. <mat-option [value]="agent.value">{{ agent.label }}</mat-option>
  18. }
  19. </mat-select>
  20. <mat-hint>选择处理项目的智能体</mat-hint>
  21. </mat-form-field>
  22. <!-- 项目标题 -->
  23. <mat-form-field appearance="outline" class="full-width">
  24. <mat-label>项目标题</mat-label>
  25. <input matInput [(ngModel)]="projectData.title" name="title" required maxlength="100">
  26. <mat-hint>输入项目标题,最多100个字符</mat-hint>
  27. </mat-form-field>
  28. <!-- 项目描述 -->
  29. <mat-form-field appearance="outline" class="full-width">
  30. <mat-label>项目描述</mat-label>
  31. <textarea matInput [(ngModel)]="projectData.description" name="description" rows="4"></textarea>
  32. <mat-hint>详细描述项目需求和目标</mat-hint>
  33. </mat-form-field>
  34. <div class="modal-actions">
  35. <button mat-button type="button" (click)="close()">取消</button>
  36. <button
  37. mat-raised-button
  38. color="primary"
  39. type="submit"
  40. [disabled]="!projectForm.valid || isLoading"
  41. >
  42. @if (isLoading) {
  43. <mat-spinner diameter="20"></mat-spinner>
  44. } @else {
  45. 创建项目
  46. }
  47. </button>
  48. </div>
  49. </form>
  50. </div>
  51. </div>
  52. </div>
  53. }