From 642c5c94f48e5545ce0225dc859d27824aa61907 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Tue, 15 Dec 2020 16:28:44 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=88=A0=E9=99=A4=E5=A4=9A?= =?UTF-8?q?=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app-routing.module.ts | 2 +- src/app/examiner/examiner-routing.ts | 3 - src/app/navigation/adddatabank.html | 14 ----- src/app/navigation/editdatabankname.html | 14 ----- src/app/navigation/navigation.component.html | 4 +- src/app/navigation/navigation.component.ts | 64 -------------------- src/app/navigation/navigation.module.ts | 6 +- src/app/pipes/size.pipe.ts | 25 -------- src/app/tabbar/tabbar.component.ts | 10 --- src/app/ui/ui.module.ts | 4 +- 10 files changed, 7 insertions(+), 139 deletions(-) delete mode 100644 src/app/navigation/adddatabank.html delete mode 100644 src/app/navigation/editdatabankname.html diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 8dd5e69..bd6ecc8 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -21,7 +21,7 @@ const routes: Routes = [ ] }, { path:'examiner/create-test-score', component:CreateTestScoreComponent,canActivate: [AuthGuard],}, //创建试卷具体分数页面 - { path: 'canvasTool', component:CollectionToolsComponent,canActivate: [AuthGuard], }, //编制工具 + { path:'canvasTool', component:CollectionToolsComponent,canActivate: [AuthGuard], }, //编制工具 { path:'adminLogin', component:LoginComponent}, //管理员登录路由 { path:'login', component:LockscreenComponent}, //教员学员登录路由 diff --git a/src/app/examiner/examiner-routing.ts b/src/app/examiner/examiner-routing.ts index e3b9aef..553b265 100644 --- a/src/app/examiner/examiner-routing.ts +++ b/src/app/examiner/examiner-routing.ts @@ -15,14 +15,11 @@ import { MarkPapersTwoComponent } from './mark-papers-two/mark-papers-two.compon import { StatisticAnalysisComponent } from './statistic-analysis/statistic-analysis.component' const routes: Routes = [ - // { path: '', component:CreateExamComponent } { path: 'createexam-index', component:ExaminerIndexComponent }, { path: 'examiner-new-one', component:ExaminerNewOneComponent }, { path: 'mark-papers-index',component:MarkPapersIndexComponent}, { path: 'mark-papers-two',component:MarkPapersTwoComponent}, { path: 'statistic-anaily',component:StatisticAnalysisComponent} - - //{ path: 'createexam-index', component:ExaminerIndexComponent }, ] @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/src/app/navigation/adddatabank.html b/src/app/navigation/adddatabank.html deleted file mode 100644 index defbcba..0000000 --- a/src/app/navigation/adddatabank.html +++ /dev/null @@ -1,14 +0,0 @@ -
- - - - - -
- - -
- -
diff --git a/src/app/navigation/editdatabankname.html b/src/app/navigation/editdatabankname.html deleted file mode 100644 index 80aaf2a..0000000 --- a/src/app/navigation/editdatabankname.html +++ /dev/null @@ -1,14 +0,0 @@ -
- - - - - -
- - -
- -
diff --git a/src/app/navigation/navigation.component.html b/src/app/navigation/navigation.component.html index 2dff347..820a46e 100644 --- a/src/app/navigation/navigation.component.html +++ b/src/app/navigation/navigation.component.html @@ -7,7 +7,7 @@ * @LastEditTime: 2020-12-15 14:32:13 --> - +
@@ -40,7 +40,7 @@
- +
diff --git a/src/app/navigation/navigation.component.ts b/src/app/navigation/navigation.component.ts index 6c58c6c..9c3a581 100644 --- a/src/app/navigation/navigation.component.ts +++ b/src/app/navigation/navigation.component.ts @@ -18,70 +18,6 @@ export class NavigationComponent implements OnInit { isAdmin:boolean = false ngOnInit() { - // if(sessionStorage.getItem("roleType") == "0"){ - // this.isAdmin = true - // } - } - - darktheme = false;//黑夜主题 - switchTheme (dark) { this.darktheme = dark; } - defaulttheme () { this.darktheme = false } - redtheme () { this.darktheme = true} - -} - -//新增资料库 -@Component({ - selector: 'adddatabank', - templateUrl: './adddatabank.html', - styleUrls: ['./navigation.component.scss'] -}) -export class AddDataBank { - myControl = new FormControl(); - constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} - - onNoClick(): void { - this.dialogRef.close(); - } - - onSubmit(value){ - if ( value.name.includes('/') ) { - let config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('名称不允许有特殊字符','确定',config); - } else { - this.dialogRef.close(value); - } } } - -//更改资料库名称 -@Component({ - selector: 'editdatabankname', - templateUrl: './editdatabankname.html', - styleUrls: ['./navigation.component.scss'] -}) -export class EditDataBankName { - myControl = new FormControl(); - constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} - - dataBankName:any = this.data.name//要修改的资料库原名称 - - onNoClick(): void { - this.dialogRef.close(); - } - - onSubmit(value){ - if ( value.name.includes('/') ) { - let config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('名称不允许有特殊字符','确定',config); - } else { - this.dialogRef.close(value); - } - } - -} \ No newline at end of file diff --git a/src/app/navigation/navigation.module.ts b/src/app/navigation/navigation.module.ts index a127fcb..9b99dd6 100644 --- a/src/app/navigation/navigation.module.ts +++ b/src/app/navigation/navigation.module.ts @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { NavigationComponent, AddDataBank, EditDataBankName } from './navigation.component'; +import { NavigationComponent } from './navigation.component'; import { MatIconModule } from '@angular/material/icon'; import { MatSidenavModule } from '@angular/material/sidenav'; import { RouterModule } from '@angular/router'; @@ -54,9 +54,7 @@ import {MatTreeModule} from '@angular/material/tree'; @NgModule({ declarations: [ NavigationComponent, - TabbarComponent, - AddDataBank, - EditDataBankName + TabbarComponent ], imports: [ CommonModule, diff --git a/src/app/pipes/size.pipe.ts b/src/app/pipes/size.pipe.ts index 5cff3f8..7ce6619 100644 --- a/src/app/pipes/size.pipe.ts +++ b/src/app/pipes/size.pipe.ts @@ -1,29 +1,4 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({name: 'name'}) -export class NamePipe implements PipeTransform { - transform(name: string): string { - let nameArr = name.split("/") - return nameArr[nameArr.length - 1] - } -} -@Pipe({name: 'name2'}) -export class NamePipe2 implements PipeTransform { - transform(name: string): string { - let nameArr = name.split("/") - return nameArr[nameArr.length - 2] - } -} -@Pipe({name: 'name3'}) -export class NamePipe3 implements PipeTransform { - transform(name: string): string { - if(name.charAt(name.length-1) == "/"){ - return name.substr(0, name.length - 1).replace(/\//g,'>').substring(9,name.length) - }else{ - return name.replace(/\//g,'>').substring(9,name.length) - } - } -} - @Pipe({name: 'testState'}) export class testState implements PipeTransform { transform(name: string): string { diff --git a/src/app/tabbar/tabbar.component.ts b/src/app/tabbar/tabbar.component.ts index 633536e..c90b195 100644 --- a/src/app/tabbar/tabbar.component.ts +++ b/src/app/tabbar/tabbar.component.ts @@ -25,16 +25,6 @@ import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar'; }) export class TabbarComponent implements OnInit { - theme: boolean = true; - @Output() - toggle = new EventEmitter(); - @Output() - toggleDarkTheme = new EventEmitter(); - @Output() - defaulttheme = new EventEmitter(); - @Output() - redtheme = new EventEmitter(); - constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,public token:CacheTokenService,public dialog: MatDialog,public isLogin:IsLoginService,public snackBar: MatSnackBar,) { } ngOnInit() { diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index cb6fa9d..e868da5 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -45,7 +45,7 @@ import { ReactiveFormsModule, FormsModule } from '@angular/forms'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatPaginatorIntl } from '@angular/material/paginator'; import { ChangepasswordComponent } from './changepassword/changepassword.component'; -import { NamePipe,NamePipe2, NamePipe3, testState} from '../pipes/size.pipe'; +import { testState} from '../pipes/size.pipe'; import {ConfirmpswDirective} from './changepassword/equal-validator.directive'; import { FileUploadModule } from 'ng2-file-upload' import { ChangeuserdataComponent } from './changeuserdata/changeuserdata.component'; @@ -59,7 +59,7 @@ import {WorkingAreaComponent} from '../working-area/working-area.component' import { NzTreeModule } from 'ng-zorro-antd/tree'; import { examinationQuestions,uploadQuestions } from './collection-tools/examinationQuestions' @NgModule({ - declarations: [ChangepasswordComponent,NamePipe,NamePipe2,NamePipe3,ConfirmpswDirective, ChangeuserdataComponent,testState,CollectionToolsComponent,CreateBuilding,EditBuilding,ViewDetailss,leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeComponent,editDisposalNodeComponent,saveOneDialog,saveTwoDialog,WorkingAreaComponent,examinationQuestions,uploadQuestions], + declarations: [ChangepasswordComponent,ConfirmpswDirective, ChangeuserdataComponent,testState,CollectionToolsComponent,CreateBuilding,EditBuilding,ViewDetailss,leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeComponent,editDisposalNodeComponent,saveOneDialog,saveTwoDialog,WorkingAreaComponent,examinationQuestions,uploadQuestions], imports: [ NzDatePickerModule,