1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- import { Component, OnInit,NgModule } from '@angular/core';
- import { Router } from '@angular/router';
- import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList,
- IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption } from '@ionic/angular/standalone';
- import { CommonModule } from '@angular/common';
- import { FormsModule } from '@angular/forms';
- @Component({
- selector: 'app-page-publishsurvey',
- templateUrl: './page-publishsurvey.component.html',
- styleUrls: ['./page-publishsurvey.component.scss'],
- standalone: true,
- imports: [
- IonHeader,IonToolbar,IonTitle,IonContent,IonSegment,IonSegmentButton,IonSelect,IonSelectOption,
- IonList,IonListHeader,IonItem,IonCardTitle,
- IonLabel,IonIcon,IonButton,IonCardContent,
- IonInput,IonSearchbar,IonCard,IonCardHeader,
- CommonModule,FormsModule
- ]
- })
- export class PagePublishsurveyComponent implements OnInit {
- category: string = 'school'; // 默认类别
- surveyTitle: string = '';
- surveyLink: string = '';
- targetAudience: string = 'all'; // 默认面向对象
- societySurveyTitle: string = '';
- societySurveyLink: string = '';
- onCategoryChange() {
- console.log(`当前选择的类别: ${this.category}`);
- }
- publishSurvey() {
- console.log('发布学校问卷:');
- console.log(`标题: ${this.surveyTitle}`);
- console.log(`链接: ${this.surveyLink}`);
- console.log(`面向对象: ${this.targetAudience}`);
- // 这里可以添加逻辑将问卷发布到后端或其他处理
- }
- publishSocietySurvey() {
- console.log('发布社会问卷:');
- console.log(`标题: ${this.societySurveyTitle}`);
- console.log(`链接: ${this.societySurveyLink}`);
- // 这里可以添加逻辑将问卷发布到后端或其他处理
- }
- constructor(private router: Router) { }
- goTab1(){
- this.router.navigate(['tabs/tab1']);
- }
- ngOnInit() {}
- }
|