Compare commits
30 Commits
Author | SHA1 | Date |
---|---|---|
|
294eccdda7 | 11 months ago |
|
411722d6a8 | 3 years ago |
|
4dbeaf2b36 | 3 years ago |
|
bc75ce7993 | 3 years ago |
|
bc1e6d3997 | 3 years ago |
|
720098a068 | 3 years ago |
|
1c35191071 | 3 years ago |
|
2f8548211a | 3 years ago |
|
3ac88e8a1a | 3 years ago |
|
f676d9e2d8 | 3 years ago |
|
8f09a38a1b | 3 years ago |
|
2ebf5df542 | 3 years ago |
|
8d8098bb60 | 3 years ago |
|
689e5c1573 | 3 years ago |
|
aa43b3c2d7 | 3 years ago |
|
495f73bf6f | 3 years ago |
|
6ba3be89d9 | 3 years ago |
|
8dc468c261 | 3 years ago |
|
4b6ec4c9a2 | 3 years ago |
|
58db1fc807 | 3 years ago |
|
209ab9a802 | 3 years ago |
|
fe46ca80b7 | 3 years ago |
|
036c9834a6 | 3 years ago |
|
f58e91a420 | 3 years ago |
|
44a72a93ec | 4 years ago |
|
e6b3652c36 | 4 years ago |
|
a35b485add | 4 years ago |
|
d76ab10342 | 4 years ago |
|
1bc637f97c | 4 years ago |
|
b8d8b7ab9a | 4 years ago |
365 changed files with 36857 additions and 91707 deletions
@ -1,9 +1,6 @@
|
||||
{ |
||||
"/api": { |
||||
"target": "http://121.36.37.70:8201/", |
||||
"生产": "http://10.81.73.39:8000/", |
||||
"测试": "http://121.36.37.70:8201/", |
||||
"生产2": "http://183.194.244.232:8088/", |
||||
"target": "http://218.75.214.31:28085/", |
||||
"secure": false, |
||||
"changeOrigin": true |
||||
} |
||||
|
@ -1,70 +1,31 @@
|
||||
import { HttpClient } from "@angular/common/http"; |
||||
import { Injectable } from "@angular/core"; |
||||
import { |
||||
CanActivate, |
||||
ActivatedRouteSnapshot, |
||||
RouterStateSnapshot, |
||||
Router, |
||||
} from "@angular/router"; |
||||
import { Injectable } from '@angular/core'; |
||||
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router'; |
||||
|
||||
@Injectable({ |
||||
providedIn: "root", |
||||
providedIn: 'root' |
||||
}) |
||||
export class AuthGuard implements CanActivate { |
||||
constructor(private http: HttpClient, private router: Router) {} |
||||
|
||||
// 路由守卫
|
||||
async canActivate( |
||||
next: ActivatedRouteSnapshot, |
||||
state: RouterStateSnapshot |
||||
): Promise<boolean> { |
||||
console.log("next", next); |
||||
console.log("state", state); |
||||
constructor(private router: Router) { |
||||
|
||||
if ( |
||||
next.queryParams.singleSignOn && |
||||
next.queryParams.singleSignOn === "true" |
||||
) { |
||||
//执行自动登录逻辑
|
||||
await this.onSubmit(); |
||||
} |
||||
|
||||
// 路由守卫
|
||||
canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean { |
||||
|
||||
return this.checkLogin(); |
||||
} |
||||
|
||||
checkLogin(): boolean { |
||||
|
||||
// 判断本地有没有token
|
||||
const token = sessionStorage.getItem("token"); |
||||
const token = sessionStorage.getItem('token'); |
||||
|
||||
// 如果有token,允许访问
|
||||
if (token) { |
||||
return true; |
||||
} |
||||
if (token) { return true; } |
||||
|
||||
//如果没有token,跳转登录页
|
||||
this.router.navigate(["/login"]); |
||||
this.router.navigate(['/login']); |
||||
return false; |
||||
} |
||||
|
||||
onSubmit() { |
||||
return new Promise<void>((resolve, reject) => { |
||||
this.http |
||||
.post("/api/Account/SignIn", { |
||||
name: "superadmin", |
||||
password: "SHya119!@", |
||||
}) |
||||
.subscribe( |
||||
(data: any) => { |
||||
sessionStorage.setItem("level", data.level); |
||||
sessionStorage.setItem("token", data.token); |
||||
sessionStorage.setItem("refreshToken", data.refreshToken); |
||||
sessionStorage.setItem("isDefaultPassword", data.isDefaultPassword); //是否需要修改默认密码
|
||||
sessionStorage.setItem("singleSignOn", "true"); //是否需要修改默认密码
|
||||
resolve(); |
||||
}, |
||||
(err) => { |
||||
reject(); |
||||
} |
||||
); |
||||
}); |
||||
} |
||||
} |
||||
|
@ -1,20 +0,0 @@
|
||||
<div class="addCarBox"> |
||||
<div class="topbox"> |
||||
<span>新增消防车辆</span> |
||||
</div> |
||||
<div class="content"> |
||||
<!-- <div (click)="selecteAddType(item,key)" *ngFor="let item of addList;let key = index" [ngClass]="{selectedDiv: item.id == selectedFireForceTypeIndex}"> |
||||
{{item.name}} |
||||
</div> --> |
||||
<form class="example-form" (ngSubmit)="onSubmit(form.value)" #form="ngForm"> |
||||
<mat-form-field class="example-full-width"> |
||||
<mat-label>车辆名称</mat-label> |
||||
<input name="carName" matInput [(ngModel)]="carName" required> |
||||
</mat-form-field> |
||||
</form> |
||||
</div> |
||||
<div class="btnbox"> |
||||
<button type="submit" mat-flat-button color="primary" [disabled]='form.invalid' (click)="onSubmit(form.value)">确定</button> |
||||
<button type="button" mat-flat-button style="background-color: #F2F4F6;" mat-dialog-close>取消</button> |
||||
</div> |
||||
</div> |
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
||||
<div class="box"> |
||||
<button mat-raised-button color="primary" (click)="export()">导出excel表格</button> |
||||
</div> |
@ -1,7 +0,0 @@
|
||||
.box{ |
||||
width: 100%; |
||||
height: 100%; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
} |
@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { ExportExcelComponent } from './export-excel.component'; |
||||
|
||||
describe('ExportExcelComponent', () => { |
||||
let component: ExportExcelComponent; |
||||
let fixture: ComponentFixture<ExportExcelComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ ExportExcelComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(ExportExcelComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -1,31 +0,0 @@
|
||||
import { HttpClient } from '@angular/common/http'; |
||||
import { Component, OnInit } from '@angular/core'; |
||||
|
||||
@Component({ |
||||
selector: 'app-export-excel', |
||||
templateUrl: './export-excel.component.html', |
||||
styleUrls: ['./export-excel.component.scss'] |
||||
}) |
||||
export class ExportExcelComponent implements OnInit { |
||||
|
||||
constructor(public http:HttpClient) { } |
||||
|
||||
ngOnInit(): void { |
||||
} |
||||
export(){ |
||||
const httpOptions = { |
||||
responseType: 'blob' as 'json' |
||||
}; |
||||
this.http.get('/api/StatisticsAnalysis/ExportToExcel',httpOptions).subscribe((data:any) => { |
||||
// 文件名中有中文 则对文件名进行转码
|
||||
const link = document.createElement('a'); |
||||
const blob = new Blob([data], {type: 'application/vnd.ms-excel'}); |
||||
link.setAttribute('href', window.URL.createObjectURL(blob)); |
||||
link.setAttribute('download', '统计信息'+'.xls'); |
||||
link.style.visibility = 'hidden'; |
||||
document.body.appendChild(link); |
||||
link.click(); |
||||
document.body.removeChild(link); |
||||
}) |
||||
} |
||||
} |
@ -1,73 +1,11 @@
|
||||
<mat-tab-group *ngIf="planId" selectedIndex="10" style="height: 99%;"> |
||||
<mat-tab label="1.基本信息"> |
||||
<ng-template matTabContent> |
||||
<app-basicinfo-look></app-basicinfo-look> |
||||
</ng-template> |
||||
</mat-tab> |
||||
<mat-tab label="2.四周毗邻"> |
||||
<ng-template matTabContent> |
||||
<app-allaround></app-allaround> |
||||
</ng-template> |
||||
</mat-tab> |
||||
<mat-tab label="3.消防设施"> |
||||
<ng-template matTabContent> |
||||
<app-fire-fighting-device-look></app-fire-fighting-device-look> |
||||
</ng-template> |
||||
</mat-tab> |
||||
<mat-tab label="4.重点部位"> |
||||
<ng-template matTabContent> |
||||
<app-key-site-look></app-key-site-look> |
||||
</ng-template> |
||||
</mat-tab> |
||||
<mat-tab label="5.功能分区"> |
||||
<ng-template matTabContent> |
||||
<app-function-division-look></app-function-division-look> |
||||
</ng-template> |
||||
</mat-tab> |
||||
<mat-tab label="6.行车路线"> |
||||
<ng-template matTabContent> |
||||
<app-router-gis></app-router-gis> |
||||
</ng-template> |
||||
</mat-tab> |
||||
<mat-tab label="7.周边水源及力量"> |
||||
<ng-template matTabContent> |
||||
<app-water-road></app-water-road> |
||||
</ng-template> |
||||
</mat-tab> |
||||
<mat-tab label="8.实景图"> |
||||
<ng-template matTabContent> |
||||
<app-realistic-picture-look></app-realistic-picture-look> |
||||
</ng-template> |
||||
</mat-tab> |
||||
<mat-tab label="9.上传CAD"> |
||||
<ng-template matTabContent> |
||||
<app-uploading-cad-look></app-uploading-cad-look> |
||||
</ng-template> |
||||
</mat-tab> |
||||
<mat-tab label="10.特别警示"> |
||||
<ng-template matTabContent> |
||||
<app-special-warning></app-special-warning> |
||||
</ng-template> |
||||
</mat-tab> |
||||
<mat-tab label="11.作战部署"> |
||||
<ng-template matTabContent> |
||||
<!-- 株洲项目:传入预案id显示相应预案 --> |
||||
<div *ngIf="showType == 0"> |
||||
<iframe id="inneriframe" [src]='iframeSrc' frameborder="0" style="width: 100%;height: 100%;"></iframe> |
||||
</div> |
||||
<div *ngIf="showType == 1" id="viewer"></div> |
||||
<div *ngIf="showType == 3"> |
||||
<app-collection-tools></app-collection-tools> |
||||
</div> |
||||
|
||||
<!-- 在线编制预案 --> |
||||
<div *ngIf="showType == 2"> |
||||
<app-create-plan-online-five></app-create-plan-online-five> |
||||
<iframe id="inneriframe2" [src]='threedUrl' frameborder="0" style="width: 100%;height: 100%;"></iframe> |
||||
</div> |
||||
</ng-template> |
||||
</mat-tab> |
||||
|
||||
</mat-tab-group> |
||||
|
||||
<div *ngIf="unitId"> |
||||
<app-basicinfo-look></app-basicinfo-look> |
||||
<div *ngIf="showType == 3"> |
||||
<app-collection-tools></app-collection-tools> |
||||
</div> |
@ -1,198 +1,139 @@
|
||||
import { HttpClient } from "@angular/common/http"; |
||||
import { Component, OnInit } from "@angular/core"; |
||||
import { ActivatedRoute, Router } from "@angular/router"; |
||||
import { CacheTokenService } from "../http-interceptors/cache-token.service"; |
||||
import { Viewer } from "photo-sphere-viewer"; |
||||
import { DomSanitizer } from "@angular/platform-browser"; |
||||
import { HttpClient } from '@angular/common/http'; |
||||
import { Component, OnInit } from '@angular/core'; |
||||
import { ActivatedRoute } from '@angular/router'; |
||||
import { CacheTokenService } from '../http-interceptors/cache-token.service'; |
||||
import { Viewer } from 'photo-sphere-viewer'; |
||||
import { DomSanitizer } from '@angular/platform-browser'; |
||||
|
||||
declare var CryptoJS |
||||
@Component({ |
||||
selector: "app-external-links-plan", |
||||
templateUrl: "./external-links-plan.component.html", |
||||
styleUrls: ["./external-links-plan.component.scss"], |
||||
selector: 'app-external-links-plan', |
||||
templateUrl: './external-links-plan.component.html', |
||||
styleUrls: ['./external-links-plan.component.scss'] |
||||
}) |
||||
export class ExternalLinksPlanComponent implements OnInit { |
||||
constructor( |
||||
private http: HttpClient, |
||||
private token: CacheTokenService, |
||||
public route: ActivatedRoute, |
||||
private sanitizer: DomSanitizer, |
||||
private router: Router |
||||
) {} |
||||
|
||||
planId: any; //预案id
|
||||
viewer; //全景图对象
|
||||
fetchUrl; //预案文件地址
|
||||
showType; //预案类型 1:全景图
|
||||
planData; //预案信息
|
||||
|
||||
unitId; |
||||
constructor(private http: HttpClient, private token: CacheTokenService, public route: ActivatedRoute, private sanitizer: DomSanitizer) { } |
||||
planId: any//预案id
|
||||
viewer//全景图对象
|
||||
fetchUrl//预案文件地址
|
||||
showType//预案类型 1:全景图
|
||||
planData//预案信息
|
||||
async ngOnInit(): Promise<void> { |
||||
await this.login(); //登录存储token
|
||||
this.route.queryParams.subscribe((paramsData) => { |
||||
console.log(paramsData.planId) |
||||
if (paramsData.planId) { |
||||
this.planId = paramsData.planId; |
||||
this.http |
||||
.get(`/api/PlanComponents/${this.planId}`) |
||||
.subscribe((data: any) => { |
||||
console.log("单个预案详细信息", data); |
||||
sessionStorage.setItem("planId", data.id); |
||||
sessionStorage.setItem("companyId", data.companyId); |
||||
sessionStorage.setItem( |
||||
"buildingTypeId", |
||||
data.company.buildingTypes[0].id |
||||
); |
||||
sessionStorage.setItem("editable", "0"); |
||||
sessionStorage.setItem("planName", data.name); |
||||
let queryParams = {}; |
||||
if (data.webTextData && data.planType === 16) { |
||||
queryParams = { |
||||
id: data.companyId, |
||||
planId: data.id, |
||||
orName: data.company.organizationName, |
||||
orId: data.company.organizationId, |
||||
companyId: data.companyId, |
||||
planName: data.name, |
||||
unitName: data.companyName, |
||||
planCategory: data.planCategory, |
||||
unitTypeId: data.company.buildingTypes[0].id, |
||||
pattern: "false", |
||||
}; |
||||
} else { |
||||
queryParams = { |
||||
id: data.companyId, |
||||
planId: data.id, |
||||
orName: data.company.organizationName, |
||||
orId: data.company.organizationId, |
||||
}; |
||||
} |
||||
this.router.navigate([`/linksPlan`], { |
||||
queryParams: queryParams, |
||||
}); |
||||
this.planData = data; |
||||
|
||||
//如果是查看文件类型
|
||||
|
||||
console.log("data.planType", data.planType); |
||||
await this.login()//登录存储token
|
||||
this.route.queryParams.subscribe(paramsData => { |
||||
this.planId = paramsData.planId |
||||
let planId = paramsData.planId |
||||
this.http.get(`/api/PlanComponents/${planId}`).subscribe((data: any) => { |
||||
console.log('单个预案详细信息', data) |
||||
this.planData = data |
||||
if (data.planType != 1 && data.planType != 2) { |
||||
this.fetchUrl = data.attachmentUrls ? data.attachmentUrls[0] : ""; |
||||
var index = this.fetchUrl.indexOf("/"); |
||||
|
||||
// 在线编制预案
|
||||
if (data.webTextData && data.planType === 16) { |
||||
this.showType = 2; |
||||
return; |
||||
} |
||||
|
||||
//全景图图片
|
||||
if (this.fetchUrl.substr(0, index) == "psw") { |
||||
this.showType = 1; |
||||
var obj = document.getElementById("viewer"); |
||||
this.fetchUrl = data.attachmentUrls[0] |
||||
var index = this.fetchUrl.indexOf("\/") |
||||
if (this.fetchUrl.substr(0, index) == 'psw') { |
||||
this.showType = 1 |
||||
var obj = document.getElementById('viewer') |
||||
if (obj != null) { |
||||
obj.innerHTML = ""; |
||||
obj.innerHTML = '' |
||||
} |
||||
window.setTimeout(() => { |
||||
this.viewer = new Viewer({ |
||||
container: document.querySelector("#viewer"), |
||||
panorama: "/api/Objects/PlanPlatform/" + this.fetchUrl, |
||||
}); |
||||
container: document.querySelector('#viewer'), |
||||
panorama: '/api/Objects/PlanPlatform/' + this.fetchUrl, |
||||
}); |
||||
}) |
||||
} else { |
||||
//word文档
|
||||
this.lookWord(); |
||||
//毕生
|
||||
this.lookWord() |
||||
} |
||||
} else { |
||||
// 如果是二三维预案
|
||||
this.handleData(); |
||||
// 二维三维预案
|
||||
this.handleData(data.url) |
||||
} |
||||
}); |
||||
} else if (paramsData.unitId) { |
||||
this.http |
||||
.get(`/api/Companies/${paramsData.unitId}`) |
||||
.subscribe((data: any) => { |
||||
console.log("单位信息", data); |
||||
sessionStorage.setItem("editable", "0"); |
||||
sessionStorage.setItem("companyName", data.name); |
||||
sessionStorage.setItem("companyId", data.id); |
||||
sessionStorage.setItem( |
||||
data.id, |
||||
JSON.stringify(data.companyIntegrityScore) |
||||
); |
||||
let queryParams = { |
||||
id: data.id, |
||||
usci: data.usci, |
||||
}; |
||||
this.unitId = paramsData.unitId; |
||||
this.router.navigate([`/linksPlan`], { |
||||
queryParams: queryParams, |
||||
}); |
||||
}); |
||||
} |
||||
}); |
||||
}) |
||||
}) |
||||
} |
||||
|
||||
async login() { |
||||
await new Promise((resolve, reject) => { |
||||
let { appKey, signature, timestamp } = this.route.snapshot.queryParams; |
||||
if (!appKey || !signature || !timestamp) { |
||||
alert("url参数不完整"); |
||||
return; |
||||
} |
||||
this.http |
||||
.get("/api/Account/VerifyAppInfo", { |
||||
params: { |
||||
appKey: appKey, |
||||
signature: signature, |
||||
timestamp: timestamp, |
||||
}, |
||||
}) |
||||
.subscribe((data: any) => { |
||||
this.http.post('/api/Account/SignIn', { |
||||
name: 'zhuzhouyuanchakan', |
||||
password: '12345678' |
||||
}).subscribe((data: any) => { |
||||
sessionStorage.setItem("level", data.level); |
||||
sessionStorage.setItem("token", data.token); |
||||
sessionStorage.setItem("refreshToken", data.refreshToken); |
||||
console.log("登录成功", data); |
||||
resolve(data); |
||||
this.token.startUp(); |
||||
}); |
||||
}); |
||||
console.log('登录成功', data) |
||||
resolve(data) |
||||
this.token.startUp() |
||||
}) |
||||
}) |
||||
|
||||
} |
||||
iframeSrc; //word服务器链接
|
||||
iframeSrc//毕生服务器链接
|
||||
src//文件存储地址
|
||||
lookWord() { |
||||
this.showType = 0; |
||||
let src; |
||||
let suffix = this.fetchUrl |
||||
.split(".") |
||||
[this.fetchUrl.split(".").length - 1].toLowerCase(); |
||||
if (suffix == "docx" || suffix == "doc") { |
||||
let arr = this.fetchUrl.split("."); |
||||
arr[arr.length - 1] = "pdf"; |
||||
src = `/api/Objects/PlanPlatform/` + arr.join("."); |
||||
} else if (suffix == "pdf") { |
||||
src = `/api/Objects/PlanPlatform/` + this.fetchUrl; |
||||
let docIdWordArray = CryptoJS.enc.Utf8.parse(`PlanPlatform/` + this.fetchUrl); |
||||
let docId = CryptoJS.enc.Base64.stringify(docIdWordArray); |
||||
let jwt = sessionStorage.getItem("token"); |
||||
let rawJwt = CryptoJS.enc.Base64.parse(jwt.split('.')[1]); |
||||
let identityJson = CryptoJS.enc.Utf8.stringify(rawJwt); |
||||
let identityJsonparse = JSON.parse(identityJson) |
||||
let filename: string |
||||
this.http.get(`/api/ObjectMetadata/PlanPlatform/${this.fetchUrl}`).subscribe((data: any) => { |
||||
filename = data.fileName |
||||
let json = { |
||||
doc: { |
||||
docId: docId, |
||||
title: filename, |
||||
//title: filename,
|
||||
fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/` + this.fetchUrl |
||||
}, |
||||
user: { |
||||
uid: identityJsonparse.sub, |
||||
nickName: identityJsonparse.name, |
||||
avatar: "", |
||||
privilege: [ |
||||
'FILE_READ', 'FILE_DOWNLOAD', 'FILE_PRINT' |
||||
], |
||||
}, |
||||
} |
||||
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src); |
||||
var stringjson = JSON.stringify(json) |
||||
var wordArray = CryptoJS.enc.Utf8.parse(stringjson); |
||||
var base64 = CryptoJS.enc.Base64.stringify(wordArray); |
||||
this.src = `http://121.5.10.84:80/apps/editor/openPreview?data=${base64}` |
||||
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
||||
this.showType = 0 |
||||
}) |
||||
} |
||||
|
||||
companyData; //当前公司信息
|
||||
thirdPartyURL; |
||||
threedUrl: any; |
||||
handleData() { |
||||
let data = this.planData; |
||||
if (this.planData.planMode == 1 || this.planData.planMode == 2) { |
||||
//预案planMode=2时, 跳查看页面组件
|
||||
this.showType = 3; |
||||
} else if (this.planData.planMode == 3) { |
||||
//网页地址
|
||||
let localhostPath = window.document.location.href.substring( |
||||
0, |
||||
window.document.location.href.indexOf(window.document.location.pathname) |
||||
); |
||||
let url = data.url; |
||||
if (url.indexOf(localhostPath) != -1) { |
||||
window.location.href = `${url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false`; |
||||
} else { |
||||
window.location.href = `${url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false`; |
||||
} |
||||
companyData//当前公司信息
|
||||
thirdPartyURL |
||||
threedUrl: any |
||||
handleData(url?:string) { |
||||
let data = this.planData |
||||
// console.log('ddddd',data)
|
||||
if (this.planData.planMode == 2) { //预案planMode=2时, 跳查看页面组件
|
||||
|
||||
this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => { |
||||
console.log(data) |
||||
data && data.company ? this.companyData = data.company : null |
||||
sessionStorage.setItem("buildingTypeId", this.companyData.buildingTypes.length ? this.companyData.buildingTypes[0].id : undefined); |
||||
sessionStorage.setItem("companyId", data.companyId); |
||||
sessionStorage.setItem("planId", this.planId); |
||||
sessionStorage.setItem("editable", '0'); |
||||
sessionStorage.setItem("planName", this.planData.name) |
||||
this.showType = 3 |
||||
// this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`/keyUnit/viewunitinfoplans?id=${data.companyId}`)
|
||||
}) |
||||
} else if (this.planData.planMode == 3) { //预案planMode=3时, 第三方网址'
|
||||
// this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => {
|
||||
// console.log('xxxx',data)
|
||||
// data && data.company ? this.companyData = data.company : null
|
||||
// this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url)
|
||||
// this.showType = 2
|
||||
// })
|
||||
window.location.href = `${url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false` |
||||
} |
||||
} |
||||
} |
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,34 +1,40 @@
|
||||
import { Injectable } from "@angular/core"; |
||||
import { HttpClient } from "@angular/common/http"; |
||||
import { Injectable } from '@angular/core'; |
||||
import { HttpClient } from '@angular/common/http' |
||||
|
||||
@Injectable({ |
||||
providedIn: "root", |
||||
providedIn: 'root' |
||||
}) |
||||
|
||||
export class CacheTokenService { |
||||
|
||||
constructor(private http:HttpClient) { } |
||||
public timer; |
||||
|
||||
//刷新token令牌定时器
|
||||
startUp = ():void=>{ |
||||
window.clearInterval(this.timer); //清一遍定时器
|
||||
window.clearInterval(this.timer) //清一遍定时器
|
||||
this.timer = window.setInterval(()=>{ |
||||
var token = sessionStorage.getItem("token"); |
||||
var refreshToken = sessionStorage.getItem("refreshToken"); |
||||
this.http |
||||
.post("/api/Account/RefreshToken", { |
||||
this.http.post('/api/Account/RefreshToken', { |
||||
token: token, |
||||
refreshToken: refreshToken, |
||||
}) |
||||
.subscribe((data: any) => { |
||||
refreshToken: refreshToken |
||||
}).subscribe((data:any) => { |
||||
sessionStorage.setItem("level",data.level); |
||||
sessionStorage.setItem("token",data.token); |
||||
sessionStorage.setItem("refreshToken",data.refreshToken); |
||||
}); |
||||
}, 5 * 60 * 1000); |
||||
}; |
||||
}) |
||||
},18*60*1000) |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
//删除定时器
|
||||
delete = ():void=> { |
||||
window.clearInterval(this.timer); |
||||
}; |
||||
window.clearInterval(this.timer) |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,119 +0,0 @@
|
||||
<h2 mat-dialog-title>演练记录</h2> |
||||
<div class="box"> |
||||
<div class="contentItem"> |
||||
<div class="title"> |
||||
单位信息 |
||||
</div> |
||||
<div class="content"> |
||||
<div class="textbox"> |
||||
<span class="name">单位名称:</span> |
||||
<span>{{data.unitInfo.name}}</span> |
||||
</div> |
||||
<div class="textbox"> |
||||
<span class="name">单位地址:</span> |
||||
<span>{{data.unitInfo.address}}</span> |
||||
</div> |
||||
<div class="textbox"> |
||||
<span class="name">联系人:</span> |
||||
<span>{{data.unitInfo.contacts}}</span> |
||||
</div> |
||||
<div class="textbox"> |
||||
<span class="name">联系电话:</span> |
||||
<span>{{data.unitInfo.phone}}</span> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="contentItem"> |
||||
<div class="title"> |
||||
调研人员 |
||||
</div> |
||||
<div class="content peoplecontent"> |
||||
<div> |
||||
<span class="name">带队人员:</span> |
||||
<input [disabled]="!isEditMode" name="teamLeader" [(ngModel)]="teamLeader" nz-input |
||||
placeholder="带队人员" /> |
||||
</div> |
||||
<div> |
||||
<span class="name">熟悉时间:</span> |
||||
<nz-range-picker [disabled]="!isEditMode" [nzShowTime]="{ nzFormat: 'HH:mm' }" |
||||
nzFormat="yyyy-MM-dd HH:mm" [nzPlaceHolder]="['开始时间', '结束时间']" name="time" |
||||
[(ngModel)]="time"></nz-range-picker> |
||||
</div> |
||||
<div> |
||||
<span class="name">调研照片:</span> |
||||
<div class="uploadbox"> |
||||
<input *ngIf="isEditMode" type="file" (change)="upload($event,'调研')"> |
||||
<button *ngIf="isEditMode" nz-button nzType="default">上传照片</button> |
||||
<ul class="imgbox"> |
||||
<li *ngFor="let item of surveyPhoto;let key = index"><img [src]="item" alt="" |
||||
(click)="viewImg(item)"> |
||||
<span *ngIf="isEditMode" class="close material-icons" (click)="deleteImg(surveyPhoto,key)"> |
||||
cancel |
||||
</span> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="contentItem"> |
||||
<div class="title"> |
||||
熟悉内容 |
||||
</div> |
||||
<div class="content photocontent"> |
||||
<div> |
||||
<span class="name">水源照片:</span> |
||||
<div class="uploadbox"> |
||||
<input *ngIf="isEditMode" type="file" (change)="upload($event,'水源')"> |
||||
<button *ngIf="isEditMode" nz-button nzType="default">上传照片</button> |
||||
<ul class="imgbox"> |
||||
<li *ngFor="let item of waterPhoto;let key = index"><img [src]="item" alt="" |
||||
(click)="viewImg(item)"> |
||||
<span *ngIf="isEditMode" class="close material-icons" (click)="deleteImg(waterPhoto,key)"> |
||||
cancel |
||||
</span> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div> |
||||
<span class="name">疏散通道:</span> |
||||
<div class="uploadbox"> |
||||
<input *ngIf="isEditMode" type="file" (change)="upload($event,'疏散通道')"> |
||||
<button *ngIf="isEditMode" nz-button nzType="default">上传照片</button> |
||||
<ul class="imgbox"> |
||||
<li *ngFor="let item of routePhoto;let key = index"><img [src]="item" alt="" |
||||
(click)="viewImg(item)"> |
||||
<span *ngIf="isEditMode" class="close material-icons" (click)="deleteImg(routePhoto,key)"> |
||||
cancel |
||||
</span> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div> |
||||
<span class="name">消控室:</span> |
||||
<div class="uploadbox"> |
||||
<input *ngIf="isEditMode" type="file" (change)="upload($event,'消控室')"> |
||||
<button *ngIf="isEditMode" nz-button nzType="default">上传照片</button> |
||||
<ul class="imgbox"> |
||||
<li *ngFor="let item of fireControlPhoto;let key = index"><img [src]="item" alt="" |
||||
(click)="viewImg(item)"> |
||||
<span *ngIf="isEditMode" class="close material-icons" |
||||
(click)="deleteImg(fireControlPhoto,key)"> |
||||
cancel |
||||
</span> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="mask" *ngIf="isLoading"> |
||||
<mat-spinner [diameter]="30"></mat-spinner> |
||||
</div> |
||||
</div> |
||||
<mat-dialog-actions align="end"> |
||||
<button mat-button mat-dialog-close [disabled]="isLoading || isLoadingSave">取消</button> |
||||
<button mat-button cdkFocusInitial (click)="save()" [disabled]="isLoading || isLoadingSave">确定</button> |
||||
</mat-dialog-actions> |
@ -1,120 +0,0 @@
|
||||
.box { |
||||
width: 100%; |
||||
position: relative; |
||||
|
||||
.contentItem { |
||||
display: flex; |
||||
margin: 6px 0; |
||||
border-bottom: 1px dashed rgb(180, 178, 178); |
||||
|
||||
.title { |
||||
width: 75px; |
||||
color: #1890ff; |
||||
display: flex; |
||||
align-items: center; |
||||
} |
||||
|
||||
.content { |
||||
flex: 1; |
||||
display: flex; |
||||
flex-wrap: wrap; |
||||
|
||||
div { |
||||
margin-bottom: 3px; |
||||
|
||||
.name { |
||||
display: inline-block; |
||||
width: 70px; |
||||
margin-right: 3px; |
||||
text-align: right; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.peoplecontent, |
||||
.photocontent { |
||||
flex-direction: column; |
||||
|
||||
div { |
||||
display: flex; |
||||
align-items: center; |
||||
|
||||
input, |
||||
nz-range-picker { |
||||
flex: 1; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.textbox { |
||||
height: 32px; |
||||
line-height: 32px; |
||||
width: 50%; |
||||
white-space: nowrap; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
|
||||
} |
||||
|
||||
.uploadbox { |
||||
position: relative; |
||||
display: flex; |
||||
align-items: center; |
||||
|
||||
input { |
||||
width: 88px; |
||||
height: 32px; |
||||
position: absolute; |
||||
left: 0; |
||||
top: 0; |
||||
opacity: 0; |
||||
z-index: 2; |
||||
cursor: pointer; |
||||
} |
||||
|
||||
button { |
||||
z-index: 1; |
||||
cursor: pointer; |
||||
} |
||||
|
||||
.imgbox { |
||||
height: 100%; |
||||
display: flex; |
||||
align-items: center; |
||||
|
||||
li { |
||||
display: flex; |
||||
align-items: center; |
||||
position: relative; |
||||
} |
||||
|
||||
img { |
||||
width: 50px; |
||||
height: 50px; |
||||
margin: 0 5px; |
||||
cursor: pointer; |
||||
} |
||||
.close{ |
||||
position: absolute; |
||||
right: 0; |
||||
top: 0; |
||||
font-size: 15px; |
||||
cursor: pointer; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
.mask { |
||||
position: absolute; |
||||
width: 100%; |
||||
height: 100%; |
||||
left: 0; |
||||
top: 0; |
||||
background: rgba(0, 0, 0, 0.2); |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
z-index: 3; |
||||
} |
||||
} |
@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { UploadDrillComponent } from './upload-drill.component'; |
||||
|
||||
describe('UploadDrillComponent', () => { |
||||
let component: UploadDrillComponent; |
||||
let fixture: ComponentFixture<UploadDrillComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ UploadDrillComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(UploadDrillComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -1,203 +0,0 @@
|
||||
import { HttpClient } from "@angular/common/http"; |
||||
import { Component, OnInit, Inject } from "@angular/core"; |
||||
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog"; |
||||
import { ObjectsService } from "@src/app/services/objects.service"; |
||||
import { DatePipe } from "@angular/common"; |
||||
import { MatSnackBar } from "@angular/material/snack-bar"; |
||||
import Viewer from "viewerjs"; |
||||
@Component({ |
||||
selector: "app-upload-drill", |
||||
templateUrl: "./upload-drill.component.html", |
||||
styleUrls: ["./upload-drill.component.scss"], |
||||
providers: [DatePipe], |
||||
}) |
||||
export class UploadDrillComponent implements OnInit { |
||||
constructor( |
||||
public dialogRef: MatDialogRef<UploadDrillComponent>, |
||||
@Inject(MAT_DIALOG_DATA) public data: any, |
||||
private objectsSer: ObjectsService, |
||||
private http: HttpClient, |
||||
private datePipe: DatePipe, |
||||
public snackBar: MatSnackBar |
||||
) {} |
||||
|
||||
isEditMode = true; |
||||
|
||||
ngOnInit(): void { |
||||
console.log(this.data); |
||||
this.isEditMode = this.data.isEditMode; |
||||
this.getData(); |
||||
} |
||||
|
||||
isHttpPost; |
||||
getData() { |
||||
this.http |
||||
.get("/api/DrillRecords", { |
||||
params: { |
||||
CompanyId: this.data.unitInfo.id, |
||||
}, |
||||
}) |
||||
.subscribe((data: any) => { |
||||
console.log("演练记录数据", data); |
||||
if (data.totalCount === 0) { |
||||
this.isHttpPost = true; |
||||
} else { |
||||
this.isHttpPost = false; |
||||
let item = data.items[0]; |
||||
this.drillId = item.id; |
||||
this.teamLeader = item.teamLeader; |
||||
this.time = [item.startTime, item.endTime]; |
||||
this.surveyPhoto = JSON.parse(item.images); |
||||
this.waterPhoto = JSON.parse(item.waterSource); |
||||
this.routePhoto = JSON.parse(item.escapeRoute); |
||||
this.fireControlPhoto = JSON.parse(item.fireControlRoom); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
surveyPhoto = [ |
||||
// "../../../../assets/images/yiyuan.png",
|
||||
// "../../../../assets/images/homeHeader.png",
|
||||
// "../../../../assets/images/add.png",
|
||||
]; //调研人员照片
|
||||
waterPhoto = []; //水源照片
|
||||
routePhoto = []; //疏散照片
|
||||
fireControlPhoto = []; //消控室照片
|
||||
|
||||
//设置文件路径并上传
|
||||
postFilePath; |
||||
isLoading = false; |
||||
async upload(e, type) { |
||||
this.isLoading = true; |
||||
let file = e.target.files[0] || null; //获取上传的文件
|
||||
let fileSize = file.size || null; //上传文件的总大小
|
||||
let shardSize = 5 * 1024 * 1024; //5MB 超过5MB要分块上传
|
||||
this.postFilePath = "演练记录/" + this.data.unitInfo.id; |
||||
if (fileSize >= shardSize) { |
||||
await this.postFileByMul(file, type); |
||||
} else { |
||||
await this.postFile(file, type); |
||||
} |
||||
this.isLoading = false; |
||||
} |
||||
|
||||
//直接上传
|
||||
async postFile(file: File, type) { |
||||
await new Promise((resolve, reject) => { |
||||
this.objectsSer.postFile(this.postFilePath, file).subscribe((data) => { |
||||
let dataObj = data as any; |
||||
let filePath: string = ObjectsService.baseUrl + dataObj.objectName; |
||||
this.setFileUrl(type, filePath); |
||||
resolve("success"); |
||||
}); |
||||
}); |
||||
} |
||||
//分块上传
|
||||
async postFileByMul(file: File, type) { |
||||
await new Promise((resolve, reject) => { |
||||
this.objectsSer |
||||
.postFile_MultipartUpload(this.postFilePath, file) |
||||
.then((value) => { |
||||
console.log("分块上传成功", value); |
||||
let dataObj = value as any; |
||||
this.setFileUrl(type, dataObj.filePath + dataObj.fileName); |
||||
resolve("success"); |
||||
}); |
||||
}); |
||||
} |
||||
|
||||
setFileUrl(type, filePath) { |
||||
switch (type) { |
||||
case "调研": |
||||
this.surveyPhoto.push(filePath); |
||||
break; |
||||
case "水源": |
||||
this.waterPhoto.push(filePath); |
||||
break; |
||||
case "疏散通道": |
||||
this.routePhoto.push(filePath); |
||||
break; |
||||
case "消控室": |
||||
this.fireControlPhoto.push(filePath); |
||||
break; |
||||
} |
||||
} |
||||
deleteImg(arr, key) { |
||||
if (confirm("确认删除此照片吗")) { |
||||
arr.splice(key, 1); |
||||
} |
||||
} |
||||
teamLeader; |
||||
time; |
||||
drillId; |
||||
isLoadingSave = false; |
||||
save() { |
||||
if (!this.isEditMode) { |
||||
this.dialogRef.close(); |
||||
return; |
||||
} |
||||
|
||||
if (!this.teamLeader || !this.time) { |
||||
this.snackBar.open("请输入带队人员和熟悉时间", "确定", { |
||||
verticalPosition: "top", |
||||
duration: 3000, |
||||
}); |
||||
return; |
||||
} |
||||
this.isLoadingSave = true; |
||||
let body: any = { |
||||
companyId: this.data.unitInfo.id, |
||||
teamLeader: this.teamLeader, |
||||
startTime: this.datePipe.transform(this.time[0], "yyyy-MM-ddTHH:mm:ss"), |
||||
endTime: this.datePipe.transform(this.time[1], "yyyy-MM-ddTHH:mm:ss"), |
||||
images: JSON.stringify(this.surveyPhoto), |
||||
waterSource: JSON.stringify(this.waterPhoto), |
||||
escapeRoute: JSON.stringify(this.routePhoto), |
||||
fireControlRoom: JSON.stringify(this.fireControlPhoto), |
||||
}; |
||||
if (this.isHttpPost) { |
||||
this.http.post("/api/DrillRecords", body).subscribe((data: any) => { |
||||
this.drillId = data.id; |
||||
this.isHttpPost = false; |
||||
this.isLoadingSave = false; |
||||
this.snackBar.open("保存成功", "确定", { |
||||
verticalPosition: "top", |
||||
duration: 3000, |
||||
}); |
||||
this.dialogRef.close(); |
||||
}); |
||||
} else { |
||||
body.id = this.drillId; |
||||
this.http |
||||
.put(`/api/DrillRecords/${this.drillId}`, body) |
||||
.subscribe((data: any) => { |
||||
this.isLoadingSave = false; |
||||
this.snackBar.open("保存成功", "确定", { |
||||
verticalPosition: "top", |
||||
duration: 3000, |
||||
}); |
||||
this.dialogRef.close(); |
||||
}); |
||||
} |
||||
} |
||||
|
||||
//查看图片
|
||||
viewImg(url) { |
||||
let dom = document.getElementById(`viewerjs`); |
||||
let pObjs = dom.childNodes; |
||||
let node = document.createElement("img"); |
||||
node.style.display = "none"; |
||||
node.src = url; |
||||
node.id = "img"; |
||||
dom.appendChild(node); |
||||
setTimeout(() => { |
||||
let viewer = new Viewer(document.getElementById(`viewerjs`), { |
||||
hidden: () => { |
||||
dom.removeChild(pObjs[0]); |
||||
viewer.destroy(); |
||||
}, |
||||
}); |
||||
node.click(); |
||||
}, 0); |
||||
} |
||||
} |
@ -1,20 +1,20 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { AppKeyComponent } from './app-key.component'; |
||||
import { LoginComponent } from './login.component'; |
||||
|
||||
describe('AppKeyComponent', () => { |
||||
let component: AppKeyComponent; |
||||
let fixture: ComponentFixture<AppKeyComponent>; |
||||
describe('LoginComponent', () => { |
||||
let component: LoginComponent; |
||||
let fixture: ComponentFixture<LoginComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ AppKeyComponent ] |
||||
declarations: [ LoginComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(AppKeyComponent); |
||||
fixture = TestBed.createComponent(LoginComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
@ -1,7 +0,0 @@
|
||||
<p style="text-align: center;">更新公告</p> |
||||
<p>更新内容如下:</p> |
||||
<p>1.单位管理模块现在支持按照重点单位和一般单位进行查询。</p> |
||||
<p>2.在单位管理模块的列表中,我们将“关注/取消”改为了“重点单位/一般单位”,并且重点单位名称前面有红星标记,一般单位前面无标记,以便更好地区分。</p> |
||||
<p>3.在预案管理模块中,我们去掉了预案列表中的编制级别,并且增加了按照重点单位和一般单位进行查询的功能。在预案列表中的单位名称前面增加了一列显示栏,区分重点单位和一般单位。</p> |
||||
<p>4.预案列表页面中,预案的名称支持手动修改,同时转在线导入文档转成功后名称去掉 “转在线编制”。 </p> |
||||
<p>5.点击系统右上角的“?”下载重点单位设置说明,以便更好地了解如何设置重点单位。 </p> |
@ -1,95 +1,63 @@
|
||||
import { Pipe, PipeTransform } from "@angular/core"; |
||||
import { |
||||
isno, |
||||
PlanTypeEnum, |
||||
AuditStatusEnum, |
||||
PlanLevelEnum, |
||||
PlanAuditStatusEnum, |
||||
} from "../interface"; |
||||
@Pipe({ name: "isno" }) |
||||
import { Pipe, PipeTransform } from '@angular/core'; |
||||
import { isno, PlanTypeEnum, AuditStatusEnum, PlanLevelEnum } from '../interface' |
||||
@Pipe({ name: 'isno' }) |
||||
export class IsnoPipe implements PipeTransform { |
||||
transform(value: boolean): string { |
||||
if (value) { |
||||
var x = 0; |
||||
var x = 0 |
||||
} else { |
||||
x = 1; |
||||
x = 1 |
||||
} |
||||
return isno[x]; |
||||
return isno[x] |
||||
} |
||||
} |
||||
@Pipe({ name: "plantype" }) |
||||
@Pipe({ name: 'plantype' }) |
||||
export class PlanType implements PipeTransform { |
||||
transform(value: number): string { |
||||
return PlanTypeEnum[value]; |
||||
return PlanTypeEnum[value] |
||||
} |
||||
} |
||||
|
||||
@Pipe({ name: "auditsatus" }) |
||||
@Pipe({ name: 'auditsatus' }) |
||||
export class AuditSatus implements PipeTransform { |
||||
transform(value: number): string { |
||||
return AuditStatusEnum[value]; |
||||
return AuditStatusEnum[value] |
||||
} |
||||
} |
||||
@Pipe({ name: "planlevel" }) |
||||
@Pipe({ name: 'planlevel' }) |
||||
export class PlanLevel implements PipeTransform { |
||||
transform(value: number): string { |
||||
return PlanLevelEnum[value]; |
||||
return PlanLevelEnum[value] |
||||
} |
||||
} |
||||
|
||||
@Pipe({ name: "state" }) |
||||
@Pipe({ name: 'state' }) |
||||
export class state implements PipeTransform { |
||||
transform(value: number): string { |
||||
if (value == 3) { |
||||
return "维护中"; |
||||
return '维护中' |
||||
} else if (value == 4) { |
||||
return "维护通过审核"; |
||||
return '维护通过审核' |
||||
} else if (value == 5) { |
||||
return "维护驳回审核"; |
||||
return '维护驳回审核' |
||||
} else { |
||||
return "未维护"; |
||||
return '未维护' |
||||
} |
||||
} |
||||
} |
||||
|
||||
@Pipe({ name: "auditState" }) |
||||
export class auditState implements PipeTransform { |
||||
transform(value: number): string { |
||||
return PlanAuditStatusEnum[value]; |
||||
} |
||||
} |
||||
|
||||
@Pipe({ name: "differentContentTitle" }) |
||||
@Pipe({ name: 'differentContentTitle' }) |
||||
export class differentContentTitle implements PipeTransform { |
||||
transform(value: string): string { |
||||
if (typeof value == "boolean" && value) { |
||||
return "是"; |
||||
} else if (typeof value == "boolean" && !value) { |
||||
return "否"; |
||||
} else if (JSON.stringify(value) == "{}") { |
||||
return "空"; |
||||
if (typeof (value) == 'boolean' && value) { |
||||
return '是' |
||||
} else if (typeof (value) == 'boolean' && !value) { |
||||
return '否' |
||||
} else if (!value) { |
||||
return "空"; |
||||
return '空' |
||||
} else { |
||||
return value; |
||||
} |
||||
} |
||||
} |
||||
@Pipe({ name: "yuan" }) |
||||
export class yuan implements PipeTransform { |
||||
transform(value: string): string { |
||||
if (value == "LevelOne") { |
||||
return "一级预案"; |
||||
} else if (value == "LevelTwo") { |
||||
return "二级预案"; |
||||
} else if (value == "LevelThree") { |
||||
return "三级预案"; |
||||
} else if (value == "LevelFour") { |
||||
return "四级预案"; |
||||
} else if (value == "LevelFive") { |
||||
return "五级预案"; |
||||
} else if (value == "PlanText") { |
||||
return "文本预案"; |
||||
return value |
||||
} |
||||
|
||||
} |
||||
} |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue