Browse Source

[新增]单位增加演练按钮功能

tianjin
邵佳豪 2 years ago
parent
commit
dd13bb0b6b
  1. 15
      angular.json
  2. 4
      src/app/app.module.ts
  3. 23
      src/app/key-unit/key-unit-management/key-unit-management.component.html
  4. 1486
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  5. 112
      src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.html
  6. 120
      src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.scss
  7. 25
      src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.spec.ts
  8. 175
      src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.ts
  9. 282
      src/app/key-unit/key-unit.module.ts
  10. 3
      src/app/services/objects.service.ts
  11. 8
      src/index.html
  12. 3
      src/styles.scss

15
angular.json

@ -46,12 +46,10 @@
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"fileReplacements": [{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
@ -60,8 +58,7 @@
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"budgets": [{
"type": "initial",
"maximumWarning": "18mb",
"maximumError": "18mb"
@ -142,4 +139,4 @@
"cli": {
"analytics": "6210f5d0-2cd7-43dc-b245-2140372d1b89"
}
}
}

4
src/app/app.module.ts

@ -26,7 +26,9 @@ import { TestComponent } from './test/test.component';
import { ExternalLinksPlanComponent } from './external-links-plan/external-links-plan.component';
import { SearchDownList } from '../modules/map/declare/component/SearchDownListPlugins/SearchDownList';
import { ExportExcelComponent } from './export-excel/export-excel.component';
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
registerLocaleData(zh);
@NgModule({
declarations: [
AppComponent,

23
src/app/key-unit/key-unit-management/key-unit-management.component.html

@ -16,8 +16,8 @@
</mat-form-field>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img
[src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;width: 10px;height: 6px;" (click)='padInfo()'>收起<img
[src]='imgsrcdown'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;width: 10px;height: 6px;"
(click)='padInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!pcfind">
@ -44,9 +44,11 @@
</mat-select>
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 10px; color: #0080FF; cursor: pointer;"
(click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
(click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;"
(click)='pcInfo()'>收起<img [src]='imgsrcdown' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
(click)='pcInfo()'>收起<img [src]='imgsrcdown'
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
</div>
<div class="queryField" *ngIf="pcfind">
<button mat-raised-button color="primary">查询</button>
@ -112,11 +114,13 @@
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<input type="radio" [(ngModel)]="IsNewData" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true'>
<input type="radio" [(ngModel)]="IsNewData"
style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true'>
<label style="margin-right: 10px;margin-left: 2px;">新增</label>
<input type="radio" [(ngModel)]="IsNewData" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false'>
<input type="radio" [(ngModel)]="IsNewData"
style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false'>
<label style="margin-right: 10px;margin-left: 2px;">维护更新</label>
</div>
</div>
</div>
@ -155,8 +159,8 @@
<ng-container matColumnDef="state">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">单位状态</th>
<td mat-cell *matCellDef="let element">
<span class="add" *ngIf="element.isNewData">新增</span>
<span class="weihu" *ngIf="!element.isNewData">维护更新</span>
<span class="add" *ngIf="element.isNewData">新增</span>
<span class="weihu" *ngIf="!element.isNewData">维护更新</span>
</td>
</ng-container>
<ng-container matColumnDef="unitname">
@ -348,6 +352,7 @@
<ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element" class="operation">
<span (click)="drill(element)">演练</span>
<span (click)="unitdetails(element)">查看详情</span>
<span style="color: blue;margin-left: 4px;"
*ngIf="(element.isNewData && (element.newVerifyState=='未提交审核'||element.newVerifyState=='审核通过'

1486
src/app/key-unit/key-unit-management/key-unit-management.component.ts

File diff suppressed because it is too large Load Diff

112
src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.html

@ -0,0 +1,112 @@
<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 name="teamLeader" [(ngModel)]="teamLeader" nz-input placeholder="带队人员" />
</div>
<div>
<span class="name">熟悉时间:</span>
<nz-range-picker [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 type="file" (change)="upload($event,'调研')">
<button nz-button nzType="default">上传照片</button>
<ul class="imgbox">
<li *ngFor="let item of surveyPhoto;let key = index"><img [src]="item" alt="">
<span 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 type="file" (change)="upload($event,'水源')">
<button nz-button nzType="default">上传照片</button>
<ul class="imgbox">
<li *ngFor="let item of waterPhoto;let key = index"><img [src]="item" alt="">
<span class="close material-icons" (click)="deleteImg(waterPhoto,key)">
cancel
</span>
</li>
</ul>
</div>
</div>
<div>
<span class="name">疏散通道:</span>
<div class="uploadbox">
<input type="file" (change)="upload($event,'疏散通道')">
<button nz-button nzType="default">上传照片</button>
<ul class="imgbox">
<li *ngFor="let item of routePhoto;let key = index"><img [src]="item" alt="">
<span class="close material-icons" (click)="deleteImg(routePhoto,key)">
cancel
</span>
</li>
</ul>
</div>
</div>
<div>
<span class="name">消控室:</span>
<div class="uploadbox">
<input type="file" (change)="upload($event,'消控室')">
<button nz-button nzType="default">上传照片</button>
<ul class="imgbox">
<li *ngFor="let item of fireControlPhoto;let key = index"><img [src]="item" alt="">
<span 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>

120
src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.scss

@ -0,0 +1,120 @@
.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;
}
}

25
src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.spec.ts

@ -0,0 +1,25 @@
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();
});
});

175
src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.ts

@ -0,0 +1,175 @@
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";
@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
) {}
ngOnInit(): void {
console.log(this.data);
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.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),
};
console.log(body);
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();
});
}
}
}

282
src/app/key-unit/key-unit.module.ts

@ -1,94 +1,191 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { KeyUnitRoutingModule } from './key-unit-routing.module';
import { KeyUnitManagementComponent, CreateUnit } from './key-unit-management/key-unit-management.component';
import {A11yModule} from '@angular/cdk/a11y';
import {DragDropModule} from '@angular/cdk/drag-drop';
import {PortalModule} from '@angular/cdk/portal';
import {ScrollingModule} from '@angular/cdk/scrolling';
import {CdkStepperModule} from '@angular/cdk/stepper';
import {CdkTableModule} from '@angular/cdk/table';
import {CdkTreeModule} from '@angular/cdk/tree';
import {MatAutocompleteModule} from '@angular/material/autocomplete';
import {MatBadgeModule} from '@angular/material/badge';
import {MatBottomSheetModule} from '@angular/material/bottom-sheet';
import {MatButtonModule} from '@angular/material/button';
import {MatButtonToggleModule} from '@angular/material/button-toggle';
import {MatCardModule} from '@angular/material/card';
import {MatCheckboxModule} from '@angular/material/checkbox';
import {MatChipsModule} from '@angular/material/chips';
import {MatStepperModule} from '@angular/material/stepper';
import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatDialogModule} from '@angular/material/dialog';
import {MatDividerModule} from '@angular/material/divider';
import {MatExpansionModule} from '@angular/material/expansion';
import {MatGridListModule} from '@angular/material/grid-list';
import {MatIconModule} from '@angular/material/icon';
import {MatInputModule} from '@angular/material/input';
import {MatListModule} from '@angular/material/list';
import {MatMenuModule} from '@angular/material/menu';
import {MatNativeDateModule, MatRippleModule, MatOption} from '@angular/material/core';
import {MatPaginatorModule} from '@angular/material/paginator';
import {MatProgressBarModule} from '@angular/material/progress-bar';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatRadioModule} from '@angular/material/radio';
import {MatSelectModule} from '@angular/material/select';
import {MatSidenavModule} from '@angular/material/sidenav';
import {MatSliderModule} from '@angular/material/slider';
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
import {MatSnackBarModule} from '@angular/material/snack-bar';
import {MatSortModule} from '@angular/material/sort';
import {MatTableModule} from '@angular/material/table';
import {MatTabsModule} from '@angular/material/tabs';
import {MatToolbarModule} from '@angular/material/toolbar';
import {MatTooltipModule} from '@angular/material/tooltip';
import {MatTreeModule} from '@angular/material/tree';
import { EditUnitInfoComponent } from './edit-unit-info/edit-unit-info.component';
import { ViewUnitDetailsComponent } from './view-unit-details/view-unit-details.component';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { AddHouseInfo } from './basicinfo/addhouseinfo.component';
import { LookMaster } from './basicinfo/lookmaster.component';
import { BasicinfoComponent, StatisticsOfFireFightingFacilities } from './basicinfo/basicinfo.component';
import { EditPlanInfoComponent } from './edit-plan-info/edit-plan-info.component';
import { CountdownModule } from 'ngx-countdown';
import { BasicinfoLookComponent } from './basicinfo-look/basicinfo.component';
import { ViewUnitDetailsPlanComponent } from './view-unit-details-plan/view-unit-details-plan.component';
import { FunctionDivisionComponent, addPartition, addPartitionAttribute } from './function-division/function-division.component';
import {AllaroundComponent} from './allaround/allaround.component'
import {ImgDetails} from './allaround/imgdetails.component'
import { RealisticPictureComponent, previewImg, addRealPicture, editRealPicture } from './realistic-picture/realistic-picture.component';
import { FileUploadModule } from 'ng2-file-upload';
import {KeySiteComponent} from './key-site/key-site.component'
import {KeySiteImgs} from './key-site/keysiteimgs.component'
import {UploadingCADComponent,readFile,editFile} from './uploading-cad/uploading-cad.component'
import { KeySiteLookComponent } from './key-site-look/key-site.component';
import { KeySiteImgs2 } from './key-site-look/keysiteimgs.component';
import { FunctionDivisionLookComponent, addPartitionAttribute2 } from './function-division-look/function-division.component';
import { RealisticPictureLookComponent, previewImg3 } from './realistic-picture-look/realistic-picture.component';
import { UploadingCADLookComponent } from './uploading-cad-look/uploading-cad.component';
import { FireFightingDeviceComponent } from './fire-fighting-device/fire-fighting-device.component';
import { ImagesData, previewBigImg } from './fire-fighting-device/imagesdata.component';
import { ImgsDataDetail } from './fire-fighting-device/addGrouping.component';
import { FireFightingDeviceLookComponent } from './fire-fighting-device-look/fire-fighting-device.component';
import { ImagesData2, previewBigImg2 } from './fire-fighting-device-look/imagesdata.component';
import { ImgsDataDetail2 } from './fire-fighting-device-look/addGrouping.component';
import { UiModule } from '../../app/ui/ui.module';
import { SixFamiliarityComponent,routerMapComponent } from './six-familiarity/six-familiarity.component';
import { ActualCombatDrillComponent } from './actual-combat-drill/actual-combat-drill.component';
import { SixFamiliarListComponent } from './six-familiar-list/six-familiar-list.component'
import { TrainingRecordinfoComponent } from './training-recordinfo/training-recordinfo.component';
import { RouterGISComponent } from './router-gis/router-gis.component';
import { WaterRoadComponent } from './water-road/water-road.component';
import { PhotoofthesceneComponent } from './photoofthescene/photoofthescene.component';
import { KnowRouteComponent } from './know-route/know-route.component';
import { FindProblemComponent } from './find-problem/find-problem.component';
import { upname } from './key-unit-management/key-unit-management.component';
import { companyAuditResult } from './key-unit-management/key-unit-management.component';
import { SpecialWarningComponent } from './special-warning/special-warning.component'
import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { KeyUnitRoutingModule } from "./key-unit-routing.module";
import {
KeyUnitManagementComponent,
CreateUnit,
} from "./key-unit-management/key-unit-management.component";
import { A11yModule } from "@angular/cdk/a11y";
import { DragDropModule } from "@angular/cdk/drag-drop";
import { PortalModule } from "@angular/cdk/portal";
import { ScrollingModule } from "@angular/cdk/scrolling";
import { CdkStepperModule } from "@angular/cdk/stepper";
import { CdkTableModule } from "@angular/cdk/table";
import { CdkTreeModule } from "@angular/cdk/tree";
import { MatAutocompleteModule } from "@angular/material/autocomplete";
import { MatBadgeModule } from "@angular/material/badge";
import { MatBottomSheetModule } from "@angular/material/bottom-sheet";
import { MatButtonModule } from "@angular/material/button";
import { MatButtonToggleModule } from "@angular/material/button-toggle";
import { MatCardModule } from "@angular/material/card";
import { MatCheckboxModule } from "@angular/material/checkbox";
import { MatChipsModule } from "@angular/material/chips";
import { MatStepperModule } from "@angular/material/stepper";
import { MatDatepickerModule } from "@angular/material/datepicker";
import { MatDialogModule } from "@angular/material/dialog";
import { MatDividerModule } from "@angular/material/divider";
import { MatExpansionModule } from "@angular/material/expansion";
import { MatGridListModule } from "@angular/material/grid-list";
import { MatIconModule } from "@angular/material/icon";
import { MatInputModule } from "@angular/material/input";
import { MatListModule } from "@angular/material/list";
import { MatMenuModule } from "@angular/material/menu";
import {
MatNativeDateModule,
MatRippleModule,
MatOption,
} from "@angular/material/core";
import { MatPaginatorModule } from "@angular/material/paginator";
import { MatProgressBarModule } from "@angular/material/progress-bar";
import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
import { MatRadioModule } from "@angular/material/radio";
import { MatSelectModule } from "@angular/material/select";
import { MatSidenavModule } from "@angular/material/sidenav";
import { MatSliderModule } from "@angular/material/slider";
import { MatSlideToggleModule } from "@angular/material/slide-toggle";
import { MatSnackBarModule } from "@angular/material/snack-bar";
import { MatSortModule } from "@angular/material/sort";
import { MatTableModule } from "@angular/material/table";
import { MatTabsModule } from "@angular/material/tabs";
import { MatToolbarModule } from "@angular/material/toolbar";
import { MatTooltipModule } from "@angular/material/tooltip";
import { MatTreeModule } from "@angular/material/tree";
import { EditUnitInfoComponent } from "./edit-unit-info/edit-unit-info.component";
import { ViewUnitDetailsComponent } from "./view-unit-details/view-unit-details.component";
import { ReactiveFormsModule, FormsModule } from "@angular/forms";
import { AddHouseInfo } from "./basicinfo/addhouseinfo.component";
import { LookMaster } from "./basicinfo/lookmaster.component";
import {
BasicinfoComponent,
StatisticsOfFireFightingFacilities,
} from "./basicinfo/basicinfo.component";
import { EditPlanInfoComponent } from "./edit-plan-info/edit-plan-info.component";
import { CountdownModule } from "ngx-countdown";
import { BasicinfoLookComponent } from "./basicinfo-look/basicinfo.component";
import { ViewUnitDetailsPlanComponent } from "./view-unit-details-plan/view-unit-details-plan.component";
import {
FunctionDivisionComponent,
addPartition,
addPartitionAttribute,
} from "./function-division/function-division.component";
import { AllaroundComponent } from "./allaround/allaround.component";
import { ImgDetails } from "./allaround/imgdetails.component";
import {
RealisticPictureComponent,
previewImg,
addRealPicture,
editRealPicture,
} from "./realistic-picture/realistic-picture.component";
import { FileUploadModule } from "ng2-file-upload";
import { KeySiteComponent } from "./key-site/key-site.component";
import { KeySiteImgs } from "./key-site/keysiteimgs.component";
import {
UploadingCADComponent,
readFile,
editFile,
} from "./uploading-cad/uploading-cad.component";
import { KeySiteLookComponent } from "./key-site-look/key-site.component";
import { KeySiteImgs2 } from "./key-site-look/keysiteimgs.component";
import {
FunctionDivisionLookComponent,
addPartitionAttribute2,
} from "./function-division-look/function-division.component";
import {
RealisticPictureLookComponent,
previewImg3,
} from "./realistic-picture-look/realistic-picture.component";
import { UploadingCADLookComponent } from "./uploading-cad-look/uploading-cad.component";
import { FireFightingDeviceComponent } from "./fire-fighting-device/fire-fighting-device.component";
import {
ImagesData,
previewBigImg,
} from "./fire-fighting-device/imagesdata.component";
import { ImgsDataDetail } from "./fire-fighting-device/addGrouping.component";
import { FireFightingDeviceLookComponent } from "./fire-fighting-device-look/fire-fighting-device.component";
import {
ImagesData2,
previewBigImg2,
} from "./fire-fighting-device-look/imagesdata.component";
import { ImgsDataDetail2 } from "./fire-fighting-device-look/addGrouping.component";
import { UiModule } from "../../app/ui/ui.module";
import {
SixFamiliarityComponent,
routerMapComponent,
} from "./six-familiarity/six-familiarity.component";
import { ActualCombatDrillComponent } from "./actual-combat-drill/actual-combat-drill.component";
import { SixFamiliarListComponent } from "./six-familiar-list/six-familiar-list.component";
import { TrainingRecordinfoComponent } from "./training-recordinfo/training-recordinfo.component";
import { RouterGISComponent } from "./router-gis/router-gis.component";
import { WaterRoadComponent } from "./water-road/water-road.component";
import { PhotoofthesceneComponent } from "./photoofthescene/photoofthescene.component";
import { KnowRouteComponent } from "./know-route/know-route.component";
import { FindProblemComponent } from "./find-problem/find-problem.component";
import { upname } from "./key-unit-management/key-unit-management.component";
import { companyAuditResult } from "./key-unit-management/key-unit-management.component";
import { SpecialWarningComponent } from "./special-warning/special-warning.component";
import { UploadDrillComponent } from "./key-unit-management/upload-drill/upload-drill.component";
import { NzDatePickerModule } from "ng-zorro-antd/date-picker";
import { NzInputModule } from "ng-zorro-antd/input";
import { NzButtonModule } from "ng-zorro-antd/button";
@NgModule({
declarations: [KeyUnitManagementComponent, EditUnitInfoComponent, ViewUnitDetailsComponent,CreateUnit,BasicinfoComponent,LookMaster,AddHouseInfo, EditPlanInfoComponent,BasicinfoLookComponent, ViewUnitDetailsPlanComponent,FunctionDivisionComponent,addPartition,addPartitionAttribute,AllaroundComponent,ImgDetails,RealisticPictureComponent,previewImg,addRealPicture,editRealPicture,KeySiteComponent,KeySiteImgs,UploadingCADComponent,readFile,editFile,KeySiteLookComponent,KeySiteImgs2,FunctionDivisionLookComponent,RealisticPictureLookComponent,previewImg3,UploadingCADLookComponent,FireFightingDeviceComponent,ImagesData,previewBigImg,ImgsDataDetail,FireFightingDeviceLookComponent,ImagesData2,ImgsDataDetail2,previewBigImg2,addPartitionAttribute2, SixFamiliarityComponent, ActualCombatDrillComponent,routerMapComponent, SixFamiliarListComponent,TrainingRecordinfoComponent,RouterGISComponent,WaterRoadComponent,PhotoofthesceneComponent,KnowRouteComponent,FindProblemComponent,upname,companyAuditResult,StatisticsOfFireFightingFacilities, SpecialWarningComponent],
exports:[ViewUnitDetailsPlanComponent,WaterRoadComponent],
declarations: [
KeyUnitManagementComponent,
EditUnitInfoComponent,
ViewUnitDetailsComponent,
CreateUnit,
BasicinfoComponent,
LookMaster,
AddHouseInfo,
EditPlanInfoComponent,
BasicinfoLookComponent,
ViewUnitDetailsPlanComponent,
FunctionDivisionComponent,
addPartition,
addPartitionAttribute,
AllaroundComponent,
ImgDetails,
RealisticPictureComponent,
previewImg,
addRealPicture,
editRealPicture,
KeySiteComponent,
KeySiteImgs,
UploadingCADComponent,
readFile,
editFile,
KeySiteLookComponent,
KeySiteImgs2,
FunctionDivisionLookComponent,
RealisticPictureLookComponent,
previewImg3,
UploadingCADLookComponent,
FireFightingDeviceComponent,
ImagesData,
previewBigImg,
ImgsDataDetail,
FireFightingDeviceLookComponent,
ImagesData2,
ImgsDataDetail2,
previewBigImg2,
addPartitionAttribute2,
SixFamiliarityComponent,
ActualCombatDrillComponent,
routerMapComponent,
SixFamiliarListComponent,
TrainingRecordinfoComponent,
RouterGISComponent,
WaterRoadComponent,
PhotoofthesceneComponent,
KnowRouteComponent,
FindProblemComponent,
upname,
companyAuditResult,
StatisticsOfFireFightingFacilities,
SpecialWarningComponent,
UploadDrillComponent,
],
exports: [ViewUnitDetailsPlanComponent, WaterRoadComponent],
imports: [
CommonModule,
KeyUnitRoutingModule,
@ -139,6 +236,9 @@ import { SpecialWarningComponent } from './special-warning/special-warning.compo
FileUploadModule,
UiModule,
ReactiveFormsModule,
]
NzDatePickerModule,
NzInputModule,
NzButtonModule,
],
})
export class KeyUnitModule { }
export class KeyUnitModule {}

3
src/app/services/objects.service.ts

@ -66,13 +66,16 @@ export class ObjectsService {
PartNumberETag.push(result)
if (PartNumberETag.length === allSlice) { //分块上传完成
console.log("分块上传成功00");
let data = PartNumberETag
let paramsData = { uploadId: uploadId };
let path = ObjectsService.c_apiRoot_Multipart + 'CompleteMultipartUpload/PlanPlatform/' + objectName;
this.http.post(path, data, { params: paramsData }).subscribe(data => {
let objData: any = new Object();
objData.fileName = file.name;
objData.filePath = (ObjectsService.baseUrl + objectName).replace(file.name, "");
console.log("分块上传成功11",objData);
resolve(objData)
})
}

8
src/index.html

@ -1,11 +1,3 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-11-25 15:44:29
* @LastEditors: sueRimn
* @LastEditTime: 2021-07-23 14:02:42
-->
<!doctype html>
<html lang="zh-CN">

3
src/styles.scss

@ -3,6 +3,9 @@
/* 引入组件样式 */
// @import "~ng-zorro-antd/style/index.min.css"; /* 引入基本样式 */
@import "~ng-zorro-antd/tree-select/style/index.min.css";
@import "~ng-zorro-antd/date-picker/style/index.min.css";
@import "~ng-zorro-antd/input/style/index.min.css";
@import "~ng-zorro-antd/button/style/index.min.css";
/* 引入组件样式 */
@font-face {

Loading…
Cancel
Save