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,
From b989186ed5e24f73c6ccd6f4996b307c0f5765ec Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Tue, 15 Dec 2020 17:28:30 +0800
Subject: [PATCH 05/24] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E8=80=83=E5=AE=98,=E8=80=83?=
=?UTF-8?q?=E7=94=9F=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/app.component.ts | 1 +
.../examiner-index.component.ts | 3 -
.../http-interceptors/cache-token.service.ts | 1 +
src/app/navigation/navigation.component.html | 10 +-
src/app/navigation/navigation.component.ts | 5 +-
.../addenterpriseuser.component.html | 49 ++++
.../addenterpriseuser.component.ts | 67 +++++
.../ui/enterpriseuser/editenterpriseuser.html | 46 +++
.../enterpriseuser.component.html | 77 +++++
.../enterpriseuser.component.scss | 54 ++++
.../enterpriseuser.component.spec.ts | 25 ++
.../enterpriseuser.component.ts | 273 ++++++++++++++++++
.../ui/enterpriseuser/seeenterpriseuser.html | 0
.../addenterpriseuser.component.html | 49 ++++
.../addenterpriseuser.component.ts | 67 +++++
.../teacherManagement/editenterpriseuser.html | 46 +++
.../enterpriseuser.component.html | 72 +++++
.../enterpriseuser.component.scss | 54 ++++
.../enterpriseuser.component.ts | 272 +++++++++++++++++
.../teacherManagement/seeenterpriseuser.html | 0
src/app/ui/ui-routing.module.ts | 4 +
src/app/ui/ui.module.ts | 6 +-
22 files changed, 1173 insertions(+), 8 deletions(-)
create mode 100644 src/app/ui/enterpriseuser/addenterpriseuser.component.html
create mode 100644 src/app/ui/enterpriseuser/addenterpriseuser.component.ts
create mode 100644 src/app/ui/enterpriseuser/editenterpriseuser.html
create mode 100644 src/app/ui/enterpriseuser/enterpriseuser.component.html
create mode 100644 src/app/ui/enterpriseuser/enterpriseuser.component.scss
create mode 100644 src/app/ui/enterpriseuser/enterpriseuser.component.spec.ts
create mode 100644 src/app/ui/enterpriseuser/enterpriseuser.component.ts
create mode 100644 src/app/ui/enterpriseuser/seeenterpriseuser.html
create mode 100644 src/app/ui/teacherManagement/addenterpriseuser.component.html
create mode 100644 src/app/ui/teacherManagement/addenterpriseuser.component.ts
create mode 100644 src/app/ui/teacherManagement/editenterpriseuser.html
create mode 100644 src/app/ui/teacherManagement/enterpriseuser.component.html
create mode 100644 src/app/ui/teacherManagement/enterpriseuser.component.scss
create mode 100644 src/app/ui/teacherManagement/enterpriseuser.component.ts
create mode 100644 src/app/ui/teacherManagement/seeenterpriseuser.html
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 0a77d73..388e788 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -28,6 +28,7 @@ export class AppComponent {
sessionStorage.setItem("roleType",data.roleType);
sessionStorage.setItem("token",data.token);
sessionStorage.setItem("refreshToken",data.refreshToken);
+ sessionStorage.setItem("level",data.level);
this.token.startUp()
})
} else {
diff --git a/src/app/examiner/examiner-index/examiner-index.component.ts b/src/app/examiner/examiner-index/examiner-index.component.ts
index 076bb9d..74c556c 100644
--- a/src/app/examiner/examiner-index/examiner-index.component.ts
+++ b/src/app/examiner/examiner-index/examiner-index.component.ts
@@ -79,9 +79,7 @@ export class ExaminerIndexComponent implements OnInit {
this.http.get("/api/Papers",{params:paramsdata}).subscribe((data:any)=>{
this.tabledataSource=data.items
this.length=data.totalCount
- console.log(data)
})
- //console.log(this.tabledataSource)
}
//获取消防救援对信息
getHelp(){
@@ -98,7 +96,6 @@ export class ExaminerIndexComponent implements OnInit {
SortType:''
}
this.http.get("/api/ExamUsers",{params:paramsdata}).subscribe((data:any)=>{
- console.log(data)
this.helpName=data.items
})
}
diff --git a/src/app/http-interceptors/cache-token.service.ts b/src/app/http-interceptors/cache-token.service.ts
index c5a8399..917bbd1 100644
--- a/src/app/http-interceptors/cache-token.service.ts
+++ b/src/app/http-interceptors/cache-token.service.ts
@@ -25,6 +25,7 @@ export class CacheTokenService {
sessionStorage.setItem("roleType",data.roleType);
sessionStorage.setItem("token",data.token);
sessionStorage.setItem("refreshToken",data.refreshToken);
+ sessionStorage.setItem("level",data.level);
})
} else { this.delete() }
},18*60*1000)
diff --git a/src/app/navigation/navigation.component.html b/src/app/navigation/navigation.component.html
index 820a46e..f389b85 100644
--- a/src/app/navigation/navigation.component.html
+++ b/src/app/navigation/navigation.component.html
@@ -22,7 +22,7 @@
diff --git a/src/app/navigation/navigation.component.ts b/src/app/navigation/navigation.component.ts
index 9c3a581..99c7683 100644
--- a/src/app/navigation/navigation.component.ts
+++ b/src/app/navigation/navigation.component.ts
@@ -16,8 +16,7 @@ export class NavigationComponent implements OnInit {
constructor(private router:Router,public emitService: ComponentServiceService,public navmenus:CacheTokenService,private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public islogin:IsLoginService) { }
- isAdmin:boolean = false
- ngOnInit() {
- }
+ roleType = sessionStorage.getItem('roleType')
+ ngOnInit() {}
}
diff --git a/src/app/ui/enterpriseuser/addenterpriseuser.component.html b/src/app/ui/enterpriseuser/addenterpriseuser.component.html
new file mode 100644
index 0000000..3c624ef
--- /dev/null
+++ b/src/app/ui/enterpriseuser/addenterpriseuser.component.html
@@ -0,0 +1,49 @@
+
\ No newline at end of file
diff --git a/src/app/ui/enterpriseuser/addenterpriseuser.component.ts b/src/app/ui/enterpriseuser/addenterpriseuser.component.ts
new file mode 100644
index 0000000..e7aab20
--- /dev/null
+++ b/src/app/ui/enterpriseuser/addenterpriseuser.component.ts
@@ -0,0 +1,67 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import {MatDialogRef} from '@angular/material/dialog';
+import {FormControl} from '@angular/forms';
+import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
+
+@Component({
+ selector: 'addenterpriseuser',
+ templateUrl: './addenterpriseuser.component.html',
+ styleUrls: ['./enterpriseuser.component.scss']
+ })
+export class AddEnterpriserUser {
+
+ toppings = new FormControl();
+ constructor(private http: HttpClient,public dialogRef: MatDialogRef