فهرست منبع

增加了一些页面

yuebuzu-creater 4 ماه پیش
والد
کامیت
11c48e0f7a
26فایلهای تغییر یافته به همراه284 افزوده شده و 54 حذف شده
  1. 0 26
      wisdom-app/src/app/inquiry-human/inquiry-human.component.html
  2. 39 0
      wisdom-app/src/app/page/inquiry-human/inquiry-human.component.html
  3. 0 0
      wisdom-app/src/app/page/inquiry-human/inquiry-human.component.scss
  4. 0 0
      wisdom-app/src/app/page/inquiry-human/inquiry-human.component.spec.ts
  5. 11 5
      wisdom-app/src/app/page/inquiry-human/inquiry-human.component.ts
  6. 7 0
      wisdom-app/src/app/page/page-health-records/page-health-records.component.html
  7. 0 0
      wisdom-app/src/app/page/page-health-records/page-health-records.component.scss
  8. 22 0
      wisdom-app/src/app/page/page-health-records/page-health-records.component.spec.ts
  9. 26 0
      wisdom-app/src/app/page/page-health-records/page-health-records.component.ts
  10. 7 0
      wisdom-app/src/app/page/page-inquiry/page-inquiry.component.html
  11. 0 0
      wisdom-app/src/app/page/page-inquiry/page-inquiry.component.scss
  12. 0 0
      wisdom-app/src/app/page/page-inquiry/page-inquiry.component.spec.ts
  13. 11 3
      wisdom-app/src/app/page/page-inquiry/page-inquiry.component.ts
  14. 11 0
      wisdom-app/src/app/page/page-my-health/page-my-health.component.html
  15. 0 0
      wisdom-app/src/app/page/page-my-health/page-my-health.component.scss
  16. 22 0
      wisdom-app/src/app/page/page-my-health/page-my-health.component.spec.ts
  17. 29 0
      wisdom-app/src/app/page/page-my-health/page-my-health.component.ts
  18. 11 0
      wisdom-app/src/app/page/page-smart-community/page-smart-community.component.html
  19. 0 0
      wisdom-app/src/app/page/page-smart-community/page-smart-community.component.scss
  20. 22 0
      wisdom-app/src/app/page/page-smart-community/page-smart-community.component.spec.ts
  21. 29 0
      wisdom-app/src/app/page/page-smart-community/page-smart-community.component.ts
  22. 20 18
      wisdom-app/src/app/tab1/tab1.page.ts
  23. 17 2
      wisdom-app/src/app/tabs/tabs.routes.ts
  24. BIN
      wisdom-app/src/assets/image/doctor5.png
  25. BIN
      wisdom-app/src/assets/image/doctor6.png
  26. BIN
      wisdom-app/src/assets/image/doctor7.png

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

@@ -1,26 +0,0 @@
-<ion-list>
-  <ion-item>
-    <ion-avatar aria-hidden="true" slot="start">
-      <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
-    </ion-avatar>
-    <ion-label>Huey</ion-label>
-  </ion-item>
-  <ion-item>
-    <ion-avatar aria-hidden="true" slot="start">
-      <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
-    </ion-avatar>
-    <ion-label>Dewey</ion-label>
-  </ion-item>
-  <ion-item>
-    <ion-avatar aria-hidden="true" slot="start">
-      <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
-    </ion-avatar>
-    <ion-label>Louie</ion-label>
-  </ion-item>
-  <ion-item>
-    <ion-avatar aria-hidden="true" slot="start">
-      <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
-    </ion-avatar>
-    <ion-label>Fooie</ion-label>
-  </ion-item>
-</ion-list>

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

@@ -0,0 +1,39 @@
+<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>
+
+<ion-content>
+  <div>
+    <ion-list>
+      <ion-item>
+        <ion-avatar aria-hidden="true" slot="start">
+          <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
+        </ion-avatar>
+        <ion-label>Huey</ion-label>
+      </ion-item>
+      <ion-item>
+        <ion-avatar aria-hidden="true" slot="start">
+          <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
+        </ion-avatar>
+        <ion-label>Dewey</ion-label>
+      </ion-item>
+      <ion-item>
+        <ion-avatar aria-hidden="true" slot="start">
+          <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
+        </ion-avatar>
+        <ion-label>Louie</ion-label>
+      </ion-item>
+      <ion-item>
+        <ion-avatar aria-hidden="true" slot="start">
+          <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
+        </ion-avatar>
+        <ion-label>Fooie</ion-label>
+      </ion-item>
+    </ion-list>    
+  </div>
+</ion-content>>
+

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


+ 0 - 0
wisdom-app/src/app/inquiry-human/inquiry-human.component.spec.ts → wisdom-app/src/app/page/inquiry-human/inquiry-human.component.spec.ts


+ 11 - 5
wisdom-app/src/app/inquiry-human/inquiry-human.component.ts → wisdom-app/src/app/page/inquiry-human/inquiry-human.component.ts

@@ -1,8 +1,9 @@
 import { Component, OnInit } from '@angular/core';
-import { IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonLabel, IonAvatar } from '@ionic/angular/standalone';
-import { ExploreContainerComponent } from '../explore-container/explore-container.component';
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonLabel, IonAvatar, IonButton } from '@ionic/angular/standalone';
+import { ExploreContainerComponent } from '../../explore-container/explore-container.component';
 import { addIcons } from 'ionicons';
 import { airplane, bluetooth, call, wifi } from 'ionicons/icons';
+import { Router } from '@angular/router';
 addIcons({ airplane, bluetooth, call, wifi });
 
 @Component({
@@ -11,13 +12,18 @@ addIcons({ airplane, bluetooth, call, wifi });
   styleUrls: ['./inquiry-human.component.scss'],
   standalone: true,
   imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,
-    IonLabel,IonItem,IonList,IonAvatar,IonLabel
+    IonLabel,IonItem,IonList,IonAvatar,IonLabel,IonButton
   ]
 })
 export class InquiryHumanComponent  implements OnInit {
 
-  constructor() { }
+  constructor(
+    private router: Router
+  ) { }
 
   ngOnInit() {}
-
+  back:string = "<";
+  backhome(){
+    this.router.navigate(['/tabs/tab1']);
+  }
 }

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

@@ -0,0 +1,7 @@
+<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-inquiry/page-inquiry.component.scss → wisdom-app/src/app/page/page-health-records/page-health-records.component.scss


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

@@ -0,0 +1,22 @@
+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();
+  });
+});

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

@@ -0,0 +1,26 @@
+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']);
+  }
+
+}

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

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

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


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


+ 11 - 3
wisdom-app/src/app/page-inquiry/page-inquiry.component.ts → wisdom-app/src/app/page/page-inquiry/page-inquiry.component.ts

@@ -13,21 +13,29 @@ import { TaskInqueryUserStory } from 'src/agent/tasks/inquiry/1.inquiry-user-sto
 import { extactAndParseJsonFromString } from 'src/agent/agent.json';
 import { TaskInqueryDoctorQuestion } from 'src/agent/tasks/inquiry/2.inquiry-doctor-question';
 import { TaskInqueryUserAnswer } from 'src/agent/tasks/inquiry/3.inquiry-user-answer';
+import { Router } from '@angular/router';
 addIcons({radioButtonOffOutline,reloadOutline,checkmarkCircleOutline,closeCircleOutline})
 
 @Component({
-  selector: 'app-page-inquiry',
+  selector: 'page-inquiry',
   templateUrl: './page-inquiry.component.html',
   styleUrls: ['./page-inquiry.component.scss'],
   standalone: true,
-  imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonButton,IonTextarea,IonInput,
+  imports: [
+    IonHeader, IonToolbar, IonTitle, IonContent, IonButton,IonTextarea,IonInput,
     IonIcon,AgentUserInputComponent,DecimalPipe
   ],
 })
 export class PageInquiryComponent  implements OnInit {
-  constructor(private modalCtrl:ModalController) {
+  constructor(
+    private modalCtrl:ModalController,
+    private router:Router
+  ) {}
 
+  back:string = "<";
 
+  backhome() {
+    this.router.navigate(['/tabs/tab1']);
   }
 
   taskList:AgentTaskStep[] = []

+ 11 - 0
wisdom-app/src/app/page/page-my-health/page-my-health.component.html

@@ -0,0 +1,11 @@
+<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-my-health works!
+</p>

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


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

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

+ 29 - 0
wisdom-app/src/app/page/page-my-health/page-my-health.component.ts

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

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

@@ -0,0 +1,11 @@
+<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


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

@@ -0,0 +1,22 @@
+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();
+  });
+});

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

@@ -0,0 +1,29 @@
+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']);
+  }
+}

+ 20 - 18
wisdom-app/src/app/tab1/tab1.page.ts

@@ -30,12 +30,13 @@ export class Tab1Page {
     private router: Router,
     // private modalController: ModalController,
     // private navCtrl: NavController,
-    // private http: HttpClient // 注入 HttpClient
+    private http: HttpClient // 注入 HttpClient
   ) {}
   /**
    * Go to the ai page
    */
   goToPage1(){
+    console.log(['route'])
     this.router.navigate(['/tabs/inquiry/ai'])
   }
 
@@ -47,6 +48,7 @@ export class Tab1Page {
   }
 
   goToPicture(){
+    console.log(['route'])
     this.router.navigate(['/tabs/picture'])
   }
   searchContent:string = ''; //搜索内容
@@ -68,18 +70,19 @@ export class Tab1Page {
 
   // 功能按钮数据
   functionItems1 = [
-    { label: '我的健康', icon: 'document-text', route: '/medical-records' },
-    { label: '健康档案', icon: 'person', route: '/health-profile' },
-    { label: '电话问诊', icon: 'calendar', route: '/appointment' },
-    { label: '购买药品', icon: 'medkit', route: '/telemedicine' },
+    { label: '我的健康', icon: 'document-text', route: '/tabs/my-health' },
+    { label: '健康档案', icon: 'person', route: '/tabs/health-records' },
+    { label: '电话问诊', icon: 'calendar', route: '/tabs/tab1' },
+    { label: '购买药品', icon: 'medkit', route: '/tabs/tab1' },
   ];
 
   functionItems2 = [
-    { label: '专业男科', icon: 'clipboard', route: '/medicine-purchase' },
-    { label: '权威专家', icon: 'podium', route: '/expert-lectures' },
-    { label: '健康资讯', icon: 'newspaper', route: '/health-news' },
-    { label: '智慧社区', icon: 'people', route: '/health-community' }
+    { label: '专业男科', icon: 'clipboard', route: '/tabs/tab1' },
+    { label: '权威专家', icon: 'podium', route: '/tabs/tab1' },
+    { label: '健康资讯', icon: 'newspaper', route: '/tabs/tab1' },
+    { label: '智慧社区', icon: 'people', route: '/tabs/smart-community' }
   ];
+
   doctors = [
     {
       name: '余海涛',
@@ -87,31 +90,30 @@ export class Tab1Page {
       position: '主任医师',
       department: '中医草药科',
       hospital: '南昌市江西师范医院',
-      image: '../../assets/image/doctor3.png',
+      image: '../../assets/image/doctor5.png',
     },
     {
-      name: '王强',
-      age: 50,
+      name: '聂翼伏',
+      age: 25,
       position: '副主任医师',
       department: '骨科',
       hospital: 'YY市人民医院',
-      image: '../../assets/image/doctor4.png',
+      image: '../../assets/image/doctor7.png',
     },
     {
-      name: '李芳',
-      age: 40,
+      name: '徐君豪',
+      age: 28,
       position: '主治医师',
       department: '心血管内科',
       hospital: 'XX市第一医院',
-      image: '../../assets/image/doctor2.png',
+      image: '../../assets/image/doctor6.png',
     },
   ];
 
   // 导航到指定路由
   navigateTo(route: string) {
-    // this.router.navigate([route]);
+    this.router.navigate([route]);
     console.log("route: ",route)
-
   }
 
   ngOnInit() {}

+ 17 - 2
wisdom-app/src/app/tabs/tabs.routes.ts

@@ -34,18 +34,33 @@ export const routes: Routes = [
       {
         path: 'inquiry/ai',
         loadComponent: () =>
-          import('../page-inquiry/page-inquiry.component').then((m) => m.PageInquiryComponent),
+          import('../page/page-inquiry/page-inquiry.component').then((m) => m.PageInquiryComponent),
       },
       {
         path: 'inquiry/human',
         loadComponent: () =>
-          import('../inquiry-human/inquiry-human.component').then((m) => m.InquiryHumanComponent),
+          import('../page/inquiry-human/inquiry-human.component').then((m) => m.InquiryHumanComponent),
       },
       {
         path: 'page-test',
         loadComponent: () =>
           import('../page-test/page-test.component').then((m) => m.PageTestComponent),
       },
+      {
+        path: 'my-health',
+        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: 'smart-community',
+        loadComponent: () =>
+          import('../page/page-smart-community/page-smart-community.component').then((m) => m.PageSmartCommunityComponent),
+      },
       {
         path: '',
         redirectTo: '/tabs/tab1',

BIN
wisdom-app/src/assets/image/doctor5.png


BIN
wisdom-app/src/assets/image/doctor6.png


BIN
wisdom-app/src/assets/image/doctor7.png