Browse Source

feat: new

yuebuzu-creater 4 months ago
parent
commit
5de3737ea0
37 changed files with 79 additions and 425 deletions
  1. 0 2
      wisdom-app/src/app/page/inquiry-human/inquiry-human.component.html
  2. 0 7
      wisdom-app/src/app/page/page-authority-experts/page-authority-experts.component.html
  3. 0 0
      wisdom-app/src/app/page/page-authority-experts/page-authority-experts.component.scss
  4. 0 22
      wisdom-app/src/app/page/page-authority-experts/page-authority-experts.component.spec.ts
  5. 0 26
      wisdom-app/src/app/page/page-authority-experts/page-authority-experts.component.ts
  6. 7 5
      wisdom-app/src/app/page/page-create-agent/page-create-agent.component.html
  7. 21 8
      wisdom-app/src/app/page/page-create-agent/page-create-agent.component.ts
  8. 0 7
      wisdom-app/src/app/page/page-drug-purchase/page-drug-purchase.component.html
  9. 0 0
      wisdom-app/src/app/page/page-drug-purchase/page-drug-purchase.component.scss
  10. 0 22
      wisdom-app/src/app/page/page-drug-purchase/page-drug-purchase.component.spec.ts
  11. 0 26
      wisdom-app/src/app/page/page-drug-purchase/page-drug-purchase.component.ts
  12. 0 7
      wisdom-app/src/app/page/page-health-information/page-health-information.component.html
  13. 0 0
      wisdom-app/src/app/page/page-health-information/page-health-information.component.scss
  14. 0 22
      wisdom-app/src/app/page/page-health-information/page-health-information.component.spec.ts
  15. 0 26
      wisdom-app/src/app/page/page-health-information/page-health-information.component.ts
  16. 0 7
      wisdom-app/src/app/page/page-health-records/page-health-records.component.html
  17. 0 0
      wisdom-app/src/app/page/page-health-records/page-health-records.component.scss
  18. 0 22
      wisdom-app/src/app/page/page-health-records/page-health-records.component.spec.ts
  19. 0 26
      wisdom-app/src/app/page/page-health-records/page-health-records.component.ts
  20. 1 1
      wisdom-app/src/app/page/page-inquiry/page-inquiry.component.html
  21. 5 3
      wisdom-app/src/app/page/page-my-health/page-my-health.component.html
  22. 18 7
      wisdom-app/src/app/page/page-my-health/page-my-health.component.ts
  23. 0 7
      wisdom-app/src/app/page/page-phone-inquiry/page-phone-inquiry.component.html
  24. 0 0
      wisdom-app/src/app/page/page-phone-inquiry/page-phone-inquiry.component.scss
  25. 0 22
      wisdom-app/src/app/page/page-phone-inquiry/page-phone-inquiry.component.spec.ts
  26. 0 26
      wisdom-app/src/app/page/page-phone-inquiry/page-phone-inquiry.component.ts
  27. 0 11
      wisdom-app/src/app/page/page-smart-community/page-smart-community.component.html
  28. 0 0
      wisdom-app/src/app/page/page-smart-community/page-smart-community.component.scss
  29. 0 22
      wisdom-app/src/app/page/page-smart-community/page-smart-community.component.spec.ts
  30. 0 29
      wisdom-app/src/app/page/page-smart-community/page-smart-community.component.ts
  31. 10 6
      wisdom-app/src/app/tab1/tab1.page.ts
  32. 0 16
      wisdom-app/src/app/tab2/tab2.page.html
  33. 1 5
      wisdom-app/src/app/tab2/tab2.page.ts
  34. 3 1
      wisdom-app/src/app/tab4/tab4.page.html
  35. 10 2
      wisdom-app/src/app/tab4/tab4.page.ts
  36. 2 2
      wisdom-app/src/app/tabs/tabs.page.html
  37. 1 30
      wisdom-app/src/app/tabs/tabs.routes.ts

+ 0 - 2
wisdom-app/src/app/page/inquiry-human/inquiry-human.component.html

@@ -7,8 +7,6 @@
 </ion-header>
 
 <ion-content>
-
-  
   <div>
     <ion-list>
       <ion-item>

+ 0 - 7
wisdom-app/src/app/page/page-authority-experts/page-authority-experts.component.html

@@ -1,7 +0,0 @@
-<ion-header [translucent]="true">
-  <ion-toolbar class="searchbar">
-    <div>
-      <ion-button (click)="backhome()" color="primary" slot="start">{{back}}</ion-button>
-    </div>
-  </ion-toolbar>
-</ion-header>

+ 0 - 0
wisdom-app/src/app/page/page-authority-experts/page-authority-experts.component.scss


+ 0 - 22
wisdom-app/src/app/page/page-authority-experts/page-authority-experts.component.spec.ts

@@ -1,22 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-
-import { PageAuthorityExpertsComponent } from './page-authority-experts.component';
-
-describe('PageAuthorityExpertsComponent', () => {
-  let component: PageAuthorityExpertsComponent;
-  let fixture: ComponentFixture<PageAuthorityExpertsComponent>;
-
-  beforeEach(waitForAsync(() => {
-    TestBed.configureTestingModule({
-      imports: [PageAuthorityExpertsComponent],
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(PageAuthorityExpertsComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  }));
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 26
wisdom-app/src/app/page/page-authority-experts/page-authority-experts.component.ts

@@ -1,26 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonButton, IonHeader, IonToolbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'page-authority-experts',
-  templateUrl: './page-authority-experts.component.html',
-  styleUrls: ['./page-authority-experts.component.scss'],
-  standalone: true,
-  imports:[
-    IonHeader,IonToolbar,IonButton,
-  ]
-})
-export class PageAuthorityExpertsComponent  implements OnInit {
-
-  constructor(
-    private router: Router
-  ) { }
-
-  ngOnInit() {}
-  back:string = "<";
-  backhome(){
-    this.router.navigate(['/tabs/tab1']);
-  }
-
-}

+ 7 - 5
wisdom-app/src/app/page/page-create-agent/page-create-agent.component.html

@@ -8,8 +8,10 @@
   </ion-toolbar>
 </ion-header>
 
-
 <ion-content [fullscreen]="true">
+  <ion-refresher slot="fixed" (ionRefresh)="handleRefresh($event)">
+    <ion-refresher-content></ion-refresher-content>
+  </ion-refresher>
   <div style="text-align: center; margin-top: 20px">
     <img height="80px" [src]="currentUser.get('avatar')" alt="" style="border-radius: 50%;">
     <p>AI生成头像</p>
@@ -54,11 +56,11 @@
     </ion-card-header>
     <ion-card-content>
       <ion-list>
-        <ion-item (click)="openInquiry(agent)" *ngFor="let agent of agentList" lines="none">
-          <ion-thumbnail slot="start">
+        <ion-item  *ngFor="let agent of agentList" lines="none">
+          <ion-thumbnail slot="start" (click)="openInquiry(agent)">
             <img [src]="agent.get('avatar') || '../../assets/image/doctor7.png'" [alt]="agent.get('name')" />
           </ion-thumbnail>
-          <div class="doctor-info">
+          <div class="doctor-info" (click)="openInquiry(agent)">
             <div>
               <ion-text>{{ agent.get('name') }}({{ agent.get('age') }}岁)</ion-text>
             </div>
@@ -66,7 +68,7 @@
               <ion-text>{{ agent.get('gender') }}</ion-text>
             </div>
           </div>
-          <ion-button ios="logo-apple" size="small" color="Danger" (click)="deleteAgent(agent)" slot="end">删除</ion-button>
+          <ion-button ios="logo-apple" size="small" color="danger" (click)="deleteAgent(agent)" slot="end">删除</ion-button>
         </ion-item>
       </ion-list>
     </ion-card-content>

+ 21 - 8
wisdom-app/src/app/page/page-create-agent/page-create-agent.component.ts

@@ -1,7 +1,7 @@
 import { Component, OnInit } from '@angular/core';
 import { Router } from '@angular/router';
 import { CloudObject, CloudQuery, CloudUser } from 'src/lib/ncloud';
-import { IonHeader, IonToolbar, IonTitle, IonContent, IonButton,IonIcon, ModalController, IonTextarea, IonInput, IonCard, IonCardHeader, IonCardTitle, IonThumbnail, IonCardContent, IonCardSubtitle, IonItem, IonList, IonLabel, IonAvatar, IonSelect, IonSelectOption, AlertController, IonButtons, IonProgressBar, IonText } from '@ionic/angular/standalone';
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonButton,IonIcon, ModalController, IonTextarea, IonInput, IonCard, IonCardHeader, IonCardTitle, IonThumbnail, IonCardContent, IonCardSubtitle, IonItem, IonList, IonLabel, IonAvatar, IonSelect, IonSelectOption, AlertController, IonButtons, IonProgressBar, IonText, IonRefresherContent, IonRefresher } from '@ionic/angular/standalone';
 import { CommonModule } from '@angular/common';
 import { AvatarModule, ChatPanelOptions, DalleOptions, FmodeChat, FmodeChatCompletion, FmodeChatMessage, ImagineWork, openChatPanelModal } from 'fmode-ng';
 
@@ -16,11 +16,17 @@ import { AvatarModule, ChatPanelOptions, DalleOptions, FmodeChat, FmodeChatCompl
     IonIcon,IonCard,IonCardHeader,IonCardTitle,
     IonCardSubtitle,IonCardContent, IonThumbnail, IonItem,IonList,CommonModule,IonLabel,
     IonAvatar, IonSelect, IonSelectOption,IonButtons,IonProgressBar,
-    IonText, IonCardHeader, IonCardSubtitle,
+    IonText, IonCardHeader, IonCardSubtitle,IonRefresher,IonRefresherContent
   ],
 })
 export class PageCreateAgentComponent  implements OnInit {
-
+  handleRefresh(event:any) {
+    setTimeout(() => {
+      // Any calls to load data go here
+      this.loadAgentData()
+      event.target.complete();
+    }, 2000);
+  }
   currentUser: CloudUser;
   constructor(
     private modalCtrl:ModalController,
@@ -39,7 +45,7 @@ export class PageCreateAgentComponent  implements OnInit {
   this.loadAgentData()
   }
  images:Array<string> = []
-  back:string = "<";
+  back:string = "返回";
 
   backhome() {
     this.router.navigate(['/tabs/tab1']);
@@ -52,12 +58,12 @@ export class PageCreateAgentComponent  implements OnInit {
     this.name = e.detail.value;
     console.log(this.name);
   }
-  age: number = 25
+  age: number | undefined;
   ageInput(e:any) {
     this.age = e.detail.value;
     console.log(this.age);
   }
-  gender: string = 'male'
+  gender: string | undefined;
   genderChange(e:any) {
     console.log('ionChange fired with value: ' + e.detail.value);
     this.gender = e.detail.value;
@@ -161,13 +167,19 @@ export class PageCreateAgentComponent  implements OnInit {
         consult.save();
         console.log(consult);
       }
-  
+      this.name = ''
+      this.age = 18
+      this.gender = 'male'
+      this.desc = ''
   }
   
   agentList: Array<CloudObject> = [];
   async loadAgentData() {
+    let objectId = this.currentUser.get('objectId')
     let query = new CloudQuery("DoctorAgent")
-    this.agentList = await query.find()
+    let agentlist = await query.find()
+    // 将查询到的数据反向排序
+    this.agentList = agentlist.reverse()
     console.log(this.agentList);
   }
 
@@ -258,5 +270,6 @@ ${userPrompt}
   }
   deleteAgent(agent:CloudObject){
     console.log("删除了",agent);
+    agent.destroy();
   }
 }

+ 0 - 7
wisdom-app/src/app/page/page-drug-purchase/page-drug-purchase.component.html

@@ -1,7 +0,0 @@
-<ion-header [translucent]="true">
-  <ion-toolbar class="searchbar">
-    <div>
-      <ion-button (click)="backhome()" color="primary" slot="start">{{back}}</ion-button>
-    </div>
-  </ion-toolbar>
-</ion-header>

+ 0 - 0
wisdom-app/src/app/page/page-drug-purchase/page-drug-purchase.component.scss


+ 0 - 22
wisdom-app/src/app/page/page-drug-purchase/page-drug-purchase.component.spec.ts

@@ -1,22 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-
-import { PageDrugPurchaseComponent } from './page-drug-purchase.component';
-
-describe('PageDrugPurchaseComponent', () => {
-  let component: PageDrugPurchaseComponent;
-  let fixture: ComponentFixture<PageDrugPurchaseComponent>;
-
-  beforeEach(waitForAsync(() => {
-    TestBed.configureTestingModule({
-      imports: [PageDrugPurchaseComponent],
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(PageDrugPurchaseComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  }));
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 26
wisdom-app/src/app/page/page-drug-purchase/page-drug-purchase.component.ts

@@ -1,26 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonButton, IonHeader, IonToolbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'page-drug-purchase',
-  templateUrl: './page-drug-purchase.component.html',
-  styleUrls: ['./page-drug-purchase.component.scss'],
-  standalone: true,
-  imports:[
-    IonHeader,IonToolbar,IonButton,
-  ]
-})
-export class PageDrugPurchaseComponent  implements OnInit {
-
-  constructor(
-    private router: Router
-  ) { }
-
-  ngOnInit() {}
-  back:string = "<";
-  backhome(){
-    this.router.navigate(['/tabs/tab1']);
-  }
-
-}

+ 0 - 7
wisdom-app/src/app/page/page-health-information/page-health-information.component.html

@@ -1,7 +0,0 @@
-<ion-header [translucent]="true">
-  <ion-toolbar class="searchbar">
-    <div>
-      <ion-button (click)="backhome()" color="primary" slot="start">{{back}}</ion-button>
-    </div>
-  </ion-toolbar>
-</ion-header>

+ 0 - 0
wisdom-app/src/app/page/page-health-information/page-health-information.component.scss


+ 0 - 22
wisdom-app/src/app/page/page-health-information/page-health-information.component.spec.ts

@@ -1,22 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-
-import { PageHealthInformationComponent } from './page-health-information.component';
-
-describe('PageHealthInformationComponent', () => {
-  let component: PageHealthInformationComponent;
-  let fixture: ComponentFixture<PageHealthInformationComponent>;
-
-  beforeEach(waitForAsync(() => {
-    TestBed.configureTestingModule({
-      imports: [PageHealthInformationComponent],
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(PageHealthInformationComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  }));
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 26
wisdom-app/src/app/page/page-health-information/page-health-information.component.ts

@@ -1,26 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonButton, IonHeader, IonToolbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'page-health-information',
-  templateUrl: './page-health-information.component.html',
-  styleUrls: ['./page-health-information.component.scss'],
-  standalone: true,
-  imports:[
-    IonHeader,IonToolbar,IonButton,
-  ]
-})
-export class PageHealthInformationComponent  implements OnInit {
-
-  constructor(
-    private router: Router
-  ) { }
-
-  ngOnInit() {}
-  back:string = "<";
-  backhome(){
-    this.router.navigate(['/tabs/tab1']);
-  }
-
-}

+ 0 - 7
wisdom-app/src/app/page/page-health-records/page-health-records.component.html

@@ -1,7 +0,0 @@
-<ion-header [translucent]="true">
-  <ion-toolbar class="searchbar">
-    <div>
-      <ion-button (click)="backhome()" color="primary" >{{back}}</ion-button>
-    </div>
-  </ion-toolbar>
-</ion-header>

+ 0 - 0
wisdom-app/src/app/page/page-health-records/page-health-records.component.scss


+ 0 - 22
wisdom-app/src/app/page/page-health-records/page-health-records.component.spec.ts

@@ -1,22 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-
-import { PageHealthRecordsComponent } from './page-health-records.component';
-
-describe('PageHealthRecordsComponent', () => {
-  let component: PageHealthRecordsComponent;
-  let fixture: ComponentFixture<PageHealthRecordsComponent>;
-
-  beforeEach(waitForAsync(() => {
-    TestBed.configureTestingModule({
-      imports: [PageHealthRecordsComponent],
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(PageHealthRecordsComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  }));
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 26
wisdom-app/src/app/page/page-health-records/page-health-records.component.ts

@@ -1,26 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonButton, IonHeader, IonToolbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'page-health-records',
-  templateUrl: './page-health-records.component.html',
-  styleUrls: ['./page-health-records.component.scss'],
-  standalone: true,
-  imports:[
-    IonHeader,IonToolbar,IonButton,
-  ]
-})
-export class PageHealthRecordsComponent  implements OnInit {
-
-  constructor(
-    private router: Router
-  ) { }
-
-  ngOnInit() {}
-  back:string = "<";
-  backhome(){
-    this.router.navigate(['/tabs/tab1']);
-  }
-
-}

+ 1 - 1
wisdom-app/src/app/page/page-inquiry/page-inquiry.component.html

@@ -41,7 +41,7 @@
   <!-- @if(isComplete){
     <fm-markdown-preview class="content-style" [content]="responseMsg"></fm-markdown-preview>
   } -->
-  <ion-button (click)="doInqueryTask()">执行问诊任务集</ion-button>
+  <!-- <ion-button (click)="doInqueryTask()">执行问诊任务集</ion-button> -->
   <ul>
     @for(step of taskList;track step.title;){
       <div>

+ 5 - 3
wisdom-app/src/app/page/page-my-health/page-my-health.component.html

@@ -1,12 +1,14 @@
 <ion-header [translucent]="true">
   <ion-toolbar class="searchbar">
-    <div>
-      <ion-button (click)="backHome()" color="primary">{{back}}</ion-button>
-    </div>
+      <ion-button slot="start" (click)="backHome()" color="primary">{{back}}</ion-button>
+      <ion-title slot="end">我的每次问询记录</ion-title>
   </ion-toolbar>
 </ion-header>
 
 <ion-content [fullscreen]="true">
+  <ion-refresher slot="fixed" (ionRefresh)="handleRefresh($event)">
+    <ion-refresher-content></ion-refresher-content>
+  </ion-refresher>
   <div>
     <!-- <p>尊敬的用户:{{currentUser?.data[realname]}},您好!</p> -->
      <ion-card *ngFor="let message of allMessage">

+ 18 - 7
wisdom-app/src/app/page/page-my-health/page-my-health.component.ts

@@ -1,5 +1,5 @@
 import { Component, NgModule, OnInit } from '@angular/core';
-import { ModalController, IonModal, IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonLabel, IonAvatar, IonButton, IonSegment, IonSegmentButton, IonSegmentContent, IonSegmentView, IonCardContent, IonCardTitle, IonCardHeader, IonCard, IonIcon, IonButtons, IonInput } from '@ionic/angular/standalone';
+import { ModalController, IonModal, IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonLabel, IonAvatar, IonButton, IonSegment, IonSegmentButton, IonSegmentContent, IonSegmentView, IonCardContent, IonCardTitle, IonCardHeader, IonCard, IonIcon, IonButtons, IonInput, IonRefresherContent, IonRefresher } from '@ionic/angular/standalone';
 import { addIcons } from 'ionicons';
 import { airplane, bluetooth, call, wifi } from 'ionicons/icons';
 import { CommonModule } from '@angular/common';
@@ -17,27 +17,38 @@ addIcons({ airplane, bluetooth, call, wifi });
       IonLabel,IonItem,IonList,IonAvatar,CommonModule,IonButton,
       IonSegment, IonSegmentButton,
       IonSegmentContent,IonSegmentView,IonCardContent, IonCardTitle, IonCardHeader,IonCard,
-      IonModal,IonIcon, IonButtons,IonInput,
+      IonModal,IonIcon, IonButtons,IonInput,IonRefresher,IonRefresherContent
       // FmMarkdownPreview,
     ]
 })
 export class PageMyHealthComponent  implements OnInit {
+  handleRefresh(event:any) {
+    setTimeout(() => {
+      // Any calls to load data go here
+      this.loadData();
+      event.target.complete();
+    }, 2000);
+  }
 
-avatar : string = "../assets/imgs/avatar.png";
+  avatar : string = "../assets/imgs/avatar.png";
   currentUser : CloudUser | undefined ;
   objectId : string = "";
 
   constructor(
     private router: Router
   ) {
-    
-  }
-  allMessage : Array<CloudObject> = [];
-  async loadData(){
     this.currentUser = new CloudUser();
     this.avatar = this.currentUser.data["avatar"];
     this.objectId = this.currentUser.data['objectId'];
+  }
+  allMessage : Array<CloudObject> = [];
+
+  async loadData(){
+    console.log("objectId",this.objectId);
     let query = new CloudQuery('Consultation');
+    console.log(query.include("user"))
+    // 根据用户id查询, 其中用户id字段是指针,指向User表中的objectId
+    // query.equalTo("user",{ "__type": "Pointer", "className": "_User", "objectId": this.objectId });
     this.allMessage = await query.find();
     console.log("allMessage",this.allMessage);
   }

+ 0 - 7
wisdom-app/src/app/page/page-phone-inquiry/page-phone-inquiry.component.html

@@ -1,7 +0,0 @@
-<ion-header [translucent]="true">
-  <ion-toolbar class="searchbar">
-    <div>
-      <ion-button (click)="backhome()" color="primary" slot="start">{{back}}</ion-button>
-    </div>
-  </ion-toolbar>
-</ion-header>

+ 0 - 0
wisdom-app/src/app/page/page-phone-inquiry/page-phone-inquiry.component.scss


+ 0 - 22
wisdom-app/src/app/page/page-phone-inquiry/page-phone-inquiry.component.spec.ts

@@ -1,22 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-
-import { PagePhoneInquiryComponent } from './page-phone-inquiry.component';
-
-describe('PagePhoneInquiryComponent', () => {
-  let component: PagePhoneInquiryComponent;
-  let fixture: ComponentFixture<PagePhoneInquiryComponent>;
-
-  beforeEach(waitForAsync(() => {
-    TestBed.configureTestingModule({
-      imports: [PagePhoneInquiryComponent],
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(PagePhoneInquiryComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  }));
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 26
wisdom-app/src/app/page/page-phone-inquiry/page-phone-inquiry.component.ts

@@ -1,26 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonButton, IonHeader, IonToolbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'page-phone-inquiry',
-  templateUrl: './page-phone-inquiry.component.html',
-  styleUrls: ['./page-phone-inquiry.component.scss'],
-  standalone: true,
-  imports:[
-    IonHeader,IonToolbar,IonButton,
-  ]
-})
-export class PagePhoneInquiryComponent  implements OnInit {
-
-  constructor(
-    private router: Router
-  ) { }
-
-  ngOnInit() {}
-  back:string = "<";
-  backhome(){
-    this.router.navigate(['/tabs/tab1']);
-  }
-
-}

+ 0 - 11
wisdom-app/src/app/page/page-smart-community/page-smart-community.component.html

@@ -1,11 +0,0 @@
-<ion-header [translucent]="true">
-  <ion-toolbar class="searchbar">
-    <div>
-      <ion-button (click)="backHome()" color="primary">{{back}}</ion-button>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<p>
-  page-smart-community works!
-</p>

+ 0 - 0
wisdom-app/src/app/page/page-smart-community/page-smart-community.component.scss


+ 0 - 22
wisdom-app/src/app/page/page-smart-community/page-smart-community.component.spec.ts

@@ -1,22 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-
-import { PageSmartCommunityComponent } from './page-smart-community.component';
-
-describe('PageSmartCommunityComponent', () => {
-  let component: PageSmartCommunityComponent;
-  let fixture: ComponentFixture<PageSmartCommunityComponent>;
-
-  beforeEach(waitForAsync(() => {
-    TestBed.configureTestingModule({
-      imports: [PageSmartCommunityComponent],
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(PageSmartCommunityComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  }));
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 29
wisdom-app/src/app/page/page-smart-community/page-smart-community.component.ts

@@ -1,29 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonButton, IonHeader, IonToolbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'page-smart-community',
-  templateUrl: './page-smart-community.component.html',
-  styleUrls: ['./page-smart-community.component.scss'],
-  standalone: true,
-  imports:[
-    IonHeader,IonToolbar,IonButton
-  ]
-})
-export class PageSmartCommunityComponent  implements OnInit {
-
-  constructor(
-    private router: Router
-  ) { }
-
-  ngOnInit() {}
-  /**
-   * 返回上一页
-   */
-  back:string = "<";
-
-  backHome(){
-    this.router.navigate(['/tabs/tab1']);
-  }
-}

+ 10 - 6
wisdom-app/src/app/tab1/tab1.page.ts

@@ -1,5 +1,5 @@
 import { Component } from '@angular/core';
-import { IonCardHeader, IonHeader, IonToolbar, IonTitle, IonContent, IonTabButton, IonSearchbar, IonLabel, IonItem, IonList, NavController, IonCard, IonCardTitle, IonCardSubtitle, IonCardContent, IonThumbnail, IonRippleEffect } from '@ionic/angular/standalone';
+import { IonCardHeader, IonHeader, IonToolbar, IonTitle, IonContent, IonTabButton, IonSearchbar, IonLabel, IonItem, IonList, NavController, IonCard, IonCardTitle, IonCardSubtitle, IonCardContent, IonThumbnail, IonRippleEffect, IonFab, IonFabList, IonFabButton } from '@ionic/angular/standalone';
 import { ExploreContainerComponent } from '../explore-container/explore-container.component';
 import { IonButton } from '@ionic/angular/standalone';
 import { IonIcon } from '@ionic/angular/standalone';
@@ -9,11 +9,12 @@ import { ModalController } from '@ionic/angular/standalone';
 import { HttpClient } from '@angular/common/http';
 import { addIcons } from 'ionicons';
 import { documentText, chatbubbles, person, calendar, newspaper,
-   medkit,clipboard, podium, videocam, people, chevronForwardOutline } from 'ionicons/icons';
+   medkit,clipboard, podium, videocam, people, chevronForwardOutline, 
+   add} from 'ionicons/icons';
 import { CloudObject, CloudQuery, CloudUser } from 'src/lib/ncloud';
 import { ChatPanelOptions, FmodeChat, FmodeChatMessage, openChatPanelModal } from 'fmode-ng';
 addIcons({ documentText, chatbubbles, person, calendar, newspaper,
-   medkit,clipboard, podium, videocam, people
+   medkit,clipboard, podium, videocam, people,add
  });
 @Component({
   selector: 'app-tab1',
@@ -23,7 +24,7 @@ addIcons({ documentText, chatbubbles, person, calendar, newspaper,
   imports: [
     IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent, IonTabButton, IonButton,
     IonIcon,IonSearchbar,IonLabel,IonItem,IonList,CommonModule,IonCard,IonCardHeader,IonCardTitle,IonCardSubtitle,
-    IonCardContent, IonThumbnail, IonRippleEffect
+    IonCardContent, IonThumbnail, IonRippleEffect, IonFab, IonFabButton, IonFabList
   ],
 })
 export class Tab1Page {
@@ -114,7 +115,7 @@ export class Tab1Page {
   // 功能按钮数据
   functionItems1 = [
     { label: '专属医生', icon: 'document-text', route: '/tabs/create-agent' },
-    { label: '我的健康', icon: 'person', route: '/tabs/health-records' },
+    { label: '我的健康', icon: 'person', route: '/tabs/my-health' },
     { label: '药品展示', icon: 'calendar', route: '/tabs/tab3' },
     { label: '健康科普', icon: 'medkit', route: '/tabs/tab2' },
   ];
@@ -179,7 +180,7 @@ export class Tab1Page {
     let dateStr = `${now.getFullYear()}-${now.getMonth()+1}-${now.getDate()}`
     // 对象权限的精确指定
     let ACL:any = {
-      "*":{read:true,write:true}
+      "*":{read:false,write:false}
     }
     if(currentUser?.id){
       ACL[currentUser?.id] = {read:true,write:true}
@@ -250,4 +251,7 @@ ${userPrompt}
     }
     openChatPanelModal(this.modalCtrl,options)
   }
+  addNew(){
+    this.router.navigate(["/tabs/create-agent"]);
+  }
 }

+ 0 - 16
wisdom-app/src/app/tab2/tab2.page.html

@@ -138,20 +138,4 @@
         <ion-button expand="block" (click)="copyLink()">复制链接</ion-button>
     </ion-content>
   </ion-modal>
-
-
-  
-  <ion-fab slot="fixed" vertical="bottom" horizontal="end">
-    <ion-fab-button>
-      <ion-icon name="chevron-up-circle"></ion-icon>
-    </ion-fab-button>
-    <ion-fab-list side="top">
-      <ion-fab-button>
-        <ion-icon name="document"></ion-icon>
-      </ion-fab-button>
-      <ion-fab-button (click)="openAiKnowledge()">
-        <ion-icon name="globe"></ion-icon>
-      </ion-fab-button>
-    </ion-fab-list>
-  </ion-fab>
 </ion-content>

+ 1 - 5
wisdom-app/src/app/tab2/tab2.page.ts

@@ -77,11 +77,7 @@ export class Tab2Page {
   }
   closeShareModal(){
     this.shareDetail = false;
-      // 在这里确保模态框关闭时处理aria-hidden属性
-    // const modalElement = document.querySelector('ion-modal');
-    // if (modalElement) {
-    //   modalElement.setAttribute('aria-hidden', 'true');
-    // }
+
   }
   copyLink() {
     console.log('复制链接');

+ 3 - 1
wisdom-app/src/app/tab4/tab4.page.html

@@ -6,7 +6,9 @@
   </ion-toolbar>
 </ion-header>
 <ion-content [fullscreen]="true">
- 
+  <ion-refresher slot="fixed" (ionRefresh)="handleRefresh($event)">
+    <ion-refresher-content></ion-refresher-content>
+  </ion-refresher>
   <!-- 用户登录状态 -->
   <ion-card>
     <!-- 未登录 -->

+ 10 - 2
wisdom-app/src/app/tab4/tab4.page.ts

@@ -1,5 +1,5 @@
 import { Component } from '@angular/core';
-import { IonHeader, IonToolbar, IonTitle, IonContent, IonCard, IonCardContent, IonButton, IonCardHeader, IonCardTitle, IonCardSubtitle, ModalController } from '@ionic/angular/standalone';
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonCard, IonCardContent, IonButton, IonCardHeader, IonCardTitle, IonCardSubtitle, ModalController, IonRefresher, IonRefresherContent } from '@ionic/angular/standalone';
 import { CloudUser } from 'src/lib/ncloud';
 import { openUserEditModal } from 'src/lib/user/modal-user-edit/modal-user-edit.component';
 import { openUserLoginModal } from 'src/lib/user/modal-user-login/modal-user-login.component';
@@ -13,10 +13,18 @@ import { Router } from '@angular/router';
   standalone: true,
   imports: [IonHeader, IonToolbar, IonTitle, IonContent, 
     IonCard,IonCardContent,IonButton,IonCardHeader,IonCardTitle,IonCardSubtitle,
-    EditTagComponent
+    EditTagComponent,IonRefresher,IonRefresherContent
   ],
 })
 export class Tab4Page {
+  handleRefresh(event:any) {
+    setTimeout(() => {
+      // Any calls to load data go here
+      this.currentUser = new CloudUser();
+      event.target.complete();
+    }, 2000);
+  }
+
   goToCollection(){
     console.log("goToCollection");
   }

+ 2 - 2
wisdom-app/src/app/tabs/tabs.page.html

@@ -10,10 +10,10 @@
       <ion-label>科普</ion-label>
     </ion-tab-button>
 
-    <ion-tab-button tab="tab3" href="/tabs/tab3">
+    <!-- <ion-tab-button tab="tab3" href="/tabs/tab3">
       <ion-icon aria-hidden="true" name="bag-add"></ion-icon>
       <ion-label>药品</ion-label>
-    </ion-tab-button>
+    </ion-tab-button> -->
 
     <ion-tab-button tab="tab4" href="/tabs/tab4">
       <ion-icon aria-hidden="true" name="person"></ion-icon>

+ 1 - 30
wisdom-app/src/app/tabs/tabs.routes.ts

@@ -52,36 +52,7 @@ export const routes: Routes = [
         loadComponent: () =>
           import('../page/page-my-health/page-my-health.component').then((m) => m.PageMyHealthComponent),
       },
-      {
-        path: 'health-records', // 健康档案
-        loadComponent: () =>
-          import('../page/page-health-records/page-health-records.component').then((m) => m.PageHealthRecordsComponent),
-      },
-      {
-        path: 'drug-purchase', // 药品购买
-        loadComponent: () =>
-          import('../page/page-drug-purchase/page-drug-purchase.component').then((m) => m.PageDrugPurchaseComponent),
-      },
-      {
-        path: 'authority-experts', // 权威专家
-        loadComponent: () =>
-          import('../page/page-authority-experts/page-authority-experts.component').then((m) => m.PageAuthorityExpertsComponent),
-      },
-      {
-        path: 'health-information', // 健康资讯
-        loadComponent: () =>
-          import('../page/page-health-information/page-health-information.component').then((m) => m.PageHealthInformationComponent),
-      },
-      {
-        path: 'phone-inquiry', // 电话咨询
-        loadComponent: () =>
-          import('../page/page-phone-inquiry/page-phone-inquiry.component').then((m) => m.PagePhoneInquiryComponent),
-      },
-      {
-        path: 'smart-community', // 智慧社区
-        loadComponent: () =>
-          import('../page/page-smart-community/page-smart-community.component').then((m) => m.PageSmartCommunityComponent),
-      },
+
       {
         path: 'drug-category/:name',
         loadComponent: () =>