Browse Source

[完善] 修改端口号, 编制工具测试

master
陈鹏飞 4 years ago
parent
commit
ea131cbbad
  1. 2
      proxy.config.json
  2. 1
      src/app/http-interceptors/cache-token.service.ts
  3. 2
      src/app/navigation/navigation.component.html
  4. 19
      src/app/pages/lockscreen/lockscreen.component.ts
  5. 9
      src/app/pages/login/login.component.ts
  6. 2
      src/app/tabbar/tabbar.component.html
  7. 26
      src/app/ui/collection-tools/collection-tools.component.ts
  8. 4
      src/app/ui/enterpriseuser/enterpriseuser.component.html
  9. 2
      src/app/ui/teacherManagement/enterpriseuser.component.html
  10. 2
      src/app/ui/ui-routing.module.ts
  11. BIN
      src/assets/images/enterPaintButton.png
  12. BIN
      src/assets/images/handle-fixed.png
  13. BIN
      src/assets/images/handle-main.png
  14. BIN
      src/assets/images/handle-secondary.png
  15. BIN
      src/assets/images/handle-terminal.png

2
proxy.config.json

@ -1,6 +1,6 @@
{
"/api": {
"target": "http://121.37.20.190:8100/",
"target": "http://121.37.20.190:8000",
"secure": false,
"changeOrigin": true
}

1
src/app/http-interceptors/cache-token.service.ts

@ -22,7 +22,6 @@ export class CacheTokenService {
refreshToken: refreshToken,
}).subscribe((data:any) => {
sessionStorage.setItem('realName',data.realName)
sessionStorage.setItem('roleType',data.roleType)
sessionStorage.setItem("token",data.token);
sessionStorage.setItem("refreshToken",data.refreshToken);
})

2
src/app/navigation/navigation.component.html

@ -34,7 +34,7 @@
</mat-sidenav>
<div class="example-sidenav-content">
<div style="height: 64px; min-height: 64px;">
<div style="height: 60px; min-height: 60px;">
<app-tabbar (toggleDarkTheme)="switchTheme($event)" (defaulttheme)="defaulttheme()" (redtheme)="redtheme()"></app-tabbar>
</div>
<div style="flex: 1; overflow: hidden;">

19
src/app/pages/lockscreen/lockscreen.component.ts

@ -27,17 +27,14 @@ export class LockscreenComponent implements OnInit {
//登录
onSubmit(e){
let params = { roleType: this.roleType }
this.http.post('/api/Account/SignIn',e,{params}).subscribe((data:any)=>{
sessionStorage.setItem('username',e.name)
sessionStorage.setItem('expires',data.expires)
sessionStorage.setItem('realName',data.realName)
sessionStorage.setItem('roleType',data.roleType)
sessionStorage.setItem("token",data.token);
sessionStorage.setItem("refreshToken",data.refreshToken);
this.token.startUp(); //登陆成功启动定时器刷新token
this.router.navigate(['/home/createexam']) //登陆成功跳转页面
},(err) => {this.errmsg = err})
// let params = { roleType: this.roleType }
// this.http.post('/api/Account/SignIn',e,{params}).subscribe((data:any)=>{
// sessionStorage.setItem("realName",data.realName);
// sessionStorage.setItem("token",data.token);
// sessionStorage.setItem("refreshToken",data.refreshToken);
// this.token.startUp(); //登陆成功启动定时器刷新token
// this.router.navigate(['/home/createexam']) //登陆成功跳转页面
// },(err) => {this.errmsg = err})
}
//切换登录角色

9
src/app/pages/login/login.component.ts

@ -27,12 +27,9 @@ export class LoginComponent implements OnInit {
//登录
onSubmit(e){
let params = { roleType: '0' }
this.http.post('/api/Account/SignIn',e,{params}).subscribe((data:any)=>{
sessionStorage.setItem('username',e.name)
sessionStorage.setItem('expires',data.expires)
sessionStorage.setItem('realName',data.realName)
sessionStorage.setItem('roleType',data.roleType)
// let params = { roleType: '0' },{params}
this.http.post('/api/Account/SignIn',e).subscribe((data:any)=>{
sessionStorage.setItem("realName",data.realName);
sessionStorage.setItem("token",data.token);
sessionStorage.setItem("refreshToken",data.refreshToken);
this.token.startUp(); //登陆成功启动定时器刷新token

2
src/app/tabbar/tabbar.component.html

@ -6,7 +6,7 @@
* @LastEditors: sueRimn
* @LastEditTime: 2020-12-11 10:01:47
-->
<mat-toolbar style="background-color:#FFFFFF;height: 60px;">
<mat-toolbar style="background-color:#FFFFFF;height: 60px; box-shadow: inset 0px -3px 5px 0px rgb(165, 163, 163)">
<!-- <mat-toolbar> -->
<p>欢迎登录消防救援考核系统</p>

26
src/app/ui/collection-tools/collection-tools.component.ts

@ -625,29 +625,14 @@ export class CollectionToolsComponent implements OnInit {
this.canvasData.isChange = true
}
isSixShow = true
isSixbtn = true //控制想定作业编辑按钮
isxxx = true //控制查看编辑模式的编辑模式按钮
ngOnInit(): void {
if(this.router.url.indexOf("keyUnit/viewunitinfoplan") == -1 && this.router.url.indexOf("keyUnit/viewunitinfo") != -1 || this.router.url.indexOf("keyUnit/editplaninfo")!= -1){
this.isSixbtn = false
}
if(!this.isSixbtn && sessionStorage.getItem("six") == "edit"){
this.isSixShow = true
}
if(!this.isSixbtn && sessionStorage.getItem("six") == "look"){
this.isEditPattern = false
this.isxxx = false
}
if (sessionStorage.getItem('editable') == "0") {
this.isEditPattern = false
this.isxxx = false
}
sessionStorage.setItem('companyId','5fa2512ef8eb762cb03c65fb')
sessionStorage.setItem('planId','5fa8b0b8f8eb762cb03c6c30')
sessionStorage.setItem('buildingTypeId','5e7c9018a3050b1a840ed4b7')
this.getAllLibrary() //获取素材库
this.getAllBuildings() //获取所有建筑
@ -661,18 +646,19 @@ export class CollectionToolsComponent implements OnInit {
event.preventDefault();
};
})
this.canvasData.getMessage().subscribe((message: any)=>{
if(message == "send a message"){
this.refurbishTreeData()
}
})
}
ngAfterViewInit(): void {
this.getSitePlan()
// 监听canvas组件选中素材事件
this.canvas.on("select",obj=>{

4
src/app/ui/enterpriseuser/enterpriseuser.component.html

@ -41,12 +41,12 @@
<ng-container matColumnDef="post">
<th mat-header-cell *matHeaderCellDef>消防救援站</th>
<td mat-cell *matCellDef="let element">上海总队</td>
<td mat-cell *matCellDef="let element">{{element.organizationName}}</td>
</ng-container>
<ng-container matColumnDef="tel">
<th mat-header-cell *matHeaderCellDef>手机号</th>
<td mat-cell *matCellDef="let element">13562321997</td>
<td mat-cell *matCellDef="let element">{{element.phone}}</td>
</ng-container>
<ng-container matColumnDef="time">

2
src/app/ui/teacherManagement/enterpriseuser.component.html

@ -41,7 +41,7 @@
<ng-container matColumnDef="post">
<th mat-header-cell *matHeaderCellDef>消防救援站</th>
<td mat-cell *matCellDef="let element">上海总队</td>
<td mat-cell *matCellDef="let element">{{element.organizationName}}</td>
</ng-container>
<ng-container matColumnDef="time">

2
src/app/ui/ui-routing.module.ts

@ -10,6 +10,7 @@ import { LookOverTestComponent } from './look-over-test/look-over-test.component
import { StatisticAnalysisComponent } from './statistic-analysis/statistic-analysis.component';
import { JoinExamComponent } from './join-exam/join-exam.component';
import { TestRecordsComponent } from './test-records/test-records.component';
import { CollectionToolsComponent } from './collection-tools/collection-tools.component'
const routes: Routes = [
{ path: '', component:CreateExamComponent },
@ -20,6 +21,7 @@ const routes: Routes = [
{ path: 'testRecords', component:TestRecordsComponent },
{ path: 'teachear', component:TeacherManagementComponent }, //管理员 教员页面
{ path: 'examinee', component:EnterpriseuserComponent }, //管理员 考生页面
{ path: 'canvasTool', component:CollectionToolsComponent }, //编制工具
]
@NgModule({
imports: [RouterModule.forChild(routes)],

BIN
src/assets/images/enterPaintButton.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
src/assets/images/handle-fixed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/assets/images/handle-main.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

BIN
src/assets/images/handle-secondary.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/assets/images/handle-terminal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Loading…
Cancel
Save