diff --git a/package-lock.json b/package-lock.json
index d6c4941..b96780b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10524,8 +10524,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"aproba": {
"version": "1.2.0",
@@ -10546,14 +10545,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -10568,20 +10565,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"core-util-is": {
"version": "1.0.2",
@@ -10698,8 +10692,7 @@
"inherits": {
"version": "2.0.4",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"ini": {
"version": "1.3.5",
@@ -10711,7 +10704,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -10726,7 +10718,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -10734,14 +10725,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -10760,7 +10749,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -10850,8 +10838,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"object-assign": {
"version": "4.1.1",
@@ -10863,7 +10850,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"wrappy": "1"
}
@@ -10949,8 +10935,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -10986,7 +10971,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -11006,7 +10990,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -11050,14 +11033,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
}
}
},
@@ -16680,8 +16661,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"aproba": {
"version": "1.2.0",
@@ -16702,14 +16682,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -16724,20 +16702,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"core-util-is": {
"version": "1.0.2",
@@ -16854,8 +16829,7 @@
"inherits": {
"version": "2.0.4",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"ini": {
"version": "1.3.5",
@@ -16867,7 +16841,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -16882,7 +16855,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -16890,14 +16862,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -16916,7 +16886,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -17006,8 +16975,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"object-assign": {
"version": "4.1.1",
@@ -17019,7 +16987,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"wrappy": "1"
}
@@ -17105,8 +17072,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -17142,7 +17108,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -17162,7 +17127,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -17206,14 +17170,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
}
}
},
@@ -17595,8 +17557,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"aproba": {
"version": "1.2.0",
@@ -17617,14 +17578,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -17639,20 +17598,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"core-util-is": {
"version": "1.0.2",
@@ -17769,8 +17725,7 @@
"inherits": {
"version": "2.0.4",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"ini": {
"version": "1.3.5",
@@ -17782,7 +17737,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -17797,7 +17751,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -17805,14 +17758,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -17831,7 +17782,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -17921,8 +17871,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"object-assign": {
"version": "4.1.1",
@@ -17934,7 +17883,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"wrappy": "1"
}
@@ -18020,8 +17968,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -18057,7 +18004,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -18077,7 +18023,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -18121,14 +18066,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
}
}
},
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 36785e4..1b4c265 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -2,12 +2,14 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { LoginComponent } from './pages/login/login.component';
import { NavigationComponent } from './navigation/navigation.component';
-import { LockscreenComponent } from './pages/lockscreen/lockscreen.component';
-import {HomeComponent} from './home/home.component'
+import { HomeComponent } from './home/home.component'
//路由守卫
-import {AuthGuard} from './auth.guard'
-import {MTokenK1Component} from './m-token-k1/m-token-k1.component' //K1秘钥
+import { AuthGuard } from './auth.guard'
+import { MTokenK1Component } from './m-token-k1/m-token-k1.component' //K1秘钥
+import { AddSixFamiliarComponent } from './ui/add-six-familiar/add-six-familiar.component';
+import { TrainingRecordinfoComponent } from './ui/training-recordinfo/training-recordinfo.component';
+
@@ -21,23 +23,23 @@ const routes: Routes = [
children:[
{path:'ui',loadChildren:() => import('./ui/ui.module').then(m => m.UiModule)},
{path:'keyUnit',loadChildren:() => import('./key-unit/key-unit.module').then(m => m.KeyUnitModule)},
- {path:'planManagement',loadChildren:() => import('./plan-management/plan-management.module').then(m => m.PlanManagementModule)},
- {path:'planAudit',loadChildren:() => import('./plan-audit/plan-audit.module').then(m => m.PlanAuditModule)},
{path:'home',loadChildren:() => import('./pages/pages.module').then(m => m.PagesModule)},
- {path:'visualization',component: HomeComponent},
- {path:'gis',loadChildren:() => import('./gis-management/gis-management.module').then(m => m.GISManagementModule)}
+ {path:'visualization',component: HomeComponent}
]
},
+ {path:'addsixfamiliar',
+ component:AddSixFamiliarComponent},
+ {path:'trainingrecordinfo',
+ component:TrainingRecordinfoComponent},
{path:'login',
component:LoginComponent},
{path:'getNoMToken',
- component:MTokenK1Component, canActivate: [AuthGuard],}, //K1秘钥验证失败是跳转页面
+ component:MTokenK1Component, canActivate: [AuthGuard],},
+ //K1秘钥验证失败是跳转页面
+ {path:'home', component:HomeComponent,canActivate: [AuthGuard],}//守卫验证
+]
- {path:'lockscreen',
- component:LockscreenComponent,
- canActivate: [AuthGuard]}//守卫验证
-];
@NgModule({
imports: [RouterModule.forRoot(routes)],
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 3b99be1..56a0618 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -19,7 +19,7 @@ import {CacheTokenService} from './http-interceptors/cache-token.service'
import { TreeService } from'./http-interceptors/tree.service';
import { MTokenK1Component } from './m-token-k1/m-token-k1.component' //K1秘钥
import { CountdownModule } from 'ngx-countdown'; //倒计时插件
-import { GISManagementModule } from './gis-management/gis-management.module';
+import { KeyUnitModule } from './key-unit/key-unit.module';
@NgModule({
declarations: [
@@ -40,7 +40,7 @@ import { GISManagementModule } from './gis-management/gis-management.module';
FormsModule,
HttpClientModule,
CountdownModule,
- GISManagementModule
+ KeyUnitModule
],
providers: [httpInterceptorProviders, CacheTokenService,TreeService],
bootstrap: [AppComponent]
diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.html b/src/app/gis-management/gis-labeling/gis-labeling.component.html
deleted file mode 100644
index 14ea061..0000000
--- a/src/app/gis-management/gis-labeling/gis-labeling.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.scss b/src/app/gis-management/gis-labeling/gis-labeling.component.scss
deleted file mode 100644
index feb03fd..0000000
--- a/src/app/gis-management/gis-labeling/gis-labeling.component.scss
+++ /dev/null
@@ -1,84 +0,0 @@
-.mapbox{
- width: 100%;
- height: 100%;
-}
-
-
-
-
-
-
-
-
-
-
-// .content-window-card {
-// position: relative;
-// box-shadow: none;
-// bottom: 0;
-// left: 0;
-// width: auto;
-// padding: 0;
-// }
-
-// .content-window-card p {
-// height: 20px;
-// }
-
-// .custom-info {
-// border: solid 1px silver;
-// }
-// div.info-top {
-// position: relative;
-// background: none repeat scroll 0 0 #F9F9F9;
-// border-bottom: 1px solid #CCC;
-// border-radius: 5px 5px 0 0;
-// }
-
-// div.info-top div {
-// display: inline-block;
-// color: #333333;
-// font-size: 14px;
-// font-weight: bold;
-// line-height: 31px;
-// padding: 0 10px;
-// }
-
-// div.info-top img {
-// position: absolute;
-// top: 10px;
-// right: 10px;
-// transition-duration: 0.25s;
-// }
-
-// div.info-top img:hover {
-// box-shadow: 0px 0px 5px #000;
-// }
-
-// div.info-middle {
-// font-size: 12px;
-// padding: 10px 6px;
-// line-height: 20px;
-// }
-
-// div.info-bottom {
-// height: 0px;
-// width: 100%;
-// clear: both;
-// text-align: center;
-// }
-
-// div.info-bottom img {
-// position: relative;
-// z-index: 104;
-// }
-
-// span {
-// margin-left: 5px;
-// font-size: 11px;
-// }
-
-// .info-middle img {
-// float: left;
-// margin-right: 6px;
-// }
diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.spec.ts b/src/app/gis-management/gis-labeling/gis-labeling.component.spec.ts
deleted file mode 100644
index 666c51f..0000000
--- a/src/app/gis-management/gis-labeling/gis-labeling.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { GisLabelingComponent } from './gis-labeling.component';
-
-describe('GisLabelingComponent', () => {
- let component: GisLabelingComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ GisLabelingComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(GisLabelingComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.ts b/src/app/gis-management/gis-labeling/gis-labeling.component.ts
deleted file mode 100644
index e6420cc..0000000
--- a/src/app/gis-management/gis-labeling/gis-labeling.component.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-import { Component, OnInit ,Renderer2,ElementRef } from '@angular/core';
-declare var AMap: any;
-@Component({
- selector: 'app-gis-labeling',
- templateUrl: './gis-labeling.component.html',
- styleUrls: ['./gis-labeling.component.scss']
-})
-export class GisLabelingComponent implements OnInit {
-
- constructor(private elementRef: ElementRef,public renderer2: Renderer2) { }
- map:any //地图
- ngOnInit(): void {
-
- setTimeout(() => {
- this.map = new AMap.Map('map');
- //给地图增加点击事件
- this.map.on('click', (ev)=>{
- // 触发事件的对象
- var target = ev.target;
-
- // 触发事件的地理坐标,AMap.LngLat 类型
- var lnglat = ev.lnglat;
-
- // 触发事件的像素坐标,AMap.Pixel 类型
- var pixel = ev.pixel;
-
- // 触发事件类型
- var type = ev.type;
-
- let marker = new AMap.Marker({
- position:[lnglat.lng, lnglat.lat]//位置
- })
- // marker.content = '我是第' + (i + 1) + '个Marker';
- marker.setMap(this.map)
-
- AMap.event.addListener(marker, 'click', () => {
- infoWindow.open(this.map, marker.getPosition());
- console.log(222,marker)
- setTimeout(() => {
- this.renderer2.listen(this.elementRef.nativeElement.querySelector('#lnglat2container'),'click',(event)=>{
- console.log(111)
- })
- }, 0);
-
- });
-
- });
-
- var infoWindowContent =
- '' +
- '
故宫博物院 ' +
- '
' +
- '
' +
- '
';
- var infoWindow = new AMap.InfoWindow({
- content: infoWindowContent,
- offset: new AMap.Pixel(0, -45)
- });
-
- // var xxx = this.el.nativeElement.querySelector('#lnglat2container')
- let yyy = document.getElementById('lnglat2container');
-
- }, 0);
- }
-
- getLngLat(){
- console.log(123)
- }
-}
diff --git a/src/app/gis-management/gis-management-routing.module.ts b/src/app/gis-management/gis-management-routing.module.ts
deleted file mode 100644
index 599381e..0000000
--- a/src/app/gis-management/gis-management-routing.module.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
-import { GisLabelingComponent } from './gis-labeling/gis-labeling.component';
-
-
-const routes: Routes = [
- { path: '', component: GisLabelingComponent },
-];
-
-@NgModule({
- imports: [RouterModule.forChild(routes)],
- exports: [RouterModule]
-})
-export class GisRoutingModule { }
diff --git a/src/app/gis-management/gis-management.module.ts b/src/app/gis-management/gis-management.module.ts
deleted file mode 100644
index 11bbefe..0000000
--- a/src/app/gis-management/gis-management.module.ts
+++ /dev/null
@@ -1,100 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { GisLabelingComponent } from './gis-labeling/gis-labeling.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 { FormsModule } from '@angular/forms';
-import { GisRoutingModule } from './gis-management-routing.module';
-
-@NgModule({
- declarations: [GisLabelingComponent],
- imports: [
- CommonModule,
- CommonModule,
- GisRoutingModule,
- A11yModule,
- CdkStepperModule,
- CdkTableModule,
- CdkTreeModule,
- DragDropModule,
- MatAutocompleteModule,
- MatBadgeModule,
- MatBottomSheetModule,
- MatButtonModule,
- MatButtonToggleModule,
- MatCardModule,
- MatCheckboxModule,
- MatChipsModule,
- MatStepperModule,
- MatDatepickerModule,
- MatDialogModule,
- MatDividerModule,
- MatExpansionModule,
- MatGridListModule,
- MatIconModule,
- MatInputModule,
- MatListModule,
- MatMenuModule,
- MatNativeDateModule,
- MatPaginatorModule,
- MatProgressBarModule,
- MatProgressSpinnerModule,
- MatRadioModule,
- MatRippleModule,
- MatSelectModule,
- MatSidenavModule,
- MatSliderModule,
- MatSlideToggleModule,
- MatSnackBarModule,
- MatSortModule,
- MatTableModule,
- MatTabsModule,
- MatToolbarModule,
- MatTooltipModule,
- MatTreeModule,
- PortalModule,
- ScrollingModule,
- FormsModule
- ]
-})
-export class GISManagementModule { }
diff --git a/src/app/http-interceptors/base-interceptor.ts b/src/app/http-interceptors/base-interceptor.ts
index 4b14ae9..38a7e07 100644
--- a/src/app/http-interceptors/base-interceptor.ts
+++ b/src/app/http-interceptors/base-interceptor.ts
@@ -24,7 +24,7 @@ export class BaseInterceptor implements HttpInterceptor {
});
if(!req.cancelToken) {
/*获取token*/
- let token = sessionStorage.getItem("token")
+ let token = sessionStorage.getItem("token") || ''
/*此处设置额外请求头,token令牌*/
newReq.headers =
newReq.headers.set('Authorization', `Bearer ${token}`)
diff --git a/src/app/key-unit/key-unit.module.ts b/src/app/key-unit/key-unit.module.ts
index 43d0a91..c536b4c 100644
--- a/src/app/key-unit/key-unit.module.ts
+++ b/src/app/key-unit/key-unit.module.ts
@@ -74,13 +74,11 @@ import { FireFightingDeviceLookComponent } from './fire-fighting-device-look/fir
import { ImagesData2, previewBigImg2 } from './fire-fighting-device-look/imagesdata.component';
import { ImgsDataDetail2 } from './fire-fighting-device-look/addGrouping.component';
import { LookMaster2 } from './basicinfo-look/lookmaster.component';
-// import { LookMaster2 } from './basicinfo-look/lookmaster.component';
-import { UiModule } from '../../app/ui/ui.module';
-
+import { UiModule } from '../../app/ui/ui.module'
@NgModule({
declarations: [KeyUnitManagementComponent, EditUnitInfoComponent, ViewUnitDetailsComponent,CreateUnit,BasicinfoComponent,LookMaster,AddHouseInfo, EditPlanInfoComponent,BasicinfoLookComponent, ViewUnitDetailsPlanComponent,FunctionDivisionComponent,addPartition,addPartitionAttribute,AllaroundComponent,ImgDetails,RealisticPictureComponent,previewImg,addRealPicture,editRealPicture,KeySiteComponent,KeyImgDetail,KeySiteImgs,UploadingCADComponent,readFile,editFile,KeySiteLookComponent,KeySiteImgs2,FunctionDivisionLookComponent,RealisticPictureLookComponent,previewImg3,UploadingCADLookComponent,FireFightingDeviceComponent,ImagesData,previewBigImg,ImgsDataDetail,FireFightingDeviceLookComponent,ImagesData2,ImgsDataDetail2,previewBigImg2,LookMaster2,addPartitionAttribute2],
- exports:[ViewUnitDetailsPlanComponent],
+ exports:[ViewUnitDetailsPlanComponent,BasicinfoComponent],
imports: [
CommonModule,
KeyUnitRoutingModule,
diff --git a/src/app/navigation/navigation.component.html b/src/app/navigation/navigation.component.html
index 61e4648..2e106bd 100644
--- a/src/app/navigation/navigation.component.html
+++ b/src/app/navigation/navigation.component.html
@@ -58,7 +58,7 @@
diff --git a/src/app/pages/home2/home2.component.html b/src/app/pages/home2/home2.component.html
deleted file mode 100644
index 16e1bb4..0000000
--- a/src/app/pages/home2/home2.component.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
- 数字化预案编制和管理平台
- {{time}}
-
-
-
diff --git a/src/app/pages/home2/home2.component.scss b/src/app/pages/home2/home2.component.scss
deleted file mode 100644
index 8bae936..0000000
--- a/src/app/pages/home2/home2.component.scss
+++ /dev/null
@@ -1,247 +0,0 @@
-@font-face {
- font-family: electronicFont;
- src: url(../../../assets/font/DS-DIGIT.TTF);
-}
-.contentBox{
- width: 100%;
- height: 100%;
- background: url(../../../assets/images/bg.jpg) no-repeat top center;
- line-height: 1.15;
- header{
- position: relative;
- height:8%;
- min-height: 64px;
- background: url(../../../assets/images/head_bg.png) no-repeat;
- background-size: 100% 100%;
- h1{
- font-size: 28px;
- color: #fff;
- text-align: center;
- line-height: 64px;
-
- }
- .showTime{
- position: absolute;
- right: 20px;
- line-height: 60px;
- color: rgba(255,255,255, $alpha: 0.7);
- font-size: 16px;
- top: 0;
- }
- }
- .mainbox{
- width: 100%;
- height: 92%;
- // background-color: pink;
- padding: 2px 0 2px 0;
- display: flex;
- .column{
- flex: 3;
- }
- .column:nth-child(2){
- flex: 6;
- margin: 0 8px 8px 8px;
- }
- .panel{
- height: 29.8%;
- position: relative;
- // background-color: red;
- border: 1px solid rgba(25,186,139,0.17);
- background: url(../../../assets/images/line.png) rgba(255,255,255, $alpha: 0.03);
- margin-bottom: 8px;
- &::before{
- position: absolute;
- top: 0;
- left: 0;
- content: "";
- width:14px;
- height:14px;
- border-left: 2px solid #02a6b5;
- border-top: 2px solid #02a6b5;
- }
- &::after{
- position: absolute;
- top: 0;
- right: 0;
- content: "";
- width:14px;
- height:14px;
- border-right: 2px solid #02a6b5;
- border-top: 2px solid #02a6b5;
- }
- .panel-footer{
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 14px;
- &::before{
- position: absolute;
- top: 0;
- left: 0;
- content: "";
- width:14px;
- height:14px;
- border-left: 2px solid #02a6b5;
- border-bottom: 2px solid #02a6b5;
- }
- &::after{
- position: absolute;
- top: 0;
- right: 0;
- content: "";
- width:14px;
- height:14px;
- border-right: 2px solid #02a6b5;
- border-bottom: 2px solid #02a6b5;
- }
- }
- h2{
- height: 18px;
- color: #fff;
- line-height: 18px;
- text-align: center;
- font-size: 14px;
- font-weight: 400;
- }
- .chart{
- height: 91%;
- // background-color: pink;
- }
- }
- .no{
- background: rgba(101,132,226,0.1);
- padding: 4px 16px;
- height: 10%;
- min-height: 100px;
- .no-hd{
- position: relative;
- border: 1px solid rgba(25,186,139,0.17);
- &::before{
- position: absolute;
- top: 0;
- left: 0;
- content: "";
- width:30px;
- height:14px;
- border-left: 2px solid #02a6b5;
- border-top: 2px solid #02a6b5;
- }
- &::after{
- position: absolute;
- bottom: 0;
- right: 0;
- content: "";
- width:30px;
- height:14px;
- border-right: 2px solid #02a6b5;
- border-bottom: 2px solid #02a6b5;
- }
- ul{
- display: flex;
- li{
-
- flex: 1;
- line-height: 55px;
- font-size: 48px;
- color: #ffeb7b;
- text-align: center;
- font-family: 'electronicFont';
- }
- li:nth-child(1){
- position: relative;
- &::after{
- position: absolute;
- top: 25%;
- height: 50%;
- right: 0;
- content: "";
- width:1px;
- background: rgba(255,255,255, $alpha: 0.2);
- }
- }
- }
-
- }
- .no-bd{
- ul{
- display: flex;
- padding: 4px 0;
- li{
- flex: 1;
- text-align: center;
- color: rgba(255,255,255, $alpha: 0.7);
- font-size: 14px;
- line-height: 30px;
- }
- }
- }
- }
- .map {
- position: relative;
- margin-top: 12px;
- height: 78%;
- .map1 {
- width: 480px;
- height: 480px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- background: url(../../../assets/images/map.png);
- background-size: 100% 100%;
- opacity: 0.3;
- }
- .map2 {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 600px;
- height: 600px;
- background: url(../../../assets/images/lbx.png);
-
- animation: rotate1 15s linear infinite;
- opacity: 0.6;
- background-size: 100% 100%;
- }
-
- .map3 {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- // width: 7.075rem;
- // height: 7.075rem;
- // background: url(../images/jt.png);
- // animation: rotate2 10s linear infinite;
- // opacity: 0.6;
- background-size: 100% 100%;
- }
- // .chart {
- // position: absolute;
- // top: 0;
- // left: 0;
- // // background-color: pink;
- // width: 100%;
- // height: 10.125rem;
- // }
- @keyframes rotate1 {
- 0% {
- transform: translate(-50%, -50%) rotate(0deg);
- };
- 100% {
- transform: translate(-50%, -50%) rotate(360deg);
- }
- }
- // @keyframes rotate2 {
- // form {
- // transform: translate(-50%, -50%) rotate(0deg);
- // }
- // to {
- // transform: translate(-50%, -50%) rotate(-360deg);
- // }
- // }
- }
- }
-}
diff --git a/src/app/pages/home2/home2.component.ts b/src/app/pages/home2/home2.component.ts
deleted file mode 100644
index a7e4b6d..0000000
--- a/src/app/pages/home2/home2.component.ts
+++ /dev/null
@@ -1,348 +0,0 @@
-import { Component, OnInit ,ElementRef} from '@angular/core';
-import { HttpClient } from '@angular/common/http'
-import { HighlightSpanKind } from 'typescript';
-
-declare var echarts: any;
-declare var westeros: any;
-declare var AMap: any;
-declare var Loca: any;
-@Component({
- selector: 'app-home2',
- templateUrl: './home2.component.html',
- styleUrls: ['./home2.component.scss']
-})
-export class Home2Component implements OnInit {
-
- constructor(private http:HttpClient,public element: ElementRef) { }
-
- unitTypeStatistics:any //单位类型统计
- myUnitTypeChart:any //单位类型统计图表
- unitTypeOption:any = {
- title: {
- // text: '单位类型统计',
- // left: 'center'
- },
- tooltip: {
- trigger: 'item',
- formatter: '占比: {b} : {c} ({d}%)'
- },
- legend: {
- // orient: 'vertical',
- // top: 'middle',
- bottom: 0,
- left: 'center',
- data: []
- },
- series: [
- {
- type: 'pie',
- radius: '65%',
- center: ['50%', '50%'],
- selectedMode: 'single',
- data: [
- ],
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }
- ]
- }; //单位类型数据
-
- planStateStatistics //预案状态统计
- myPlanStateChart:any //预案状态统计图表
- planStateOption:any = {
- title: {
- // text: '预案编制情况统计',
- // left: 'center'
- },
- tooltip: {
- trigger: 'item',
- formatter: '占比: {b} : {c} ({d}%)'
- },
- legend: {
- // orient: 'vertical',
- // top: 'middle',
- bottom: 0,
- left: 'center',
- data: ['审核通过','已提交','已公开']
- },
- series: [
- {
- type: 'pie',//类型为饼图
- radius: '65%',
- center: ['50%', '50%'],
- selectedMode: 'single',
- data: [
- ],
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }
- ]
- }; //预案状态数据
-
- planTypeStatistics //各类型预案统计
- myPlanTypeChart:any //各类型预案图表
- planTypeOption:any = {
- title: {
- // text: '各类型预案情况统计',
- // left: 'center'
- },
- tooltip: {
- trigger: 'item',
- formatter: '占比: {b} : {c} ({d}%)'
- },
- legend: {
- // orient: 'vertical',
- // top: 'middle',
- bottom: 0,
- left: 'center',
- data: ['卡片预案','二维预案','三维预案','其他预案']
- },
- series: [
- {
- type: 'pie',
- radius: '65%',
- center: ['50%', '50%'],
- selectedMode: 'single',
- data: [
- ],
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }
- ]
- }; //预案状态数据
-
- trendStatistics //趋势统计
- trendChart:any //趋势图表
- trendOption:any = {
- title: {
- // text: '预案趋势统计'
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: ['新增预案', '修改预案']
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- toolbox: {
- feature: {
- saveAsImage: {}
- }
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月','十二月']
- },
- yAxis: {
- type: 'value'
- },
- series: [
- {
- name: '新增预案',
- type: 'line',
- stack: '总量',
- data: []
- },
- {
- name: '修改预案',
- type: 'line',
- stack: '总量',
- data: []
- }
- ]
- }; //预案状态数据
-
- xxxChart:any
- xxxOption:any = {
- title: {
- // text: '南丁格尔玫瑰图',
- // subtext: '纯属虚构',
- // left: 'center'
- },
- tooltip: {
- trigger: 'item',
- formatter: '{a} {b} : {c} ({d}%)'
- },
- legend: {
- left: 'center',
- top: 'bottom',
- data: ['1', '2', '3', '4']
- },
- toolbox: {
- show: true,
- feature: {
- mark: {show: true},
- dataView: {show: true, readOnly: false},
- magicType: {
- show: true,
- type: ['pie', 'funnel']
- },
- restore: {show: true},
- saveAsImage: {show: true}
- }
- },
- series: [
- {
- name: '面积模式',
- type: 'pie',
- radius: [30, 110],
- // center: ['75%', '50%'],
- roseType: 'area',
- data: [
- {value: 10, name: '1'},
- {value: 5, name: '2'},
- {value: 15, name: '3'},
- {value: 25, name: '4'}
- ]
- }
- ]
- }
-
- yyyChart:any
- yyyOption:any = {
- color: ['#3398DB'],
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [
- {
- type: 'category',
- data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
- axisTick: {
- alignWithLabel: true
- }
- }
- ],
- yAxis: [
- {
- type: 'value'
- }
- ],
- series: [
- {
- name: '直接访问',
- type: 'bar',
- barWidth: '60%',
- data: [10, 52, 200, 334, 390, 330, 220]
- }
- ]
- };
-
- t:any
- time:any
- theme:any //主题风格
- ngOnInit(): void {
- // const map = new AMap.Map(this.element.nativeElement.querySelector('#map'), {
- // mapStyle: 'amap://styles/1de318cbb8d12c02303a22c550b9ccc9',
- // // pitch: 0,
- // features: ['bg', 'road'],//地图显示要素
- // zoom: 6,
- // center: [116.408075, 39.950187],
- // // viewMode: '3D'
- // });
- // const layer = new Loca.DistrictLayer({
- // map: map
- // });
- // layer.setMap(map);
-
-
-
- this.getTime()
- setTimeout(() => {
-
- this.myUnitTypeChart = echarts.init(this.element.nativeElement.querySelector('#unitType'),'westeros');
- this.myPlanStateChart = echarts.init(this.element.nativeElement.querySelector('#planStates') ,'westeros');
- this.myPlanTypeChart = echarts.init(this.element.nativeElement.querySelector('#planType'),'westeros');
- this.trendChart = echarts.init(this.element.nativeElement.querySelector('#trend'),'westeros');
- this.xxxChart = echarts.init(this.element.nativeElement.querySelector('#xxx'),'westeros');
- this.xxxChart.setOption(this.xxxOption);
- this.yyyChart = echarts.init(this.element.nativeElement.querySelector('#yyy'),'westeros');
- this.yyyChart.setOption(this.yyyOption);
- }, 0);
-
-
- this.chartsSetOption();
- }
- getTime():any{
- this.t = setInterval(()=>{
- var dt = new Date();
- var y = dt.getFullYear();
- var mt = dt.getMonth() + 1;
- var day = dt.getDate();
- var h = dt.getHours(); //获取时
- var m = dt.getMinutes(); //获取分
- var s = dt.getSeconds(); //获取秒
- this.time = "当前时间:" + y + "年" + mt + "月" + day + "-" + h + "时" + m + "分" + s + "秒";
- }, 1000); //開始运行
- }
- chartsSetOption(){
- this.http.get("/api/StatisticsAnalysis").subscribe((data:any)=>{
- //单位类型统计
- this.unitTypeStatistics = data.companyStatistics.buildingTypeStatistics.buildingTypes
- this.unitTypeStatistics.forEach(item => {
- item.name = item.buildingTypeName
- item.value = item.count
- // this.unitTypeOption.legend.data.push(item.buildingTypeName)
- });
- this.unitTypeOption.series[0].data = this.unitTypeStatistics
- this.myUnitTypeChart.setOption(this.unitTypeOption,true);
- //预案状态统计
- this.planStateStatistics = data.planStatistics.planningStatistics
- this.planStateOption.series[0].data.push({name:'审核通过',value:data.planStatistics.planningStatistics.approvedCount})
- this.planStateOption.series[0].data.push({name:'已提交',value:data.planStatistics.planningStatistics.committedCount})
- this.planStateOption.series[0].data.push({name:'已公开',value:data.planStatistics.planningStatistics.publicCount})
- this.myPlanStateChart.setOption(this.planStateOption,true);
- //各类型预案统计
- this.planTypeStatistics = data.planStatistics.planTypeStatistics
- this.planTypeOption.series[0].data.push({name:'卡片预案',value:data.planStatistics.planTypeStatistics.planCardCount})
- this.planTypeOption.series[0].data.push({name:'二维预案',value:data.planStatistics.planTypeStatistics.plan2DCount})
- this.planTypeOption.series[0].data.push({name:'三维预案',value:data.planStatistics.planTypeStatistics.plan3DCount})
- this.planTypeOption.series[0].data.push({name:'其他预案',value:data.planStatistics.planTypeStatistics.planOtherCount})
- this.myPlanTypeChart.setOption(this.planTypeOption,true);
- //预案趋势图统计
- this.trendStatistics = data.planStatistics.trendStatistics
- // this.trendOption.series = []
- this.trendStatistics.added.forEach(item=>{
- this.trendOption.series[0].data.push(item.count)
- })
- this.trendStatistics.modified.forEach(item=>{
- this.trendOption.series[1].data.push(item.count)
- })
- this.trendChart.setOption(this.trendOption,true);
-
- })
- }
- ngOnDestroy(){
- window.clearInterval(this.t) //清一遍定时器
- }
-}
diff --git a/src/app/pages/homedetail/homedetail.component.html b/src/app/pages/homedetail/homedetail.component.html
deleted file mode 100644
index e379f6d..0000000
--- a/src/app/pages/homedetail/homedetail.component.html
+++ /dev/null
@@ -1,70 +0,0 @@
-
\ No newline at end of file
diff --git a/src/app/pages/homedetail/homedetail.component.scss b/src/app/pages/homedetail/homedetail.component.scss
deleted file mode 100644
index a5c924a..0000000
--- a/src/app/pages/homedetail/homedetail.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import "../../../assets/css/style.css";
\ No newline at end of file
diff --git a/src/app/pages/homedetail/homedetail.component.ts b/src/app/pages/homedetail/homedetail.component.ts
deleted file mode 100644
index c46e4a3..0000000
--- a/src/app/pages/homedetail/homedetail.component.ts
+++ /dev/null
@@ -1,563 +0,0 @@
-import { Component, OnInit ,ViewChild, AfterViewInit,ElementRef,Renderer2 } from '@angular/core';
-import { HttpClient } from '@angular/common/http'
-import { Router,ActivatedRoute } from '@angular/router'
-declare var echarts: any;
-declare var AMap: any;
-
-declare var AMapUI: any;
-
-
-@Component({
- selector: 'app-homedetail',
- templateUrl: './homedetail.component.html',
- styleUrls: ['./homedetail.component.scss']
-})
-export class HomedetailComponent implements OnInit {
-
- constructor(private http:HttpClient, private render2: Renderer2,public element: ElementRef,private router:Router,private route:ActivatedRoute) { }
-
- //全队数据采集和预案编制数量统计
- chartQusj:any
- chartQusjOption:any = {
-
- grid: {
- top: 50,
- left: 30,
- right: 20,
- bottom: 20,
- },
- // 标题
- title: {
- text: '全队数据采集和预案编制数量统计',
- top: -4,
- left:-2
- },
- //图例
- legend: {
- top: 0,
- right:-2,
- // left:3,
- data: ['单位预案编制数量', '单位数据采集数量'],
- },
- //提示框
- tooltip: {
- trigger: 'axis',
- },
- // x轴
- xAxis: {
- type: 'category',
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
- boundaryGap: false,
- },
- // y轴
- yAxis: {
- type: 'value',
- name:'个'
- },
- // 数据
- series: [
- {
- name: '单位预案编制数量',
- type: 'line',
- data: [38, 42, 46, 40, 35, 30, 38, 38, 42, 46, 40, 35],
- // showSymbol: true,
- // symbolSize:6,
- // smooth: false,
- // label: {
- // show: true,
- // },
- areaStyle: {
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [{
- offset: 0,
- color: 'rgba(60,103,195,1)' // 0% 处的颜色
- }, {
- offset: 1,
- color: 'rgba(0,194,255,.2)' // 100% 处的颜色
- }],
- global: false // 缺省为 false
- }
- }
- },
- {
- name: '单位数据采集数量',
- type: 'line',
- data: [28, 12, 66, 50, 25, 40, 48, 12, 66, 50, 25, 40 ],
- },
- ],
- };
- //预案单位类型统计
- chartYadwlx:any
- data02:any = [{
- value: 335,
- name: '类型名称1'
- },
- {
- value: 110,
- name: '类型名称2'
- },
- {
- value: 274,
- name: '类型名称3'
- },
- {
- value: 235,
- name: '视频广告'
- },
- {
- value: 400,
- name: '类型名称4'
- }
- ];
- chartYadwlxOption:any = {
- // 标题
- title: {
- text: '预案单位类型统计',
- left: '15%',
- top:0
- },
- //图例
- legend: {
- orient: 'vertical',
- top: 'center',
- right: '0%',
- show: false,
- formatter: function (name) {
- var target;
- for (var i = 0, l = this.data02.length; i < l; i++) {
- if (this.data02[i].name == name) {
- target = this.data02[i].value;
- }
- }
- return name + ' ' + target;
- }
- },
- //提示框
- tooltip: {
- trigger: 'item',
- },
- // 数据
- series: [{
- type: 'pie',
- center: ['55%', '55%'],
- radius: ['25%', '60%'],
- roseType:true,
- // labelLine: {
- // show: true,
- // length: 20,
- // length2: 0,
- // lineStyle: {
- // color: '#999',
- // width: 1
- // }
- // },
- labelLine:{
- lineStyle:{
- color: '#93FCFF'
- }
- },
- label: {
- //formatter: '{hr|}\n{a|{b}}\n{b|{c}}万吨\n{c|{d}%}',
- formatter: '{a|{b}}\n{b|{c}}{c|万吨}\n{d|{d}%}',
- rich: {
- // hr: {
- // borderColor: '#999',
- // width: '100%',
- // borderWidth: 1,
- // marginLeft: '-15px',
- // marginRight: '-15px',
- // height:0
- // },
- a: {
- color: '#1F6F9B',
- fontSize: 12,
- height: 18,
- borderColor: '#999',
- //marginTop: '65px',
- },
- b: {
- color: '#fff',
- fontSize: 24,
- height: 36,
- },
- c: {
- color: '#fff',
- fontSize: 12,
- },
- d: {
- color: '#fff',
- fontSize: 12,
- height: 16,
- marginLeft: '5px',
- },
- },
- },
- data: [{
- value: 335,
- name: '类型名称1'
- },
- {
- value: 110,
- name: '类型名称2'
- },
- {
- value: 274,
- name: '类型名称3'
- },
- {
- value: 235,
- name: '类型名称4'
- }
- ],
- }],
- };
- // 预案评优排行
- chartYapyph:any
- chartYapyphOption:any = {
- // 标题
- title: {
- text: '预案评优排行',
- left:0
- },
- grid: {
- left: 30,
- right: 0,
- },
- //提示框
- tooltip: {
- trigger: 'axis',
- },
- // x轴
- xAxis: {
- type: 'category',
- data: ['机构1', '机构2', '机构3', '机构4', '机构5', '机构6', '机构7']
- },
- // y轴
- yAxis: {
- type: 'value',
- splitLine: {
- show: true,
- lineStyle: {
- color: '#fff'
- }
- },
- },
- // 数据
- series: [{
- name: '预案评优',
- type: 'bar',
- data: [320, 302, 301, 234, 390, 330, 320],
- label: {
- show: false,
- position: "top",
- formatter: '{c}',
- color: "#fff",
- },
- itemStyle: {
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [{
- offset: 0,
- color: 'rgba(0,220,254,1)' // 0% 处的颜色
- }, {
- offset: 1,
- color: 'rgba(1,104,191,1)' // 100% 处的颜色
- }],
- globalCoord: false // 缺省为 false
- },
- }
- }
- ],
- };
- //预案类型统计
- chartYalxtj:any
- chartYalxtjOption:any = {
- color: ['#FB33C2', '#00CFF0', '#2C3DE0'],
- grid: {
- top: 50,
- left: 30,
- right: 20,
- bottom: 20,
- },
- // 标题
- title: {
- text: '预案类型统计',
- top: -4,
- left: 0
- },
- //图例
- legend: {
- top: 0,
- data: ['二维预案', '三维预案', '卡片预案'],
- icon:'circle',
- itemGap: 20,
- },
- //提示框
- tooltip: {
- trigger: 'axis',
- },
- // x轴
- xAxis: {
- type: 'category',
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
- boundaryGap: false,
- },
- // y轴
- yAxis: {
- type: 'value',
- },
- // 数据
- series: [{
- name: '二维预案',
- type: 'line',
- symbolSize: 0,
- smooth:true,
- lineStyle:{
- width: 4,
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 1,
- y2: 0,
- colorStops: [{
- offset: 0,
- color: 'rgba(254,51,194,0)' // 0% 处的颜色
- }, {
- offset: 0.5,
- color: 'rgba(254,51,194,1)' // 100% 处的颜色
- }, {
- offset: 1,
- color: 'rgba(254,51,194,0)' // 100% 处的颜色
- }],
- global: false // 缺省为 false
- }
- },
- data: [38, 42, 46, 40, 35, 30, 38, 42, 46, 40, 35, 30 ],
- },
- {
- name: '三维预案',
- type: 'line',
- symbolSize: 0,
- smooth:true,
- lineStyle:{
- width: 4,
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 1,
- y2: 0,
- colorStops: [{
- offset: 0,
- color: 'rgba(14,222,252,0)' // 0% 处的颜色
- }, {
- offset: 0.5,
- color: 'rgba(0,221,255,1)' // 100% 处的颜色
- }, {
- offset: 1,
- color: 'rgba(1,255,253,0)' // 100% 处的颜色
- }],
- global: false // 缺省为 false
- },
- },
- data: [28, 72, 66, 50, 25, 40, 48, 66, 50, 25, 40, 48 ],
- },
- {
- name: '卡片预案',
- type: 'line',
- symbolSize: 0,
- smooth:true,
- lineStyle:{
- width: 4,
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 1,
- y2: 0,
- colorStops: [{
- offset: 0,
- color: 'rgba(48,63,240,0)' // 0% 处的颜色
- }, {
- offset: 0.5,
- color: 'rgba(48,63,240,1)' // 100% 处的颜色
- }, {
- offset: 1,
- color: 'rgba(48,63,240,0)' // 100% 处的颜色
- }],
- global: false // 缺省为 false
- },
- },
- data: [28, 112, 166, 150, 125, 140, 48, 28, 112, 166, 150, 125 ],
- },
- ],
- };
- //地图
-
- chartMap:any
- chartMapOption:any = {
- tooltip: {
- show: true,
- formatter: function (params) {
- return params.name + ':' + params.data['value'];
- },
- },
- geo: [{
- show: true,
- map: 'chongqing',
- zoom: 1,
- itemStyle: {
- areaColor: '#090C15',
- borderColor: '#0584DD',
- borderWidth: 2,
- shadowColor: 'rgba(5, 132, 221, 1)',
- shadowBlur: 1,
- shadowOffsetX: 2,
- shadowOffsetY: 10,
- },
- emphasis: {
- label: {
- color: '#fff',
- },
- itemStyle: {
- areaColor: '#0584DD',
- }
- }
- },
- {
- show: true,
- map: 'chongqing',
- label: {
- show: true,
- color: '#fff',
- fontSize: 12,
- },
- zoom: 1,
- itemStyle: {
- areaColor: '#090C15',
- borderColor: '#0584DD',
- },
- emphasis: {
- label: {
- color: '#fff',
- },
- itemStyle: {
- areaColor: '#0584DD',
- }
- }
- }
- ]
- }
-
- ngOnInit(): void {
- setTimeout(() => {
- this.chartQusj = echarts.init(this.element.nativeElement.querySelector('#chartQusj'),'skinUpp');
- this.chartQusj.setOption(this.chartQusjOption);
- this.chartYadwlx = echarts.init(this.element.nativeElement.querySelector('#chartYadwlx'),'skinUpp');
- this.chartYadwlx.setOption(this.chartYadwlxOption);
- this.chartYapyph = echarts.init(this.element.nativeElement.querySelector('#chartYapyph'),'skinUpp');
- this.chartYapyph.setOption(this.chartYapyphOption);
- this.chartYalxtj = echarts.init(this.element.nativeElement.querySelector('#chartYalxtj'),'skinUpp');
- this.chartYalxtj.setOption(this.chartYalxtjOption);
- this.chartMap = echarts.init(this.element.nativeElement.querySelector('#chartMap'));
- console.log(this.chartMapOption)
- this.chartMap.setOption(this.chartMapOption);
- this.mapInit() //初始化地图
- }, 0);
- console.log(echarts)
- }
- mapInit () {
-
- //创建地图
- var map = new AMap.Map('chartMap', {
- cursor: 'default',
- zooms:[7,10],
- mapStyle:"amap://styles/grey",
-
- });
-
- var colors = [
- "#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", "#0099c6", "#dd4477", "#66aa00",
- "#b82e2e", "#316395", "#994499", "#22aa99", "#aaaa11", "#6633cc", "#e67300", "#8b0707",
- "#651067", "#329262", "#5574a6", "#3b3eac"
- ];
-
- AMapUI.loadUI(['geo/DistrictExplorer'], (DistrictExplorer)=> {
-
- //创建一个实例
- var districtExplorer = new DistrictExplorer({
- map: map,
- eventSupport: true, //打开事件支持
- });
-
- var adcode = this.route.snapshot.queryParams.code;
-
- districtExplorer.loadAreaNode(adcode, (error, areaNode)=>{
-
- //更新地图视野
- map.setBounds(areaNode.getBounds(), null, null, true);
-
- //清除已有的绘制内容
- districtExplorer.clearFeaturePolygons();
-
- //绘制子区域
- districtExplorer.renderSubFeatures(areaNode, (feature, i) => {
- // console.log(123,feature,i)
- var fillColor = colors[i % colors.length];
- var strokeColor = colors[colors.length - 1 - i % colors.length];
-
- return {
- cursor: 'default',
- bubble: true,
- strokeColor: strokeColor, //线颜色
- strokeOpacity: 1, //线透明度
- strokeWeight: 1, //线宽
- fillColor: fillColor, //填充色
- fillOpacity: 0.5, //填充透明度
- };
- });
-
- let fillColor2
- if(this.route.snapshot.queryParams.level == 'city'){
- fillColor2 = null
- }else{
- fillColor2 = '#329262'
- }
- // console.log(789,fillColor2)
- //绘制父区域
- districtExplorer.renderParentFeature(areaNode, {
- cursor: 'default',
- bubble: true,
- strokeColor: 'black', //线颜色
- strokeOpacity: 1, //线透明度
- strokeWeight: 1, //线宽
- fillColor: fillColor2, //填充色
- fillOpacity: 0.5, //填充透明度
- });
-
- });
- districtExplorer.on('featureClick', function(e, feature) {
- var props = feature.properties;
- // //如果存在子节点
- // // if (props.childrenNum > 0) {
- // //切换聚焦区域
- // switch2AreaNode(props.adcode);
- // // }
- console.log(props)
- });
-
-
- });
-
- }
-}
diff --git a/src/app/pages/lockscreen/lockscreen.component.html b/src/app/pages/lockscreen/lockscreen.component.html
deleted file mode 100644
index 77892b0..0000000
--- a/src/app/pages/lockscreen/lockscreen.component.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
锁屏
-
-
- 输入密码
-
- lock
-
-
-
- 输入密码以进入
-
-
进入
-
-
WEBSITE BY Anxin
-
© 2020. All RIGHT RESERVED.
-
-
-
-
diff --git a/src/app/pages/lockscreen/lockscreen.component.scss b/src/app/pages/lockscreen/lockscreen.component.scss
deleted file mode 100644
index 041d3ab..0000000
--- a/src/app/pages/lockscreen/lockscreen.component.scss
+++ /dev/null
@@ -1,111 +0,0 @@
-.pages-lockscreen {
- .page-content {
- display: inline-block;
- width: 400px;
- max-width: 100%;
- padding: 30px;
- }
- .avatar {
- width: 50px;
- height: 50px;
- margin: 0 auto;
-
- img {
- border-radius: 50%;
- }
-
- }
-}
-.layout-full {
- position: absolute;
- z-index: 0;
- width: 100%;
- height: 100%;
- color: #fff;
- font-family: Roboto, sans-serif;
- background: url('../../../assets/images/background.jpg');
- &::before {
- position: fixed;
- top: 0;
- left: 0;
- z-index: -1;
- width: 100%;
- height: 100%;
- content: "";
- background-position: center top;
- background-size: cover;
- }
-
- &::after {
- position: fixed;
- top: 0;
- left: 0;
- z-index: -1;
- width: 100%;
- height: 100%;
- content: "";
- background-color: rgba(33, 33, 33, .6);
- }
-
- .page {
- position: relative;
- height: 100%;
- padding: 0;
- margin: 0;
- background: transparent;
- }
-
-}
-
-
-.auth-box {
-
- .copyright {
- margin-top: 60px;
- font-size: 12px;
- font-weight: 500;
- letter-spacing: 1px;
-
- p {
- margin: 0 0 14px;
- }
- }
-
- .social {
- mat-icon {
- color: #fff;
- }
- }
-}
-
-.vertical-align {
- &::before {
- display: inline-block;
- height: 100%;
- vertical-align: middle;
- content: "";
- }
-
- .vertical-align-middle {
- display: inline-block;
- vertical-align: middle;
- }
-
-}
-
-.pages-login {
- .page-content {
- display: inline-block;
- width: 400px;
- max-width: 100%;
- padding: 30px;
- }
-
-}
-.page-content{
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%,-50%);
- text-align: center;
-}
\ No newline at end of file
diff --git a/src/app/pages/lockscreen/lockscreen.component.ts b/src/app/pages/lockscreen/lockscreen.component.ts
deleted file mode 100644
index fe3258d..0000000
--- a/src/app/pages/lockscreen/lockscreen.component.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router,ActivatedRoute } from '@angular/router'
-import {CacheTokenService} from '../../http-interceptors/cache-token.service'//引入服务
-@Component({
- selector: 'app-lockscreen',
- templateUrl: './lockscreen.component.html',
- styleUrls: ['./lockscreen.component.scss']
-})
-export class LockscreenComponent implements OnInit {
-
- constructor(private router:Router,private route:ActivatedRoute,private getMenus:CacheTokenService) { }
- password = ''
- ngOnInit() {
- }
-
- open(){
- if(this.password == "12345678"){
- this.router.navigate(['/ui/enterpriseuser'])
- }
- }
-
-
-
-}
diff --git a/src/app/pages/login/login.component.html b/src/app/pages/login/login.component.html
index 0ed8f33..2bd2854 100644
--- a/src/app/pages/login/login.component.html
+++ b/src/app/pages/login/login.component.html
@@ -1,24 +1,9 @@
-
-
-
-
-
-
- 数字化预案编制管理平台
-
- 数字化预案编制管理应用平台集重点单位的数字化预案资源的管理、分析及调用为一体,可实现辖区内预案使用的高效化、集约化、统一化、标准化管理。同时,可将消防现有的三维预案、图片式预案、卡片式预案、二维预案、视频预案等接入至系统中进行更加全面、真实、直观、生动的展示各项单位预案数据,方便进行预案资源调用,更好的服务实战指挥。
-
-
-
-
+
-
-
-
-
+
六熟悉演练记录系统
-
- 7天免登录
-
- 忘记密码?
-
-
-
登录
-
diff --git a/src/app/pages/login/login.component.scss b/src/app/pages/login/login.component.scss
index 5e378b0..9c3ceb1 100644
--- a/src/app/pages/login/login.component.scss
+++ b/src/app/pages/login/login.component.scss
@@ -3,22 +3,18 @@
width: 100%;
height: 100%;
display: flex;
+ overflow: hidden;
.intro {
- flex: 85%;
- height: 100%;
- background: url('../../../assets/images/background.jpg');
- background-repeat:no-repeat;
+ flex: 1;
+ background: url('../../../assets/images/pic.png');
background-size:100% 100%;
- -moz-background-size:100% 100%;
- .text {
- padding-top: 3%;
- margin-left: 8%;
- width: 53%;
- }
}
.card{
- flex: 15%;
+ width: 3.90625rem;
height: 100%;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
background-color: #fff;
}
}
@@ -29,59 +25,52 @@
width: 100%;
}
.loginbtn {
- margin-top: 25px;
- height: 35px;
- background-color:#039be5;
- border-radius: 15px;
- color: #fff;;
-}
-.website {
- font-size: 14px;
- text-align: center;
- margin-top: 60px;
+ margin-top: 0.488281rem;
+ height: 0.341797rem;
+ background: linear-gradient(303deg, #FC7045 0%, #FF4923 100%);
+ border-radius: 0.292969rem;
+ color: #fff;
}
.alert-danger {
- font-size: 14px;
+ font-size: 0.136719rem;
color: red;
}
-.cardheader{
- font-size: 26px;
- font-weight: 500;
- margin-top: 20px;
-}
.mat-card {
box-shadow: 0px 0px 0px;
- margin-top: 10px;
- padding-left: 20px;
+ margin-top: 0.097656rem;
+ padding-left: 0.195313rem;
}
.mat-form-field {
- padding-left: 20px;;
+ padding-left: 0.195313rem;
+ font-size: 0.15625rem;
+ input { font-size: 0.15625rem; }
}
.loginImg {
- margin-top: 90px;
text-align: center;
+ margin-bottom: 0.488281rem;
+ background-image:-webkit-linear-gradient(right,#f18d6f,#FF4923);
+ font-weight: 900;
+ font-family: KaiTi;
+ -webkit-background-clip:text;
+ font-size: 0.273438rem;
+ -webkit-text-fill-color:transparent;
}
.mat-input-element {
position: relative;
}
.mat-card .example-container .icon {
- width: 24px;
+ width: 0.234375rem;
color: #666;
- font-size: 24px;
+ font-size: 0.234375rem;
position: absolute;
- top:36px;
- left: 15px;
+ top: 0.351563rem;
+ left: 0.146484rem;
}
.mat-card .example-container .icon2 {
- width: 24px;
+ width: 0.234375rem;
color: #666;
- font-size: 24px;
+ font-size: 0.234375rem;
position: absolute;
- top:100px;
- left: 15px;
-}
-a {
- font-size: 14px;
- color: #0066FF;
- margin-left: 250px;
+ top: 0.976563rem;
+ left: 0.146484rem
}
\ No newline at end of file
diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts
index 1a38a1d..38ef74d 100644
--- a/src/app/pages/login/login.component.ts
+++ b/src/app/pages/login/login.component.ts
@@ -18,7 +18,7 @@ export class LoginComponent implements OnInit {
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,public token:CacheTokenService,public snackBar: MatSnackBar) { }
ngOnInit() {
- this.automaticLogin()
+
}
errmsg :string = ''
@@ -30,52 +30,11 @@ export class LoginComponent implements OnInit {
sessionStorage.setItem("level",data.level);
sessionStorage.setItem("token",data.token);
sessionStorage.setItem("refreshToken",data.refreshToken);
- // this.router.navigate([`/home`])
- this.http.get('/api/Account/NavMenus').subscribe((data:any)=>{
-
- let isHave = data.find(item=>{ return item.url == "/home"})
-
- if (isHave) {
- this.router.navigate([`/home`])
- } else {
- data.forEach(item => {
- if(item.url){
- this.router.navigate([`/keyUnit`])
- return
- }
- });
- }
-
- })
- if(e.notlogin){ //7天免登录时
- localStorage.setItem("isnologin","true")
- localStorage.setItem("token",data.token)
- localStorage.setItem("refreshToken",data.refreshToken) }
+ this.router.navigate([`/home`])
//调用服务中的function刷新token
this.token.startUp()
},
- (err) => {this.errmsg = err}
- )
- }
-
- //7天免登录自动登录
- automaticLogin () {
- let isNoLogin = localStorage.getItem("isnologin")
- if (isNoLogin) { //7天免登录时
- let token = localStorage.getItem("token");
- let refreshToken = localStorage.getItem("refreshToken");
- this.http.post('/api/Account/RefreshToken', {
- token: token,
- refreshToken: refreshToken}).subscribe((data:any)=>{
- sessionStorage.setItem("level",data.level);
- sessionStorage.setItem("token",data.token);
- sessionStorage.setItem("refreshToken",data.refreshToken);
- this.token.startUp()
- this.router.navigate(['/ui/userdata'])
- this.snackBar.open('已自动登录', '确定', {duration: 3000});
- })
- } //if
-
+ (err) => {this.errmsg = err})
}
//打开弹窗
diff --git a/src/app/pages/pages-routing.module.ts b/src/app/pages/pages-routing.module.ts
index 1024d73..0c4a705 100644
--- a/src/app/pages/pages-routing.module.ts
+++ b/src/app/pages/pages-routing.module.ts
@@ -1,17 +1,10 @@
import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { PagesComponent } from './pages.component';
-import { PersonaldataComponent } from './personaldata/personaldata.component';
import { HomeComponent } from './home/home.component';
-import { Home2Component } from './home2/home2.component';
-import { HomedetailComponent } from './homedetail/homedetail.component';
-
const routes: Routes = [
- { path: '', component: HomeComponent},
- { path: '2', component: Home2Component},
- { path: 'detail', component: HomedetailComponent},
-
+ { path: '', component: HomeComponent}
];
@NgModule({
diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts
index abf0f80..6da8972 100644
--- a/src/app/pages/pages.module.ts
+++ b/src/app/pages/pages.module.ts
@@ -48,22 +48,13 @@ import {MatToolbarModule} from '@angular/material/toolbar';
import {MatTooltipModule} from '@angular/material/tooltip';
import {MatTreeModule} from '@angular/material/tree';
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
-import { PersonaldataComponent } from './personaldata/personaldata.component';
import { RouterModule } from '@angular/router';
-import { LockscreenComponent } from './lockscreen/lockscreen.component';
import { HomeComponent } from './home/home.component';
-import { Home2Component } from './home2/home2.component';
-import { HomedetailComponent } from './homedetail/homedetail.component';
-// import { PagesRoutingModule } from './pages-routing.module';
-
-
@NgModule({
- declarations: [PagesComponent, LoginComponent, RegisterComponent, LockscreenComponent, HomeComponent, Home2Component, HomedetailComponent],
+ declarations: [PagesComponent, LoginComponent, RegisterComponent, HomeComponent],
imports: [
-
PagesRoutingModule,
CommonModule,
-
A11yModule,
CdkStepperModule,
CdkTableModule,
@@ -75,7 +66,6 @@ import { HomedetailComponent } from './homedetail/homedetail.component';
MatButtonModule,
MatButtonToggleModule,
MatCardModule,
-
MatCheckboxModule,
MatChipsModule,
MatStepperModule,
@@ -107,11 +97,9 @@ import { HomedetailComponent } from './homedetail/homedetail.component';
MatTreeModule,
PortalModule,
ScrollingModule,
-
FormsModule,
ReactiveFormsModule,
RouterModule
- // PagesRoutingModule,
]
})
export class PagesModule { }
diff --git a/src/app/pages/personaldata/personaldata.component.html b/src/app/pages/personaldata/personaldata.component.html
deleted file mode 100644
index 4e0fb3e..0000000
--- a/src/app/pages/personaldata/personaldata.component.html
+++ /dev/null
@@ -1,280 +0,0 @@
-
-
-
-
-
- 安信科创
- 嘻嘻嘻嘻
-
- 不要做程序员,要做问题解决者
-
-
-
-
-
-
-
- 关注
-
-
-
-
-
-
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
- 我是假数据
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
-
- 我是假数据
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
- 我是假数据
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
- 我是假数据
-
-
-
-
- 更多
-
-
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
-
- 我是假数据
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
- 我是假数据
-
-
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
- 我是假数据
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
- 我是假数据
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
-
-
-
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
- 我是假数据
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
-
- 我是假数据
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
- 我是假数据
-
-
-
-
-
-
-
我是假数据
- 我是假数据
-
-
我是假数据
-
-
-
- 我是假数据
-
-
-
-
-
-
-
-
diff --git a/src/app/pages/personaldata/personaldata.component.scss b/src/app/pages/personaldata/personaldata.component.scss
deleted file mode 100644
index 674904d..0000000
--- a/src/app/pages/personaldata/personaldata.component.scss
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#xxx{
- display: flex;
- justify-content: space-around;
-}
-.pages-profile {
- padding: 30px;
-
- .profile-card {
- padding: 9px;
- text-align: center;
- font-family: Roboto, sans-serif;
- width: 500px;
- height: 600px;
- mat-card-content {
- padding: 40px 15px;
- margin: 0;
- }
-
- .mat-card-avatar {
- width: 130px;
- height: 130px;
- margin-bottom: 10px;
- }
-
- .profile-user {
- margin: 10px 0;
- font-weight: normal;
- }
-
- .profile-job {
- margin-bottom: 20px;
- color: #9e9e9e;
- font-weight: 500;
- }
-
- .profile-introduction {
- margin: 0 0 1rem;
- color: #757575;
- }
-
- .profile-social {
- margin: 25px 0;
-
- mat-icon {
- margin: 0 10px;
- color: rgba(66, 66, 66, .4);
- }
- }
-
- mat-card-actions {
- padding: 10px;
- background: #f6f9fd;
- }
-
- .profile-card-footer {
- display: flex;
- justify-content: space-around;
- .profile-stat-count {
- display: block;
- margin-bottom: 3px;
- font-size: 20px;
- font-weight: bold;
- color: #616161;
-
- +span {
- color: #9e9e9e;
- }
- }
- }
-
- }
-
- .profile-board {
- padding: 30px;
- width: 500px;
- mat-list {
- padding-bottom: 20px;
- }
-
- mat-list-item {
- height: auto;
- padding: 25px 0;
- margin-left: -16px;
- border-bottom: 1px solid #dfe0df;
-
- .profile-item-content {
- padding: 20px 0 0 56px;
- line-height: 1.571429;
- color: #757575;
- white-space: normal;
- display: flex;
- flex-wrap: wrap;
-
- img {
- width: 100%;
- max-width: 220px;
- max-height: 150px;
- padding: 0 20px 20px 0;
- }
- }
- }
- }
-
- .show-more-btn {
- width: 100%;
- background-color: #eee;
- color: #3949ab;
- }
-}
\ No newline at end of file
diff --git a/src/app/pages/personaldata/personaldata.component.spec.ts b/src/app/pages/personaldata/personaldata.component.spec.ts
deleted file mode 100644
index cf44bea..0000000
--- a/src/app/pages/personaldata/personaldata.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { PersonaldataComponent } from './personaldata.component';
-
-describe('PersonaldataComponent', () => {
- let component: PersonaldataComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ PersonaldataComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(PersonaldataComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/pages/personaldata/personaldata.component.ts b/src/app/pages/personaldata/personaldata.component.ts
deleted file mode 100644
index 28d9b93..0000000
--- a/src/app/pages/personaldata/personaldata.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-personaldata',
- templateUrl: './personaldata.component.html',
- styleUrls: ['./personaldata.component.scss']
-})
-export class PersonaldataComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/src/app/plan-audit/detachment-level/detachment-level.component.html b/src/app/plan-audit/detachment-level/detachment-level.component.html
deleted file mode 100644
index 20ff8cc..0000000
--- a/src/app/plan-audit/detachment-level/detachment-level.component.html
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
-
-
- 单位名称
- {{element.companyName}}
-
-
-
- 预案名称
- {{element.name}}
-
-
-
- 添加人
- {{element.creatorName}}
-
-
-
- 添加时间
-
- {{element.creationTime|date:'yyyy-MM-dd'}}
-
-
-
-
- 预案类型
-
- 卡片预案
- 二维预案
- 三维预案
- 其他预案
-
-
-
-
- 审核状态
-
- 预案未审核
- 审核中
- 审核通过
- 审核退回
-
-
-
-
- 是否公开
- {{element.openRange}}
-
-
-
- 编制级别
-
- 总队
- 支队
- 大队
- 中队
-
-
-
-
- 操作
-
- 预案审核
- 预案公开
- 预案取消公开
- 预案已驳回
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/plan-audit/detachment-level/detachment-level.component.scss b/src/app/plan-audit/detachment-level/detachment-level.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/plan-audit/detachment-level/detachment-level.component.spec.ts b/src/app/plan-audit/detachment-level/detachment-level.component.spec.ts
deleted file mode 100644
index 568d65b..0000000
--- a/src/app/plan-audit/detachment-level/detachment-level.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { DetachmentLevelComponent } from './detachment-level.component';
-
-describe('DetachmentLevelComponent', () => {
- let component: DetachmentLevelComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ DetachmentLevelComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(DetachmentLevelComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/plan-audit/detachment-level/detachment-level.component.ts b/src/app/plan-audit/detachment-level/detachment-level.component.ts
deleted file mode 100644
index 6973614..0000000
--- a/src/app/plan-audit/detachment-level/detachment-level.component.ts
+++ /dev/null
@@ -1,248 +0,0 @@
-import { Component, OnInit, ViewChild, Inject } from '@angular/core';
-import { HttpClient } from '@angular/common/http'
-import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
-import { MatPaginator } from '@angular/material/paginator';
-import { FlatTreeControl } from '@angular/cdk/tree';
-import { FormControl } from '@angular/forms';
-import { Router,ActivatedRoute } from '@angular/router'
-import { PageEvent } from '@angular/material/paginator';
-import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-import { TreeService } from '../../http-interceptors/tree.service'
-
-
-export interface Food {
- name:string;
- value: string;
-}
-@Component({
- selector: 'app-detachment-level',
- templateUrl: './detachment-level.component.html',
- styleUrls: ['../plan-audit/plan-audit.component.scss']
-})
-export class DetachmentLevelComponent implements OnInit {
-
- constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
-
- private _transformer = (node, level: number) => { //初始化tree
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- children: node.children
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- myControl = new FormControl();
- hasChild = (_: number, node: any) => node.expandable;
-
- organizationName:any //当前单位所属辖区中队名称
- allunittype:any //所有单位类型
- planpatterns:Food[] = [ //预案类型
- {name:"卡片预案",value:"8"},
- {name:"二维预案",value:"1" },
- {name:"三维预案",value:"2" },
- {name:"其他预案",value:"4" },]
- passstates:Food[]=[ //审核状态
- {name:"审核中",value:"1"},
- {name:"审核通过",value:"2"},
- {name:"审核退回",value:"4"},]
-
- displayedColumns: string[] = ['unitname','planname', 'addpeople', 'addtime','plantype','auditstate', 'isopen','preparethelevel','operation'];
- tabledataSource:any; //所有预案审核信息
-
- //分页
- @ViewChild(MatPaginator, {static: true})
- pageEvent: PageEvent;
- paginator: MatPaginator;
- length:any; //共多少条数据
- pageSize:any; //每页条数
- pageSizeOptions: number[] = [10] //设置每页条数
- PageNumber:number = 1; //第几页
-
- //查询筛选条件
- CompanyName:any; //单位名称
- selectOrganizationID:any //选中的辖区中队id
- selectOrganizationIName:any //选中的辖区中队name
- HasChildrenOrganization:boolean = false; //辖区中队是否包含下级
- BuildingTypeId:any; //选中的单位类型
- PlanType:any; //选中的预案类型
- AuditStatus:any = '1'; //选中的审核状态
- PlanLevel:any='2'; //选中的编制级别
-
- //分页事件
- chagePage(e){
- this.PageNumber = e.pageIndex + 1
- let header = {
- CompanyName: this.CompanyName || '',
- OrganizationId: this.selectOrganizationID || '',
- HasChildrenOrganization: String(this.HasChildrenOrganization) || 'false',
- BuildingTypeId: this.BuildingTypeId || '',
- PlanType: this.PlanType || '',
- AuditStatus: this.AuditStatus || '1',
- PlanLevel: this.PlanLevel || '2',
- PageNumber: String(this.PageNumber),
- }
- this.http.get('/api/PlanAudits',{params:header}).subscribe((data:any)=>{
- this.length = data.totalCount
- this.pageSize = data.pageSize
- this.tabledataSource = data.items
- })
- }
-
- //查询
- onSubmit(e){
- this.getAllPlanAudits()
- }
-
- //重置
- reset () {
- this.CompanyName = ''
- this.selectOrganizationID = ''
- this.selectOrganizationIName = ''
- this.HasChildrenOrganization = false
- this.BuildingTypeId = ''
- this.PlanType = '',
- this.AuditStatus = '1',
- this.PlanLevel = '2',
- this.getAllPlanAudits()
- }
-
- //获取当前所有预案审核
- getAllPlanAudits () {
- let header = {
- CompanyName: this.CompanyName || '',
- OrganizationId: this.selectOrganizationID || '',
- HasChildrenOrganization: String(this.HasChildrenOrganization) || 'false',
- BuildingTypeId: this.BuildingTypeId || '',
- PlanType: this.PlanType || '',
- AuditStatus: this.AuditStatus || '1',
- PlanLevel: this.PlanLevel || '2',
- PageNumber: '1',
- }
- this.http.get('/api/PlanAudits',{params:header}).subscribe((data:any)=>{
- this.length = data.totalCount
- this.pageSize = data.pageSize
- this.pageEvent.pageIndex = 0
- this.tabledataSource = data.items
- })
- }
-
- ngOnInit(): void {
- this.getunitdata();
- this.getOrganizations();
- this.getUnittype();
- this.getAllPlanAudits()
- }
-
- //得到当前账号所属辖区中队名称
- getunitdata(){
- this.http.get("/api/Account/Profiles").subscribe((data:any)=>{
- this.organizationName = data.organizationName
- })
- }
-
- //获得所有辖区中队(处理数据结构)
- getOrganizations(){
- let treeData = []
- this.http.get('/api/Organizations').subscribe((data:any)=>{
- data.forEach(element => {
- element.children = []
- data.forEach(item => { if (item.parentId == element.id) {element.children.push(item)} });
- });
- if (this.organizationName) { //当前账号有辖区中队时
- data.forEach(element => {
- if (element.name===this.organizationName) {
- treeData.push(element)
- this.dataSource.data = treeData }
- });
- } else { //当前账号没有有辖区中队时
- data.forEach(element => {
- if (!element.parentId) {
- treeData.push(element)
- this.dataSource.data = treeData }
- });
- }
-
- })
- }
-
- //获得所有单位类型
- getUnittype(){
- this.http.get('/api/BuildingTypes/Simple').subscribe(data=>{
- this.allunittype = data
- })
- }
-
- isorganizationbox:boolean = false //辖区中队DIV显隐
-
- //打开辖区中队
- openorganizationbox() {
- this.isorganizationbox = true
- }
-
- //关闭辖区中队
- closediv(){
- this.isorganizationbox = false
- }
-
- //选择辖区中队时
- add(node) {
- this.selectOrganizationID = node.id
- this.selectOrganizationIName = node.name
- this.isorganizationbox = false
- }
-
- //预案审核
- toExamine (e) {
- window.open(`/planAudit/planpass?id=${e.companyId}&companyName=${e.companyName}&auditPlanId=${e.id}&auditStatus=${e.auditStatus}`);
- }
-
- //预案公开
- openReserve (e) {
- this.http.put(`/api/PlanAudits/${e.id}/Public`,[]).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('预案公开成功','确定',config);
- this.renew()
- })
- }
-
- //预案取消公开
- closeReserve (e) {
- this.http.put(`/api/PlanAudits/${e.id}/Unpublic`,[]).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('预案已取消公开','确定',config);
- this.renew()
- })
- }
-
- //按查询条件及分页 更新当前页面
- renew () {
- let header = {
- CompanyName: this.CompanyName || '',
- OrganizationId: this.selectOrganizationID || '',
- HasChildrenOrganization: String(this.HasChildrenOrganization) || 'false',
- BuildingTypeId: this.BuildingTypeId || '',
- PlanType: this.PlanType || '',
- AuditStatus: this.AuditStatus || '1',
- PlanLevel: this.PlanLevel || '2',
- PageNumber: String(this.PageNumber),
- }
- this.http.get('/api/PlanAudits',{params:header}).subscribe((data:any)=>{
- this.length = data.totalCount
- this.pageSize = data.pageSize
- this.tabledataSource = data.items
- })
- }
-
-
-
-}
diff --git a/src/app/plan-audit/plan-audit-routing.module.ts b/src/app/plan-audit/plan-audit-routing.module.ts
deleted file mode 100644
index 4069bfa..0000000
--- a/src/app/plan-audit/plan-audit-routing.module.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
-import {DetachmentLevelComponent} from './detachment-level/detachment-level.component'
-import { PlanAuditComponent } from './plan-audit/plan-audit.component';
-import { PlanPassComponent } from './plan-pass/plan-pass.component';
-
-const routes: Routes = [
- { path: 'detachmentLevel', component: DetachmentLevelComponent },
- { path: 'planaudit', component: PlanAuditComponent },
- { path: 'planpass', component: PlanPassComponent },
-];
-
-@NgModule({
- imports: [RouterModule.forChild(routes)],
- exports: [RouterModule]
-})
-export class PlanAuditRoutingModule { }
diff --git a/src/app/plan-audit/plan-audit.module.ts b/src/app/plan-audit/plan-audit.module.ts
deleted file mode 100644
index c8bbc2a..0000000
--- a/src/app/plan-audit/plan-audit.module.ts
+++ /dev/null
@@ -1,104 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { PlanAuditRoutingModule } from './plan-audit-routing.module';
-import { DetachmentLevelComponent } from './detachment-level/detachment-level.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 { PlanAuditComponent, PlanOpen } from './plan-audit/plan-audit.component';
-import { FormsModule } from '@angular/forms';
-import { PlanPassComponent } from './plan-pass/plan-pass.component';
-import {ViewUnitDetailsPlanComponent} from '../key-unit/view-unit-details-plan/view-unit-details-plan.component'
-import {KeyUnitModule} from '../key-unit/key-unit.module'
-
-@NgModule({
- declarations: [DetachmentLevelComponent, PlanAuditComponent, PlanPassComponent,PlanOpen,],
- imports: [
- CommonModule,
- PlanAuditRoutingModule,
- A11yModule,
- CdkStepperModule,
- CdkTableModule,
- CdkTreeModule,
- DragDropModule,
- MatAutocompleteModule,
- MatBadgeModule,
- MatBottomSheetModule,
- MatButtonModule,
- MatButtonToggleModule,
- MatCardModule,
- MatCheckboxModule,
- MatChipsModule,
- MatStepperModule,
- MatDatepickerModule,
- MatDialogModule,
- MatDividerModule,
- MatExpansionModule,
- MatGridListModule,
- MatIconModule,
- MatInputModule,
- MatListModule,
- MatMenuModule,
- MatNativeDateModule,
- MatPaginatorModule,
- MatProgressBarModule,
- MatProgressSpinnerModule,
- MatRadioModule,
- MatRippleModule,
- MatSelectModule,
- MatSidenavModule,
- MatSliderModule,
- MatSlideToggleModule,
- MatSnackBarModule,
- MatSortModule,
- MatTableModule,
- MatTabsModule,
- MatToolbarModule,
- MatTooltipModule,
- MatTreeModule,
- PortalModule,
- ScrollingModule,
- FormsModule,
- KeyUnitModule
- ]
-})
-export class PlanAuditModule { }
diff --git a/src/app/plan-audit/plan-audit/plan-audit.component.html b/src/app/plan-audit/plan-audit/plan-audit.component.html
deleted file mode 100644
index 75b1a2d..0000000
--- a/src/app/plan-audit/plan-audit/plan-audit.component.html
+++ /dev/null
@@ -1,173 +0,0 @@
-
-
-
-
-
-
-
-
- 单位名称
- {{element.companyName}}
-
-
-
- 预案名称
- {{element.name}}
-
-
-
- 添加人
- {{element.creatorName}}
-
-
-
- 添加时间
-
- {{element.creationTime|date:'yyyy-MM-dd'}}
-
-
-
-
- 预案类型
-
- 卡片预案
- 二维预案
- 三维预案
- 其他预案
-
-
-
-
- 审核状态
-
- 预案未审核
- 审核中
- 审核通过
- 审核退回
-
-
-
-
- 是否公开
- {{element.openRange}}
-
-
-
- 编制级别
-
- 总队
- 支队
- 大队
- 中队
-
-
-
-
- 操作
-
- 预案审核
- 预案公开
- 预案取消公开
- 预案已驳回
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/plan-audit/plan-audit/plan-audit.component.scss b/src/app/plan-audit/plan-audit/plan-audit.component.scss
deleted file mode 100644
index 313ca71..0000000
--- a/src/app/plan-audit/plan-audit/plan-audit.component.scss
+++ /dev/null
@@ -1,83 +0,0 @@
-.header {
- width: 100%;
- padding: 10px 10px;
- box-sizing: border-box;
- .queryBox {
- box-sizing: border-box;
- padding: 5px 25px;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-items:center;
- .queryField {
- margin: 3px 40px;
- input {
- width: 180px;
- height: 22px;
- line-height: 22px;
- border-radius: 3px;}
- }
- } //queryBox
-
- .ordiv{ //辖区中队
- position: relative;
- .organizationbox{
- width:450px;
- height: 200px;
- background: white;
- position: absolute;
- top: 48px;
- left: 77px;
- z-index: 999;
- border: 1px solid grey;
- overflow-y: auto;
- li{
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- mat-tree-node{
- cursor: pointer;
- white-space:pre;
- }
- mat-tree-node:hover{
- background: rgba(225, 225, 225, 0.8);
- }
- .closediv{
- z-index: 100;
- position: absolute;
- right: 0;
- top: 0;
- width: 30px;
- height: 30px;
- cursor: pointer;
- line-height: 30px;
- text-align: center;
- }
- .closediv:hover{
- background:rgba(225, 225, 225, 0.8);
- }
- }
- } //ordiv
-
-} //header
-
-.body{
- .tablebox{
- overflow-y: auto;
- table {
- width: 100%;
- text-align: center;
- .cdk-header-cell { text-align: center;}
- }
- } //tablebox
-
-}
-
-textarea {
- border-radius: 5px;
- padding: 5px;
- width: 300px;
- height: 100px;
- resize: none;
-}
\ No newline at end of file
diff --git a/src/app/plan-audit/plan-audit/plan-audit.component.spec.ts b/src/app/plan-audit/plan-audit/plan-audit.component.spec.ts
deleted file mode 100644
index 64d9c20..0000000
--- a/src/app/plan-audit/plan-audit/plan-audit.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { PlanAuditComponent } from './plan-audit.component';
-
-describe('PlanAuditComponent', () => {
- let component: PlanAuditComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ PlanAuditComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(PlanAuditComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/plan-audit/plan-audit/plan-audit.component.ts b/src/app/plan-audit/plan-audit/plan-audit.component.ts
deleted file mode 100644
index fa9e7e9..0000000
--- a/src/app/plan-audit/plan-audit/plan-audit.component.ts
+++ /dev/null
@@ -1,317 +0,0 @@
-import { Component, OnInit, ViewChild, Inject } from '@angular/core';
-import { HttpClient } from '@angular/common/http'
-import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
-import { MatPaginator } from '@angular/material/paginator';
-import { FlatTreeControl } from '@angular/cdk/tree';
-import { FormControl } from '@angular/forms';
-import { Router,ActivatedRoute } from '@angular/router'
-import { PageEvent } from '@angular/material/paginator';
-import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-import { TreeService } from '../../http-interceptors/tree.service'
-
-
-
-export interface Food {
- name:string;
- value: string;
-}
-@Component({
- selector: 'app-plan-audit',
- templateUrl: './plan-audit.component.html',
- styleUrls: ['./plan-audit.component.scss']
-})
-export class PlanAuditComponent implements OnInit {
-
- constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
-
- private _transformer = (node, level: number) => { //初始化tree
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- children: node.children
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- myControl = new FormControl();
- hasChild = (_: number, node: any) => node.expandable;
-
- organizationName:any //当前单位所属辖区中队名称
- allunittype:any //所有单位类型
- preparelevels:Food[] //编制级别
- planpatterns:Food[] = [ //预案类型
- {name:"卡片预案",value:"8"},
- {name:"二维预案",value:"1" },
- {name:"三维预案",value:"2" },
- {name:"其他预案",value:"4" },]
- passstates:Food[]=[ //审核状态
- {name:"审核中",value:"1"},
- {name:"审核通过",value:"2"},
- {name:"审核退回",value:"4"},]
-
- displayedColumns: string[] = ['unitname','planname', 'addpeople', 'addtime','plantype','auditstate', 'isopen','preparethelevel','operation'];
- tabledataSource:any; //所有预案审核信息
-
- //分页
- @ViewChild(MatPaginator, {static: true})
- pageEvent: PageEvent;
- paginator: MatPaginator;
- length:any; //共多少条数据
- pageSize:any; //每页条数
- pageSizeOptions: number[] = [10] //设置每页条数
- PageNumber:number = 1; //第几页
-
- //查询筛选条件
- CompanyName:any; //单位名称
- selectOrganizationID:any //选中的辖区中队id
- selectOrganizationIName:any //选中的辖区中队name
- HasChildrenOrganization:boolean = false; //辖区中队是否包含下级
- BuildingTypeId:any; //选中的单位类型
- PlanType:any; //选中的预案类型
- AuditStatus:any = '1'; //选中的审核状态
- PlanLevel:any; //选中的编制级别
- HasChildrenPlanLevel:boolean = false; //编制级别是否包含下级
-
- //分页事件
- chagePage(e){
- this.PageNumber = e.pageIndex + 1
- let header = {
- CompanyName: this.CompanyName || '',
- OrganizationId: this.selectOrganizationID || '',
- HasChildrenOrganization: String(this.HasChildrenOrganization) || 'false',
- BuildingTypeId: this.BuildingTypeId || '',
- PlanType: this.PlanType || '',
- AuditStatus: this.AuditStatus || '1',
- PlanLevel: this.PlanLevel || '',
- HasChildrenPlanLevel: String(this.HasChildrenPlanLevel) || 'false',
- PageNumber: String(this.PageNumber),
- }
- this.http.get('/api/PlanAudits',{params:header}).subscribe((data:any)=>{
- this.length = data.totalCount
- this.pageSize = data.pageSize
- this.tabledataSource = data.items
- })
- }
-
- //查询
- onSubmit(e){
- this.getAllPlanAudits()
- }
-
- //重置
- reset () {
- this.CompanyName = ''
- this.selectOrganizationID = ''
- this.selectOrganizationIName = ''
- this.HasChildrenOrganization = false
- this.BuildingTypeId = ''
- this.PlanType = '',
- this.AuditStatus = '1',
- this.PlanLevel = '',
- this.HasChildrenPlanLevel = false
- this.getAllPlanAudits()
- }
-
- //获取当前所有预案审核
- getAllPlanAudits () {
- let header = {
- CompanyName: this.CompanyName || '',
- OrganizationId: this.selectOrganizationID || '',
- HasChildrenOrganization: String(this.HasChildrenOrganization) || 'false',
- BuildingTypeId: this.BuildingTypeId || '',
- PlanType: this.PlanType || '',
- AuditStatus: this.AuditStatus || '1',
- PlanLevel: this.PlanLevel || '',
- HasChildrenPlanLevel: String(this.HasChildrenPlanLevel) || 'false',
- PageNumber: '1',
- }
- this.http.get('/api/PlanAudits',{params:header}).subscribe((data:any)=>{
- this.length = data.totalCount
- this.pageSize = data.pageSize
- this.pageEvent.pageIndex = 0
- this.tabledataSource = data.items
- })
- }
-
- ngOnInit(): void {
- this.getunitdata();
- this.getOrganizations();
- this.getUnittype();
- let level = sessionStorage.getItem("level");
- if(level == "0"){ //如果是总队
- this.preparelevels = [
- {name:"总队",value:"1"},
- {name:"支队",value:"2"},
- {name:"大队",value:"4"},
- {name:"中队",value:"8"},] }
- if(level == "1"){ //如果是支队
- this.preparelevels = [
- {name:"支队",value:"2"},
- {name:"大队",value:"4"},
- {name:"中队",value:"8"},] }
- if(level == "2"){ //如果是大队
- this.preparelevels = [
- {name:"大队",value:"4"},
- {name:"中队",value:"8"},] }
- if(level == "3"){ //如果是中队
- this.preparelevels = [{name:"中队",value:"8"}] }
-
- this.getAllPlanAudits()
- }
-
- //得到当前账号所属辖区中队名称
- getunitdata(){
- this.http.get("/api/Account/Profiles").subscribe((data:any)=>{
- this.organizationName = data.organizationName
- })
- }
-
- //获得所有辖区中队(处理数据结构)
- getOrganizations(){
- let treeData = []
- this.http.get('/api/Organizations').subscribe((data:any)=>{
- data.forEach(element => {
- element.children = []
- data.forEach(item => { if (item.parentId == element.id) {element.children.push(item)} });
- });
- if (this.organizationName) { //当前账号有辖区中队时
- data.forEach(element => {
- if (element.name===this.organizationName) {
- treeData.push(element)
- this.dataSource.data = treeData }
- });
- } else { //当前账号没有有辖区中队时
- data.forEach(element => {
- if (!element.parentId) {
- treeData.push(element)
- this.dataSource.data = treeData }
- });
- }
-
- })
- }
-
- //获得所有单位类型
- getUnittype(){
- this.http.get('/api/BuildingTypes/Simple').subscribe(data=>{
- this.allunittype = data
- })
- }
-
- isorganizationbox:boolean = false //辖区中队DIV显隐
-
- //打开辖区中队
- openorganizationbox() {
- this.isorganizationbox = true
- }
-
- //关闭辖区中队
- closediv(){
- this.isorganizationbox = false
- }
-
- //选择辖区中队时
- add(node) {
- this.selectOrganizationID = node.id
- this.selectOrganizationIName = node.name
- this.isorganizationbox = false
- }
-
- //预案审核
- toExamine (e) {
- window.open(`/planAudit/planpass?id=${e.companyId}&companyName=${e.companyName}&auditPlanId=${e.id}&auditStatus=${e.auditStatus}`);
- }
-
- //预案公开
- openReserve (e) {
- this.http.put(`/api/PlanAudits/${e.id}/Public`,[]).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('预案已公开','确定',config);
- this.renew()
- })
- }
-
- //预案取消公开
- closeReserve (e) {
- this.http.put(`/api/PlanAudits/${e.id}/Unpublic`,[]).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('预案已取消公开','确定',config);
- this.renew()
- })
- }
-
- //按查询条件及分页 更新当前页面
- renew () {
- let header = {
- CompanyName: this.CompanyName || '',
- OrganizationId: this.selectOrganizationID || '',
- HasChildrenOrganization: String(this.HasChildrenOrganization) || 'false',
- BuildingTypeId: this.BuildingTypeId || '',
- PlanType: this.PlanType || '',
- AuditStatus: this.AuditStatus || '1',
- PlanLevel: this.PlanLevel || '',
- HasChildrenPlanLevel: String(this.HasChildrenPlanLevel) || 'false',
- PageNumber: String(this.PageNumber),
- }
- this.http.get('/api/PlanAudits',{params:header}).subscribe((data:any)=>{
- this.length = data.totalCount
- this.pageSize = data.pageSize
- this.tabledataSource = data.items
- })
- }
-
-
-
-}
-
-
-
-@Component({
- selector: 'planopen',
- templateUrl: './plan-opendialog.html',
- styleUrls: ['./plan-audit.component.scss']
-})
-export class PlanOpen {
-
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar,private tree: TreeService,
- private route:ActivatedRoute,) {}
-
- ngOnInit(): void {
-
- }
-
- //审核预案
- onSubmit (e) {
- e.auditStatus = Number(e.auditStatus)
- this.http.put(`/api/PlanAudits/${this.data}`,e).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('审批结果提交成功','确定',config);
- this.dialogRef.close();
- })
- }
-
- //提醒弹窗
- remind () {
- let type = this.route.snapshot.queryParams.auditStatus //当前预案审核状态 =2为审核通过时
- if (type==2) {
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('预案驳回,公开预案会设置为未公开状态','确定',config);
- }
- }
-
-
-
-}
\ No newline at end of file
diff --git a/src/app/plan-audit/plan-audit/plan-opendialog.html b/src/app/plan-audit/plan-audit/plan-opendialog.html
deleted file mode 100644
index b15f335..0000000
--- a/src/app/plan-audit/plan-audit/plan-opendialog.html
+++ /dev/null
@@ -1,25 +0,0 @@
-审核预案
-
\ No newline at end of file
diff --git a/src/app/plan-audit/plan-pass/plan-pass.component.html b/src/app/plan-audit/plan-pass/plan-pass.component.html
deleted file mode 100644
index 6131a9e..0000000
--- a/src/app/plan-audit/plan-pass/plan-pass.component.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 文件名称
- {{element.fileName?element.fileName : compantData.name}}
-
-
- 上传时间
- {{element.lastModified | date:'yyyy-MM-dd'}}
-
-
- 操作
-
- 下载
- 正在下载... {{element.progress}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/app/plan-audit/plan-pass/plan-pass.component.scss b/src/app/plan-audit/plan-pass/plan-pass.component.scss
deleted file mode 100644
index 058dc93..0000000
--- a/src/app/plan-audit/plan-pass/plan-pass.component.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-.planHeader {
- width: 100%;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- .planBox {
- margin: 0px 30px;
- color: black;
- :first-child {margin-right: 10px;}
- }
-}
-
-.table {
- overflow-y: auto;
- table {
- width: 100%;
- text-align: center;
- .cdk-header-cell { text-align: center;}
- }
-}
diff --git a/src/app/plan-audit/plan-pass/plan-pass.component.spec.ts b/src/app/plan-audit/plan-pass/plan-pass.component.spec.ts
deleted file mode 100644
index 1df6883..0000000
--- a/src/app/plan-audit/plan-pass/plan-pass.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { PlanPassComponent } from './plan-pass.component';
-
-describe('PlanPassComponent', () => {
- let component: PlanPassComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ PlanPassComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(PlanPassComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/plan-audit/plan-pass/plan-pass.component.ts b/src/app/plan-audit/plan-pass/plan-pass.component.ts
deleted file mode 100644
index f853fdb..0000000
--- a/src/app/plan-audit/plan-pass/plan-pass.component.ts
+++ /dev/null
@@ -1,170 +0,0 @@
-import { Component, OnInit, ViewChild, Inject } from '@angular/core';
-import { HttpClient } from '@angular/common/http'
-import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
-import { MatPaginator } from '@angular/material/paginator';
-import { FlatTreeControl } from '@angular/cdk/tree';
-import { FormControl } from '@angular/forms';
-import { Router,ActivatedRoute } from '@angular/router'
-import { PageEvent } from '@angular/material/paginator';
-import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-import { TreeService } from '../../http-interceptors/tree.service'
-import { MatTableDataSource } from '@angular/material/table';
-import { DomSanitizer } from '@angular/platform-browser';
-import {PlanOpen} from '../plan-audit/plan-audit.component'
-import {ViewUnitDetailsPlanComponent} from '../../key-unit/view-unit-details-plan/view-unit-details-plan.component'
-
-
-
-export interface Food {
- name:string;
- value: string;
-}
-@Component({
- selector: 'app-plan-pass',
- templateUrl: './plan-pass.component.html',
- styleUrls: ['./plan-pass.component.scss']
-})
-export class PlanPassComponent implements OnInit {
-
- constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,
- public snackBar: MatSnackBar,private sanitizer: DomSanitizer) { }
-
- type:any //审核按钮是否出现
- ngOnInit(): void {
- this.type = this.route.snapshot.queryParams.type
- this.getCompanyData()
- this.getPlanData()
- }
-
- displayedColumns: string[] = ['filename','addtime','operation']; //表头
- compantData:any = {name:'',organizationName: '', buildingTypes:[{name:''}], address:''}; //当前单位信息
- planData:any; //审核预案信息
-
- //获取当前单位信息
- getCompanyData () {
- let header = {
- CompanyName: this.route.snapshot.queryParams.companyName || '',
- PageSize: '100'}
- this.http.get('/api/Plans',{params:header}).subscribe((data:any)=>{
- data.items.forEach(element => {
- if (element.companyId===this.route.snapshot.queryParams.id) {
- this.compantData = element.company
- return } });
-
- })
- }
-
- //获取当前单位审核预案的信息
- getPlanData () {
- let header = {
- CompanyName: this.route.snapshot.queryParams.companyName || '',
- AuditStatus: this.route.snapshot.queryParams.auditStatus || '',
- PageSize: '100',
- }
- this.http.get('/api/PlanAudits',{params:header}).subscribe((data:any)=>{
- data.items.forEach(element => {
- if (element.id===this.route.snapshot.queryParams.auditPlanId) {
- this.planData = element
- this.handleData()
- return } });
-
- })
- }
-
- planType:any; //展示预案类型
- allFile:any = []; //类型=0时所有文件
- thirdPartyURL:any; //类型=3时网址
- handleData () {
- this.planType = this.planData.planMode
- let data = this.planData
- if (this.planData.planMode==0) { //预案planMode=0时, 下载文件
- data.attachmentUrls.forEach(item => {
- this.http.get(`/api/ObjectMetadata/PlanPlatform/${item}`).subscribe((data:any)=>{
- data.isLoading = false
- this.allFile.push(data)
- this.allFile = new MatTableDataSource(this.allFile) })
- });
- } else if (this.planData.planMode==1) { //预案planMode=1时, 解析文档
-
- } else if (this.planData.planMode==2) { //预案planMode=2时, 跳查看页面组件
- sessionStorage.setItem("buildingTypeId", this.compantData.buildingTypes.length? this.compantData.buildingTypes[0].id: undefined);
- sessionStorage.setItem("companyId",this.route.snapshot.queryParams.id);
- sessionStorage.setItem("planId",this.route.snapshot.queryParams.auditPlanId);
- sessionStorage.setItem("editable",'0');
- } else if (this.planData.planMode==3) { //预案planMode=3时, 第三方网址
- this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(data.url)
- }
-
- }
-
- //预案审核
- toExamine () {
- let data = this.route.snapshot.queryParams.auditPlanId
- const dialogRef = this.dialog.open(PlanOpen,{data});
- }
-
- suffix:string; //文件名后缀
- //下载
- download (e) {
- e.isLoading = true
- let file = e
- let fileSize = file.fileLength //下载文件的总大小
- let shardSize = 10 * 1024 * 1024 //文件大小是否大于10MB
- this.suffix = this.compantData.name + '.' + (e.objectName.substring(e.objectName.lastIndexOf(".")+1,e.objectName.length));
-
- if (file && fileSize<=shardSize) { //<=10MB时直接下载
- this.http.get(`/api/Objects/PlanPlatform/${file.objectName}`,{responseType: 'blob'},).subscribe(data=>{
- let url = window.URL.createObjectURL(new Blob([data])); //createObjectURL创建一个下载Blob的url地址
- let link = document.createElement("a");
- link.style.display = "none";
- link.href = url;
- link.setAttribute("download", e.fileName?e.fileName : this.suffix);
- document.body.appendChild(link);
- link.click();
- e.isLoading = false
- })
- } else if (file && fileSize>shardSize) { //>10MB时分块下载
- this.blockingDownload(e) //分段下载
- }
-
- }
-
- //分段下载并合并
- async blockingDownload (e) {
- let file = e
- let fileSize = file.fileLength //下载文件的总大小
- let shardSize = 3 * 1024 * 1024 //3MB一个分片
- let allSlice = Math.ceil(fileSize / shardSize) //总文件/3MB===共分多少段
- let allFile:any = [] //所有的file分段
-
- for (let i=0;i{
- this.http.get(`/api/Objects/PlanPlatform/${file.objectName}`,{headers:{'range':`bytes= ${start}-${end}`},responseType:'blob'}).subscribe(data=>{
- result(data) })
- })
- allFile.push(result)
- e.progress = Number((i/allSlice).toFixed(2))*100 + '%'
-
- if (allFile.length === allSlice) { //合并文件输出给浏览器
- let url = window.URL.createObjectURL(new Blob(allFile)); //createObjectURL创建一个下载Blob的url地址
- let link = document.createElement("a");
- link.style.display = "none";
- link.href = url;
- link.setAttribute("download", e.fileName?e.fileName : this.suffix);
- document.body.appendChild(link);
- link.click();
- e.isLoading = false
- e.progress = ''
- }
-
- } //for循环
-
- }
-
-
-
-}
diff --git a/src/app/plan-management/entry-plan-look/AddPlanone.html b/src/app/plan-management/entry-plan-look/AddPlanone.html
deleted file mode 100644
index beaf0d1..0000000
--- a/src/app/plan-management/entry-plan-look/AddPlanone.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
- 新建预案
-
-
-
-
-
- 填写名称与类型
-
-
-
-
-
-
-
-
- 卡片预案
- 二维预案
- 三维预案
- 其他预案
-
-
-
-
- 下一步
- 取消
-
-
-
-
-
- 上传预案完成创建
-
-
-
-
- 上传中...
-
- 取消上传
-
-
- 上一步
- 取消
- 完成
-
-
-
-
-
-
-
-
-
-
diff --git a/src/app/plan-management/entry-plan-look/auditresult.html b/src/app/plan-management/entry-plan-look/auditresult.html
deleted file mode 100644
index 2c61b7e..0000000
--- a/src/app/plan-management/entry-plan-look/auditresult.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
- 审批结果
-
-
-
-
预案名称:{{planName}}
-
提交时间:{{commitTime| date:'yyyy-MM-dd HH:mm:ss'}}
-
发起申请:{{commitOrganizationName }}
-
-
审批大队:{{auditOrganizationName}}
-
审批结果:{{auditResult | auditsatus}}
-
审批意见:{{auditOpinion}}
-
-
-
-
- 关闭
-
\ No newline at end of file
diff --git a/src/app/plan-management/entry-plan-look/changename.html b/src/app/plan-management/entry-plan-look/changename.html
deleted file mode 100644
index 5299e45..0000000
--- a/src/app/plan-management/entry-plan-look/changename.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- 更改预案名称
-
-
-
-
-
-
-
-
- 确定
- 取消
-
-
diff --git a/src/app/plan-management/entry-plan-look/downloadFile.html b/src/app/plan-management/entry-plan-look/downloadFile.html
deleted file mode 100644
index 8e6b4d4..0000000
--- a/src/app/plan-management/entry-plan-look/downloadFile.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
选择要下载的文件:
-
-
-
- insert_drive_file
- {{item.fileName ? item.fileName : name2 }}
- 文件大小:{{ item.filePige }} M
- check_circle
-
-
-
-
-
- 确定
- 取消
-
-
-
-
\ No newline at end of file
diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.html b/src/app/plan-management/entry-plan-look/entry-plan-look.component.html
deleted file mode 100644
index 770bed2..0000000
--- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.html
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
新建
-
-
-
-
- {{downloadFileName}}
- 下载中...
-
-
-
-
-
-
-
- 预案名称
- {{element.name}}
-
-
- 添加人
- {{element.creatorName}}
-
-
- 修改时间
-
- {{element.modifiedTime | date:'yyyy-MM-dd'}}
-
-
-
- 预案类型
- {{element.planType | plantype}}
-
-
-
- 审核状态
- {{element.auditStatus | auditsatus}}
-
-
- 是否公开
- {{element.openRange}}
-
-
- 编制级别
- {{element.planLevel | planlevel}}
-
-
- 操作
-
- 改名
- 编辑
- 查看
- 下载
- 删除
- 审批结果
-
- 提交审核
- 撤销审核
-
-
-
- 操作
-
- 查看
- 下载
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.scss b/src/app/plan-management/entry-plan-look/entry-plan-look.component.scss
deleted file mode 100644
index cadd2d5..0000000
--- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.scss
+++ /dev/null
@@ -1,117 +0,0 @@
-.header{
- height: 130px;
- // border-bottom: 1px solid rgba(0, 0, 0, 0.12);
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-items:center;
- // justify-content:center;
- div{
- width: 300px;
- height: 30px;
- // margin: 0 30px;
- margin-left: 80px;
- }
- // margin-bottom: 30px;
-}
-.body{
- .btn{
- button{
- width: 80px;
- height: 40px;
- margin-left: 2%;
- }
- }
- .tablebox{
- table{
- width: 100%;
- margin-left: 0%;
- margin-top: 15px;
- }
- mat-paginator{
- width: 100%;
- margin-left: 0%;
- // margin-top: 30px;
- }
- }
-}
-.upbox{
- height: 100px;
- margin-bottom: 15px;
- mat-radio-group{
- div{
- margin: 10px 0;
- }
- }
-}
-.createbtnbox{
- button{
- margin: 0 6px;
- }
-}
-.mat-header-cell{
- text-align: center;
-}
-.mat-cell{
- text-align: center;
- span{
- color: #0000BF;
- margin: 0 3px;
- cursor: pointer;
- }
- span:hover{
- text-decoration:underline
- }
- .grey{
- color: grey;
- pointer-events: none;
- }
-}
-
-//进度条
-.progressBox{
- line-height: 49px;
- height: 49px;
- position: relative;
- display: inline-block;
- width: 100%;
- button{
- float: right;
- }
- .progress{
- display: inline-block;
- position: absolute;
- width: 500px;
- top: 22px;
- left: 32px;
- }
-
- .filename{
- display: inline-block;
- max-width: 180px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- // margin-left: 160px;
- }
-
-}
-
- .fileDiv{
- cursor: pointer;
- }
- .fileDiv:hover{
- background-color: #fafafa;
-}
-.auditDiv{
- p{
- margin: 8px 0;
- margin-left: 16px;
- }
-}
-.btn{
- text-align: center;
- button{
- margin: 0 3px;
- }
-}
\ No newline at end of file
diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.spec.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.spec.ts
deleted file mode 100644
index 381ed6c..0000000
--- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { EntryPlanLookComponent } from './entry-plan-look.component';
-
-describe('EntryPlanLookComponent', () => {
- let component: EntryPlanLookComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ EntryPlanLookComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(EntryPlanLookComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
deleted file mode 100644
index 15f9db0..0000000
--- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
+++ /dev/null
@@ -1,988 +0,0 @@
-import { Component, OnInit, ViewChild, Inject } from '@angular/core';
-import { HttpClient,HttpHeaders } from '@angular/common/http'
-import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
-import { MatPaginator } from '@angular/material/paginator';
-import { FlatTreeControl } from '@angular/cdk/tree';
-import { FormControl } from '@angular/forms';
-import { Router,ActivatedRoute } from '@angular/router'
-import { PageEvent } from '@angular/material/paginator';
-import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-import { TreeService } from '../../http-interceptors/tree.service'
-import {FormBuilder, FormGroup, Validators} from '@angular/forms';
-import { async } from '@angular/core/testing';
-@Component({
- selector: 'app-entry-plan-look',
- templateUrl: './entry-plan-look.component.html',
- styleUrls: ['./entry-plan-look.component.scss']
-})
-export class EntryPlanLookComponent implements OnInit {
- constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
- pageEvent: PageEvent;
- private _transformer = (node, level: number) => { //初始化tree
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- children: node.children
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- myControl = new FormControl();
- hasChild = (_: number, node: any) => node.expandable;
-
- displayedColumns: string[] = ['planname', 'addpeople', 'addtime','plantype','auditstate', 'isopen','preparethelevel','operation'];
- tabledataSource:any
- //分页
- @ViewChild(MatPaginator, {static: true})
- paginator: MatPaginator;
- length:any; //共多少条数据
- pageSize:any; //每页条数
- pageSizeOptions: number[] = [10] //设置每页条数
- PageNumber:any = 1; //第几页
-
- unitdata:any = {}
-
-
-
- unittypeId:any //单位类型id
-
- //获取当前单位信息
- compantData:any
- getCompanyData () {
- let CompanyName = sessionStorage.getItem("companyName")
- let header = {
- CompanyName: CompanyName || '',
- }
- this.http.get('/api/Plans',{params:header}).subscribe((data:any)=>{
- data.items.forEach(element => {
- if (element.companyId===this.route.snapshot.queryParams.unitId) {
- this.compantData = element.company
- return } });
- // console.log(123,this.compantData)
- this.unitdata.unitname = this.compantData.name
- this.unitdata.organizationName = this.compantData.organizationName
- this.unitdata.unittype = this.compantData.buildingTypes[0].name
- this.unitdata.unitaddress = this.compantData.address
- this.unittypeId = this.compantData.buildingTypes[0].id
- })
- }
- //跳转单位信息
- lookUnitData(){
- window.open(`/keyUnit/viewunitinfo?id=${this.route.snapshot.queryParams.unitId}`)
- }
- //分页事件
- changePage(e){
- this.PageNumber = e.pageIndex+1
- this.getAllPlanComponents()
- }
- isoperation:any //判断预案录入 和 审核公开预案 区别变量
- ngOnInit(): void {
- this.tabledataSource = [
- ]
- // this.getCompanyData()
- this.isoperation = this.route.snapshot.queryParams.operation
-
-
- this.unitdata.unitname = this.route.snapshot.queryParams.unitName
- this.unitdata.organizationName = this.route.snapshot.queryParams.orName
- this.unitdata.unittype = this.route.snapshot.queryParams.unitType
- this.unitdata.unitaddress = this.route.snapshot.queryParams.unitAdd
- this.companyId = this.route.snapshot.queryParams.unitId
- this.unittypeId = this.route.snapshot.queryParams.unitTypeId
- this.getAllPlanComponents()
- }
- //查看预案
- lookPlan(e){
- if(e.planMode == 0){
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('本地文件,请下载查看','确定',config);
- }
- if(e.planMode == 1){
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('查看导入word文件','确定',config);
- }
- if(e.planMode == 2){ //如果是在线编辑
- let id = e.id
- sessionStorage.setItem("planId",id)
- sessionStorage.setItem("companyId",this.companyId)
- sessionStorage.setItem("buildingTypeId",this.unittypeId)
- sessionStorage.setItem("editable","0")
- sessionStorage.setItem("planName",e.name)
- let companyId = sessionStorage.getItem("companyId")
- window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`);
- }
- if(e.planMode == 3){ //如果是跳转网页
- sessionStorage.setItem("url",e.url)
- window.open(`/planManagement/webLook`)
- }
- }
- //编辑预案
- editPlan(e){
- if(e.planMode == 2){ //如果是在线编辑
- let id = e.id
- sessionStorage.setItem("planId",id)
- sessionStorage.setItem("companyId",this.companyId)
- sessionStorage.setItem("buildingTypeId",this.unittypeId)
- sessionStorage.setItem("editable","1")
- sessionStorage.setItem("planName",e.name)
- let companyId = sessionStorage.getItem("companyId")
- window.open(`/keyUnit/editunitinfo?id=${companyId}`);
- }
- }
- allPlanComponents:any //所有预案组件
- companyId : any //新建预案需要使用的id
- planId : any //统一预案id
- //改名
- changeName(element){
- // console.log(element)
- const dialogRef = this.dialog.open(ChangeName, {
- data: {element:element}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('修改成功!','确定',config);
- this.getAllPlanComponents()
- }
- }
- );
- }
- //获得所有预案组件
- getAllPlanComponents(){
- let pagetype = this.route.snapshot.queryParams.pagetype
- let unitId = this.route.snapshot.queryParams.unitId
- let paramsData:any
- if(pagetype == 'entryplan'){
- paramsData = {
- companyId:unitId,
- pageNumber: this.PageNumber,
- pageSize: "",
- sort: ""
- }
- }
- if(pagetype == 'passplan'){
- paramsData = {
- companyId:unitId,
- pageNumber: this.PageNumber,
- pageSize: "",
- AuditStatus:2,
- sort: ""
- }
- }
- if(pagetype == 'openplan'){
- paramsData = {
- companyId:unitId,
- pageNumber: this.PageNumber,
- pageSize: "",
- IsPublic:true,
- sort: ""
- }
- }
-
- this.http.get("/api/PlanComponents",{params:paramsData}).subscribe((data:any)=>{
- this.length = data.totalCount
- this.allPlanComponents = data
- this.tabledataSource = data.items
- })
- }
- //删除预案
- deletePlan(plandata){
-
- let isTrue = confirm('您确定要删除吗')
- if (isTrue) {
- if(plandata.planType == 1){//如果删除的是二维预案
- this.http.delete(`/api/PlanComponents2D/${plandata.id}`).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('删除成功!','确定',config);
- this.getAllPlanComponents()
- })
- }else{
- this.http.delete(`/api/PlanComponents/${plandata.id}`).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('删除成功!','确定',config);
- this.getAllPlanComponents()
- })
- }
- }
-
- }
- //提交审核
- submitAudit(element){
- // console.log(element)
- if(element.auditStatus == 4){
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!','确定',config);
- }else{
- if(element.planType == 1){//如果提交审核的是二维预案
- this.http.put(`/api/PlanComponents2D/${element.id}/Commit`,"").subscribe(data=>{
- this.getAllPlanComponents()
- })
- }else{
- this.http.put(`/api/PlanComponents/${element.id}/Commit`,"").subscribe(data=>{
- this.getAllPlanComponents()
- })
- }
- }
-
- }
- //撤销审核
- cancelAudit(element){
- if(element.planType == 1){//如果撤销审核的是二维预案
- this.http.put(`/api/PlanComponents2D/${element.id}/Cancel`,"").subscribe(data=>{
- this.getAllPlanComponents()
- })
- }else{
- this.http.put(`/api/PlanComponents/${element.id}/Cancel`,"").subscribe(data=>{
- this.getAllPlanComponents()
- })
- }
- }
- //审核结果
- auditResult(element){
- // console.log(element)
- const dialogRef = this.dialog.open(AuditResult, {
- width:"395px",
- data: {element:element}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
-
- }
- }
- );
-
- }
-
- //下载↓
- selectDownloadFile:any; //选择下载的文件
- download:any; //下载文件元数据
- downloadisLoading:boolean = false; //进度条loading加载
- downloadProgress:number=0; //进度条进度
- downloadFileName:any
-
-
- uploadFileLonging:any
- //读取下载文件信息
- readFile (element) {
- this.uploadFileLonging = element
- const dialogRef = this.dialog.open(DownloadFile, {
- width:"435px",
- // height:"410px",
- data: {fileUrls:element.attachmentUrls,compantData:this.unitdata.unitname,element:element}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
- this.downloadFileName = data.fileName
- this.download = data
- this.downloadFile()
- }
- }
- );
- }
-
- //初始化下载
- downloadFile () {
- this.downloadProgress = 0
- let file = this.download
- let fileSize = file.fileLength//下载文件的总大小
- let shardSize = 10 * 1024 * 1024 //文件大小是否大于10MB
-
- if (file && fileSize<=shardSize) { //<=10MB时直接下载
- this.downloadisLoading = true
- // this.setFileLoading()
- this.http.get(`/api/Objects/PlanPlatform/${file.objectName}`,{responseType: 'blob'},).subscribe(data=>{
-
- let url = window.URL.createObjectURL(new Blob([data])); //createObjectURL创建一个下载Blob的url地址
- let link = document.createElement("a");
- link.style.display = "none";
- link.href = url;
-
- let suffix = file.objectName.substring(file.objectName.lastIndexOf(".")+1,file.objectName.length) ;
- link.setAttribute("download", file.fileName ? file.fileName : this.unitdata.unitname + "-" +this.uploadFileLonging.name + "." + suffix);
- document.body.appendChild(link);
- link.click();
- this.downloadisLoading = false
- // this.setFileLoading()
- })
- } else if (file && fileSize > shardSize) { //>10MB时分块下载
- this.blockingDownload() //分段下载
- this.downloadisLoading = true
- // this.setFileLoading()
- }
-
- }
-
- //分段下载并合并
- async blockingDownload () {
- let file = this.download
- let fileSize = file.fileLength //下载文件的总大小
- let shardSize = 3 * 1024 * 1024 //3MB一个分片
- let allSlice = Math.ceil(fileSize / shardSize) //总文件/3MB===共分多少段
- let allFile:any = [] //所有的file分段
-
- for (let i=0;i{
- this.http.get(`/api/Objects/PlanPlatform/${file.objectName}`,{headers:{'range':`bytes= ${start}-${end}`},responseType:'blob'}).subscribe(data=>{
- result(data) })
- })
- allFile.push(result)
- this.downloadProgress = Number((i/allSlice).toFixed(2))*100
-
- if (allFile.length === allSlice) { //合并文件输出给浏览器
- let url = window.URL.createObjectURL(new Blob(allFile)); //createObjectURL创建一个下载Blob的url地址
- let link = document.createElement("a");
- link.style.display = "none";
- link.href = url;
- let suffix = file.objectName.substring(file.objectName.lastIndexOf(".")+1,file.objectName.length) ;
- link.setAttribute("download", file.fileName ? file.fileName : this.unitdata.unitname + "-" +this.uploadFileLonging.name + "." + suffix);
- document.body.appendChild(link);
- link.click();
- // this.downloadProgress = 0
- this.downloadisLoading = false
- // this.setFileLoading()
- }
-
- } //for循环
-
- }
-
- //取消分块下载
- cancelDowload () {
- }
-
- //封装函数设置当前文件loading状态
- setFileLoading () {
- // let id = this.selectDownloadFile.id
- // this.CADList.forEach(element => {
- // if (element.id === id) { element.loading = !element.loading }
- // });
- }
-
- //新建预案弹出框
- addplan () {
- const dialogRef = this.dialog.open(AddPlanone, {
- width:"585px",
- height:"410px",
- data: {companyId:this.companyId},
- disableClose:true
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
- // this.route.snapshot.queryParams.id = data.planId
- this.planId = data.planId
- this.getAllPlanComponents()
- if(data.planMode == 2){//如果添加方式为在线编辑
- sessionStorage.setItem("planId",data.id);
- sessionStorage.setItem("companyId",this.companyId)
- sessionStorage.setItem("buildingTypeId",this.unittypeId)
- sessionStorage.setItem("editable","1")
- let companyId = sessionStorage.getItem("companyId")
- window.open(`/keyUnit/editunitinfo?id=${companyId}`);
- }
- }
- }
- );
- }
-}
-
-
-//新建预案弹出框
-@Component({
- selector: 'AddPlanone',
- templateUrl: './AddPlanone.html',
- styleUrls: ['./entry-plan-look.component.scss']
-})
-export class AddPlanone {
- isLinear = true; //是否为线性步进器
- firstFormGroup: FormGroup;
- secondFormGroup: FormGroup;
- constructor(private _formBuilder: FormBuilder,private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar,private tree: TreeService) {}
-
-
-
- ngOnInit(): void {
-
- this.firstFormGroup = this._formBuilder.group({
- firstCtrlone: ['', Validators.required],
- firstCtrltwo: ['', Validators.required]
- });
- this.secondFormGroup = this._formBuilder.group({
- secondCtrl: ['', Validators.required]
- });
-
- }
- onNoClick(): void {
- this.dialogRef.close();
- }
- isup:boolean = true //上传input框是否显示
- isweb:boolean = false //web输入框是否显示
- isinput:boolean = false //导入是否显示
- defaultisshow = '0' //默认显示上传input框
- //选择radio
- selectradio(e){
- if(e.value == "0"){ //如果点击本地上传
- this.isup = true
- this.isinput = false
- this.isweb = false
- this.webaddress = ""
- }
- if(e.value == "1"){ //如果点击导入word文档
- this.isinput = true
- this.isup = false
- this.isweb = false
- this.webaddress = ""
- }
- if(e.value == "2"){ //如果点击在线编辑
- this.isinput = false
- this.isup = false
- this.isweb = false
- this.webaddress = ""
- }
- if(e.value == "3"){ //如果点击输入网址
- this.isweb = true
- this.isup = false
- this.isinput = false
- this.webaddress = ""
- }
- }
- file2:any = null; //导入的文件
- webaddress:any = "" //输入的网页地址
-
- //上传文件↓
- file:any; //上传的文件
- fileName:any; //上传文件name
- uploadisLoading:boolean = false; //进度条loading加载
- uploadProgress:number=0; //进度条进度
- objectName:any; //上传对象名
- uploadId:any; //上传分块上传事件编号
- //上传文件input
- filechange(e){
- this.file = e.target.files[0] || null //上传的文件
- // this.startUploading()
-}
-
- //上传文件
- startUploading (planType) {
-
- let file = this.file || null //获取上传的文件
- let fileSize = file.size || null //上传文件的总大小
- let shardSize = 5 * 1024 * 1024 //5MB一个分片
-
- if (file && fileSize<=shardSize) { //上传文件<=5MB时
- let formData = new FormData()
- formData.append("file",file)
- this.http.post(`/api/Objects/PlanPlatform/${this.data.companyId}/2D`,formData).subscribe((data:any)=>{
- this.objectName = data.objectName
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('上传成功!','确定',config);
- this.uploadover = true
-
- let level = sessionStorage.getItem("level")
- // console.log(level)
- let PlanLevel
- if(level == '0'){
- PlanLevel = 1
- }
- if(level == '1'){
- PlanLevel = 2
- }
- if(level == '2'){
- PlanLevel = 4
- }
- if(level == '3'){
- PlanLevel = 8
- }
- let uploadUrl
- if(planType == "非二维"){
- uploadUrl = "/api/PlanComponents"
- }else{
- uploadUrl = "/api/PlanComponents2D"
- }
- if(this.uploadover){
- this.http.post(uploadUrl,{
- id: "",
- name: this.selectedPLanName,
- planType:Number(this.selectedPLanType),
- planMode: Number(this.defaultisshow),
- planLevel: PlanLevel,
- url: "",
- attachmentUrls: [`${this.objectName}`]
- },{params:{
- companyId : this.data.companyId
- }}).subscribe(data=>{
- this.dialogRef.close(data);
- })
- }else{
- console.log("上传出错")
- }
-
- })
- } else if (file && fileSize>shardSize) { //上传文件>5MB时,分块上传
- let data = {filename: file.name}
- this.uploadisLoading = true
- this.http.post(`/api/NewMultipartUpload/PlanPlatform/${this.data.companyId}/2D`,{},{params:data}).subscribe((data:any)=>{ //初始化分段上传
- this.objectName = data.objectName
- this.uploadId = data.uploadId
- this.subsectionUploading(planType)
- })
- }
-
- }
-
- PartNumberETag:any=[]; //每次返回需要保存的信息
- //开始分段上传
- async subsectionUploading (planType) {
- let file = this.file || null //获取上传的文件
- let fileSize = file.size || null //上传文件的总大小
- let shardSize = 5 * 1024 * 1024 //5MB一个分片
- let allSlice = Math.ceil(fileSize / shardSize) //总文件/5MB===共分多少段 向上取整
-
- for (let i = 0;i < allSlice;i++) { //循环分段上传
- let start = i * shardSize //切割文件开始位置
- let end = Math.min(fileSize, start + shardSize); //切割文件结束位置 (对比取小数)
- let formData = new FormData()
- formData.append("file",file.slice(start, end))
-
- //同步写法实现异步调用
- let result = await new Promise((resolve, reject) => {
- // await 需要后面返回一个 promise 对象
- this.http.post(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}&partNumber=${i+1}`,formData).subscribe((data:any)=>{
- let msg = {
- "partNumber":data.partNumber || null,
- "eTag": data.eTag || null}
- resolve(msg) // 调用 promise 内置方法处理成功
- })
- });
- this.PartNumberETag.push(result)
- this.uploadProgress = Number((i/allSlice).toFixed(2))*100
-
- if (this.PartNumberETag.length === allSlice) {
- this.uploadProgress = 100
- this.endUploading(planType)}
- }//for循环
-
- }
- uploadover:any = false //上传完成之后提示
- //完成分块上传
- endUploading (planType) {
- let data = this.PartNumberETag
- let paramsData = {uploadId:this.uploadId}
- this.http.post(`/api/CompleteMultipartUpload/PlanPlatform/${this.objectName}`,data,{params:paramsData}).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('上传成功!','确定',config);
- this.uploadProgress = 0;
- this.uploadisLoading = false
- this.PartNumberETag =[] //清空保存返回的信息
- this.uploadover = true
- let level = sessionStorage.getItem("level")
- // console.log(level)
- let PlanLevel
- if(level == '0'){
- PlanLevel = 1
- }
- if(level == '1'){
- PlanLevel = 2
- }
- if(level == '2'){
- PlanLevel = 4
- }
- if(level == '3'){
- PlanLevel = 8
- }
- let uploadUrl
- if(planType == "非二维"){
- uploadUrl = "/api/PlanComponents"
- }else{
- uploadUrl = "/api/PlanComponents2D"
- }
- if(this.uploadover){//如果上次成功了才创建
- this.http.post(uploadUrl,{
- id: "",
- name: this.selectedPLanName,
- planType:Number(this.selectedPLanType),
- planMode: Number(this.defaultisshow),
- planLevel: PlanLevel,
- url: "",
- attachmentUrls: [`${this.objectName}`]
- },{params:{
- companyId : this.data.companyId
- }}).subscribe(data=>{
- this.dialogRef.close(data);
- })
- }else{
- console.log("上传出错!")
- }
-
- })
- }
-
- //取消分块上传
- cancel () {
- this.http.delete(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}`).subscribe(data=>{
- this.uploadProgress = 0;
- this.uploadisLoading= false;
- (document.getElementById('uploadFile')).value = null
- this.PartNumberETag =[] //清空保存返回的信息
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('取消上传成功!','确定',config);
- this.uploadover = false
- this.file = null
- })
- }
-
-
-
-
-
- //导入word文件
- fileInput(e){
- this.file2 = e.target.files[0]
- }
- //点击下一步
- selectedPLanType:any//所选预案类型
- selectedPLanName:any//所选预案名称
- localup:boolean = false //本地上传
- inputword:boolean = false //导入文档
- onlineedit:boolean = false //在线编辑
- website:boolean = false //网页地址
- next(formdata){
- // console.log(formdata.value.firstCtrltwo)
- this.selectedPLanName = formdata.value.firstCtrlone
- this.selectedPLanType = formdata.value.firstCtrltwo
- if(formdata.value.firstCtrltwo=='8'){ //如果是卡片预案
- this.localup = true
- this.inputword = true
- this.onlineedit = false
- this.website = false
- }
- if(formdata.value.firstCtrltwo=='1'){ //如果是2D预案
- this.localup = true
- this.inputword = false
- this.onlineedit = true
- this.website = true
- }
- if(formdata.value.firstCtrltwo=='2' || formdata.value.firstCtrltwo=='4'){
- this.localup = true
- this.inputword = false
- this.onlineedit = false
- this.website = true
- }
- }
- closediv(){
- this.cancel();
- this.dialogRef.close();
- }
-
-
-
- // 提交创建
- onSubmit(value){
- let level = sessionStorage.getItem("level")
- // console.log(level)
- let PlanLevel
- if(level == '0'){
- PlanLevel = 1
- }
- if(level == '1'){
- PlanLevel = 2
- }
- if(level == '2'){
- PlanLevel = 4
- }
- if(level == '3'){
- PlanLevel = 8
- }
- if(this.selectedPLanType != "1"){//如果创建的不是二维预案
- if(this.defaultisshow == '0' && this.file == null){ //如果是本地上传
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请先上传文件','确定',config);
- }
- if(this.defaultisshow == '0' && this.file){ //如果是本地上传并且有文件
- //先上传成功
- this.startUploading("非二维")
-
- //再创建预案
- // this.http.post("/api/PlanComponents",{
- // id: "",
- // name: this.selectedPLanName,
- // planType:Number(this.selectedPLanType),
- // planMode: Number(this.defaultisshow),
- // planLevel: PlanLevel,
- // url: "",
- // attachmentUrls: [`${this.objectName}`]
- // },{params:{
- // companyId : this.data.companyId
- // }}).subscribe(data=>{
- // this.dialogRef.close(data);
- // })
- }
-
- if(this.defaultisshow == '1'){//如果是导入则很复杂
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('暂不支持导入','确定',config);
- }
- if(this.defaultisshow == '3' && (this.webaddress == "" || this.webaddress == null)){ //如果是填写网址
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请先输入网址','确定',config);
- }
- if(this.defaultisshow == '3' && this.webaddress){ //如果是填写网址
- // console.log(99999,this.selectedPLanType)
- var reg = new RegExp('(http|https):\/\/([\w.!@#$%^&*()_+-=])*\s*')
- if(reg.test(this.webaddress)){
- let body = {
- id: "",
- name: this.selectedPLanName,
- planType:Number(this.selectedPLanType),
- planMode: Number(this.defaultisshow),
- planLevel: PlanLevel,
- url: this.webaddress,
- attachmentUrls: null
- }
- this.http.post("/api/PlanComponents",body,{params:{
- companyId : this.data.companyId
- }}).subscribe(data=>{
- // console.log("创建成功")
- this.dialogRef.close(data);
- })
- }else{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写正确网址格式,需以http://或者https://开头的正确网址','确定',config);
- }
-
- }
- }else{ //如果创建的是二维预案
- if(this.defaultisshow == '0' && this.file == null){ //如果是本地上传
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请先上传文件','确定',config);
- }
- if(this.defaultisshow == '0' && this.file){
- this.startUploading("二维")
- // let body = {
- // id: "",
- // name: this.selectedPLanName,
- // planType:Number(this.selectedPLanType),
- // planMode: Number(this.defaultisshow),
- // planLevel: PlanLevel,
- // url: "",
- // attachmentUrls: [`${this.objectName}`]
- // }
- // this.http.post("/api/PlanComponents2D",body,{params:{
- // companyId : this.data.companyId
- // }}).subscribe(data=>{
- // // console.log("创建成功")
- // this.dialogRef.close(data);
- // })
- }
- if(this.defaultisshow == '2'){ //如果是在线编辑------>跳转编制工具
- let body = {
- id: "",
- name: this.selectedPLanName,
- planType:Number(this.selectedPLanType),
- planMode: Number(this.defaultisshow),
- planLevel: PlanLevel,
- url: "",
- attachmentUrls: null
- }
- this.http.post("/api/PlanComponents2D",body,{params:{
- companyId : this.data.companyId
- }}).subscribe(data=>{
- // console.log("创建成功")
- this.dialogRef.close(data);
- })
- }
- if(this.defaultisshow == '3' && (this.webaddress == "" || this.webaddress == null)){ //如果是填写网址
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请先输入网址','确定',config);
- }
- if(this.defaultisshow == '3' && this.webaddress){ //如果是填写网址
-
- var reg = new RegExp('(http|https):\/\/([\w.!@#$%^&*()_+-=])*\s*')
- if(reg.test(this.webaddress)){
- let body = {
- id: "",
- name: this.selectedPLanName,
- planType:Number(this.selectedPLanType),
- planMode: Number(this.defaultisshow),
- planLevel: PlanLevel,
- url: this.webaddress,
- attachmentUrls: null
- }
- this.http.post("/api/PlanComponents2D",body,{params:{
- companyId : this.data.companyId
- }}).subscribe(data=>{
- // console.log("创建成功")
- this.dialogRef.close(data);
- })
- }else{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写正确网址格式,需以http://或者https://开头的正确网址','确定',config);
- }
-
-
-
- }
-
- }
- }
- onSubmit2(value){
- console.log(this.webaddress)
- var reg = new RegExp('(http|https):\/\/([\w.!@#$%^&*()_+-=])*\s*')
- console.log(reg.test(this.webaddress))
- }
-
-}
-
-
-
-
-
-
-
-//下载文件弹出框
-@Component({
- selector: 'downloadfile',
- templateUrl: './downloadFile.html',
- styleUrls: ['./entry-plan-look.component.scss']
-})
-export class DownloadFile {
-
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
- fileUrls:any //当前预案附件地址
- fileDatas:any = []
- selectedFileIndex : any = 0
- selectedFileData : any
-
- name2:any //如果真实姓名为空时
- ngOnInit(): void {
- this.name2 = this.data.element.name
- this.fileUrls = this.data.fileUrls
- this.fileUrls.forEach(item=>{
- this.http.get('/api/ObjectMetadata/PlanPlatform/'+item).subscribe((data:any)=>{
- data.filePige = (data.fileLength / (1024*1024)).toFixed(2)
- this.fileDatas.push(data)
- this.selectedFileData = data
- })
- })
- }
- onNoClick(): void {
- this.dialogRef.close();
- }
-
- confirm(){
- this.dialogRef.close(this.selectedFileData);
- }
-
- //点击想要下载的文件
- addurl(item,key){
- console.log(item,key)
- this.selectedFileIndex = key
- this.selectedFileData = item
- }
-}
-
-
-//审批结果弹出框
-@Component({
- selector: 'auditresult',
- templateUrl: './auditresult.html',
- styleUrls: ['./entry-plan-look.component.scss']
-})
-export class AuditResult {
-
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
-
- planName:any = this.data.element.name
- commitTime:any = this.data.element.committedTime
- commitOrganizationName:any = this.data.element.committerOrganizationName
-
- auditOrganizationName:any = this.data.element.auditorOrganizationName
- auditResult:any = this.data.element.auditStatus
- auditOpinion:any = this.data.element.auditOpinion
- ngOnInit(): void {
-
- }
- onNoClick(): void {
- this.dialogRef.close();
- }
-}
-
-
-//改名弹出框
-@Component({
- selector: 'changename',
- templateUrl: './changename.html',
- styleUrls: ['./entry-plan-look.component.scss']
-})
-export class ChangeName {
-
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
- planName:any//预案名称
- ngOnInit(): void {
- this.planName = this.data.element.name
- }
- onNoClick(): void {
- this.dialogRef.close();
- }
- onSubmit(value){
- let headers = new HttpHeaders({
- 'Content-Type': 'text/json'
- });
- let options = {
- headers
- };
- let body = JSON.stringify(value.name);
- if(this.data.element.planType == 1){//如果是二维预案
- this.http.put(`/api/PlanComponents2D/${this.data.element.id}`,body,options).subscribe(data=>{
- this.dialogRef.close("success");
- })
- }else{
- this.http.put(`/api/PlanComponents/${this.data.element.id}`,body,options).subscribe(data=>{
- this.dialogRef.close("success");
- })
- }
- }
-}
\ No newline at end of file
diff --git a/src/app/plan-management/entry-plan/entry-plan.component.html b/src/app/plan-management/entry-plan/entry-plan.component.html
deleted file mode 100644
index ab20216..0000000
--- a/src/app/plan-management/entry-plan/entry-plan.component.html
+++ /dev/null
@@ -1,258 +0,0 @@
-
-
-
-
-
-
-
- 单位名称
- {{element.company.name}}
-
-
-
- 辖区中队
- {{element.company.organizationName}}
-
-
-
- 单位类型
- {{element.company.buildingTypes[0] ? element.company.buildingTypes[0].name : ''}}
-
-
- 预案类型
- {{element.planType}}
-
-
- 审核状态
- {{element.auditStatus}}
-
-
- 编制级别
- {{element.planLevel}}
-
-
- 操作
-
- 查看预案
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/plan-management/entry-plan/entry-plan.component.scss b/src/app/plan-management/entry-plan/entry-plan.component.scss
deleted file mode 100644
index 42c10c8..0000000
--- a/src/app/plan-management/entry-plan/entry-plan.component.scss
+++ /dev/null
@@ -1,231 +0,0 @@
-.header {
- width: 100%;
- padding: 12px 10px;
-// margin-bottom: 10px;
- box-sizing: border-box;
-// border-bottom: 1px solid black;
- .queryBox {
- box-sizing: border-box;
- padding: 5px 25px;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-items:center;
- // justify-content:center;
- .queryField {
- margin: 3px 40px;
- input {
- width: 180px;
- height: 22px;
- line-height: 22px;
- border-radius: 3px;}
- }
-
- } //queryBox
- .ordiv{
- position: relative;
-
- .organizationbox{
- width:450px;
- height: 200px;
- background: white;
- position: absolute;
- top: 48px;
- left: 77px;
- z-index: 999;
- border: 1px solid grey;
- overflow-y: auto;
- background-color: #fafafa;
- li{
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- background-color: #fafafa;
- }
- mat-tree-node{
- cursor: pointer;
- white-space:pre;
- background-color: #fafafa;
- }
- mat-tree-node:hover{
- background: rgba(225, 225, 225, 0.8);
- li{
- background: rgba(225, 225, 225, 0.8);
- }
- }
- .closediv{
- z-index: 100;
- position: absolute;
- right: 0;
- top: 0;
- width: 30px;
- height: 30px;
- cursor: pointer;
- line-height: 30px;
- text-align: center;
- }
- .closediv:hover{
- background:rgba(225, 225, 225, 0.8);
- }
- }
-
- }
-}
-.body{
- .buttonbox{
- padding-left: 50px;
- button{
- margin:0 10px
- }
- }
- .tablebox{
- table{
- width: 100%;
- margin-left: 0%;
- margin-top:15px;
- }
- mat-paginator{
- width: 100%;
- margin-left: 0%;
- // margin-top: 30px;
- }
- }
-}
-
-.mat-header-cell{
- text-align: center;
-}
-.mat-cell{
- text-align: center;
- span{
- color:red;
- margin: 0 3px;
- cursor: pointer;
- }
- span:hover{
- text-decoration:underline
- }
- .grey{
- color: grey;
- pointer-events: none;
- }
-}
-
-//完整度
-.integrityDiv{
- width: 180px;
- height: 30px;
- background-color: #e2e7ee;
- margin: 0 auto;
- position: relative;
- .integrityNum{
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- color: black;
- font-weight: 800;
- font-size: 15px;
- cursor: default;
- }
- .integrityColorDiv{
- height: 100%;
- // background-color: #32cd32;
- }
- .integrityDetails{
- position: absolute;
- display: none;
- width: 350px;
- height:280px;
- border: 1px solid rgba(0, 0, 0, 0.22);
- background-color: white;
- .integrityDetailsTop{
- width: 100%;
- height: 23px;
- line-height:23px;
- border-bottom: 1px solid rgba(0, 0, 0, 0.22);
- margin-bottom: 1px;
- font-size: 14px;
- span{
- display: inline-block;
- text-align: center;
- font-weight: 800;
- margin: 0;
- color: black;
- }
- .span1{
- width: 25%;
- }
- .span2{
- width: 60%;
- }
- .span3{
- width: 15%;
- }
- }
- .integrityDetailsBody{
- ul{
- li{
- width: 100%;
- height: 23px;
- line-height: 23px;
- margin: 3px 0;
- div{
- float: left;
- font-size: 13px;
- }
- .name{
- width: 25%;
- height: 100%;
- }
- .colorDiv{
- width: 60%;
- height: 100%;
- position: relative;
- .colorDivBac{
- width: 90%;
- height: 100%;
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%,-50%);
- background-color: #dfe5ec;
- border-radius: 5px;
- .colorDivCon{
- border-radius: 5px;
- height: 100%;
- background-color: #2398f1;
- }
- }
- span{
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%,-50%);
- color: black;
- font-weight: 600;
- }
- }
- .number{
- width: 15%;
- height: 100%;
- }
- }
- }
-
- }
- }
- .bottomposition{
- top: 2px;
- left: 188px;
- }
- .topposition{
- top: -252px;
- left: 188px;
- }
-}
-.integrityDiv:hover{
- .integrityDetails{
- display: block;
- }
-}
\ No newline at end of file
diff --git a/src/app/plan-management/entry-plan/entry-plan.component.spec.ts b/src/app/plan-management/entry-plan/entry-plan.component.spec.ts
deleted file mode 100644
index 8b4ef5a..0000000
--- a/src/app/plan-management/entry-plan/entry-plan.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { EntryPlanComponent } from './entry-plan.component';
-
-describe('EntryPlanComponent', () => {
- let component: EntryPlanComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ EntryPlanComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(EntryPlanComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/plan-management/entry-plan/entry-plan.component.ts b/src/app/plan-management/entry-plan/entry-plan.component.ts
deleted file mode 100644
index 4695575..0000000
--- a/src/app/plan-management/entry-plan/entry-plan.component.ts
+++ /dev/null
@@ -1,256 +0,0 @@
-import { Component, OnInit, ViewChild, Inject } from '@angular/core';
-import { HttpClient } from '@angular/common/http'
-import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
-import { MatPaginator } from '@angular/material/paginator';
-import { FlatTreeControl } from '@angular/cdk/tree';
-import { FormControl } from '@angular/forms';
-import { Router,ActivatedRoute } from '@angular/router'
-import { PageEvent } from '@angular/material/paginator';
-import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-import { TreeService } from '../../http-interceptors/tree.service'
-import { ConstantPool } from '@angular/compiler';
-@Component({
- selector: 'app-entry-plan',
- templateUrl: './entry-plan.component.html',
- styleUrls: ['./entry-plan.component.scss']
-})
-export class EntryPlanComponent implements OnInit {
-
- constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
-
- private _transformer = (node, level: number) => { //初始化tree
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- children: node.children
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- myControl = new FormControl();
- hasChild = (_: number, node: any) => node.expandable;
- //分页
- @ViewChild(MatPaginator, {static: true})
- pageEvent: PageEvent;
- paginator: MatPaginator;
- length:any; //共多少条数据
- pageSize:any; //每页条数
- pageSizeOptions: number[] = [10] //设置每页条数
- PageNumber:any; //第几页
-
-
-
- displayedColumns: string[] = ['unitname', 'jurisdictionsquadron', 'unittype','plantype', 'passstate','projectlevel','operation'];
- allorganizations:any //所有组织机构
- allunittype:any //所有单位类型
- tabledataSource:any //表格数据
-
- organizationName:any //当前单位组织机构名称
- preparelevels:any
- integrity(width){
- let style:any = {}
- style.width = width*10 +'%';
- if(width < 4){
- style.background = "#FF4500";
- }
- if(width >= 4 && width <7){
- style.background = "#FF8C00";
- }
- if(width >= 7){
- style.background = "#32cd32";
- }
- return style
- }
- integrityDetails(width,zong){
- let style:any = {}
- style.width = (width/zong)*100 +'%';
- return style
- }
- ngOnInit(): void {
- this.getunitdata();
- this.getOrganizations();
- this.getUnittype();
- this.getAllPlanInfo();
- let level = sessionStorage.getItem("level");
- if(level == "0"){//如果是总队
- this.preparelevels = [
- {name:"总队",value:"1"},
- {name:"支队",value:"2"},
- {name:"大队",value:"4"},
- {name:"中队",value:"8"}
- ]
- }
- if(level == "1"){//如果是支队
- this.preparelevels = [
- {name:"支队",value:"2"},
- {name:"大队",value:"4"},
- {name:"中队",value:"8"}
- ]
- }
- if(level == "2"){//如果是大队
- this.preparelevels = [
- {name:"大队",value:"4"},
- {name:"中队",value:"8"}
- ]
- }
- if(level == "3"){//如果是中队
- this.preparelevels = [
- {name:"中队",value:"8"}
- ]
- }
- }
-
-
-
- //得到当前单位信息
- getunitdata(){
- this.http.get("/api/Account/Profiles").subscribe(
- (data:any)=>{
- this.organizationName = data.organizationName
- }
- )
- }
- treedata:any //组织机构树型数据
- newArr:any = []
- newallorganizations:any //用于存储在原始数据基础上的每个机构增加children字段
- //得到当前单位所在组织机构的tree型数据
- getpresentOrganization(){
- this.newallorganizations = this.allorganizations
-
- this.newallorganizations.forEach(item => {
- item.children = []
- this.newallorganizations.forEach(element => {
- if(element.parentId == item.id){
- item.children.push(element)
- }
- });
- });
- this.http.get("/api/Account/Profiles").subscribe(
- (data:any)=>{
- this.organizationName = data.organizationName
- if(this.organizationName){
- this.newallorganizations.forEach(item => {
- if(item.name == this.organizationName){
- this.dataSource.data = [item]
- }
- });
- }else{
- this.dataSource.data = this.tree.toTree(this.treedata);
- }
- }
- )
-
-
- }
- //获得所有组织机构
- getOrganizations(){
- this.http.get('/api/Organizations').subscribe(
- (data:any)=>{
- this.allorganizations = data
- this.treedata = this.tree.toTree(data);
- this.getpresentOrganization();
- }
- )
- }
- //获得所有单位类型
- getUnittype(){
- this.http.get('/api/BuildingTypes/Simple').subscribe(
- data=>{
- this.allunittype = data
- }
- )
- }
-
- //分页事件
- chagePage(e){
- this.PageNumber = e.pageIndex+1
- this.getAllPlanInfo();
- }
- //辖区中队div是否显示
- isorganizationbox:boolean = false
- //点击辖区中队树,将选择的辖区中队添加到变量
- add(node) {
- this.isorganizationbox = false
- this.js = node.name
- this.jsId = node.id
- }
- //打开辖区中队隐藏框
- openorganizationbox() {
- this.isorganizationbox = true
- }
- //关闭出现的组织机构div
- closediv(){
- this.isorganizationbox = false
- }
-
- allPlanInfo:any //存储所有预案信息
- //获得所有预案信息
- getAllPlanInfo(){
- let paramsdata:any = {
- CompanyName: this.companyName || '',
- OrganizationId: this.jsId || '',
- HasChildrenOrganization:this.jscheck || '',
- BuildingTypeId: this.unittype || '',
- PlanType: this.reservePlanType || '',
- AuditStatus: this.toExamine || '',
- PlanLevel: this.preparelevel || '',
- HasChildrenPlanLevel: this.plcheck || '',
- PageNumber: this.PageNumber || '1',
- PageSize: this.pageSizeOptions[0],
- Sort: ''
- }
- this.http.get("/api/Plans",{params:paramsdata}).subscribe((data:any)=>{
-
- this.length = data.totalCount
- this.allPlanInfo = data
-
- this.tabledataSource = data.items
- })
- }
-
-
- //查看预案按钮跳转
- routerTo(element){
- // console.log(element)
- sessionStorage.setItem("companyName",element.company.name)
- window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=true&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}`);
- }
- //查询
- onSubmit (value) {
- this.PageNumber = 1
- this.pageEvent.pageIndex = 0
- this.getAllPlanInfo();
- }
-
- companyName:any //单位名称
- js:any //所选组织机构
- jsId:any //所选组织机构的id
- jscheck:boolean //所选组织机构勾选框
- unittype:any //单位类型
- reservePlanType:any //预案类型
- toExamine:any //审核状态
- preparelevel:any //编制级别
- plcheck:boolean //编制级别勾选框
- //重置
- reset(){
- this.companyName = ''
- this.js = ''
- this.jsId = ''
- this.jscheck = false
- this.unittype = ''
- this.reservePlanType = ''
- this.toExamine = ''
- this.preparelevel = ''
- this.plcheck = false
- //重新获取初始化列表
- // console.log(this.pageEvent)
- this.pageEvent.pageIndex = 0
- this.PageNumber = 1
- this.getAllPlanInfo();
- }
-}
diff --git a/src/app/plan-management/open-plan/open-plan.component.html b/src/app/plan-management/open-plan/open-plan.component.html
deleted file mode 100644
index 308e872..0000000
--- a/src/app/plan-management/open-plan/open-plan.component.html
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
-
-
- 单位名称
- {{element.companyName}}
-
-
- 预案名称
- {{element.name}}
-
-
- 添加人
- {{element.creatorName}}
-
-
- 添加时间
- {{element.creationTime | date:'yyyy-MM-dd'}}
-
-
- 预案类型
- {{element.planType | plantype}}
-
-
- 审核状态
- {{element.auditStatus | auditsatus}}
-
-
-
- 是否公开
- {{element.openRange}}
-
-
- 编制级别
- {{element.planLevel | planlevel}}
-
-
- 操作
-
- 查看预案
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/app/plan-management/open-plan/open-plan.component.scss b/src/app/plan-management/open-plan/open-plan.component.scss
deleted file mode 100644
index dc9f5c8..0000000
--- a/src/app/plan-management/open-plan/open-plan.component.scss
+++ /dev/null
@@ -1,84 +0,0 @@
-.header {
- width: 100%;
- padding: 12px 10px;
- // margin-bottom: 10px;
- box-sizing: border-box;
- // border-bottom: 1px solid black;
- .queryBox {
- box-sizing: border-box;
- padding: 5px 25px;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-items:center;
- // justify-content:center;
- .queryField {
- margin: 3px 40px;
- input {
- width: 180px;
- height: 22px;
- line-height: 22px;
- border-radius: 3px;}
- }
-
- } //queryBox
- .ordiv{
- position: relative;
-
- .organizationbox{
- width:450px;
- height: 200px;
- background: white;
- position: absolute;
- top: 48px;
- left: 77px;
- z-index: 999;
- border: 1px solid grey;
- overflow-y: auto;
- li{
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- mat-tree-node{
- cursor: pointer;
- white-space:pre;
- }
- mat-tree-node:hover{
- background: rgba(225, 225, 225, 0.8);
- }
- .closediv{
- z-index: 100;
- position: absolute;
- right: 0;
- top: 0;
- width: 30px;
- height: 30px;
- cursor: pointer;
- line-height: 30px;
- text-align: center;
- }
- .closediv:hover{
- background:rgba(225, 225, 225, 0.8);
- }
- }
-
- }
- }
- .body{
- .buttonbox{
- padding-left: 50px;
- button{
- margin:0 10px
- }
- }
- .tablebox{
- table{
- width: 100%;
- margin-top: 15px;
- }
- mat-paginator{
- width: 100%;
- }
- }
- }
\ No newline at end of file
diff --git a/src/app/plan-management/open-plan/open-plan.component.spec.ts b/src/app/plan-management/open-plan/open-plan.component.spec.ts
deleted file mode 100644
index 9a257ca..0000000
--- a/src/app/plan-management/open-plan/open-plan.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { OpenPlanComponent } from './open-plan.component';
-
-describe('OpenPlanComponent', () => {
- let component: OpenPlanComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ OpenPlanComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(OpenPlanComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/plan-management/open-plan/open-plan.component.ts b/src/app/plan-management/open-plan/open-plan.component.ts
deleted file mode 100644
index c7e4e3c..0000000
--- a/src/app/plan-management/open-plan/open-plan.component.ts
+++ /dev/null
@@ -1,223 +0,0 @@
-import { Component, OnInit, ViewChild, Inject } from '@angular/core';
-import { HttpClient } from '@angular/common/http'
-import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
-import { MatPaginator } from '@angular/material/paginator';
-import { FlatTreeControl } from '@angular/cdk/tree';
-import { FormControl } from '@angular/forms';
-import { Router,ActivatedRoute } from '@angular/router'
-import { PageEvent } from '@angular/material/paginator';
-import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-import { TreeService } from '../../http-interceptors/tree.service'
-@Component({
- selector: 'app-open-plan',
- templateUrl: './open-plan.component.html',
- styleUrls: ['./open-plan.component.scss']
-})
-export class OpenPlanComponent implements OnInit {
-
- constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
-
- private _transformer = (node, level: number) => { //初始化tree
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- children: node.children
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- myControl = new FormControl();
- hasChild = (_: number, node: any) => node.expandable;
- //分页
- @ViewChild(MatPaginator, {static: true})
- pageEvent: PageEvent;
- paginator: MatPaginator;
- length:any; //共多少条数据
- pageSize:any; //每页条数
- pageSizeOptions: number[] = [10] //设置每页条数
- PageNumber:any; //第几页
-
- displayedColumns: string[] = ['unitname', 'planname', 'addpeople','addtime','plantype','auditStatus','openRange','projectlevel','operation'];
-
- allorganizations:any //所有组织机构
- allunittype:any //所有单位类型
- tabledataSource:any //表格数据
- preparelevels:any //编制级别
- ngOnInit(): void {
- this.getunitdata();
- this.getOrganizations();
- this.getUnittype();
- this.getAllPlanInfo(); //得到所有单位
- let level = sessionStorage.getItem("level");
- if(level == "0"){//如果是总队
- this.preparelevels = [
- {name:"总队",value:"1"},
- {name:"支队",value:"2"},
- {name:"大队",value:"4"},
- {name:"中队",value:"8"}
- ]
- }
- if(level == "1"){//如果是支队
- this.preparelevels = [
- {name:"支队",value:"2"},
- {name:"大队",value:"4"},
- {name:"中队",value:"8"}
- ]
- }
- if(level == "2"){//如果是大队
- this.preparelevels = [
- {name:"大队",value:"4"},
- {name:"中队",value:"8"}
- ]
- }
- if(level == "3"){//如果是中队
- this.preparelevels = [
- {name:"中队",value:"8"}
- ]
- }
- }
-
-
- allPlanInfo:any //存储所有预案信息
- //获得所有预案信息
- getAllPlanInfo(){
- let paramsdata:any = {
- CompanyName: this.companyName || '',
- OrganizationId: '',
- HasChildrenOrganization:'',
- BuildingTypeId: this.unittype || '',
- PlanType: this.reservePlanType || '',
- AuditStatus:'', //审核状态
- PlanLevel: this.preparelevel || '',
- HasChildrenPlanLevel: this.plcheck || '',
- PageNumber: this.PageNumber || '1',
- PageSize: this.pageSizeOptions[0],
- Sort: ''
- }
- this.http.get("/api/PublicPlans",{params:paramsdata}).subscribe((data:any)=>{
- // console.log(111,data)
- this.length = data.totalCount
- this.allPlanInfo = data
- this.tabledataSource = data.items
- })
- }
- //得到当前单位信息
- getunitdata(){
- this.http.get("/api/Account/Profiles").subscribe(
- (data:any)=>{
- this.organizationName = data.organizationName
- }
- )
- }
- organizationName:any //当前单位组织机构名称
- treedata:any //组织机构树型数据
- newArr:any = []
- newallorganizations:any //用于存储在原始数据基础上的每个机构增加children字段
- //得到当前单位所在组织机构的tree型数据
- getpresentOrganization(){
- this.newallorganizations = this.allorganizations
- this.newallorganizations.forEach(item => {
- item.children = []
- this.newallorganizations.forEach(element => {
- if(element.parentId == item.id){
- item.children.push(element)
- }
- });
- });
- // console.log(666,this.organizationName)
- if(this.organizationName){
- this.newallorganizations.forEach(item => {
- if(item.name == this.organizationName){
- this.dataSource.data = [item]
- }
- });
- }else{
- this.dataSource.data = this.tree.toTree(this.treedata);
- }
-
- }
- //获得所有组织机构
- getOrganizations(){
- this.http.get('/api/Organizations').subscribe(
- (data:any)=>{
- this.allorganizations = data
- this.treedata = this.tree.toTree(data);
- this.getpresentOrganization();
- }
- )
- }
-
- //获得所有单位类型
- getUnittype(){
- this.http.get('/api/BuildingTypes/Simple').subscribe(
- data=>{
- this.allunittype = data
- }
- )
- }
- //跳转查看预案页面
- routerTo(element){
- sessionStorage.setItem("companyName",element.companyName)
- // window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=false&pagetype=openplan&unitName=${element.company.name}&orName=${element.company.organizationName}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}`);
- window.open(`/planAudit/planpass?id=${element.companyId}&companyName=${element.companyName}&auditPlanId=${element.id}&auditStatus=${element.auditStatus}&type=6`);
-
- }
- //分页事件
- chagePage(e){
- this.PageNumber = e.pageIndex+1
- this.getAllPlanInfo();
- }
- //辖区中队div是否显示
- isorganizationbox:boolean = false
- //点击辖区中队树,将选择的辖区中队添加到变量
- add(node) {
- this.isorganizationbox = false
- this.js = node.name
- this.jsId = node.id
- }
- //关闭辖区中队隐藏框
- closeorganizationbox() {
- this.isorganizationbox = false
- }
- //打开辖区中队隐藏框
- openorganizationbox() {
- this.isorganizationbox = true
- }
- //关闭出现的组织机构div
- closediv(){
- this.isorganizationbox = false
- }
- //查询
- onSubmit (e) {
- this.getAllPlanInfo()
- }
- companyName:any //单位名称
- js:any //所选组织机构
- jsId:any //所选组织机构的id
- // jscheck:boolean //所选组织机构勾选框
- unittype:any //单位类型
- reservePlanType:any //预案类型
- preparelevel:any //编制级别
- plcheck:boolean //编制级别勾选框
- //重置
- reset(){
- this.companyName = ''
- // this.js = ''
- // this.jsId = ''
- // this.jscheck = false
- this.unittype = ''
- this.reservePlanType = ''
- this.preparelevel = ''
- this.plcheck = false
- //重新获取初始化列表
- this.pageEvent.pageIndex = 0
- this.PageNumber = 1
- this.getAllPlanInfo();
-
- }
-}
diff --git a/src/app/plan-management/pass-plan/pass-plan.component.html b/src/app/plan-management/pass-plan/pass-plan.component.html
deleted file mode 100644
index c62fb6d..0000000
--- a/src/app/plan-management/pass-plan/pass-plan.component.html
+++ /dev/null
@@ -1,142 +0,0 @@
-
-
-
-
-
-
-
- 单位名称
- {{element.companyName}}
-
-
- 预案名称
- {{element.name}}
-
-
- 添加人
- {{element.creatorName}}
-
-
- 添加时间
- {{element.creationTime | date:'yyyy-MM-dd'}}
-
-
- 预案类型
- {{element.planType | plantype}}
-
-
- 审核状态
- {{element.auditStatus | auditsatus}}
-
-
-
- 是否公开
- {{element.openRange}}
-
-
- 编制级别
- {{element.planLevel | planlevel}}
-
-
- 操作
-
- 查看预案
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/plan-management/pass-plan/pass-plan.component.scss b/src/app/plan-management/pass-plan/pass-plan.component.scss
deleted file mode 100644
index 3769e5e..0000000
--- a/src/app/plan-management/pass-plan/pass-plan.component.scss
+++ /dev/null
@@ -1,92 +0,0 @@
-.header {
- width: 100%;
- padding: 12px 10px;
- box-sizing: border-box;
- .queryBox {
- box-sizing: border-box;
- padding: 5px 25px;
- // margin-left: 50px;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-items:center;
- // justify-content:center;
- .queryField {
- margin: 3px 40px;
- input {
- width: 180px;
- height: 22px;
- line-height: 22px;
- border-radius: 3px;}
- }
-
- } //queryBox
- .ordiv{
- position: relative;
- .organizationbox{
- width:450px;
- height: 200px;
- background: white;
- position: absolute;
- top: 48px;
- left: 77px;
- z-index: 999;
- border: 1px solid grey;
- overflow-y: auto;
- li{
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- mat-tree-node{
- cursor: pointer;
- white-space:pre;
- }
- mat-tree-node:hover{
- background: rgba(225, 225, 225, 0.8);
- }
- .closediv{
- z-index: 100;
- position: absolute;
- right: 0;
- top: 0;
- width: 30px;
- height: 30px;
- cursor: pointer;
- line-height: 30px;
- text-align: center;
- }
- .closediv:hover{
- background:rgba(225, 225, 225, 0.8);
- }
- }
-
- }
- }
- .body{
- .buttonbox{
- padding-left: 50px;
- button{
- margin:0 10px
- }
- }
- .tablebox{
- table{
- width: 100%;
- // margin-left: 2%;
- margin-top: 15px;
- }
- mat-paginator{
- width:100%;
- // margin-left: 2%;
- // margin-top: 30px;
- }
- }
- }
- .mat-header-cell{
- text-align: center;
-}
-.mat-cell{
- text-align: center;
-
-}
\ No newline at end of file
diff --git a/src/app/plan-management/pass-plan/pass-plan.component.spec.ts b/src/app/plan-management/pass-plan/pass-plan.component.spec.ts
deleted file mode 100644
index 7ee8878..0000000
--- a/src/app/plan-management/pass-plan/pass-plan.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { PassPlanComponent } from './pass-plan.component';
-
-describe('PassPlanComponent', () => {
- let component: PassPlanComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ PassPlanComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(PassPlanComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/plan-management/pass-plan/pass-plan.component.ts b/src/app/plan-management/pass-plan/pass-plan.component.ts
deleted file mode 100644
index db73627..0000000
--- a/src/app/plan-management/pass-plan/pass-plan.component.ts
+++ /dev/null
@@ -1,232 +0,0 @@
-import { Component, OnInit, ViewChild, Inject } from '@angular/core';
-import { HttpClient } from '@angular/common/http'
-import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
-import { MatPaginator } from '@angular/material/paginator';
-import { FlatTreeControl } from '@angular/cdk/tree';
-import { FormControl } from '@angular/forms';
-import { Router,ActivatedRoute } from '@angular/router'
-import { PageEvent } from '@angular/material/paginator';
-import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-import { TreeService } from '../../http-interceptors/tree.service'
-@Component({
- selector: 'app-pass-plan',
- templateUrl: './pass-plan.component.html',
- styleUrls: ['./pass-plan.component.scss']
-})
-export class PassPlanComponent implements OnInit {
-
- constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
-
- private _transformer = (node, level: number) => { //初始化tree
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- children: node.children
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- myControl = new FormControl();
- hasChild = (_: number, node: any) => node.expandable;
- //分页
- @ViewChild(MatPaginator, {static: true})
- pageEvent: PageEvent;
- paginator: MatPaginator;
- length:any; //共多少条数据
- pageSize:any; //每页条数
- pageSizeOptions: number[] = [10] //设置每页条数
- PageNumber:any; //第几页
-
- displayedColumns: string[] = ['unitname', 'planname', 'addpeople','addtime','plantype','auditStatus','openRange','projectlevel','operation'];
- allorganizations:any //所有组织机构
- allunittype:any //所有单位类型
- tabledataSource:any //表格数据
-
- preparelevels:any
- ngOnInit(): void {
- this.getunitdata();
- this.getOrganizations();
- this.getUnittype();
- this.getAllPlanInfo();
- let level = sessionStorage.getItem("level");
- if(level == "0"){//如果是总队
- this.preparelevels = [
- {name:"总队",value:"1"},
- {name:"支队",value:"2"},
- {name:"大队",value:"4"},
- {name:"中队",value:"8"}
- ]
- }
- if(level == "1"){//如果是支队
- this.preparelevels = [
- {name:"支队",value:"2"},
- {name:"大队",value:"4"},
- {name:"中队",value:"8"}
- ]
- }
- if(level == "2"){//如果是大队
- this.preparelevels = [
- {name:"大队",value:"4"},
- {name:"中队",value:"8"}
- ]
- }
- if(level == "3"){//如果是中队
- this.preparelevels = [
- {name:"中队",value:"8"}
- ]
- }
- }
-
- allPlanInfo:any //存储所有预案信息
- //获得所有预案信息
- getAllPlanInfo(){
- let paramsdata:any = {
- CompanyName: this.companyName || '',
- OrganizationId: this.jsId || '',
- HasChildrenOrganization:this.jscheck || '',
- BuildingTypeId: this.unittype || '',
- PlanType: this.reservePlanType || '',
- AuditStatus:'', //审核状态
- PlanLevel: this.preparelevel || '',
- HasChildrenPlanLevel: this.plcheck || '',
- PageNumber: this.PageNumber || '1',
- PageSize: this.pageSizeOptions[0],
- Sort: ''
- }
- this.http.get("/api/ApprovedPlans",{params:paramsdata}).subscribe((data:any)=>{
- this.length = data.totalCount
- this.allPlanInfo = data
- this.tabledataSource = data.items
- })
- }
-
-
-
-
- //得到当前单位信息
- getunitdata(){
- this.http.get("/api/Account/Profiles").subscribe(
- (data:any)=>{
- this.organizationName = data.organizationName
- }
- )
- }
- organizationName:any //当前单位组织机构名称
- treedata:any //组织机构树型数据
- newArr:any = []
- newallorganizations:any //用于存储在原始数据基础上的每个机构增加children字段
- //得到当前单位所在组织机构的tree型数据
- getpresentOrganization(){
- this.newallorganizations = this.allorganizations
- this.newallorganizations.forEach(item => {
- item.children = []
- this.newallorganizations.forEach(element => {
- if(element.parentId == item.id){
- item.children.push(element)
- }
- });
- });
- this.http.get("/api/Account/Profiles").subscribe(
- (data:any)=>{
- this.organizationName = data.organizationName
- if(this.organizationName){
- this.newallorganizations.forEach(item => {
- if(item.name == this.organizationName){
- this.dataSource.data = [item]
- }
- });
- }else{
- this.dataSource.data = this.tree.toTree(this.treedata);
- }
- }
- )
-
- }
- //获得所有组织机构
- getOrganizations(){
- this.http.get('/api/Organizations').subscribe(
- (data:any)=>{
- this.allorganizations = data
- this.treedata = this.tree.toTree(data);
- this.getpresentOrganization();
- }
- )
- }
-
- //获得所有单位类型
- getUnittype(){
- this.http.get('/api/BuildingTypes/Simple').subscribe(
- data=>{
- this.allunittype = data
- }
- )
- }
- //跳转查看预案页面
- routerTo(element){
- sessionStorage.setItem("companyName",element.companyName)
- // window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=false&pagetype=passplan&unitName=${element.company.name}&orName=${element.company.organizationName}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}`);
- window.open(`/planAudit/planpass?id=${element.companyId}&companyName=${element.companyName}&auditPlanId=${element.id}&auditStatus=${element.auditStatus}&type=6`);
-
- }
- //分页事件
- chagePage(e){
- this.PageNumber = e.pageIndex+1
- this.getAllPlanInfo();
- }
-
- //辖区中队div是否显示
- isorganizationbox:boolean = false
- //点击辖区中队树,将选择的辖区中队添加到变量
- add(node) {
- this.isorganizationbox = false
- this.js = node.name
- this.jsId = node.id
- }
- //关闭辖区中队隐藏框
- closeorganizationbox() {
- this.isorganizationbox = false
- }
- //打开辖区中队隐藏框
- openorganizationbox() {
- this.isorganizationbox = true
- }
- //关闭出现的组织机构div
- closediv(){
- this.isorganizationbox = false
- }
- //查询
- onSubmit (e) {
- this.PageNumber = 1
- this.pageEvent.pageIndex = 0
- this.getAllPlanInfo();
- }
- companyName:any //单位名称
- js:any //所选组织机构
- jsId:any //所选组织机构的id
- jscheck:boolean //所选组织机构勾选框
- unittype:any //单位类型
- reservePlanType:any //预案类型
- preparelevel:any //编制级别
- plcheck:boolean //编制级别勾选框
- //重置
- reset(){
- this.companyName = ''
- this.js = ''
- this.jsId = ''
- this.jscheck = false
- this.unittype = ''
- this.reservePlanType = ''
- this.preparelevel = ''
- this.plcheck = false
- //重新获取初始化列表
- this.pageEvent.pageIndex = 0
- this.PageNumber = 1
- this.getAllPlanInfo();
-
- }
-}
diff --git a/src/app/plan-management/plan-management-routing.module.ts b/src/app/plan-management/plan-management-routing.module.ts
deleted file mode 100644
index 7fa18ab..0000000
--- a/src/app/plan-management/plan-management-routing.module.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
-import {EntryPlanComponent} from './entry-plan/entry-plan.component'
-import { OpenPlanComponent } from './open-plan/open-plan.component';
-import { PassPlanComponent } from './pass-plan/pass-plan.component';
-import { EntryPlanLookComponent } from './entry-plan-look/entry-plan-look.component';
-import { WebLookComponent } from './web-look/web-look.component';
-
-const routes: Routes = [
- { path: 'entryPlan', component: EntryPlanComponent},
- { path: 'openPlan', component: OpenPlanComponent},
- { path: 'passPlan', component: PassPlanComponent},
- { path: 'entryPlandetail', component: EntryPlanLookComponent},
- { path: 'webLook', component: WebLookComponent}
-];
-
-@NgModule({
- imports: [RouterModule.forChild(routes)],
- exports: [RouterModule]
-})
-export class PlanManagementRoutingModule { }
diff --git a/src/app/plan-management/plan-management.module.ts b/src/app/plan-management/plan-management.module.ts
deleted file mode 100644
index d874586..0000000
--- a/src/app/plan-management/plan-management.module.ts
+++ /dev/null
@@ -1,107 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { PlanManagementRoutingModule } from './plan-management-routing.module';
-import { ReactiveFormsModule, FormsModule } from '@angular/forms';
-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} 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 { EntryPlanComponent } from './entry-plan/entry-plan.component';
-import { PassPlanComponent } from './pass-plan/pass-plan.component';
-import { OpenPlanComponent } from './open-plan/open-plan.component';
-import { EntryPlanLookComponent, AddPlanone, DownloadFile, AuditResult, ChangeName } from './entry-plan-look/entry-plan-look.component';
-import { PlanType, AuditSatus, PlanLevel } from '../pipes/boolean.pipe';
-import { WebLookComponent } from './web-look/web-look.component';
-
-
-
-@NgModule({
- declarations: [EntryPlanComponent, PassPlanComponent, OpenPlanComponent, EntryPlanLookComponent,AddPlanone,PlanType,AuditSatus,PlanLevel,DownloadFile,AuditResult,ChangeName, WebLookComponent],
- imports: [
- CommonModule,
- PlanManagementRoutingModule,
- ReactiveFormsModule,
- FormsModule,
- A11yModule,
- DragDropModule,
- PortalModule,
- ScrollingModule,
- CdkStepperModule,
- CdkTableModule,
- CdkTreeModule,
- MatAutocompleteModule,
- MatBadgeModule,
- MatBottomSheetModule,
- MatButtonModule,
- MatButtonToggleModule,
- MatCardModule,
- MatCheckboxModule,
- MatChipsModule,
- MatStepperModule,
- MatDatepickerModule,
- MatDialogModule,
- MatDividerModule,
- MatExpansionModule,
- MatGridListModule,
- MatIconModule,
- MatInputModule,
- MatListModule,
- MatMenuModule,
- MatNativeDateModule,
- MatRippleModule,
- MatPaginatorModule,
- MatProgressBarModule,
- MatProgressSpinnerModule,
- MatRadioModule,
- MatSelectModule,
- MatSidenavModule,
- MatSliderModule,
- MatSlideToggleModule,
- MatSnackBarModule,
- MatSortModule,
- MatTableModule,
- MatTabsModule,
- MatToolbarModule,
- MatTooltipModule,
- MatTreeModule
- ]
-})
-export class PlanManagementModule { }
diff --git a/src/app/plan-management/web-look/web-look.component.html b/src/app/plan-management/web-look/web-look.component.html
deleted file mode 100644
index f2c7bee..0000000
--- a/src/app/plan-management/web-look/web-look.component.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/app/plan-management/web-look/web-look.component.scss b/src/app/plan-management/web-look/web-look.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/plan-management/web-look/web-look.component.spec.ts b/src/app/plan-management/web-look/web-look.component.spec.ts
deleted file mode 100644
index 894b3db..0000000
--- a/src/app/plan-management/web-look/web-look.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { WebLookComponent } from './web-look.component';
-
-describe('WebLookComponent', () => {
- let component: WebLookComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ WebLookComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(WebLookComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/plan-management/web-look/web-look.component.ts b/src/app/plan-management/web-look/web-look.component.ts
deleted file mode 100644
index 7e4c581..0000000
--- a/src/app/plan-management/web-look/web-look.component.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router,ActivatedRoute } from '@angular/router'
-import { DomSanitizer } from '@angular/platform-browser';
-
-@Component({
- selector: 'app-web-look',
- templateUrl: './web-look.component.html',
- styleUrls: ['./web-look.component.scss']
-})
-export class WebLookComponent implements OnInit {
-
- constructor(private router:Router,private route:ActivatedRoute,private sanitizer: DomSanitizer) { }
- url:any = sessionStorage.getItem("url")
- thirdPartyURL:any
- ngOnInit(): void {
- this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.url)
- }
-
-}
diff --git a/src/app/ui/add-six-familiar/Select-unit-list.html b/src/app/ui/add-six-familiar/Select-unit-list.html
new file mode 100644
index 0000000..13f572f
--- /dev/null
+++ b/src/app/ui/add-six-familiar/Select-unit-list.html
@@ -0,0 +1,19 @@
+
+
+
+ 单位名称 :
+
+
+
+ 搜索
+
+
+ 确定
+
+
+
+
\ No newline at end of file
diff --git a/src/app/ui/add-six-familiar/add-six-familiar.component.html b/src/app/ui/add-six-familiar/add-six-familiar.component.html
new file mode 100644
index 0000000..57fa8f5
--- /dev/null
+++ b/src/app/ui/add-six-familiar/add-six-familiar.component.html
@@ -0,0 +1,37 @@
+
+
diff --git a/src/app/ui/add-six-familiar/add-six-familiar.component.scss b/src/app/ui/add-six-familiar/add-six-familiar.component.scss
new file mode 100644
index 0000000..a941d86
--- /dev/null
+++ b/src/app/ui/add-six-familiar/add-six-familiar.component.scss
@@ -0,0 +1,92 @@
+.bigbox{
+ width: 10rem;
+ height: 7.5rem;
+ position: relative;
+ background: #F4F5F9;
+ .content{
+ width: 10rem;
+ height: 6.71875rem;
+ .list{
+ margin-top: 0.117188rem;
+ mat-list-item{
+ background-color: #fff;
+ margin-bottom: 1px;
+ position: relative;
+ height: 0.46875rem;
+ line-height: 0.46875rem;
+ font-size: 0.15625rem;
+ .name{
+ margin-left: 0.175781rem;
+ }
+ input{
+ position: absolute;
+ right: 0;
+ text-align: right;
+ height: 0.46875rem;
+ line-height: 0.46875rem;
+ font-size: 0.15625rem;
+ border: none;
+ width: 8.300781rem;
+ padding-right: 0.292969rem;
+ }
+ }
+ }
+ }
+ .btnbox{
+ display: flex;
+ justify-content: center;
+ margin-top: 2.929688rem;
+ button{
+ width: 1.757813rem;
+ height: 0.46875rem;
+ line-height: 0.46875rem;
+ text-align: center;
+ border-radius: 0.292969rem;
+ border: none;
+ opacity: 1;
+ font-size: 16px;
+ }
+ .ok{
+ background: linear-gradient(337deg, #FC7045 0%, #FF4923 100%);
+ color: #fff;
+ margin-right: 0.097656rem;
+ }
+ .cancel{
+ background: #E9EAF3;
+ color: black;
+ margin-left: 0.097656rem;
+ }
+ }
+}
+
+.dialogbox{
+ width: 7.617188rem;
+ height: 5.859375rem;
+ .topbox{
+ height: 0.488281rem;
+ line-height: 0.488281rem;
+ display: flex;
+ justify-content: space-between;
+ border-bottom: 1px solid black;
+ span{
+ font-size: 0.15625rem;
+ }
+ input{
+ height: 0.195313rem;
+ line-height: 0.195313rem;
+ font-size: 0.15625rem;
+ }
+ }
+ .listbox{
+ height: 5.3rem;
+ overflow-y: auto;
+ li{
+ z-index: 888;
+ font-size: 0.175781rem;
+ margin: 3px 0;
+ }
+ li:hover{
+ background-color: #FC7045;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/pages/lockscreen/lockscreen.component.spec.ts b/src/app/ui/add-six-familiar/add-six-familiar.component.spec.ts
similarity index 52%
rename from src/app/pages/lockscreen/lockscreen.component.spec.ts
rename to src/app/ui/add-six-familiar/add-six-familiar.component.spec.ts
index 7f11516..8450a37 100644
--- a/src/app/pages/lockscreen/lockscreen.component.spec.ts
+++ b/src/app/ui/add-six-familiar/add-six-familiar.component.spec.ts
@@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { LockscreenComponent } from './lockscreen.component';
+import { AddSixFamiliarComponent } from './add-six-familiar.component';
-describe('LockscreenComponent', () => {
- let component: LockscreenComponent;
- let fixture: ComponentFixture;
+describe('AddSixFamiliarComponent', () => {
+ let component: AddSixFamiliarComponent;
+ let fixture: ComponentFixture;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ LockscreenComponent ]
+ declarations: [ AddSixFamiliarComponent ]
})
.compileComponents();
}));
beforeEach(() => {
- fixture = TestBed.createComponent(LockscreenComponent);
+ fixture = TestBed.createComponent(AddSixFamiliarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
diff --git a/src/app/ui/add-six-familiar/add-six-familiar.component.ts b/src/app/ui/add-six-familiar/add-six-familiar.component.ts
new file mode 100644
index 0000000..c0b0177
--- /dev/null
+++ b/src/app/ui/add-six-familiar/add-six-familiar.component.ts
@@ -0,0 +1,104 @@
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit, Inject } from '@angular/core';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
+import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
+@Component({
+ selector: 'app-add-six-familiar',
+ templateUrl: './add-six-familiar.component.html',
+ styleUrls: ['./add-six-familiar.component.scss']
+})
+export class AddSixFamiliarComponent implements OnInit {
+
+ constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
+ title:String = "新增六熟悉记录"
+
+ unitname:any
+ address:any
+ contactname:any
+ contactphone:any
+ peoplenum:any
+ leadname:any
+ ngOnInit(): void {
+ }
+ //选择单位
+ openUnitList(){
+ let dialogRef = this.dialog.open(SelectUnit);
+ dialogRef.afterClosed().subscribe(data=>{
+ if(data){
+ this.unitname = data.name
+ this.address = data.address
+ this.contactname = data.contacts
+ this.contactphone = data.phone
+ }
+ });
+ }
+ //确定
+ ok(){
+ console.log(this.unitname)
+ if(this.unitname && this.address && this.contactname && this.contactphone && this.peoplenum && this.leadname){
+
+ }else{
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ this.snackBar.open('存在未填项','确定',config)
+ }
+ }
+ //取消
+ cancel(){
+
+ }
+}
+
+
+
+//选择单位
+@Component({
+ selector: 'app-editBuilding',
+ templateUrl: './Select-unit-list.html',
+ styleUrls: ['./add-six-familiar.component.scss']
+})
+export class SelectUnit {
+
+ constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { }
+
+ unitName:any //输入的单位名
+ allUnitList:any
+ ngOnInit(): void {
+ this.getAllKeyUnit()
+ }
+ //获得所有单位
+ getAllKeyUnit(){
+ let paramsdata:any = {
+ Name: this.unitName || '',
+ OrganizationId: '',
+ HasChildren: '',
+ USCI:'',
+ IsFollowed: '',
+ BuildingTypeId: '',
+ PageNumber:'1',
+ PageSize: 100,
+ Sort: ''
+ }
+ this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{
+ this.allUnitList = data.items
+ console.log(789,data.items)
+ })
+ }
+
+
+ selectedUnit:any//选中的单位
+ selected(item){
+ this.selectedUnit = item
+ console.log(item)
+ }
+
+ //搜索
+ search(){
+ this.getAllKeyUnit()
+ }
+ //确定选择
+ ok(){
+ this.dialogRef.close(this.selectedUnit);
+ }
+}
\ No newline at end of file
diff --git a/src/app/ui/authority/authority.component.html b/src/app/ui/authority/authority.component.html
deleted file mode 100644
index 8acc302..0000000
--- a/src/app/ui/authority/authority.component.html
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
- {{node.name}}
- add_circle_outline
- delete
-
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
- {{node.name}}
- add_circle_outline
- delete
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/authority/authority.component.scss b/src/app/ui/authority/authority.component.scss
deleted file mode 100644
index dea1283..0000000
--- a/src/app/ui/authority/authority.component.scss
+++ /dev/null
@@ -1,30 +0,0 @@
-table {
- width: 100%;
- th,td{
- text-align: center;
- }
-}
-form{
- text-align: center;
- button{
- margin: 0 12px;
- }
-}
-mat-tree{
- width: 500px;
- button{
- display: block;
- float: right;
- }
- mat-tree-node{
- position: relative;
- .deleted{
- position: absolute;
- right: 0;
- }
- .create{
- position: absolute;
- right: 40px;
- }
- }
-}
diff --git a/src/app/ui/authority/authority.component.ts b/src/app/ui/authority/authority.component.ts
deleted file mode 100644
index 239757c..0000000
--- a/src/app/ui/authority/authority.component.ts
+++ /dev/null
@@ -1,144 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { HttpClient } from '@angular/common/http';
-import { TreeService } from '../../http-interceptors/tree.service'
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-export interface authority {
- id: string,
- name: string,
- value: string,
- order: number,
- parentId: string
-}
-@Component({
- selector: 'app-authority',
- templateUrl: './authority.component.html',
- styleUrls: ['./authority.component.scss']
-})
-export class AuthorityComponent implements OnInit {
-
- data:any =[]
- newdata = [];
-
- private _transformer = (node, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- constructor(private http: HttpClient,public dialog: MatDialog,private tree:TreeService) { }
-
- //重新拉去列表函数
- getlist = ():void=>{
- this.http.get('/api/Permissions').subscribe((data: any[])=>{
- this.newdata = this.tree.toTree(data)
- const nodes = this.treeControl.dataNodes;
- const expandNodes = [];
- nodes.forEach((item) => {
- if(item.expandable && this.treeControl.isExpanded(item)){
- expandNodes.push(item.id);
- }
- });
- this.dataSource.data = this.newdata;
- let newNodes = this.treeControl.dataNodes;
- newNodes = newNodes.filter(n => {
- return expandNodes.indexOf(n.id) >= 0;
- });
- newNodes.forEach(item => {
- this.treeControl.expand(item);
- });
- })
- }
-
- //初始化视图
- ngOnInit() {
- this.http.get('/api/Permissions').subscribe((data: any[])=>{
- this.dataSource.data = this.tree.toTree(data)
- })
- }
- hasChild = (_: number, node: any) => node.expandable;
-
- //创建按钮
- createauthority(value){
- const dialogRef = this.dialog.open(CreateAuthority, {//调用open方法打开对话框并且携带参数过去
- width: '260px',
- data: {id:value.id}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
- this.newdata = []
- this.getlist()
- }
- }
- );
- }
- //删除按钮
- deleted(authority){
- var isdeleted = confirm("确定要删除此用户吗?")
- if(isdeleted){
- //请求删除接口
- this.newdata = []
- this.http.delete(`/api/Permissions/${authority.id}`).subscribe( data=>{
- this.getlist()
- })
- }
- }
-}
-
-
-//创建组件
-@Component({
- selector: 'createauthority',
- templateUrl: './createauthority.component.html',
- styleUrls: ['./authority.component.scss']
-})
-export class CreateAuthority {
- myControl = new FormControl();
- options: string[] = ['0', '1','2', '3','4', '5','6', '7','8'];
-
- //注入MatDialogRef,可以用来关闭对话框
- //要访问对话框组件中的数据,必须使用MAT_DIALOG_DATA注入令牌
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,public snackBar: MatSnackBar,
- @Inject(MAT_DIALOG_DATA) public data) {}
-
- onNoClick(): void {
- this.dialogRef.close();
- }
- onSubmit(value){
-
- if(value.parentId == "null"){
- value.parentId = null
- }
- //编写请求创建用户接口(value是参数)//并且刷新一下
- this.http.post(
- '/api/Permissions',
- {
- id: '',
- name: value.name,
- value: value.value,
- order: Number(value.order),
- parentId: this.data.id
- }
- ).subscribe(
- data=>{
- this.dialogRef.close(data);
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写正确格式','确定',config);
- }
- )
- }
-}
\ No newline at end of file
diff --git a/src/app/ui/authority/createauthority.component.html b/src/app/ui/authority/createauthority.component.html
deleted file mode 100644
index b8e7500..0000000
--- a/src/app/ui/authority/createauthority.component.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{option}}
-
-
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/badge/badge.component.html b/src/app/ui/badge/badge.component.html
deleted file mode 100644
index ef434c9..0000000
--- a/src/app/ui/badge/badge.component.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
- 未读信息
-
-
-
-
- 按钮徽章
-
-
-
-
- home
-
-
diff --git a/src/app/ui/badge/badge.component.scss b/src/app/ui/badge/badge.component.scss
deleted file mode 100644
index d91e4df..0000000
--- a/src/app/ui/badge/badge.component.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-p{
- margin: 30px;
-}
\ No newline at end of file
diff --git a/src/app/ui/badge/badge.component.spec.ts b/src/app/ui/badge/badge.component.spec.ts
deleted file mode 100644
index 21c0577..0000000
--- a/src/app/ui/badge/badge.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { BadgeComponent } from './badge.component';
-
-describe('BadgeComponent', () => {
- let component: BadgeComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ BadgeComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(BadgeComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/badge/badge.component.ts b/src/app/ui/badge/badge.component.ts
deleted file mode 100644
index a64e7c1..0000000
--- a/src/app/ui/badge/badge.component.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-badge',
- templateUrl: './badge.component.html',
- styleUrls: ['./badge.component.scss']
-})
-export class BadgeComponent implements OnInit {
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/src/app/ui/button/button.component.html b/src/app/ui/button/button.component.html
deleted file mode 100644
index 1c1d3c0..0000000
--- a/src/app/ui/button/button.component.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/button/button.component.scss b/src/app/ui/button/button.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/ui/button/button.component.spec.ts b/src/app/ui/button/button.component.spec.ts
deleted file mode 100644
index 794fc67..0000000
--- a/src/app/ui/button/button.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ButtonComponent } from './button.component';
-
-describe('ButtonComponent', () => {
- let component: ButtonComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ ButtonComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ButtonComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/button/button.component.ts b/src/app/ui/button/button.component.ts
deleted file mode 100644
index a59ed36..0000000
--- a/src/app/ui/button/button.component.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';
-@Component({
- selector: 'app-button',
- templateUrl: './button.component.html',
- styleUrls: ['./button.component.scss']
-})
-export class ButtonComponent implements OnInit {
-
- constructor(public http: HttpClient) { }
-
-
- data =[
- {
- id:"1",
- name:"广西总队",
- order:0,
- parentId:null,
- children:[
- {
- id:"2",
- name:"南宁支队",
- order:2,
- parentId:1,
- children:[
- {
- id:"6",
- name:"南宁特勤大队",
- order:0,
- parentId:2,
- children:[
- {
- id:"6",
- name:"南宁特勤3中队",
- order:3,
- parentId:6,
- },
- {
- id:"6",
- name:"南宁特勤2中队",
- order:2,
- parentId:6,
- },
- {
- id:"6",
- name:"南宁特勤1中队",
- order:1,
- parentId:6,
- }
- ]
- }
- ]
- },
- {
- id:"3",
- name:"北海支队",
- order:1,
- parentId:1
- },
- {
- id:"4",
- name:"梧州支队",
- order:0,
- parentId:1
- },
- {
- id:"5",
- name:"桂林支队",
- order:3,
- parentId:1
- },
- ]
- }
- ]
-
-
- ngOnInit() {
- var str = "xxxx.jjjj"
- // console.log(2222,str.split('.')[1])
- }
-
- drop(event: CdkDragDrop) {
- moveItemInArray(this.data, event.previousIndex, event.currentIndex);
-
- }
-
-
-}
diff --git a/src/app/ui/card/card.component.html b/src/app/ui/card/card.component.html
deleted file mode 100644
index da5b6ca..0000000
--- a/src/app/ui/card/card.component.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
- 简单的卡片
- 卡片的字幕
- 原来爱情的世界很大,大得可以装下一百种委屈;原来爱情的世界很小,小得三个人就会窒息。
-
-
- 我是按钮
-
-
- 我要被固定在卡片底部
-
-
\ No newline at end of file
diff --git a/src/app/ui/card/card.component.scss b/src/app/ui/card/card.component.scss
deleted file mode 100644
index feb037a..0000000
--- a/src/app/ui/card/card.component.scss
+++ /dev/null
@@ -1,10 +0,0 @@
-
-mat-card{
- width: 300px;
- height: 600px;
- img{
- width: 300px;
- height: 300px;
- padding: 16px;
- }
-}
\ No newline at end of file
diff --git a/src/app/ui/card/card.component.ts b/src/app/ui/card/card.component.ts
deleted file mode 100644
index ae25273..0000000
--- a/src/app/ui/card/card.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-card',
- templateUrl: './card.component.html',
- styleUrls: ['./card.component.scss']
-})
-export class CardComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/src/app/ui/dateselect/dateselect.component.html b/src/app/ui/dateselect/dateselect.component.html
deleted file mode 100644
index c400626..0000000
--- a/src/app/ui/dateselect/dateselect.component.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/app/ui/dateselect/dateselect.component.scss b/src/app/ui/dateselect/dateselect.component.scss
deleted file mode 100644
index be335f5..0000000
--- a/src/app/ui/dateselect/dateselect.component.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-.example-events {
- width: 400px;
- height: 200px;
- border: 1px solid #555;
- overflow: auto;
- }
-
\ No newline at end of file
diff --git a/src/app/ui/dateselect/dateselect.component.spec.ts b/src/app/ui/dateselect/dateselect.component.spec.ts
deleted file mode 100644
index 1e4f0dc..0000000
--- a/src/app/ui/dateselect/dateselect.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { DateselectComponent } from './dateselect.component';
-
-describe('DateselectComponent', () => {
- let component: DateselectComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ DateselectComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(DateselectComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/dateselect/dateselect.component.ts b/src/app/ui/dateselect/dateselect.component.ts
deleted file mode 100644
index 6c3347c..0000000
--- a/src/app/ui/dateselect/dateselect.component.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import {MatDatepickerInputEvent} from '@angular/material/datepicker';
-
-
-
-@Component({
- selector: 'app-dateselect',
- templateUrl: './dateselect.component.html',
- styleUrls: ['./dateselect.component.scss'],
-})
-
-export class DateselectComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
- events: string[] = [];
-
- addEvent(type: string, event: MatDatepickerInputEvent) {
- this.events.push(`${type}: ${event.value}`);
- }
-}
diff --git a/src/app/ui/enterpriseuser/addenterpriseuser.component.html b/src/app/ui/enterpriseuser/addenterpriseuser.component.html
deleted file mode 100644
index 1ee3b98..0000000
--- a/src/app/ui/enterpriseuser/addenterpriseuser.component.html
+++ /dev/null
@@ -1,44 +0,0 @@
-创建企业用户
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/enterpriseuser/addenterpriseuser.component.ts b/src/app/ui/enterpriseuser/addenterpriseuser.component.ts
deleted file mode 100644
index 0ebea60..0000000
--- a/src/app/ui/enterpriseuser/addenterpriseuser.component.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import {MatDialogRef} from '@angular/material/dialog';
-
-
-
-@Component({
- selector: 'addenterpriseuser',
- templateUrl: './addenterpriseuser.component.html',
- styleUrls: ['./enterpriseuser.component.scss']
- })
-export class AddEnterpriserUser {
-
- constructor(private http: HttpClient,public dialogRef: MatDialogRef) {}
-
- errmsg:any; //捕获错误信息
- //提交创建表单
- onSubmit (e) {
- let date = new Date()
- this.http.post('/api/CompanyUsers',{
- name:e.loginName,
- phone:e.tel,
- enabled:true,
- creationTime:date,
- usci:e.creditcode,
- companyName:e.unitname
- }).subscribe(data=>{
- this.dialogRef.close(data)},
- error=>{this.errmsg=error}
- )
- }
-
-
-
-}
\ No newline at end of file
diff --git a/src/app/ui/enterpriseuser/editenterpriseuser.html b/src/app/ui/enterpriseuser/editenterpriseuser.html
deleted file mode 100644
index 2b8a15a..0000000
--- a/src/app/ui/enterpriseuser/editenterpriseuser.html
+++ /dev/null
@@ -1,40 +0,0 @@
-编辑企业用户
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/enterpriseuser/enterpriseuser.component.html b/src/app/ui/enterpriseuser/enterpriseuser.component.html
deleted file mode 100644
index af329b3..0000000
--- a/src/app/ui/enterpriseuser/enterpriseuser.component.html
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
- 登录账号
- {{element.name}}(该账号已被注销)
-
-
-
- 单位名称
- {{element.companyName}}
-
-
-
- 统一社会信用代码
- {{element.usci}}
-
-
-
-
- 创建时间
-
- {{element.creationTime|date:'yyyy-MM-dd'}}
-
-
-
-
- 操作
-
- 重置密码
- 查看
- 编辑
- 启用
- 禁用
- 注销
- 删除
-
-
-
-
-
-
-
-
-
diff --git a/src/app/ui/enterpriseuser/enterpriseuser.component.scss b/src/app/ui/enterpriseuser/enterpriseuser.component.scss
deleted file mode 100644
index 6171aff..0000000
--- a/src/app/ui/enterpriseuser/enterpriseuser.component.scss
+++ /dev/null
@@ -1,38 +0,0 @@
-table {
- width: 100%;
- text-align: center;
- .cdk-header-cell {
- text-align: center;
- }
- }
-.maginleft {
- margin-left: 5px;
-}
-
-
-
-.header {
- width: 100%;
- padding: 10px;
- margin-bottom: 10px;
- box-sizing: border-box;
- border-bottom: 1px solid rgba(0,0,0,0.12);
- .queryBox {
- box-sizing: border-box;
- padding: 5px 15px;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-items:center;
- justify-content:center;
- .queryField {
- margin: 0 15px;
- input {
- width: 180px;
- height: 22px;
- line-height: 22px;
- border-radius: 3px;}
- }
-
- } //queryBox
-}
\ No newline at end of file
diff --git a/src/app/ui/enterpriseuser/enterpriseuser.component.spec.ts b/src/app/ui/enterpriseuser/enterpriseuser.component.spec.ts
deleted file mode 100644
index 044b696..0000000
--- a/src/app/ui/enterpriseuser/enterpriseuser.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { EnterpriseuserComponent } from './enterpriseuser.component';
-
-describe('EnterpriseuserComponent', () => {
- let component: EnterpriseuserComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ EnterpriseuserComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(EnterpriseuserComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/enterpriseuser/enterpriseuser.component.ts b/src/app/ui/enterpriseuser/enterpriseuser.component.ts
deleted file mode 100644
index 08603ed..0000000
--- a/src/app/ui/enterpriseuser/enterpriseuser.component.ts
+++ /dev/null
@@ -1,241 +0,0 @@
-import { Component, OnInit, ViewChild, Inject } from '@angular/core';
-import {HttpClient} from '@angular/common/http'
-import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatPaginator } from '@angular/material/paginator';
-import { MatTableDataSource } from '@angular/material/table';
-import { PageEvent } from '@angular/material/paginator';
-import { AddEnterpriserUser } from './addenterpriseuser.component'
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-
-
-
-@Component({
- selector: 'app-enterpriseuser',
- templateUrl: './enterpriseuser.component.html',
- styleUrls: ['./enterpriseuser.component.scss']
-})
-export class EnterpriseuserComponent implements OnInit {
-
- constructor(public http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
-
- ngOnInit() {
- this.initData()
- }
-
- displayedColumns: string[] = ['loginName', 'unitName', 'creditcode','time', 'operation'];
- dataSource:any; //所有企业用户
-
- userLogin:string; //搜索账号
- userName:string; //搜索名称
- creditcode:string//统一社会信用代码
- //分页
- @ViewChild(MatPaginator, {static: true})
- pageEvent: PageEvent;
- paginator: MatPaginator;
- length:any; //共多少条数据
- pageSize:any; //每页条数
- pageSizeOptions: number[] = [10] //设置每页条数
- pageNumber:number = 1; //第几页
-
- //分页切换
- chagePage (e) {
- this.pageNumber = e.pageIndex+1
- let data= {
- Name: this.userLogin || '',
- CompanyName: this.userName || '',
- USCI: this.creditcode || '',
- PageNumber: String(this.pageNumber),
- }
- this.http.get('/api/CompanyUsers',{params:data}).subscribe((data:any)=>{
- this.length = data.totalCount
- this.pageSize = data.pageSize
- this.dataSource = new MatTableDataSource(data.items)
- })
- }
-
- //页面初始化 + 查询 + 重置
- initData () {
- let data= {
- Name: this.userLogin || '',
- CompanyName: this.userName || '',
- USCI: this.creditcode || '',
- PageNumber: '1',
- }
- this.http.get('/api/CompanyUsers',{params:data}).subscribe((data:any)=>{
- this.length = data.totalCount
- this.pageSize = data.pageSize
- this.pageEvent.pageIndex = 0
- this.dataSource = new MatTableDataSource(data.items)
- })
- }
-
- //更新当前页数据
- getAllCompanyUsers () {
- let data= {
- Name: this.userLogin || '',
- CompanyName: this.userName || '',
- USCI: this.creditcode || '',
- PageNumber: String(this.pageNumber),
- }
- this.http.get('/api/CompanyUsers',{params:data}).subscribe((data:any)=>{
- this.length = data.totalCount
- this.pageSize = data.pageSize
- this.dataSource = new MatTableDataSource(data.items)
- })
- }
-
- //清空搜索
- empty () {
- this.userLogin = ''
- this.userName = ''
- this.creditcode = ''
- this.initData()
- }
-
- //创建企业用户
- open(){
- let dialogRef = this.dialog.open(AddEnterpriserUser);
- dialogRef.afterClosed().subscribe(data=>{
- if (data) {this.getAllCompanyUsers()}
- });
- }
-
- //编辑企业用户
- edit (e) {
- let dialogRef = this.dialog.open(editenterpriseuser,{data:e});
- dialogRef.afterClosed().subscribe(data=>{
- if (data) {this.getAllCompanyUsers()}
- });
- }
-
- //重置密码
- reset (e) {
- this.http.put(`/api/CompanyUsers/${e.name}/ResetPassword`,{}).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('重置密码成功!','确定',config);
- })
- }
-
- //查看企业信息
- see (e) {
- this.http.get(`/api/CompanyUsers/${e.name}`).subscribe(
- data=> {
- let dialogRef = this.dialog.open(seeenterpriseuser, {data});
- dialogRef.afterClosed().subscribe();
- }
- )
- }
-
- //启用
- enabled (e) {
- this.http.put(`/api/CompanyUsers/${e.name}`,{
- name:e.name,
- phone:e.phone,
- enabled:true,
- creationTime:e.creationTime,
- usci:e.usci,
- companyId:e.companyId,
- companyName:e.companyName
- }).subscribe(data=>{
- this.getAllCompanyUsers()
- })
- }
-
- //禁用
- noEnabled (e) {
- this.http.put(`/api/CompanyUsers/${e.name}`,{
- name:e.name,
- phone:e.phone,
- enabled:false,
- creationTime:e.creationTime,
- usci:e.usci,
- companyId:e.companyId,
- companyName:e.companyName
- }).subscribe(data=>{
- this.getAllCompanyUsers()
- })
- }
-
- //注销用户
- logoff (e) {
- let isTrue = confirm('注销是不可逆操作,您确定要注销吗')
- if (isTrue) {
- this.http.delete(`/api/CompanyUsers/${e.name}/Cancel`).subscribe(data=>{
- this.getAllCompanyUsers() })
- }
- }
-
- //删除
- delete (e) {
- let isTrue = confirm('您确定要删除吗')
- if (isTrue) {
- this.http.delete(`/api/CompanyUsers/${e.name}`).subscribe(data=>{
- this.getAllCompanyUsers()
- })
- }
- }
-
-
-
-}
-
-
-
-//编辑企业用户
-@Component({
- selector: 'app-editenterpriseuser',
- templateUrl: './editenterpriseuser.html',
- styleUrls: ['./enterpriseuser.component.scss']
-})
-export class editenterpriseuser {
-
- constructor(public http: HttpClient,public dialog: MatDialog,
- @Inject(MAT_DIALOG_DATA) public data,public dialogRef: MatDialogRef,) { }
-
- ngOnInit() {
- this.companyName = this.data.companyName
- this.companyPhone = this.data.phone
- this.companyUsci = this.data.usci
- }
-
- companyName:any; //企业单位名称
- companyPhone:any; //企业电话
- companyUsci:any; //企业统一社会信用代码
-
- //提交表单
- onSubmit (e) {
- this.http.put(`/api/CompanyUsers/${this.data.name}`,{
- name:this.data.name,
- phone:e.tel,
- enabled:this.data.enabled,
- creationTime:this.data.creationTime,
- usci:e.creditcode,
- companyId:this.data.companyId,
- companyName:e.unitname
- }).subscribe(data=>{
- this.dialogRef.close('success')
- })
- }
-
-
-
-}
-
-
-
-//查看企业用户
-@Component({
- selector: 'app-seeenterpriseuser',
- templateUrl: './seeenterpriseuser.html',
- styleUrls: ['./enterpriseuser.component.scss']
-})
-export class seeenterpriseuser {
-
- constructor(public http: HttpClient,public dialog: MatDialog,
- @Inject(MAT_DIALOG_DATA) public data) { }
-
- ngOnInit() {}
-
-}
\ No newline at end of file
diff --git a/src/app/ui/enterpriseuser/seeenterpriseuser.html b/src/app/ui/enterpriseuser/seeenterpriseuser.html
deleted file mode 100644
index a5e8a1c..0000000
--- a/src/app/ui/enterpriseuser/seeenterpriseuser.html
+++ /dev/null
@@ -1,29 +0,0 @@
-查看企业用户
-
-
-
- 登录账号:
- {{data.name}}
-
- 单位名称:
- {{data.companyName}}
-
- 联系电话:
- {{data.phone}}
-
- 统一社会信用代码:
- {{data.usci}}
-
- 创建时间:
- {{data.creationTime|date:'yyyy-MM-dd'}}
-
- 是否禁用:
- 否
- 是
-
-
-
-
-
- 关闭
-
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-facilities-formwork/addBuilt-in.html b/src/app/ui/fire-fighting-facilities-formwork/addBuilt-in.html
deleted file mode 100644
index 0b7db78..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/addBuilt-in.html
+++ /dev/null
@@ -1,20 +0,0 @@
-新增内置分组
-
-
-
-
-
-
-
-
-
-
-
- 确定
-
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-facilities-formwork/addBuilt-inAttribute.html b/src/app/ui/fire-fighting-facilities-formwork/addBuilt-inAttribute.html
deleted file mode 100644
index 44f46e2..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/addBuilt-inAttribute.html
+++ /dev/null
@@ -1,34 +0,0 @@
-新增内置分组属性
-
-
-
-
-
-
-
-
-
- 是否逐层统计:
-
- 是
- 否
-
-
-
- 是否合并:
-
- 是
- 否
-
-
-
-
-
- 确定
-
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-facilities-formwork/addFireFightingFacilitiesFormwork.html b/src/app/ui/fire-fighting-facilities-formwork/addFireFightingFacilitiesFormwork.html
deleted file mode 100644
index 19d1c0f..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/addFireFightingFacilitiesFormwork.html
+++ /dev/null
@@ -1,20 +0,0 @@
-新增消防设施模板
-
-
-
-
-
-
-
-
-
-
-
- 确定
-
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-facilities-formwork/addOptional.html b/src/app/ui/fire-fighting-facilities-formwork/addOptional.html
deleted file mode 100644
index 1065e7f..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/addOptional.html
+++ /dev/null
@@ -1,37 +0,0 @@
-新增可选分组
-
-
-
-
-
-
-
-
-
-
-
- 表单
- 表格
-
-
-
-
-
-
- 不新增
- 新增行
- 新增组
-
-
-
-
-
-
- 确定
-
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-facilities-formwork/addOptionalAttribute.html b/src/app/ui/fire-fighting-facilities-formwork/addOptionalAttribute.html
deleted file mode 100644
index ff98186..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/addOptionalAttribute.html
+++ /dev/null
@@ -1,71 +0,0 @@
-新增可选分组属性
-
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-facilities-formwork/editBuilt-inAttribute.html b/src/app/ui/fire-fighting-facilities-formwork/editBuilt-inAttribute.html
deleted file mode 100644
index 7b897c8..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/editBuilt-inAttribute.html
+++ /dev/null
@@ -1,40 +0,0 @@
-编辑内置分组属性
-
-
-
-
-
-
-
-
-
- 是否逐层统计:
-
- 是
- 否
-
-
-
- 是否合并:
-
- 是
- 否
-
-
-
-
-
-
-
-
-
-
- 确定
-
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-facilities-formwork/editFireFightingFacilitiesFormwork.html b/src/app/ui/fire-fighting-facilities-formwork/editFireFightingFacilitiesFormwork.html
deleted file mode 100644
index 8ef636a..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/editFireFightingFacilitiesFormwork.html
+++ /dev/null
@@ -1,20 +0,0 @@
-编辑消防设施模板
-
-
-
-
-
-
-
-
-
-
-
- 确定
-
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-facilities-formwork/editOptionalAttribute.html b/src/app/ui/fire-fighting-facilities-formwork/editOptionalAttribute.html
deleted file mode 100644
index 3207882..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/editOptionalAttribute.html
+++ /dev/null
@@ -1,76 +0,0 @@
-编辑可选分组属性
-
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.html b/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.html
deleted file mode 100644
index cfad728..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.html
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
-
-
消防设施模板
-
-
- add_circle_outline
-
-
- create
-
-
- block
-
-
- delete
-
-
-
-
-
- {{item.name}}
- block
-
-
-
-
-
-
-
-
-
-
- {{selectFireProtectionFacilities.name}}
- 新增内置分组
- arrow_upward
- arrow_downward
-
-
-
-
-
-
-
-
-
-
-
-
- 名称
-
- {{element.name}}
-
-
-
-
- 是否逐层统计
-
- 是
- 否
-
-
-
-
- 是否合并
-
- 是
- 否
-
-
-
-
- 操作
-
- border_color
- delete
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{selectFireProtectionFacilities.name}}
- 新增可选分组
- arrow_upward
- arrow_downward
-
-
-
-
-
-
-
-
-
-
-
-
- 名称
-
- {{element.propertyName}}
-
-
-
-
- 类型
-
- 单行文本
- 多行文本
- 数值
- 图片
- 图片数量
- 方向
- 布尔值
- 供给区域
- 供给类型
-
-
-
-
- 默认值
-
- {{element.propertyValue}}
-
-
-
-
- 必填
-
- 是
- 否
-
-
-
-
- 单位
-
- {{element.physicalUnit}}
-
-
-
-
- 操作
-
- border_color
- delete
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.scss b/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.scss
deleted file mode 100644
index 5ca7442..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.scss
+++ /dev/null
@@ -1,80 +0,0 @@
-.content {
- margin: 0 0 0 10px;
- width: 100%;
- height: 90%;
- overflow-y: auto;
- display: flex;
- .leftBox {
- flex: 20%;
- padding-top: 10px;
- }
- .rightBox {
- border-left: 1px solid #999;
- flex: 80%;
- overflow-y: auto;
- }
-}
-
-//左侧样式
-.bank {
- display: flex;
- font-size: 18px;
- font-weight: 500;
-}
-.mat-icon {
- width: 18px;
- height: 18px;
- vertical-align:top;
- margin-right: 8px;
- cursor:pointer;
-}
-.material {
- cursor:pointer;
- height: 30px;
- font-size: 16px;
- margin-top: 10px;
- padding-left: 25px;
- .overFlowText {
- width: 135px;
- display: inline-block;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .blockBtn {
- float: right;
- margin-right: 12px;
- width: 16px;
- height: 16px;
- }
-}
-//选择样式
-.active {
- background-color: rgba(225,225,225,0.8)
-}
-
-//右侧样式
-.groupingContent {
- height: 100%;
- overflow-y: auto;
- .groupingButton{
- padding-left: 10px;
- margin: 10px 0;
- .mat-icon{
- margin: 5px 0 0 15px;}
- }
- .groupingHeader{
- background-color: #d7d7d7;
- padding: 5px 0 0 25px;
- height: 30px;
- display: flex;
- .mat-icon {margin: 0 5px;}
- }
-}
-table {
- width: 100%;
- text-align: center;
- .cdk-header-cell {
- text-align: center;
- }
-}
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.spec.ts b/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.spec.ts
deleted file mode 100644
index 4d81e94..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { FireFightingFacilitiesFormworkComponent } from './fire-fighting-facilities-formwork.component';
-
-describe('FireFightingFacilitiesFormworkComponent', () => {
- let component: FireFightingFacilitiesFormworkComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ FireFightingFacilitiesFormworkComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(FireFightingFacilitiesFormworkComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.ts b/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.ts
deleted file mode 100644
index b3bb4e1..0000000
--- a/src/app/ui/fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component.ts
+++ /dev/null
@@ -1,806 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar';
-
-
-
-@Component({
- selector: 'app-fire-fighting-facilities-formwork',
- templateUrl: './fire-fighting-facilities-formwork.component.html',
- styleUrls: ['./fire-fighting-facilities-formwork.component.scss']
-})
-export class FireFightingFacilitiesFormworkComponent implements OnInit {
-
- constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
-
- displayedColumn = ['checked','name','isEachFloor','isMerged','operation']
- displayedColumns = ['checked','name', 'type', 'default','required','physicalUnit','operation'];
-
- ngOnInit(): void {
- this.http.get('/api/FacilityCategories').subscribe(data=>{
- this.allFireProtectionFacilities = data
- this.selectFireProtectionFacilities = data[0]
- this.getBuiltInGrouping()
- this.getOptionalGrouping()
- })
- }
-
- allFireProtectionFacilities:any = []; //所有的消防设施模板
- selectFireProtectionFacilities:any; //选中的消防设施模板
- FireProtectionFacilitiesIndex:any = 0; //选中的消防设施模板下标
- builtInGrouping:any = []; //当前模板的内置分组
- optionalGrouping:any = []; //当前模板的可选分组
-
- //获取所有的消防设施模板
- getAllTemplate () {
- this.http.get('/api/FacilityCategories').subscribe(data=>{
- this.allFireProtectionFacilities = data
- this.selectFireProtectionFacilities = data[this.FireProtectionFacilitiesIndex]
- })
- }
-
- //获取当前模板内置分组
- getBuiltInGrouping () {
- if (this.selectFireProtectionFacilities){
- let id = {categoryId: this.selectFireProtectionFacilities.id}
- this.http.get(`/api/FacilityGroups`,{params:id}).subscribe(data=>{
- this.builtInGrouping = data
- this.selectBuiltIn = []
- })
- }
- }
-
- //获取当前模板可选分组
- getOptionalGrouping () {
- if (this.selectFireProtectionFacilities){
- let id = {categoryId: this.selectFireProtectionFacilities.id}
- this.http.get(`/api/OptionalGroups`,{params:id}).subscribe(data=>{
- this.optionalGrouping = data
- this.selectOptional = []
- })
- }
- }
-
- //切换左侧模板时
- selectFire (e,index) {
- if (this.FireProtectionFacilitiesIndex != index) {
- this.selectFireProtectionFacilities = e
- this.FireProtectionFacilitiesIndex = index
- this.selectBuiltIn = []
- this.selectOptional = []
- this.getBuiltInGrouping()
- this.getOptionalGrouping()
- }
- }
-
- //新增消防设施模板
- addTemplate () {
- const dialogRef = this.dialog.open(addFireFightingFacilitiesFormworkComponent,{});
- dialogRef.afterClosed().subscribe(data=>{
- if (data) {this.getAllTemplate()}
- });
- }
-
- //编辑消防设施模板
- editTemplate () {
- if (this.selectFireProtectionFacilities) {
- let data = this.selectFireProtectionFacilities
- const dialogRef = this.dialog.open(editFireFightingFacilitiesFormworkComponent,{data});
- dialogRef.afterClosed().subscribe(data=>{
- if (data) {this.getAllTemplate()}
- });
- }
- }
-
- //禁启用消防设施模板
- enabledTemplate () {
- if (this.selectFireProtectionFacilities) {
- let data = this.selectFireProtectionFacilities
- if (data.enabled) {
- let newDate = {
- id: data.id,
- name: data.name,
- enabled: false}
- this.http.put(`/api/FacilityCategories/${data.id}`,newDate).subscribe(data=>{
- this.getAllTemplate()})
- } else{
- let newDate = {
- id: data.id,
- name: data.name,
- enabled: true}
- this.http.put(`/api/FacilityCategories/${data.id}`,newDate).subscribe(data=>{
- this.getAllTemplate()})
- }
- }
- }
-
- //删除消防设施模板
- deleteTemplate () {
- if (this.selectFireProtectionFacilities) {
- let isDelete = confirm('您确定要删除吗')
- if (isDelete) {
- this.http.delete(`/api/FacilityCategories/${this.selectFireProtectionFacilities.id}`).subscribe(data=>{
- this.http.get('/api/FacilityCategories').subscribe(data=>{
- this.allFireProtectionFacilities = data
- this.selectFireProtectionFacilities = data[this.FireProtectionFacilitiesIndex]
- this.builtInGrouping = []
- this.optionalGrouping = []
- this.getBuiltInGrouping()
- this.getOptionalGrouping() })//http.get
- })
- }
- }
- }
-
- //新增内置分组
- addBuiltIn () {
- if (this.selectFireProtectionFacilities) {
- let data = {template:this.selectFireProtectionFacilities, order:this.builtInGrouping[this.builtInGrouping.length-1]}
- const dialogRef = this.dialog.open(addBuiltInComponent,{data});
- dialogRef.afterClosed().subscribe(data=>{
- if (data) {this.getBuiltInGrouping()}
- });
- }
- }
-
- //禁启用内置分组
- enabledBuilt (e) {
- if (e.enabled) {
- let data = {
- id: e.id,
- name: e.name,
- order:e.order,
- enabled: false,
- facilityItems: e.facilityItems,
- facilityCategoryId: e.facilityCategoryId}
- this.http.put(`/api/FacilityGroups/${e.id}`,data).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('禁用成功','确定',config);
- this.getBuiltInGrouping()
- })
- } else {
- let data = {
- id: e.id,
- name: e.name,
- order:e.order,
- enabled: true,
- facilityItems: e.facilityItems,
- facilityCategoryId: e.facilityCategoryId}
- this.http.put(`/api/FacilityGroups/${e.id}`,data).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('启用成功','确定',config);
- this.getBuiltInGrouping()
- })
- }
- }
-
- //删除内置分组
- deleteBuilt (e) {
- let isDelete = confirm('您确定要删除吗')
- if (isDelete) {
- this.http.delete(`/api/FacilityGroups/${e.id}`).subscribe(data=>{
- this.getBuiltInGrouping()
- })
- }
- }
-
- //新增内置分组属性
- addBuiltInAttribute (e) {
- let data = e
- const dialogRef = this.dialog.open(addBuiltInAttributeComponent,{data});
- dialogRef.afterClosed().subscribe(data=>{
- if (data) {this.getBuiltInGrouping()}
- });
- }
-
- //编辑内置分组属性
- editBuiltInAttribute (e,element) {
- let data = {grouping:e, attribute: element}
- const dialogRef = this.dialog.open(editBuiltInAttributeComponent,{data});
- dialogRef.afterClosed().subscribe(data=>{
- if (data) {this.getBuiltInGrouping()}
- });
- }
-
- //删除内置分组属性
- deleteBuiltInAttribute (e,element){
- let isDelete = confirm('您确定要删除吗')
- if (isDelete) {
- e.facilityItems.splice(e.facilityItems.findIndex(item=>item==element),1)
- this.http.put(`/api/FacilityGroups/${e.id}`,e).subscribe(data=>{
- this.getBuiltInGrouping()
- })
- }
- }
-
- //内置分组排序
- selectBuiltIn = []; //checked选中的内置分组
-
- //内置分组change时
- changeBuilt (e,item) {
- if (e.checked) {
- this.selectBuiltIn.push(item)
- } else{this.selectBuiltIn.splice(this.selectBuiltIn.findIndex(items=>items==item),1)}
- }
-
- //内置分组上移
- topBuilt () {
- if(this.selectBuiltIn.length) {
- let attribute = this.selectBuiltIn[this.selectBuiltIn.length-1] //选中分组最后一项
- let newOrder = attribute.order //选中项的order
- let index = this.builtInGrouping.findIndex(item=>item==attribute) //选中项在数组中的位置
- if (index!=0) {
- this.builtInGrouping[index].order = this.builtInGrouping[index-1].order
- this.http.put(`/api/FacilityGroups/${this.builtInGrouping[index].id}`,this.builtInGrouping[index]).subscribe(data=>{
- this.builtInGrouping[index-1].order = newOrder
- this.http.put(`/api/FacilityGroups/${this.builtInGrouping[index-1].id}`,this.builtInGrouping[index-1]).subscribe(data=>{
- this.getBuiltInGrouping()
- })
- })
- }
- }
- }
-
- //内置分组下移
- bottomBuilt () {
- if(this.selectBuiltIn.length) {
- let attribute = this.selectBuiltIn[this.selectBuiltIn.length-1] //选中分组最后一项
- let newOrder = attribute.order //最后一项的order
- let index = this.builtInGrouping.findIndex(item=>item==attribute)
- if (index!= this.builtInGrouping.length-1) {
- this.builtInGrouping[index].order = this.builtInGrouping[index+1].order
- this.http.put(`/api/FacilityGroups/${this.builtInGrouping[index].id}`,this.builtInGrouping[index]).subscribe(data=>{
- this.builtInGrouping[index+1].order = newOrder
- this.http.put(`/api/FacilityGroups/${this.builtInGrouping[index+1].id}`,this.builtInGrouping[index+1]).subscribe(data=>{
- this.getBuiltInGrouping()
- })
- })
- }
- }
- }
-
-
-
- //新增可选分组
- addOptional () {
- if (this.selectFireProtectionFacilities) {
- let data = {template:this.selectFireProtectionFacilities, order:this.optionalGrouping[this.optionalGrouping.length-1]}
- const dialogRef = this.dialog.open(addOptionalComponent,{data});
- dialogRef.afterClosed().subscribe(data=>{
- if (data) {this.getOptionalGrouping()}
- });
- }
- }
-
- //是否可选-可选分组
- isOptional (e) {
- if (e.isOptional) {
- let data = {
- facilityCategoryId: e.facilityCategoryId,
- id: e.id,
- name: e.name,
- type: e.type,
- addMode: e.addMode,
- isOptional: false,
- order: e.order,
- enabled: e.enabled,
- propertyInfos: e.propertyInfos}
- this.http.put(`/api/OptionalGroups/${e.id}`,data).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('现状态为不可选','确定',config);
- this.getOptionalGrouping()
- })
- } else {
- let data = {
- facilityCategoryId: e.facilityCategoryId,
- id: e.id,
- name: e.name,
- type: e.type,
- addMode: e.addMode,
- isOptional: true,
- order: e.order,
- enabled: e.enabled,
- propertyInfos: e.propertyInfos}
- this.http.put(`/api/OptionalGroups/${e.id}`,data).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('现状态为可选','确定',config);
- this.getOptionalGrouping()
- })
- }
- }
-
- //禁启用可选分组
- enabledOptional (e) {
- if (e.enabled) {
- let data = {
- facilityCategoryId: e.facilityCategoryId,
- id: e.id,
- name: e.name,
- type: e.type,
- addMode: e.addMode,
- isOptional: e.isOptional,
- order: e.order,
- enabled: false,
- propertyInfos: e.propertyInfos}
- this.http.put(`/api/OptionalGroups/${e.id}`,data).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('禁用成功','确定',config);
- this.getOptionalGrouping()
- })
- } else {
- let data = {
- facilityCategoryId: e.facilityCategoryId,
- id: e.id,
- name: e.name,
- type: e.type,
- addMode: e.addMode,
- isOptional: e.isOptional,
- order: e.order,
- enabled: true,
- propertyInfos: e.propertyInfos}
- this.http.put(`/api/OptionalGroups/${e.id}`,data).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('启用成功','确定',config);
- this.getOptionalGrouping()
- })
- }
- }
-
- //删除可选分组
- deleteOptional (e) {
- let isDelete = confirm('您确定要删除吗')
- if (isDelete) {
- this.http.delete(`/api/OptionalGroups/${e.id}`).subscribe(data=>{
- this.getOptionalGrouping()
- })
- }
- }
-
- //新增可选分组属性
- addOptionalAttribute (e) {
- let data = e
- const dialogRef = this.dialog.open(addOptionalAttributeComponent,{data});
- dialogRef.afterClosed().subscribe(data=>{
- if (data) {this.getOptionalGrouping()}
- });
- }
-
- //编辑可选分组属性
- editOptionalAttribute (e,element) {
- let data = {grouping:e, attribute: element}
- const dialogRef = this.dialog.open(editOptionalAttributeComponent,{data});
- dialogRef.afterClosed().subscribe(data=>{
- if (data) {this.getOptionalGrouping()}
- });
- }
-
- //删除可选分组属性
- deleteOptionalAttribute (e,element) {
- let isDelete = confirm('您确定要删除吗')
- if (isDelete) {
- e.propertyInfos.splice(e.propertyInfos.findIndex(item=>item==element),1)
- this.http.put(`/api/OptionalGroups/${e.id}`,e).subscribe(data=>{
- this.getOptionalGrouping()
- })
- }
- }
-
- //可选分组排序
- selectOptional = []; //checked选中的可选分组
-
- //可选分组change时
- changeOptional (e,item) {
- if (e.checked) {
- this.selectOptional.push(item)
- } else{this.selectOptional.splice(this.selectOptional.findIndex(items=>items==item),1)}
- }
-
- //可选分组上移
- topOptional () {
- if(this.selectOptional.length) {
- let attribute = this.selectOptional[this.selectOptional.length-1] //选中分组最后一项
- let newOrder = attribute.order //选中项的order
- let index = this.optionalGrouping.findIndex(item=>item==attribute) //选中项在数组中的位置
- if (index!=0) {
- this.optionalGrouping[index].order = this.optionalGrouping[index-1].order
- this.http.put(`/api/OptionalGroups/${this.optionalGrouping[index].id}`,this.optionalGrouping[index]).subscribe(data=>{
- this.optionalGrouping[index-1].order = newOrder
- this.http.put(`/api/OptionalGroups/${this.optionalGrouping[index-1].id}`,this.optionalGrouping[index-1]).subscribe(data=>{
- this.getOptionalGrouping()
- })
- })
- }
- }
- }
-
- //可选分组下移
- bottomOptional () {
- if(this.selectOptional.length) {
- let attribute = this.selectOptional[this.selectOptional.length-1] //选中分组最后一项
- let newOrder = attribute.order //选中项的order
- let index = this.optionalGrouping.findIndex(item=>item==attribute) //选中项在数组中的位置
- if (index!=this.optionalGrouping.length-1) {
- this.optionalGrouping[index].order = this.optionalGrouping[index+1].order
- this.http.put(`/api/OptionalGroups/${this.optionalGrouping[index].id}`,this.optionalGrouping[index]).subscribe(data=>{
- this.optionalGrouping[index+1].order = newOrder
- this.http.put(`/api/OptionalGroups/${this.optionalGrouping[index+1].id}`,this.optionalGrouping[index+1]).subscribe(data=>{
- this.getOptionalGrouping()
- })
- })
- }
- }
- }
-
-
-
-}
-
-
-
-//新增消防设施模板
-@Component({
- selector: 'app-addFireFightingFacilitiesFormwork',
- templateUrl: './addFireFightingFacilitiesFormwork.html',
- styleUrls: ['./fire-fighting-facilities-formwork.component.scss']
-})
-export class addFireFightingFacilitiesFormworkComponent {
-
- constructor(private http:HttpClient,public dialogRef: MatDialogRef) { }
-
- ngOnInit(): void {
-
- }
-
- //提交表单
- onSubmit (e) {
- let data = {
- name: e.name,
- enabled: true
- }
- this.http.post('/api/FacilityCategories',data).subscribe(data=>{
- this.dialogRef.close(data);
- })
- }
-
-}
-
-
-
-//编辑消防设施模板
-@Component({
- selector: 'app-editFireFightingFacilitiesFormwork',
- templateUrl: './editFireFightingFacilitiesFormwork.html',
- styleUrls: ['./fire-fighting-facilities-formwork.component.scss']
-})
-export class editFireFightingFacilitiesFormworkComponent {
-
- constructor(private http:HttpClient,public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) { }
-
- ngOnInit(): void {
- this.templateName = this.data.name
- }
-
- templateName:any; //模板名字
-
- //提交表单
- onSubmit (e) {
- let data = {
- id: this.data.id,
- name: this.templateName,
- enabled: this.data.enabled}
- this.http.put(`/api/FacilityCategories/${this.data.id}`,data).subscribe(data=>{
- this.dialogRef.close('success');
- })
- }
-
-}
-
-
-
-//新增消防设施模板内置分组
-@Component({
- selector: 'app-addBuiltIn',
- templateUrl: './addBuilt-in.html',
- styleUrls: ['./fire-fighting-facilities-formwork.component.scss']
-})
-export class addBuiltInComponent {
-
- constructor(private http:HttpClient,public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) { }
-
- ngOnInit(): void {
- if (this.data.order) {
- this.order = this.data.order.order+1
- } else{this.order=0}
- }
-
- order:number; //order
- //提交表单
- onSubmit (e) {
- let data = {
- name: e.name,
- order: this.order,
- enabled: true,
- facilityItems: [],
- facilityCategoryId: this.data.template.id}
- this.http.post(`/api/FacilityGroups`,data).subscribe(data=>{
- this.dialogRef.close(data)
- })
- }
-
-}
-
-
-
-//新增消防设施模板内置分组属性
-@Component({
- selector: 'app-addBuiltInAttribute',
- templateUrl: './addBuilt-inAttribute.html',
- styleUrls: ['./fire-fighting-facilities-formwork.component.scss']
-})
-export class addBuiltInAttributeComponent {
-
- constructor(private http:HttpClient,public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) { }
-
- ngOnInit(): void {
- if (this.data.facilityItems.length) {
- this.order = this.data.facilityItems[this.data.facilityItems.length-1].order+1
- } else{
- this.order = 0
- }
- }
-
- order:number; //order
-
- //提交表单
- onSubmit (e) {
- let newFacilityItems = {name:e.name,isEachFloor:e.isEachFloor=='true'? true: false,order:this.order,isMerged:e.isMerged=='true'? true: false,}
- this.data.facilityItems.push(newFacilityItems)
- let data = {
- id: this.data.id,
- name: this.data.name,
- order: this.data.order,
- enabled: this.data.enabled,
- facilityItems: this.data.facilityItems,
- facilityCategoryId: this.data.facilityCategoryId}
- this.http.put(`/api/FacilityGroups/${this.data.id}`,data).subscribe(data=>{
- this.dialogRef.close('success')
- })
- }
-
-}
-
-
-
-//编辑消防设施模板内置分组属性
-@Component({
- selector: 'app-editBuiltInAttribute',
- templateUrl: './editBuilt-inAttribute.html',
- styleUrls: ['./fire-fighting-facilities-formwork.component.scss']
-})
-export class editBuiltInAttributeComponent {
-
- constructor(private http:HttpClient,public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) { }
-
- ngOnInit(): void {
- this.attributeName = this.data.attribute.name
- this.attributeIsEachFloor = String(this.data.attribute.isEachFloor)
- this.attributeIsMerged = String(this.data.attribute.isMerged)
- this.attributeOrder = this.data.attribute.order
- }
-
- attributeName:any; //属性名
- attributeIsEachFloor:any; //是否逐层统计
- attributeIsMerged:any; //是否合并
- attributeOrder:number; //属性order
-
- //提交表单
- onSubmit (e) {
- let data = {
- name: e.name,
- isEachFloor: e.isEachFloor=='true'? true: false,
- isMerged: e.isMerged=='true'? true: false,
- order: e.order}
- this.data.grouping.facilityItems.splice(this.data.grouping.facilityItems.findIndex(item=>item==this.data.attribute),1)
- this.data.grouping.facilityItems.push(data)
- this.http.put(`/api/FacilityGroups/${this.data.grouping.id}`,this.data.grouping).subscribe(data=>{
- this.dialogRef.close('success')
- })
- }
-
-
-
-}
-
-
-
-//新增消防设施模板可选分组
-@Component({
- selector: 'app-addOptional',
- templateUrl: './addOptional.html',
- styleUrls: ['./fire-fighting-facilities-formwork.component.scss']
-})
-export class addOptionalComponent {
-
- constructor(private http:HttpClient,public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) { }
-
- ngOnInit(): void {
- if (this.data.order) {
- this.order = this.data.order.order+1
- } else{this.order=0}
- }
-
- order:number; //order
-
- //提交表单
- onSubmit (e) {
- let data = {
- facilityCategoryId: this.data.template.id,
- name: e.name,
- type: Number(e.type),
- addMode: Number(e.addMode),
- isOptional: true,
- order: this.order,
- enabled: true,
- propertyInfos: []
- }
- this.http.post('/api/OptionalGroups',data).subscribe(data=>{
- this.dialogRef.close(data)
- })
- }
-
-
-
-}
-
-
-
-export interface Food {
- value: number;
- viewValue: string;
-}
-//新增消防设施模板可选分组属性
-@Component({
- selector: 'app-addOptionalAttribute',
- templateUrl: './addOptionalAttribute.html',
- styleUrls: ['./fire-fighting-facilities-formwork.component.scss']
-})
-export class addOptionalAttributeComponent {
-
- constructor(private http:HttpClient,public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) { }
-
- ngOnInit(): void {
- if (this.data.propertyInfos.length) {
- this.order = this.data.propertyInfos[this.data.propertyInfos.length-1].order+1
- } else{
- this.order = 0
- }
- }
-
- //定义属性数据
- propertyType:Food[]=[
- {value:0, viewValue: '单行文本'},
- {value:1, viewValue: '多行文本'},
- {value:2, viewValue: '数值'},
- {value:3, viewValue: '图片'},
- {value:4, viewValue: '图片数量'},
- {value:5, viewValue: '方向'},
- {value:6, viewValue: '布尔值'},
- {value:7, viewValue: '供给区域'},
- {value:8, viewValue: '供给类型'}]
-
-
- order:number; //order
- //提交表单
- onSubmit (e) {
- let data = {
- propertyName: e.propertyName,
- propertyValue: e.propertyValue,
- propertyType: e.propertyType,
- required: e.required=='true'? true: false,
- ruleName: e.ruleName,
- ruleValue: e.ruleValue,
- physicalUnit: e.physicalUnit,
- order: this.order,
- enabled: true,
- visible: true,
- tag: e.tag}
- this.data.propertyInfos.push(data)
- this.http.put(`/api/OptionalGroups/${this.data.id}`,this.data).subscribe(data=>{
- this.dialogRef.close('success')
- })
- }
-
-
-
-}
-
-
-
-//编辑消防设施模板可选分组属性
-@Component({
- selector: 'app-editOptionalAttribute',
- templateUrl: './editOptionalAttribute.html',
- styleUrls: ['./fire-fighting-facilities-formwork.component.scss']
-})
-export class editOptionalAttributeComponent {
-
- constructor(private http:HttpClient,public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) { }
-
- ngOnInit(): void {
- this.propertyName = this.data.attribute.propertyName,
- this.propertyType = this.data.attribute.propertyType
- this.propertyValue = this.data.attribute.propertyValue,
- this.required = String(this.data.attribute.required),
- this.ruleName = this.data.attribute.ruleName,
- this.ruleValue = this.data.attribute.ruleValue,
- this.physicalUnit = this.data.attribute.physicalUnit,
- this.order = this.data.attribute.order,
- this.tag = this.data.attribute.tag
- }
-
- //定义属性数据
- type:Food[]=[
- {value:0, viewValue: '单行文本'},
- {value:1, viewValue: '多行文本'},
- {value:2, viewValue: '数值'},
- {value:3, viewValue: '图片'},
- {value:4, viewValue: '图片数量'},
- {value:5, viewValue: '方向'},
- {value:6, viewValue: '布尔值'},
- {value:7, viewValue: '供给区域'},
- {value:8, viewValue: '供给类型'}]
-
- propertyName:any; //属性名
- propertyType:number; //属性类型
- propertyValue:any; //默认值
- required:any; //是否必填
- ruleName:any; //验证规则
- ruleValue:any; //验证内容
- physicalUnit:any; //单位
- order:number; //order
- tag:any; //注释说明
-
- //提交表单
- onSubmit (e) {
- let data = {
- propertyName: e.propertyName,
- propertyValue: e.propertyValue,
- propertyType: e.propertyType,
- required: e.required=='true'? true: false,
- ruleName: e.ruleName,
- ruleValue: e.ruleValue,
- physicalUnit: e.physicalUnit,
- order: e.order,
- enabled: true,
- visible: true,
- tag: e.tag}
- this.data.grouping.propertyInfos.splice(this.data.grouping.propertyInfos.findIndex(item=>item==this.data.attribute),1)
- this.data.grouping.propertyInfos.push(data)
- this.http.put(`/api/OptionalGroups/${this.data.grouping.id}`,this.data.grouping).subscribe(data=>{
- this.dialogRef.close('success')
- })
- }
-
-
-
-}
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-template/editingFireControl.html b/src/app/ui/fire-fighting-template/editingFireControl.html
deleted file mode 100644
index 9d2be33..0000000
--- a/src/app/ui/fire-fighting-template/editingFireControl.html
+++ /dev/null
@@ -1,45 +0,0 @@
-编辑消防要素模板
-
-
-
-
-
-
-
-
- 请选择消防要素
-
-
-
-
-
-
-
- {{node.name}}
-
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
-
- {{node.name}}
-
-
-
-
-
-
-
- 确定
-
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-template/fire-fighting-template.component.html b/src/app/ui/fire-fighting-template/fire-fighting-template.component.html
deleted file mode 100644
index 0b62ce3..0000000
--- a/src/app/ui/fire-fighting-template/fire-fighting-template.component.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
- 消防要素模板
-
- 创建模板
-
-
-
-
-
- 模板名称
- {{element.name}}
-
-
-
- 操作
-
-
- 编辑
-
-
- 启用
-
-
- 禁用
-
-
- 删除
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-template/fire-fighting-template.component.scss b/src/app/ui/fire-fighting-template/fire-fighting-template.component.scss
deleted file mode 100644
index 06f7d26..0000000
--- a/src/app/ui/fire-fighting-template/fire-fighting-template.component.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-table {
- width: 100%;
- text-align: center;
- .cdk-header-cell {
- text-align: center;
- }
-}
-.magin {
- margin: 10px;
- font-weight: 600;
-}
-.marginLeft {
- margin-left: 5px;
-}
-.tree {
- height: 450px;
- overflow: auto;
-}
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-template/fire-fighting-template.component.ts b/src/app/ui/fire-fighting-template/fire-fighting-template.component.ts
deleted file mode 100644
index f9aae74..0000000
--- a/src/app/ui/fire-fighting-template/fire-fighting-template.component.ts
+++ /dev/null
@@ -1,309 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatTreeFlattener, MatTreeFlatDataSource } from '@angular/material/tree';
-import { FlatTreeControl } from '@angular/cdk/tree';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-
-
-
-@Component({
- selector: 'app-fire-fighting-template',
- templateUrl: './fire-fighting-template.component.html',
- styleUrls: ['./fire-fighting-template.component.scss']
-})
-export class FireFightingTemplateComponent implements OnInit {
-
- constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
-
- ngOnInit(): void {
- this.getAllFireFighting()
- }
-
- displayedColumns: string[] = ['name','operation'];
- aLLFireFighting:any; //所有消防要素模板
-
- //获取所有消防要素模板
- getAllFireFighting () {
- this.http.get('/api/FireCategories').subscribe(data=>{
- this.aLLFireFighting=data
- })
- }
-
-
-
- //新增消防模块窗口
- establish () {
- let dialogRef = this.dialog.open(NewFireFighting,
- {
- width:'600px',
- });
- dialogRef.afterClosed().subscribe((data)=>{
- if (data) {this.getAllFireFighting()}
- });
- }
-
- //编辑消防模块窗口
- edit (e) {
- let dialogRef = this.dialog.open(EditFireClassification,
- {
- width:'600px',
- data:{e}
- });
- dialogRef.afterClosed().subscribe((data)=>{
- if (data) {this.getAllFireFighting()}
- });
- }
-
- //启用
- enable (e) {
- this.http.put(`/api/FireCategories/${e.id}`,{
- id:e.id,
- name:e.name,
- enabled:true,
- fireElements:e.fireElements
- }).subscribe(data=>{
- this.getAllFireFighting()
- })
- }
-
- //禁用
- prohibit (e) {
- this.http.put(`/api/FireCategories/${e.id}`,{
- id:e.id,
- name:e.name,
- enabled:false,
- fireElements:e.fireElements
- }).subscribe(data=>{
- this.getAllFireFighting()
- })
- }
-
- //删除
- delete (e) {
- let isTrue = confirm('您确定要删除吗')
- if (isTrue) {
- this.http.delete(`/api/FireCategories/${e}`).subscribe(data=>{
- this.getAllFireFighting()
- })
- }
- }
-
-
-
-
-}
-
-
-
-//新增消防分类窗口
-@Component({
- selector: 'app-newFireFighting',
- templateUrl: './newFireFighting.html',
- styleUrls: ['./fire-fighting-template.component.scss']
-})
-export class NewFireFighting {
- newdata = [];
-
- private _transformer = (node, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- computed:node.computed,
- order:node.order,
- children:node.children ||'',
- tag:node.tag,
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
-
- constructor(private http:HttpClient,public snackBar: MatSnackBar,
- public dialogRef: MatDialogRef) {}
-
- ngOnInit(): void {
- this.rendering()
- }
-
-
-
- checkedAll:boolean=false; //全选
- checkedList:any=[]; //选中的消防要素
-
- //渲染Tree
- rendering () {
- this.http.get('/api/FireElements').subscribe((data:any)=>{
- this.newdata=[]
- function getparentNode(parentId){
- return data.find((item)=>{
- return item.id == parentId
- })
- }
- data.forEach(item => {
- var parentNode = getparentNode(item.parentId);
- if(parentNode){
- if(!parentNode.children){
- parentNode.children = []
- }
- parentNode.children.push(item)
- }else{
- if(!item.parentId){
- this.newdata.push(item)
- }
- }
- });
- this.dataSource.data = this.newdata;
- this.treeControl.expandAll()
- })
- }
- hasChild = (_: number, node: any) => node.expandable;
-
- //change时判断是否选中
- changed (e,id) {
- if (e.checked) {
- this.checkedList.push(id)
- } else if (e.checked == false) {
- this.checkedList.splice(this.checkedList.findIndex(item => item === id), 1)
- }
- }
-
-
-
- //提交创建
- onSubmit (e) {
- if(this.checkedList.length) {
- this.http.post('/api/FireCategories',{
- name:e.name,
- enabled:true,
- fireElements:this.checkedList
- }).subscribe(data=>{
- this.dialogRef.close('success')
- })
- }else {
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择消防要素','确定',config);
- }
- }
-
-
-
-}
-
-
-
-
-
-//编辑消防分类窗口
-@Component({
- selector: 'app-editingFire',
- templateUrl: './editingFireControl.html',
- styleUrls: ['./fire-fighting-template.component.scss']
-})
-export class EditFireClassification {
- newdata = [];
-
- private transformer = (node, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- computed:node.computed,
- order:node.order,
- children:node.children ||'',
- tag:node.tag,
- checked:node.checked,
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this.transformer, node => node.level, node => node.expandable, node => node.children);
- newDataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
-
- constructor(private http:HttpClient,public snackBar: MatSnackBar,
- public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public newdate) {}
-
- ngOnInit(): void {
- this.fireID=this.newdate.e.id
- this.fireName=this.newdate.e.name
- this.rendering()
- }
-
-
-
- fireID:any; //模板id
- fireName:any; //模板name
- checkedAll:boolean=false; //全选
- checkedList:any=[]; //选中的消防要素
-
- //渲染Tree
- rendering () {
- this.http.get(`/api/FireCategories/${this.newdate.e.id}/FireElements`).subscribe((data:any)=>{
- data.forEach(item=>{
- if (item.checked === true) {
- this.checkedList.push(item.id)
- }
- })
- this.newdata=[]
- function getparentNode(parentId){
- return data.find((item)=>{
- return item.id == parentId
- })
- }
- data.forEach(item => {
- var parentNode = getparentNode(item.parentId);
- if(parentNode){
- if(!parentNode.children){
- parentNode.children = []
- }
- parentNode.children.push(item)
- }else{
- if(!item.parentId){
- this.newdata.push(item)
- }
- }
- });
- this.newDataSource.data = this.newdata;
- this.treeControl.expandAll()
- })
- }
- hasChild = (_: number, node: any) => node.expandable;
-
- //change时判断是否选中
- changed (e,id) {
- if (e.checked) {
- this.checkedList.push(id)
- } else if (e.checked == false) {
- this.checkedList.splice(this.checkedList.findIndex(item => item === id), 1)
- }
- }
-
- //提交编辑修改
- onSubmit (e) {
- if (this.checkedList.length) {
- this.http.put(`/api/FireCategories/${this.fireID}`,{
- id:this.fireID,
- name:e.name,
- enabled:this.newdate.e.enabled,
- fireElements:this.checkedList
- }).subscribe(data=>{
- this.dialogRef.close('success')
- })
- } else{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择消防要素','确定',config);
- }
- }
-
-
-
-}
\ No newline at end of file
diff --git a/src/app/ui/fire-fighting-template/newFireFighting.html b/src/app/ui/fire-fighting-template/newFireFighting.html
deleted file mode 100644
index 9d9fa46..0000000
--- a/src/app/ui/fire-fighting-template/newFireFighting.html
+++ /dev/null
@@ -1,44 +0,0 @@
-创建消防要素模板
-
-
-
-
-
-
-
-
- 请选择消防要素
-
-
-
-
-
-
-
- {{node.name}}
-
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
-
- {{node.name}}
-
-
-
-
-
-
-
- 确定
-
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-protection-elements/editingFireControl.html b/src/app/ui/fire-protection-elements/editingFireControl.html
deleted file mode 100644
index 0abff80..0000000
--- a/src/app/ui/fire-protection-elements/editingFireControl.html
+++ /dev/null
@@ -1,47 +0,0 @@
-编辑消防要素
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 是否统计:
-
-
- 是
-
-
- 否
-
-
-
-
-
-
-
- 信息录入
- 预案管理
- 指挥系统
-
-
-
-
-
-
- 确定
-
- 取消
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-protection-elements/establish.html b/src/app/ui/fire-protection-elements/establish.html
deleted file mode 100644
index 50f86b8..0000000
--- a/src/app/ui/fire-protection-elements/establish.html
+++ /dev/null
@@ -1,41 +0,0 @@
-创建消防要素
-
-
-
-
-
-
-
-
-
- 是否统计:
-
-
- 是
-
-
- 否
-
-
-
-
-
-
-
- 信息录入
- 预案管理
- 指挥系统
-
-
-
-
-
-
- 确定
-
- 取消
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-protection-elements/fire-protection-elements.component.html b/src/app/ui/fire-protection-elements/fire-protection-elements.component.html
deleted file mode 100644
index b390b48..0000000
--- a/src/app/ui/fire-protection-elements/fire-protection-elements.component.html
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
- 消防要素
-
- add_circle_outline
-
-
-
-
-
- {{node.name}}
-
-
- add_circle_outline
-
-
- create
-
-
- assessment
-
-
- assessment
-
-
- delete
-
-
-
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
- {{node.name}}
-
-
- add_circle_outline
-
-
- create
-
-
- assessment
-
-
- assessment
-
-
- delete
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/fire-protection-elements/fire-protection-elements.component.scss b/src/app/ui/fire-protection-elements/fire-protection-elements.component.scss
deleted file mode 100644
index 12c709e..0000000
--- a/src/app/ui/fire-protection-elements/fire-protection-elements.component.scss
+++ /dev/null
@@ -1,36 +0,0 @@
-
-.magin {
- margin: 8px 0 8px 10px;
- font-weight: 600;
-}
-
-.Box {
- width: 100%;
- height: 90%;
- overflow-y: auto;
- display: flex;
- padding-left: 10px;
- .right {
- width: 100%;
- }
-}
-
-.mat-tree-node {
- width: 380px;
- position: relative;
- .float {
- position: absolute;
- right: 0;
- }
-}
-.maginTop {
- margin: 10px 0;
-}
-
-.example-radio-group {
- flex-direction: column;
-}
-
-.example-radio-button {
-margin: 5px;
-}
\ No newline at end of file
diff --git a/src/app/ui/fire-protection-elements/fire-protection-elements.component.ts b/src/app/ui/fire-protection-elements/fire-protection-elements.component.ts
deleted file mode 100644
index bb78d75..0000000
--- a/src/app/ui/fire-protection-elements/fire-protection-elements.component.ts
+++ /dev/null
@@ -1,284 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatTreeFlattener, MatTreeFlatDataSource } from '@angular/material/tree';
-import { FlatTreeControl } from '@angular/cdk/tree';
-
-@Component({
- selector: 'app-fire-protection-elements',
- templateUrl: './fire-protection-elements.component.html',
- styleUrls: ['./fire-protection-elements.component.scss']
-})
-export class FireProtectionElementsComponent implements OnInit {
- data:any =[]
- newdata = [];
-
- private _transformer = (node, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- computed:node.computed,
- order:node.order,
- children:node.children ||'',
- tag:node.tag
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
-
- constructor(private http:HttpClient,public dialog: MatDialog) { }
-
- ngOnInit(): void {
- this.getAllfireControl()
- }
-
- //获取所有消防要素
- getAllfireControl () {
- this.http.get('/api/FireElements').subscribe(
- (data:any)=>{
- this.newdata=[]
- function getparentNode(parentId){
- return data.find((item)=>{
- return item.id == parentId
- })
- }
- data.forEach(item => {
- var parentNode = getparentNode(item.parentId);
- if(parentNode){
- if(!parentNode.children){
- parentNode.children = []
- }
- parentNode.children.push(item)
- }else{
- if(!item.parentId){
- this.newdata.push(item)
- }
- }
- });
- this.dataSource.data = this.newdata;
- }
-
- )
- }
-
- //更新数据后重新渲染Tree
- getlist = ():void=>{
- this.http.get('/api/FireElements').subscribe(
- (data:any)=>{
- this.newdata = []
- function getparentNode(parentId){
- return data.find((item)=>{
- return item.id == parentId
- })
- }
- data.forEach(item => {
- var parentNode = getparentNode(item.parentId);
- if(parentNode){
- if(!parentNode.children){
- parentNode.children = []
- }
- parentNode.children.push(item)
- }else{
- if(!item.parentId){
- this.newdata.push(item)
- }
- }
- });
-
- const nodes = this.treeControl.dataNodes;
- const expandNodes = [];
- nodes.forEach((item) => {
- if(item.expandable && this.treeControl.isExpanded(item)){
- expandNodes.push(item.id);
- }
- });
- this.dataSource.data = this.newdata;
- let newNodes = this.treeControl.dataNodes;
- newNodes = newNodes.filter(n => {
- return expandNodes.indexOf(n.id) >= 0;
- });
- newNodes.forEach(item => {
- this.treeControl.expand(item);
- });
- }
- )
- }
-
- hasChild = (_: number, node: any) => node.expandable;
-
- //打开创建一级消防要素窗口
- addNew () {
- let dialogRef = this.dialog.open(Establish);
- dialogRef.afterClosed().subscribe((data)=>{
- if (data) {this.getlist()}
- });
- }
-
- //打开创建窗口
- establish (e) {
- let dialogRef = this.dialog.open(Establish,
- {
- data:e
- });
- dialogRef.afterClosed().subscribe((data)=>{
- if (data) {this.getlist()}
- });
- }
-
- //打开编辑窗口
- edit (e) {
- let dialogRef = this.dialog.open(EditingFireControl,
- {
- data:e
- });
- dialogRef.afterClosed().subscribe((data)=>{
- if (data) {this.getlist()}
- });
- }
-
- //取消统计
- noStatistics (e) {
- this.http.put(`/api/FireElements/${e.id}`,{
- expandable:e.expandable,
- id:e.id,
- name:e.name,
- level:e.level,
- order:e.order,
- computed:false,
- tag:e.tag,
- parentId:e.parentId,
- children:e.children
- }).subscribe(data=>{
- this.getlist()
- })
- }
-
- //确定统计
- statistics (e) {
- this.http.put(`/api/FireElements/${e.id}`,{
- expandable:e.expandable,
- id:e.id,
- name:e.name,
- level:e.level,
- order:e.order,
- computed:true,
- tag:e.tag,
- parentId:e.parentId,
- children:e.children
- }).subscribe(data=>{
- this.getlist()
- })
- }
-
- //删除
- delete (e) {
- let isTrue = confirm(`您确定要删除${e.name}吗`)
- if (isTrue) {
- this.http.delete(`/api/FireElements/${e.id}`).subscribe(data=>{
- this.getlist()
- })
- }
- }
-
-
-
-
-}
-
-
-
-//创建窗口组件
-@Component({
- selector: 'app-establish',
- templateUrl: './establish.html',
- styleUrls: ['./fire-protection-elements.component.scss']
-})
-export class Establish {
-
- constructor(private http:HttpClient,
- public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) {}
-
- ngOnInit(): void {}
-
- order:any; //创建消防要素order排序值
-
- //提交创建消防要素
- onSubmit (e) {
- if (this.data) {
- if(this.data.children == '') {
- this.order=0
- } else if (this.data.children.length) {
- this.order=this.data.children[this.data.children.length-1].order+1
- }
- this.http.post('/api/FireElements',{
- name:e.name,
- order:this.order,
- computed:e.radio,
- tag:e.tag,
- parentId:this.data.id
- }).subscribe(data=>{
- this.dialogRef.close('success')
- })
- } else {
- this.http.post('/api/FireElements',{
- name:e.name,
- order:0,
- computed:e.radio,
- tag:e.tag,
- parentId:null
- }).subscribe(data=>{
- this.dialogRef.close('success')
- })
- }
-
- }
-
-
-
-}
-
-
-
-//编辑窗口组件
-@Component({
- selector: 'app-editingFireControl',
- templateUrl: './editingFireControl.html',
- styleUrls: ['./fire-protection-elements.component.scss']
-})
-export class EditingFireControl {
-
- constructor(private http:HttpClient,
- public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) {}
-
- ngOnInit(): void {
- this.fireName=this.data.name
- }
-
- fireName:any; //消防要素name
-
- //编辑提交
- onSubmit (e) {
- this.http.put(`/api/FireElements/${this.data.id}`,{
- expandable:this.data.expandable,
- id:this.data.id,
- name:e.name,
- level:this.data.level,
- order:e.order,
- computed:this.data.computed,
- tag:this.data.tag,
- parentId:this.data.parentId,
- children:this.data.children
- }).subscribe(data=>{
- this.dialogRef.close('success')
- })
- }
-
-
-
- }
diff --git a/src/app/ui/grid/grid.component.html b/src/app/ui/grid/grid.component.html
deleted file mode 100644
index 9014316..0000000
--- a/src/app/ui/grid/grid.component.html
+++ /dev/null
@@ -1,34 +0,0 @@
-网格列表
-
-
- 我是页眉
-
- 我是页脚
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/app/ui/grid/grid.component.scss b/src/app/ui/grid/grid.component.scss
deleted file mode 100644
index f302609..0000000
--- a/src/app/ui/grid/grid.component.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-mat-grid-tile {
- background: lightblue;
-}
-h1{
- font-size: 26px;
-}
-
-img {
- width: 100%;
- height: 100%;
-}
-
diff --git a/src/app/ui/grid/grid.component.spec.ts b/src/app/ui/grid/grid.component.spec.ts
deleted file mode 100644
index 6410123..0000000
--- a/src/app/ui/grid/grid.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { GridComponent } from './grid.component';
-
-describe('GridComponent', () => {
- let component: GridComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ GridComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(GridComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/grid/grid.component.ts b/src/app/ui/grid/grid.component.ts
deleted file mode 100644
index 203cb0c..0000000
--- a/src/app/ui/grid/grid.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-grid',
- templateUrl: './grid.component.html',
- styleUrls: ['./grid.component.scss']
-})
-export class GridComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/src/app/ui/home/home.component.html b/src/app/ui/home/home.component.html
new file mode 100644
index 0000000..f0f913a
--- /dev/null
+++ b/src/app/ui/home/home.component.html
@@ -0,0 +1,31 @@
+
diff --git a/src/app/ui/home/home.component.scss b/src/app/ui/home/home.component.scss
new file mode 100644
index 0000000..9c713f1
--- /dev/null
+++ b/src/app/ui/home/home.component.scss
@@ -0,0 +1,84 @@
+.content {
+ width: 100%;
+ height: 100%;
+ box-sizing: border-box;
+ padding: 0.009766rem;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ header {
+ width: 100%;
+ height: 0.585938rem;
+ line-height: 0.585938rem;
+ text-align: center;
+ position: relative;
+ label { font-weight: 550; }
+ .floatRight {
+ position: absolute;
+ top: 0.146484rem;
+ right: 0.244141rem;
+ height: 0.292969rem;
+ line-height: 0.292969rem;
+ font-size: 0.136719rem;
+ .mat-icon {
+ vertical-align: middle;
+ cursor: pointer;
+ color: #999;
+ margin-left: 0.048828rem;
+ }
+ }
+ }
+ .center {
+ flex: 1;
+ background: #F4F5F9;
+ display: flex;
+ flex-direction: column;
+ padding: 0.097656rem;
+ box-sizing: border-box;
+ overflow: hidden;
+ }
+}
+
+//头部
+.oneColor {
+ background-image:-webkit-linear-gradient(right,#f18d6f,#FF4923);
+ -webkit-background-clip:text;
+ -webkit-text-fill-color:transparent;
+}
+.twoColor {
+ background-image:-webkit-linear-gradient(right,rgb(38, 91, 238),skyblue,);
+ -webkit-background-clip:text;
+ -webkit-text-fill-color:transparent;
+}
+button.mat-menu-item { text-align: center; }
+
+//中间内容区
+.centerHeader {
+ width: 100%;
+ height: 0.488281rem;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ div { margin: 0 0.097656rem }
+ input {
+ height: 0.292969rem;
+ line-height: 0.292969rem;
+ padding-left: 0.048828rem;
+ border-radius: 0.195313rem;
+ outline: none;
+ border: 0.009766rem solid #999;
+ }
+ button {
+ width: 0.78125rem;
+ height: 0.341797rem;
+ line-height: 0.341797rem;
+ border-radius: 0.195313rem;
+ outline: none;
+ border: none;
+ color: #fff;
+ }
+}
+.mat-datepicker-toggle{ vertical-align: middle; }
+.centerTable {
+ flex: 1;
+}
\ No newline at end of file
diff --git a/src/app/ui/card/card.component.spec.ts b/src/app/ui/home/home.component.spec.ts
similarity index 58%
rename from src/app/ui/card/card.component.spec.ts
rename to src/app/ui/home/home.component.spec.ts
index e141708..490e81b 100644
--- a/src/app/ui/card/card.component.spec.ts
+++ b/src/app/ui/home/home.component.spec.ts
@@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { CardComponent } from './card.component';
+import { HomeComponent } from './home.component';
-describe('CardComponent', () => {
- let component: CardComponent;
- let fixture: ComponentFixture;
+describe('HomeComponent', () => {
+ let component: HomeComponent;
+ let fixture: ComponentFixture;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ CardComponent ]
+ declarations: [ HomeComponent ]
})
.compileComponents();
}));
beforeEach(() => {
- fixture = TestBed.createComponent(CardComponent);
+ fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
diff --git a/src/app/ui/home/home.component.ts b/src/app/ui/home/home.component.ts
new file mode 100644
index 0000000..1642a5e
--- /dev/null
+++ b/src/app/ui/home/home.component.ts
@@ -0,0 +1,55 @@
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { FormControl } from '@angular/forms';
+import { DateAdapter } from '@angular/material/core';
+import { MatDialog } from '@angular/material/dialog';
+import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
+import { Router } from '@angular/router';
+import { CacheTokenService } from 'src/app/http-interceptors/cache-token.service';
+
+@Component({
+ selector: 'app-home',
+ templateUrl: './home.component.html',
+ styleUrls: ['./home.component.scss']
+})
+export class HomeComponent implements OnInit {
+
+ constructor(private http:HttpClient,public token:CacheTokenService,public dialog: MatDialog,private router:Router,public snackBar: MatSnackBar,private adapter: DateAdapter,) { }
+
+ ngOnInit(): void {
+ this.adapter.setLocale('CH');
+ this.enddate = new FormControl(new Date()); //日历结束时间显示
+ }
+
+ enddate:any; //查询时间
+
+ //退出系统
+ signOut () {
+ let out = confirm("您确定要退出吗")
+ if(out) {
+ this.http.post('/api/Account/SignOut',{}).subscribe(data=> {
+ this.token.delete()
+ sessionStorage.clear()
+ window.localStorage.clear()
+ this.router.navigate(['/login'])
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'bottom';
+ config.duration = 3000
+ this.snackBar.open('成功退出','确定',config);
+ })
+ }
+ }
+
+ //查询
+ query () {
+
+ }
+
+ //新增
+ add () {
+
+ }
+
+
+
+}
diff --git a/src/app/ui/list/list.component.html b/src/app/ui/list/list.component.html
deleted file mode 100644
index 2d7dbdf..0000000
--- a/src/app/ui/list/list.component.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
-列表分隔线
-
- Item 1
-
- Item 2
-
- Item 3
-
-
-导航列表
-
-
- {{ link.name }}
-
- 跳转到编辑页面
-
-
-
-
-行动列表
-
- 行动一
- 行动二
-
-
-选择列表
-
-
- {{shoe}}
-
-
-
- 已选: {{shoes.selectedOptions.selected.length}}种
-
-
-多行列表且带图标
-
-
- folder
- item标题
-
- 我是
- -- xxx
-
-
-
-
diff --git a/src/app/ui/list/list.component.scss b/src/app/ui/list/list.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/ui/list/list.component.spec.ts b/src/app/ui/list/list.component.spec.ts
deleted file mode 100644
index beacd15..0000000
--- a/src/app/ui/list/list.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ListComponent } from './list.component';
-
-describe('ListComponent', () => {
- let component: ListComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ ListComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ListComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/list/list.component.ts b/src/app/ui/list/list.component.ts
deleted file mode 100644
index 969eb9c..0000000
--- a/src/app/ui/list/list.component.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router,ActivatedRoute } from '@angular/router'
-@Component({
- selector: 'app-list',
- templateUrl: './list.component.html',
- styleUrls: ['./list.component.scss']
-})
-export class ListComponent implements OnInit {
-
- constructor(private router:Router,private route:ActivatedRoute) { }
-
- ngOnInit() {
- }
- links = [
- {id:0,name:'小红'},
- {id:1,name:'小绿'},
- {id:2,name:'小兰'}
- ]
- typesOfShoes: string[] = ['耐克', '阿迪达斯', '彪马', '亚瑟士', '斯凯奇'];
- showInfo(link){
- this.router.navigate([link.id],{relativeTo:this.route})
- }
- save () {
-
- }
-
- undo () {}
-}
diff --git a/src/app/ui/material-bank/addAttribute.html b/src/app/ui/material-bank/addAttribute.html
deleted file mode 100644
index 6f60aca..0000000
--- a/src/app/ui/material-bank/addAttribute.html
+++ /dev/null
@@ -1,71 +0,0 @@
-新增属性
-
\ No newline at end of file
diff --git a/src/app/ui/material-bank/addmatlibrary.component.html b/src/app/ui/material-bank/addmatlibrary.component.html
deleted file mode 100644
index 6ac2f4d..0000000
--- a/src/app/ui/material-bank/addmatlibrary.component.html
+++ /dev/null
@@ -1,23 +0,0 @@
-
- 创建素材库
-
-
-
-
-
-
- 信息录入
- 预案管理
- 指挥系统
-
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/material-bank/addmatlibrary.component.ts b/src/app/ui/material-bank/addmatlibrary.component.ts
deleted file mode 100644
index 366b348..0000000
--- a/src/app/ui/material-bank/addmatlibrary.component.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import { HttpClient } from '@angular/common/http';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-
-
-
-@Component({
- selector: 'addmatlibrary',
- templateUrl: './addmatlibrary.component.html',
- styleUrls: ['./material-bank.component.scss']
- })
- export class AddMatLibrary {
- myControl = new FormControl();
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) {}
-
- ngOnInit(): void {
- if (this.data.length) {
- this.order = this.data[this.data.length - 1].order + 1
- } else {
- this.order =0
- }
- }
-
- onNoClick(): void {
- this.dialogRef.close();
- }
-
- order:number; //order
-
- onSubmit(value){
- let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
- this.http.post("/api/AssetLibraries",{
- id: "",
- name: value.name,
- order: this.order,
- tag: value.tag,
- enabled: true,
- modifiedTime: time
- }).subscribe(data=>{
- this.dialogRef.close();
- })
- }
-
-
-
- }
\ No newline at end of file
diff --git a/src/app/ui/material-bank/addoriginalcopy.component.html b/src/app/ui/material-bank/addoriginalcopy.component.html
deleted file mode 100644
index eb0ac05..0000000
--- a/src/app/ui/material-bank/addoriginalcopy.component.html
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
- 新增原件
-
-
-
-
-
-
-
-
- 点
- 多点连线
- 多边形
-
-
-
- 是否来自建筑:
-
- 是
- 否
-
-
-
- 是否允许连接:
-
- 是
- 否
-
-
-
-
- 固定大小:
-
- 是
- 否
-
-
-
- 填充方式:
-
- 颜色
- 图片
-
-
-
-
-
-
-
-
- 简单
- 九宫格
- 平铺
-
-
-
-
-
-
-
-
-
-
图片:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
消防要素列表
-
-
-
-
- {{node.name}}
-
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
- {{node.name}}
-
-
-
-
-
-
-
-
-
-
- 确定
- 取消
-
-
-
diff --git a/src/app/ui/material-bank/addoriginalcopy.component.ts b/src/app/ui/material-bank/addoriginalcopy.component.ts
deleted file mode 100644
index abe2bea..0000000
--- a/src/app/ui/material-bank/addoriginalcopy.component.ts
+++ /dev/null
@@ -1,242 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import { HttpClient } from '@angular/common/http';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import format from 'date-fns/format';
-import { TreeService } from '../../http-interceptors/tree.service'
-import { FileUploader } from 'ng2-file-upload'
-import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar';
-import { DomSanitizer } from '@angular/platform-browser'
-import { NgZone } from '@angular/core';
-import { ChangeDetectorRef } from '@angular/core'
-@Component({
- selector: 'addoriginalcopy',
- templateUrl: './addoriginalcopy.component.html',
- styleUrls: ['./material-bank.component.scss']
- })
- export class AddOriginalCopy {
-
- uploader:FileUploader = new FileUploader({
- url: "/api/Objects/PlanPlatform",
- method: "POST",
- itemAlias: "uploadedfile",
- removeAfterUpload:true
- });
-
-
-
- private _transformer = (node, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- children:node.children
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- myControl = new FormControl();
- displaynoneid = ""//选择的关联消防id
- displaynonename = ""
- padding = "0"
- pige = "1"
- from = "1"
- connect = "1"
- isallowconnect :boolean = true
- constructor(public changeDetectorRef:ChangeDetectorRef,private zone: NgZone,private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,private tree:TreeService,private sanitizer:DomSanitizer,public snackBar: MatSnackBar) {}
-
- isallowconnect1(){
- this.isallowconnect = true
- }
- isallowconnect2(){
- this.isallowconnect = false
- }
- onNoClick(): void {
- this.dialogRef.close();
- }
- ngOnInit() {
- // console.log(222,this.data.sourceMaterial)
- //获取所有的消防要素
- this.http.get('/api/FireElements').subscribe(data=>{
- this.dataSource.data = this.tree.toTree(data)
- })
- }
- add(e){
- this.displaynoneid = e.id
- this.displaynonename = e.name
- }
- isImg = true
- selectedcolor2(){
- this.isImg = true
- this.selectedcolor ="#066eed"
- this.colorIndex = 0
- }
- selectedimg2(){
- this.isImg = false
- this.selectedcolor =""
- }
- hasChild = (_: number, node: any) => node.expandable;
-
- colors = ['#066eed','#00e5ef','#00ef76','#ffff00','#efb522','#20b4ac','#836eff','#ff8d00','#ef00ef','#ffa17a','#ff6a6a','#ff0000','#ff6eb5','#00bfff','#54ff9f','#00cd00','#00ffff','#6495ed','#ffdbb9','#836eff']
- isshow = true//选择颜色或者上传图片
- colorIndex:any=0; //选中的颜色的index
- selectedcolor = "#066eed"
- imgUrl = ""//返回来的图片地址后缀
- selectcolor(item,key){
- if(this.colorIndex != key){
- this.colorIndex = key
- }
- this.selectedcolor = item
- }
-
- imgsrc = "../../../assets/images/upload2.png"
-
- filechange(e){
- const file = e.srcElement.files[0]; // 获取图片这里只操作一张图片
- var reader = new FileReader();
- reader.readAsDataURL(file);
- var image:any = new Image();
- reader.onload = function(){
- image.src = reader.result
- }
- setTimeout(() => {
- if(image.width > 128 && image.height > 128){
- var obj = document.getElementById('selectedfile') ;
- obj.outerHTML=obj.outerHTML;
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择分辨率小于128*128的图片','确定',config);
- }else{
- this.upload()
- }
- }, 100);
- }
-
- upload(){
- if(!this.uploader.queue[0]){
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择文件','确定',config);
- }else{
- this.uploader.queue[0].upload();//开始上传
- this.uploader.queue[0].onSuccess = (response, status, headers) => {
- // 上传文件成功
- if (status == 201) {
- // 上传文件后获取服务器返回的数据
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('上传成功','确定',config);
-
- let tempRes = JSON.parse(response);
- this.imgUrl = tempRes.objectName
- this.imgsrc = '/api/Objects/PlanPlatform/' + this.imgUrl
- }else {
- // 上传文件后获取服务器返回的数据错误
- }
- };
- this.uploader.queue[0].onError = (response, status, headers) => {
- if (status == 401) {
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('上传失败','确定',config);
- }
- };
- }
-
- }
- showtype:string = '0' //默认渲染方式
- isbordernum:boolean = false
- changeshowtype(e){
- if(e.value == "1"){
- this.isbordernum = true
- }else{
- this.isbordernum = false
- }
- }
- onSubmit(value){
- value.pige=Boolean(Number(value.pige))
- value.from=Boolean(Number(value.from))
- value.connect=Boolean(Number(value.connect))
- if(value.showtype == "1"){
- this.http.post(`/api/Assets`,{
- id:"",
- name:value.name,
- width: 0,
- height: 0,
- angle: 0,
- interactiveMode: Number(value.tag),//交互方式
- isFromBuilding:value.from,
- canConnect:value.connect,
- holeMaxCount:value.connect ? value.maxconnect : 0,
- fixedSize: value.pige,
- fillMode: Number(value.padding),//填充方式
- color: this.selectedcolor+'80',
- imageUrl:'/api/Objects/PlanPlatform/' + this.imgUrl,
- drawMode: Number(value.showtype) , //渲染方式
- border:{
- x: value.left,
- y: value.bottom,
- z: value.right,
- w: value.top
- },
- order: this.data.sourceMaterial.length,
- enabled: true,
- propertyInfos: [],
- fireElementId:this.displaynoneid
- },
- {
- params: {
- libraryId:this.data.node.id,
- }
- }).subscribe((data)=>{
- this.dialogRef.close("ooo");
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('新建成功','确定',config);
- })
- }else{
- this.http.post(`/api/Assets`,{
- id:"",
- name:value.name,
- width: 0,
- height: 0,
- angle: 0,
- interactiveMode: Number(value.tag),//交互方式
- isFromBuilding:value.from,
- canConnect:value.connect,
- holeMaxCount:value.connect ? value.maxconnect : 0,
- fixedSize: value.pige,
- fillMode: Number(value.padding),//填充方式
- color: this.selectedcolor+'80',
- imageUrl:'/api/Objects/PlanPlatform/' + this.imgUrl,
- drawMode: Number(value.showtype) , //渲染方式
- border:{},
- order: this.data.sourceMaterial.length,
- enabled: true,
- propertyInfos: [],
- fireElementId:this.displaynoneid
- },
- {
- params: {
- libraryId:this.data.node.id,
- }
- }).subscribe((data)=>{
- this.dialogRef.close("ooo");
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('新建成功','确定',config);
- })
- }
- }
- }
\ No newline at end of file
diff --git a/src/app/ui/material-bank/attribute.html b/src/app/ui/material-bank/attribute.html
deleted file mode 100644
index 369a50d..0000000
--- a/src/app/ui/material-bank/attribute.html
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
{{data.name}}
-
-
- description
-
-
- arrow_upward
-
-
- arrow_downward
-
-
-
-
-
-
-
-
-
- add_box
-
-
-
-
-
-
-
- 名称
-
- {{element.propertyName}}
-
-
-
-
- 类型
-
- 单行文本
- 多行文本
- 数值
- 图片
- 图片数量
- 方向
- 布尔值
- 供给区域
- 供给类型
-
-
-
-
- 默认值
-
- {{element.propertyValue}}
-
-
-
-
- 必填
-
- 是
- 否
-
-
-
-
- 单位
-
- {{element.physicalUnit}}
-
-
-
-
- 操作
-
- border_color
- visibility
- visibility_off
- block
- block
- delete
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/material-bank/editAttribute.html b/src/app/ui/material-bank/editAttribute.html
deleted file mode 100644
index 22a190c..0000000
--- a/src/app/ui/material-bank/editAttribute.html
+++ /dev/null
@@ -1,71 +0,0 @@
-编辑属性
-
\ No newline at end of file
diff --git a/src/app/ui/material-bank/editmatlibrary.component.html b/src/app/ui/material-bank/editmatlibrary.component.html
deleted file mode 100644
index c86c117..0000000
--- a/src/app/ui/material-bank/editmatlibrary.component.html
+++ /dev/null
@@ -1,23 +0,0 @@
-
- 修改素材库
-
-
-
-
-
-
- 信息录入
- 预案管理
- 指挥系统
-
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/material-bank/editmatlibrary.component.ts b/src/app/ui/material-bank/editmatlibrary.component.ts
deleted file mode 100644
index fcbba63..0000000
--- a/src/app/ui/material-bank/editmatlibrary.component.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import { HttpClient } from '@angular/common/http';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-@Component({
- selector: 'editmatlibrary',
- templateUrl: './editmatlibrary.component.html',
- styleUrls: ['./material-bank.component.scss']
- })
- export class EditMatLibrary {
- myControl = new FormControl();
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) {}
- name:any
- input:any
- ngOnInit(): void {
- this.name = this.data.material.name
- this.input = this.data.material.tag
- }
- onNoClick(): void {
-
- this.dialogRef.close();
- }
- onSubmit(value){
- let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
- this.http.put(`/api/AssetLibraries/${this.data.material.id}`,{
- id: this.data.material.id,
- name: value.name,
- order: this.data.material.order,
- tag: value.tag,
- enabled: true,
- modifiedTime: time
- }).subscribe(data=>{
- this.dialogRef.close();
- })
- }
- }
\ No newline at end of file
diff --git a/src/app/ui/material-bank/editoriginalcopy.component.html b/src/app/ui/material-bank/editoriginalcopy.component.html
deleted file mode 100644
index e00e323..0000000
--- a/src/app/ui/material-bank/editoriginalcopy.component.html
+++ /dev/null
@@ -1,149 +0,0 @@
-
-
- 编辑原件
-
-
-
-
-
-
-
-
- 点
- 多点连线
- 多边形
-
-
-
- 是否来自建筑:
-
- 是
- 否
-
-
-
- 是否允许连接:
-
- 是
- 否
-
-
-
-
- 固定大小:
-
- 是
- 否
-
-
-
-
- 填充方式:
-
- 颜色
- 图片
-
-
-
-
-
-
-
-
- 简单
- 九宫格
- 平铺
-
-
-
-
-
-
-
-
-
-
-
-
-
图片:
-
-
-
-
-
-
-
-
-
-
-
-
消防要素列表
-
-
-
-
- {{node.name}}
-
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
- {{node.name}}
-
-
-
-
-
-
-
-
-
-
- 确定
- 取消
-
-
-
diff --git a/src/app/ui/material-bank/editoriginalcopy.component.ts b/src/app/ui/material-bank/editoriginalcopy.component.ts
deleted file mode 100644
index 4a7f751..0000000
--- a/src/app/ui/material-bank/editoriginalcopy.component.ts
+++ /dev/null
@@ -1,305 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import { HttpClient } from '@angular/common/http';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-import { TreeService } from '../../http-interceptors/tree.service'
-import { FileUploader } from 'ng2-file-upload'
-import { DomSanitizer } from '@angular/platform-browser'
-@Component({
- selector: 'editoriginalcopy',
- templateUrl: './editoriginalcopy.component.html',
- styleUrls: ['./material-bank.component.scss']
- })
- export class EditOriginalCopy {
-
- uploader:FileUploader = new FileUploader({
- url: "/api/Objects/PlanPlatform",
- method: "POST",
- itemAlias: "uploadedfile",
- removeAfterUpload:true
- });
-
-
-
- private _transformer = (node, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- children:node.children
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- myControl = new FormControl();
-
- displaynonename = ""
- iscolor =null
- isimg = null
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,private tree:TreeService,private sanitizer:DomSanitizer,public snackBar: MatSnackBar) {}
-
- colors = ['#066eed','#00e5ef','#00ef76','#ffff00','#efb522','#20b4ac','#836eff','#ff8d00','#ef00ef','#ffa17a','#ff6a6a','#ff0000','#ff6eb5','#00bfff','#54ff9f','#00cd00','#00ffff','#6495ed','#ffdbb9','#836eff']
- isshow = true//选择颜色或者上传图片
- colorIndex:any=0; //选中的颜色的index
- selectedcolor = "#066eed"
- imgUrl = ""//返回来的图片地址后缀
- defaultname = this.data.Original.name//点击的原件的name
- OriginalId = this.data.Original.id//点击的原件的id
- OriginalfireElementId = this.data.Original.fireElementId//点击的原件的消防id
- displaynoneid = this.OriginalfireElementId//选择的关联消防id
- OriginalfireElementName = null //点击的原件的消防name
- OriginalpropertyInfos = this.data.Original.propertyInfos//点击原件的属性信息
- OriginalinteractiveMode = String(this.data.Original.interactiveMode) //点击原件的交互方式
- OriginalfixedSize = String(Number(this.data.Original.fixedSize))//点击原件的固定大小
- from = String(Number(this.data.Original.isFromBuilding))
- Originalpadding = null
- Originalimageurl = this.data.Original.imageUrl//点击原件的图片地址
- Originalcolor = this.data.Original.color
- padding = "0"//
- showtype:any//默认渲染方式
-
- left:number
- right:number
- top:number
- bottom:number
- isbordernum:boolean
- connect:any
- isallowconnect :boolean = true
- connectvalue:any
- onNoClick(): void {
- this.dialogRef.close();
- }
- isallowconnect1(){
- this.isallowconnect = true
- }
- isallowconnect2(){
- this.isallowconnect = false
- }
- changeshowtype(e){
- if(e.value == "1"){
- this.isbordernum = true
- }else{
- this.isbordernum = false
- }
- }
- ngOnInit() {
- // console.log(this.data.Original)
- if(this.data.Original.drawMode == 1){
- this.isbordernum = true
- }else{
- this.isbordernum = false
- }
- this.connectvalue = this.data.Original.holeMaxCount
- if(this.data.Original.canConnect){
- this.connect = "1"
- }else{
- this.connect = "0"
- }
- this.isallowconnect = this.data.Original.canConnect
-
- this.showtype = this.data.Original.drawMode + ''
- if(this.data.Original.border){
- this.left = this.data.Original.border.x
- this.bottom = this.data.Original.border.y
- this.right = this.data.Original.border.z
- this.top = this.data.Original.border.w
- }
-
- if(this.data.Original.fillMode == 1){
- this.isxxx = false
- this.colorIndex = null
- }
- if(this.Originalcolor){//如果该原件有颜色
- let Originalcolordata =(this.Originalcolor).slice(0,7)
- this.colors.forEach((item,index)=>{
- if(item == Originalcolordata){
- this.colorIndex = index
- }
- })
- }
-
-
-
- this.http.get('/api/FireElements').subscribe((data:any)=>{
- this.dataSource.data = this.tree.toTree(data)
- data.forEach(item=>{
- if(item.id === this.OriginalfireElementId){
- this.OriginalfireElementName = item.name
- }
- })
- })
-
- this.dataSource.data.forEach(item=>{
-
- })
-
- if(this.data.Original.fillMode == 0){
- this.Originalpadding ="0"
- }else{
- this.Originalpadding ="1"
- }
- }
- add(e){
- this.displaynoneid = e.id
- this.OriginalfireElementName = e.name
- }
- hasChild = (_: number, node: any) => node.expandable;
- //控制20种颜色是否显示
- isxxx = true
- //点击选择颜色
- selcolor(){
- this.isxxx = true
- if(this.data.Original.fillMode == 1){
- this.colorIndex = null
- }
- }
- //点击选择图片
- selimg(){
- this.isxxx = false
- }
- selectcolor(item,key){
- if(this.colorIndex != key){
- this.colorIndex = key
- }
- this.selectedcolor = item
- }
- imgsrc = ""
- filechange(e){
- const file = e.srcElement.files[0]; // 获取图片这里只操作一张图片
- var reader = new FileReader();
- reader.readAsDataURL(file);
- var image:any = new Image();
- reader.onload = function(){
- image.src = reader.result
- }
- setTimeout(() => {
- if(image.width > 128 && image.height > 128){
- var obj = document.getElementById('selectedfile') ;
- obj.outerHTML=obj.outerHTML;
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择分辨率小于128*128的图片','确定',config);
- }else{
- this.upload()
- }
- }, 100);
- }
- upload(){
- if(!this.uploader.queue[0]){
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择文件','确定',config);
- }else{
- this.uploader.queue[0].upload();//开始上传
- this.uploader.queue[0].onSuccess = (response, status, headers) => {
- // 上传文件成功
- if (status == 201) {
- // 上传文件后获取服务器返回的数据
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('上传成功','确定',config);
- let tempRes = JSON.parse(response);
- this.imgUrl = tempRes.objectName
- this.Originalimageurl = '/api/Objects/PlanPlatform/' + this.imgUrl
- }else {
- // 上传文件后获取服务器返回的数据错误
- }
- };
- this.uploader.queue[0].onError = (response, status, headers) => {
- if (status == 401) {
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('无权限上传','确定',config);
- }
- };
- }
-
- }
- newimageUrl = ""
- onSubmit(value){
- // console.log(value)
- if(!this.imgUrl){//判断编辑时是否重新上传了照片
- this.newimageUrl = this.Originalimageurl
- }else{
- this.newimageUrl = '/api/Objects/PlanPlatform/' + this.imgUrl
- }
- value.from=Boolean(Number(value.from))
- value.pige=Boolean(Number(value.pige))
- value.connect=Boolean(Number(value.connect))
- if(value.showtype == "1"){
- this.http.put(`/api/Assets/${this.OriginalId}`,{
- id:this.OriginalId,
- name:value.name,
- width: 0,
- height: 0,
- angle: 0,
- interactiveMode: Number(value.tag),//交互方式
- isFromBuilding:value.from,
- canConnect:value.connect,
- holeMaxCount:value.connect ? value.maxconnect : 0,
- fixedSize: value.pige,
- fillMode: Number(value.padding),//填充方式
- color: this.selectedcolor+'80',
- imageUrl:this.newimageUrl,
- drawMode: Number(value.showtype) , //渲染方式
- border: {
- x: value.left,
- y: value.bottom,
- z: value.right,
- w: value.top
- },
- order: this.data.Original.order,
- enabled: true,
- propertyInfos: this.OriginalpropertyInfos,
- fireElementId:this.displaynoneid
- }).subscribe((data)=>{
- this.dialogRef.close("ooo");
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('修改成功','确定',config);
- })
- }else{
- this.http.put(`/api/Assets/${this.OriginalId}`,{
- id:this.OriginalId,
- name:value.name,
- width: 0,
- height: 0,
- angle: 0,
- interactiveMode: Number(value.tag),//交互方式
- isFromBuilding:value.from,
- canConnect:value.connect,
- holeMaxCount:value.connect ? value.maxconnect : 0,
- fixedSize: value.pige,
- fillMode: Number(value.padding),//填充方式
- color: this.selectedcolor+'80',
- imageUrl:this.newimageUrl,
- drawMode: Number(value.showtype) , //渲染方式
- border: {},
- order: this.data.Original.order,
- enabled: true,
- propertyInfos: this.OriginalpropertyInfos,
- fireElementId:this.displaynoneid
- }).subscribe((data)=>{
- this.dialogRef.close("ooo");
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('修改成功','确定',config);
- })
- }
-
-
- }
- }
\ No newline at end of file
diff --git a/src/app/ui/material-bank/material-bank.component.html b/src/app/ui/material-bank/material-bank.component.html
deleted file mode 100644
index e4eb8ba..0000000
--- a/src/app/ui/material-bank/material-bank.component.html
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
keyboard_arrow_down
-
chevron_right
-
素材库管理
-
-
- add_circle_outline
-
-
- create
-
-
- block
-
-
- delete
-
-
-
-
-
- folder {{item.name}}
- block
-
-
-
-
-
-
-
-
-
{{material.name}}
-
-
- add_circle_outline
-
-
- create
-
-
- block
-
-
- delete
-
- 查看属性
- 选择原件
-
-
-
-
-
-
-
{{item.name}}
-
block
-
-
-
-
-
-
-
-
diff --git a/src/app/ui/material-bank/material-bank.component.scss b/src/app/ui/material-bank/material-bank.component.scss
deleted file mode 100644
index a42d67c..0000000
--- a/src/app/ui/material-bank/material-bank.component.scss
+++ /dev/null
@@ -1,310 +0,0 @@
-.content {
- padding: 0 0 0 10px;
- width: 100%;
- height: 90%;
- overflow-x: hidden;
- overflow-y: auto;
- display: flex;
- .leftBox {
- flex: 20%;
- padding-top: 10px;
- }
- .rightBox {
- border-left: 1px solid #999;
- flex: 80%;
- display: flex;
- flex-direction: column;
- .topBox {
- flex:1;
- .originalScript {
- border-bottom: 1px solid #999;
- background-color: #fafafa;
- padding:5px 0;
- width: 100%;
- padding-left: 20px;
- font-weight: 500;
- display: flex;
- flex-direction: row;
- p{
- margin-top: 11px;
- }
- .mat-icon {
- vertical-align:middle;
- }
- }
- }
- }
-}
-
-
-
-.bank {
- display: flex;
- font-size: 18px;
- font-weight: 500;
-}
-
-.mat-icon {
- width: 18px;
- height: 18px;
- vertical-align:top;
- margin-right: 8px;
- cursor:pointer;
-}
-.material {
- cursor:pointer;
- height: 30px;
- font-size: 16px;
- margin-top: 10px;
- padding-left: 25px;
- .btn {
- color: #FFC122;
- }
- .blockBtn {
- float: right;
- margin-right: 15px;
- width: 16px;
- height: 16px;
- }
-}
-.imgBox {
- padding: 5px 0 0 5px;
- margin-top: 5px;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- .imgDiv {
- span{
- overflow: hidden;
- text-overflow: ellipsis;
- }
- display: inline-block;
- margin-right: 10px;
- margin-bottom: 10px;
- width: 90px;
- height: 165px;
- text-align: center;
- img {
- width: 100%;
- }
- }
-}
-
-.attribute {
- padding-left: 25px;
- display: flex;
- flex-direction: row;
- background-color: #d7d7d7;
- div {
- margin-right: 25px;
- }
- .attributeLeft{
- padding-top: 8px;
- flex: 75%;
- }
-}
-.btnBox .mat-icon{
- padding: 8px;
-}
-.overFlow {
- height: 500px;
- overflow: auto;
-}
-table {
- width: 100%;
- text-align: center;
- .cdk-header-cell {
- text-align: center;
- }
-}
-
-
-
-.active {
- background-color: rgba(225,225,225,0.8)
-}
-.OriginalActive {
- background-color: rgba(225,225,225,0.8);
-}
-
-.btn{
- text-align: center;
- button{
- margin: 0 8px;
- }
-}
-.addbtn{
- width: 584px;
- height: 32px;
- border-top: 1px solid black;
- text-align: center;
- padding-top: 6px;
- button{
- margin: 0 6px;
- }
-}
-.mat-radio-button {
- font-size: 14px;
- margin-right: 5px;
-}
-.topbox{
- height: 32px;
- border-bottom: 1px solid black;
-
-}
-.mainbox{
- position: relative;
- width: 582px;
- height: 656px;
- .mainleft{
- height: 646px;
- width: 290px;
- float: left;
- border-right: 1px solid black;
- padding-top: 10px;
- mat-form-field{
- display: block;
- width: 220px;
- }
- .padding{
- margin-top: 12px;
- }
- .color{
- height: 50px;
- .color1{
-
- margin-bottom: 5px;
- margin-top: 12px;
- li{
- width: 23px;
- height: 23px;
- list-style: none;
- // margin: 2px;
- float: left;
- border: 2px solid white;
- }
- }
- }
- }
- .mainright{
- width: 288px;
- height: 654px;
- float: left;
- overflow: auto;
- label{
- font-weight: 900;
- }
- }
-}
-.coloractive{
- border: 2px solid black !important;
-
-}
-.pigepadding{
- font-size: 16px;
-}
-.selectoriginalcopybox{
- width: 423px;
- height: 300px;
- border: 1px solid black;
- overflow: auto;
- margin-bottom: 10px;
-}
-.originalcopyimg{
- width: 100px;
- height: 120px;
- float: left;
- text-align: center;
- img{
- width: 70px;
- height: 70px;
- }
- p{
- font-size: 11px;
- height: 11px;
- }
-
-}
-.selectedback{
- background-color:rgba(0,165,219,0.5);
-}
-.selecteditem{
- // background: grey;
- cursor:not-allowed;
- background-color: rgba(225, 225, 225, 0.8)
-}
-.selecteditemimg{
- opacity: 0.3;
- filter: alpha(opacity=30);
-}
-.matname{
- margin-left: 6px;
-
-}
-.divImg{
- width: 95px;
- height: 95px;
- font-size: 15px;
- margin-left: 48px;
- margin-top: -11px;
- border: 1px dashed grey;
- padding: 4px;
- img{
- width: 100%;
- height: 100%;
-
- }
-}
-.Input{
- width: 102px;
- height: 103px;
- position: absolute;
- left:0px;
- top: 0px;
- cursor: pointer;
- opacity:0
-}
-.relevancefire{
- margin-top: 5px;
-}
-.fireli{
- list-style: none;
-
-}
-.fireli:hover{
- background: rgba(225, 225, 225, 0.8);
- cursor: pointer;
-}
-.firebtn{
- line-height: 24px;
-}
-.image{
- margin-bottom: 6px;
-}
-
-.positionup{
- position: absolute;
- top:407px;
- left: 50px
-}
-.isbordernum{
- position: absolute;
- top: 410px;
- left: 50px
-}
-.from{
- margin-bottom: 10px;
-}
-.border{
- .bordernum{
- display: block;
- }
- .borderinputbox{
- float: left;
- width: 142px;
- input{
- width: 98px;
- }
- }
-
-}
\ No newline at end of file
diff --git a/src/app/ui/material-bank/material-bank.component.ts b/src/app/ui/material-bank/material-bank.component.ts
deleted file mode 100644
index eb9e703..0000000
--- a/src/app/ui/material-bank/material-bank.component.ts
+++ /dev/null
@@ -1,572 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { AddMatLibrary } from './addmatlibrary.component'
-import { EditMatLibrary } from './editmatlibrary.component'
-import { AddOriginalCopy } from './addoriginalcopy.component'
-import { MatTableDataSource } from '@angular/material/table';
-import { EditOriginalCopy } from './editoriginalcopy.component'
-import { SelectOriginalCopy } from './selectoriginalcopy.component'
-import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-
-
-
-@Component({
- selector: 'app-material-bank',
- templateUrl: './material-bank.component.html',
- styleUrls: ['./material-bank.component.scss']
-})
-export class MaterialBankComponent implements OnInit {
-
- constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
-
- ngOnInit(): void {
- this.http.get('/api/AssetLibraries').subscribe(data=>{
- this.material = data[0]
- this.allMaterialBank = data
- this.getSourceMaterial()
- })
- }
-
- allMaterialBank:any = []; //所有素材库
- material:any={name:''}; //选中的素材库
- materialIndex:any=0; //选中的素材库index
-
- sourceMaterial:any; //素材库对应所有原件
- Original:any; //选中的原件
- OriginalIndex:any=null; //选中的原件index
- isshow = true//左侧列表的显示隐藏
-
- //收起左侧列表
- showlist(){
- this.isshow = !this.isshow
- }
- //获取所有素材库
- getMaterialBank () {
- this.http.get('/api/AssetLibraries').subscribe(data=>{
- this.allMaterialBank = data
- this.material = data[this.materialIndex]
- })
- }
-
- //获得指定素材库所有原件
- getSourceMaterial () {
- this.sourceMaterial = null
- if (this.material) {
- let data = {
- libraryId:this.material.id
- }
- this.http.get('/api/Assets',{
- params:data
- }).subscribe(data=>{
- this.sourceMaterial = data
- this.Original = data[this.OriginalIndex]
- })
- }
- }
-
- //选中素材库
- add (e,index) {
- this.Original = null
- this.OriginalIndex = null
- if (this.materialIndex != index) {
- this.material = e
- this.materialIndex = index
- this.getSourceMaterial()
- }
- }
-
- //选中原件
- addOriginal (e,index) {
- this.Original = e
- this.OriginalIndex = index
- }
-
- //打开查看属性弹窗
- viewProperties () {
- if(this.Original){
- let data = this.Original
- const dialogRef = this.dialog.open(attributeComponent,
- {width: '1000px',data});
- dialogRef.afterClosed().subscribe(
- (data)=>{if(data){this.getSourceMaterial()}}
- )
- }else {
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择原件','确定',config);
- }
- }
-
-
-
-
- //新增素材库
- addmatlibrary(){
- let data = this.allMaterialBank || []
- const dialogRef = this.dialog.open(AddMatLibrary, {//调用open方法打开对话框并且携带参数过去
- width: '260px',
- data
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- this.getMaterialBank ()
- }
- );
- }
-
- //编辑素材库
- editmatlibrary(){
- const dialogRef = this.dialog.open(EditMatLibrary, {//调用open方法打开对话框并且携带参数过去
- width: '260px',
- data: {allMaterialBank:this.allMaterialBank,material:this.material}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- this.getMaterialBank ()
- }
- );
- }
-
- //删除素材库
- delete(){
- var isdeleted = confirm(`确定要删除${this.material.name}素材库吗?`)
- if(isdeleted){
- //请求删除接口
- this.http.delete(`/api/AssetLibraries/${this.material.id}`).subscribe( data=>{
- this.materialIndex -= 1//删除之后焦点前移
- this.getMaterialBank ()
- })
- }
- }
-
- //禁启用素材库
- disabled(){
- let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
- if(this.material.enabled){
- this.http.put(`/api/AssetLibraries/${this.material.id}`,{
- id: this.material.id,
- name: this.material.name,
- order: this.material.order,
- tag: this.material.tag,
- enabled: false,
- modifiedTime: time
- }).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('禁用成功','确定',config);
- this.getMaterialBank ()
- })
- }else{
- this.http.put(`/api/AssetLibraries/${this.material.id}`,{
- id: this.material.id,
- name: this.material.name,
- order: this.material.order,
- tag: this.material.tag,
- enabled: true,
- modifiedTime: time
- }).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('启用成功','确定',config);
- this.getMaterialBank ()
- })
- }
-
- }
-
- //新增素材原件
- addoriginalcopy(node){
- const dialogRef = this.dialog.open(AddOriginalCopy, {//调用open方法打开对话框并且携带参数过去
- // height:"715px",
- width:"640px",
- data: {allMaterialBank:this.allMaterialBank,node:node,sourceMaterial:this.sourceMaterial}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
- this.getSourceMaterial ()
- }
-
- }
- );
- }
- //修改素材原件
- editoriginalcopy(node){
- if(this.Original){
- const dialogRef = this.dialog.open(EditOriginalCopy, {//调用open方法打开对话框并且携带参数过去
- // height:"580px",
- width:"640px",
- data: {allMaterialBank:this.allMaterialBank,node:node,Original:this.Original}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
- this.getSourceMaterial ()
- }
- }
- );
- }else{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择原件','确定',config);
- }
-
- }
-
- //禁启用原件
- disableoriginal(material){
- if(this.Original){
- this.http.put(`/api/Assets/${this.Original.id}`,{
- id:this.Original.id,
- name:this.Original.name,
- width: this.Original.width,
- height: this.Original.height,
- angle: this.Original.angle,
- interactiveMode:this.Original.interactiveMode,//交互方式
- fixedSize: this.Original.fixedSize,
- fillMode: this.Original.fillMode,//填充方式
- color: this.Original.color,
- imageUrl:this.Original.imageUrl,
- order: this.Original.order,
- enabled: !this.Original.enabled,
- propertyInfos: this.Original.propertyInfos,
- fireElementId:this.Original.fireElementId
- }).subscribe((data)=>{
- this.getSourceMaterial ()
- })
- }else{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择原件','确定',config);
- }
- }
-
- //删除原件
- deleteoriginal(material){
- if(this.Original){
- var isdeleted = confirm(`确定要删除当前原件吗?`)
- if(isdeleted){
- //请求删除接口
- this.http.delete(`/api/Assets`,{
- params:{
- libraryId:material.id,
- id:this.Original.id
- }
- }).subscribe( data=>{
- this.getSourceMaterial ()
- })
- }
- }else{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择原件','确定',config);
- }
- }
-
- //选择原件素材 material为当前素材库的信息
- selectoriginal(material){
- const dialogRef = this.dialog.open(SelectOriginalCopy, {//调用open方法打开对话框并且携带参数过去
- // height:"525px",
- data: {allMaterialBank:this.allMaterialBank,material:material}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
- this.getSourceMaterial ()
- }
-
- }
- );
- }
-
-
-
-}
-
-
-
-//原件对应所有属性弹窗
-@Component({
- selector: 'app-attribute',
- templateUrl: './attribute.html',
- styleUrls: ['./material-bank.component.scss']
-})
-export class attributeComponent {
-
- constructor(private http:HttpClient,public dialog: MatDialog,
- public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) { }
-
- ngOnInit(): void {
- if (this.data.propertyInfos == null) {
- this.data.propertyInfos = []
- }
- this.setIndex()
- this.dataSource = new MatTableDataSource(this.data.propertyInfos)
- }
-
- displayedColumns = ['checked', 'name', 'type', 'default','required','physicalUnit','operation'];
- dataSource:any=[]; //当前原件属性渲染table
- dataSourceIndex:any=[]; //选中属性的index
-
-
-
- //封装函数每次更改,重新获取下标
- setIndex () {
- if (this.data.propertyInfos) {
- this.data.propertyInfos.forEach((item,index)=>{
- item.index = index
- })
- }
- }
-
- //点击checked框获取当前属性index
- checkedChange (e,index) {
- if (e.checked) {
- this.dataSourceIndex.push(index)
- } else {
- this.dataSourceIndex.splice(this.dataSourceIndex.findIndex(item=>item==index),1)
- }
- }
-
- //上移
- toTop () {
- if(this.dataSourceIndex.length) {
- let index = this.dataSourceIndex[this.dataSourceIndex.length-1]
- if (index != 0) {
- let data = this.data.propertyInfos[index]
- this.data.propertyInfos[index]=this.data.propertyInfos[index-1]
- this.data.propertyInfos[index-1] = data
- this.dataSourceIndex[this.dataSourceIndex.length-1] = index-1
- this.setIndex()
- this.dataSource = new MatTableDataSource(this.data.propertyInfos)
- }
- }
- }
-
- //下移
- toBottom () {
- if(this.dataSourceIndex.length) {
- let index = this.dataSourceIndex[this.dataSourceIndex.length-1]
- if (index != this.data.propertyInfos.length-1) {
- let data = this.data.propertyInfos[index]
- this.data.propertyInfos[index]=this.data.propertyInfos[index+1]
- this.data.propertyInfos[index+1] = data
- this.dataSourceIndex[this.dataSourceIndex.length-1] = index+1
- this.setIndex()
- this.dataSource = new MatTableDataSource(this.data.propertyInfos)
- }
- }
- }
-
-
-
- //新增属性弹窗
- add () {
- const dialogRef = this.dialog.open(addAttributeComponent);
- dialogRef.afterClosed().subscribe(
- (data)=>{
- if (data) {
- this.data.propertyInfos.push(data)
- this.setIndex()
- this.dataSource = new MatTableDataSource(this.data.propertyInfos)}
- })
- }
-
- //编辑属性弹窗
- edit (e) {
-
- let data = this.data.propertyInfos[e]
- const dialogRef = this.dialog.open(editAttribute,{data});
- dialogRef.afterClosed().subscribe(
- data=>{
- if (data) {
- this.data.propertyInfos[data.index] = data
- this.setIndex()
- this.dataSource = new MatTableDataSource(this.data.propertyInfos)}
- })
- }
-
- //显示
- visible (e) {
- this.data.propertyInfos[e].visible = true
- }
- //隐藏
- noVisible (e) {
- this.data.propertyInfos[e].visible = false
- }
- //启用
- enabled (e) {
- this.data.propertyInfos[e].enabled = true
- }
- //禁用
- noEnabled (e) {
- this.data.propertyInfos[e].enabled = false
- }
- //删除
- delete (e) {
- let isTrue = confirm('您确定要删除吗')
- if (isTrue) {
- this.data.propertyInfos.splice(e,1)
- this.setIndex()
- this.dataSource = new MatTableDataSource(this.data.propertyInfos)
- }
- }
-
-
-
- //原件属性保存
- preservation () {
- if (this.data.propertyInfos.length) {
- this.data.propertyInfos.forEach(item => {
- delete item.index
- });
- this.submit()
- } else {
- this.submit()
- }
- }
-
- //提交保存
- submit () {
- this.http.put(`/api/Assets/${this.data.id}`,{
- id:this.data.id,
- name:this.data.name,
- width:this.data.width,
- height:this.data.height,
- angle:this.data.angle,
- interactiveMode:this.data.interactiveMode,
- isFromBuilding: this.data.isFromBuilding,
- canConnect:this.data.canConnect,
- holeMaxCount:this.data.holeMaxCount,
- fixedSize:this.data.fixedSize,
- fillMode:this.data.fillMode,
- color:this.data.color,
- imageUrl:this.data.imageUrl,
- drawMode:this.data.drawMode,
- border:this.data.border,
- order:this.data.order,
- enabled:this.data.enabled,
- propertyInfos:this.data.propertyInfos,
- fireElementId:this.data.fireElementId
- }).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('保存成功','确定',config);
- this.dialogRef.close('success')
- })
- }
-
-}
-
-
-
-//新增属性弹窗
-export interface Food {
- value: number;
- viewValue: string;
-}
-@Component({
- selector: 'app-addAttribute',
- templateUrl: './addAttribute.html',
- styleUrls: ['./material-bank.component.scss']
-})
-export class addAttributeComponent {
-
- constructor(private http:HttpClient,public dialog: MatDialog,
- public dialogRef: MatDialogRef,) { }
-
- ngOnInit(): void {}
-
- //定义属性数据
- propertyType:Food[]=[
- {value:0, viewValue: '单行文本'},
- {value:1, viewValue: '多行文本'},
- {value:2, viewValue: '数值'},
- {value:3, viewValue: '图片'},
- {value:4, viewValue: '图片数量'},
- {value:5, viewValue: '方向'},
- {value:6, viewValue: '布尔值'},
- {value:7, viewValue: '供给区域'},
- {value:8, viewValue: '供给类型'}]
-
- //提交表单
- onSubmit (e) {
- e.order = 0
- e.enabled = true
- e.visible = true
- e.required = e.required=='true'? true: false,
- this.dialogRef.close(e)
- }
-
-}
-
-
-
-//编辑属性弹窗
-@Component({
- selector: 'app-editAttribute',
- templateUrl: './editAttribute.html',
- styleUrls: ['./material-bank.component.scss']
-})
-export class editAttribute {
-
- constructor(private http:HttpClient,public dialog: MatDialog,
- public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data,) { }
-
- ngOnInit(): void {
- this.propertyName = this.data.propertyName
- this.propertyValue = this.data.propertyValue
- this.propertyType = this.data.propertyType
- this.required = String(this.data.required)
- this.ruleName = this.data.ruleName
- this.ruleValue = this.data.ruleValue
- this.physicalUnit = this.data.physicalUnit
- this.tag = this.data.tag}
-
-
- propertyName:any
- propertyValue:any;
- propertyType:number;
- required:any;
- ruleName:any;
- ruleValue:any;
- physicalUnit:any;
- tag:any;
-
- //定义属性数据
- type:Food[]=[
- {value:0, viewValue: '单行文本'},
- {value:1, viewValue: '多行文本'},
- {value:2, viewValue: '数值'},
- {value:3, viewValue: '图片'},
- {value:4, viewValue: '图片数量'},
- {value:5, viewValue: '方向'},
- {value:6, viewValue: '布尔值'},
- {value:7, viewValue: '供给区域'},
- {value:8, viewValue: '供给类型'}]
-
- //提交表单
- onSubmit (e) {
- e.order = 0
- e.enabled = this.data.enabled
- e.visible = this.data.visible
- e.index = this.data.index
- e.required = e.required=='true'? true: false,
- this.dialogRef.close(e)
- }
-
-
-
-}
\ No newline at end of file
diff --git a/src/app/ui/material-bank/selectoriginalcopy.component.html b/src/app/ui/material-bank/selectoriginalcopy.component.html
deleted file mode 100644
index 00f4e33..0000000
--- a/src/app/ui/material-bank/selectoriginalcopy.component.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
- 选择原件
-
-
- {{item.name}}
-
-
-
-
-
-
{{item.name}}
-
-
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/material-bank/selectoriginalcopy.component.ts b/src/app/ui/material-bank/selectoriginalcopy.component.ts
deleted file mode 100644
index 65d195f..0000000
--- a/src/app/ui/material-bank/selectoriginalcopy.component.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import { HttpClient } from '@angular/common/http';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-@Component({
- selector: 'selectoriginalcopy',
- templateUrl: './selectoriginalcopy.component.html',
- styleUrls: ['./material-bank.component.scss']
- })
- export class SelectOriginalCopy {
- myControl = new FormControl();
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) {}
- matlibrary = this.data.allMaterialBank//所有素材库
- selectedmatlibraryid = ""//当前下拉框选中的素材库id
- sourceMaterial:any; //指定素材库对应所有原件
- atpresentSourceMaterial:any//当前选择原件素材库对应所有原件
- aaa = this.data.allMaterialBank[0].id//默认显示第一个素材库
- ngOnInit(): void {
- this.getatpresentSourceMaterial ()//初始化时先获取一下当前素材库对应所有原件,然后在获取指定素材库原件时进行筛选对比
- let data = {
- libraryId:this.data.allMaterialBank[0].id
- }
- this.http.get('/api/Assets',{
- params:data
- }).subscribe((data : any)=>{
- data.forEach(item => {
- this.atpresentSourceMaterial.forEach(n=>{
- if(n.id == item.id){
- item.isselected = true
- }
- })
- });
- this.sourceMaterial = data
- })
-
- }
- onNoClick(): void {
- this.dialogRef.close();
- }
-
- //获得指定素材库所有原件
- getSourceMaterial () {
- let data = {
- libraryId:this.selectedmatlibraryid
- }
- this.http.get('/api/Assets',{
- params:data
- }).subscribe((data : any)=>{
- data.forEach(item => {
- this.atpresentSourceMaterial.forEach(n=>{
- if(n.id == item.id){
- item.isselected = true
- }
- })
- });
- this.sourceMaterial = data
- })
- }
- //获得当前素材库所有原件
- getatpresentSourceMaterial (){
- let data = {
- libraryId:this.data.material.id
- }
- this.http.get('/api/Assets',{
- params:data
- }).subscribe(data=>{
- this.atpresentSourceMaterial = data
- })
- }
- selectmatlibrart(item){//点击下拉框中的一项
- this.selectedmatlibraryid = item.id
- this.getSourceMaterial ()
- }
- selectedimg = []//需要提交的原件id数组
- clickimg(item){//点击选择原件的多张图片
- if(!item.isselected){
- if(item.istrue){//如果图片已经被选中,此时点击
- item.istrue = false
- this.selectedimg.forEach((n,index) => {
- if(n == item.id){//将此id从数组中移除
- this.selectedimg.splice(index,1)
- }
- });
- }else{//如果图片还没有被选中
- item.istrue = true
- this.selectedimg.push(item.id)//将选中图片id存入数组
- }
- }
-
- }
- onSubmit(value){
- this.http.post("/api/Assets/Select",{
- assetLibraryId:this.data.material.id ,
- assetIds: this.selectedimg
- }).subscribe(data=>{
- this.dialogRef.close('ooo');
- })
- }
- }
\ No newline at end of file
diff --git a/src/app/ui/menu/menu.component.html b/src/app/ui/menu/menu.component.html
deleted file mode 100644
index 291721d..0000000
--- a/src/app/ui/menu/menu.component.html
+++ /dev/null
@@ -1,66 +0,0 @@
-菜单
-
- 我是老大
- 我是老二
-
-
-
-
-
-
- more_vert
-
-
-
-
-
- dialpad
- 重播
-
-
- voicemail
- 检查邮件
-
-
- notifications_off
- 禁止弹出框
-
-
-
-
-
-
-
-
- 动物
-
-
-
-
- 家养
- 野生
-
-
-
-
-
- 小狗
- 小猫
- 小乌龟
-
-
- 小黑狗
- 小黑狗
- 小黑狗
- 小黑狗
- 小黑狗
- 小黑狗
- 小黑狗
- 小黑狗
- 小黑狗
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/menu/menu.component.scss b/src/app/ui/menu/menu.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/ui/menu/menu.component.spec.ts b/src/app/ui/menu/menu.component.spec.ts
deleted file mode 100644
index beb2d9b..0000000
--- a/src/app/ui/menu/menu.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { MenuComponent } from './menu.component';
-
-describe('MenuComponent', () => {
- let component: MenuComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ MenuComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(MenuComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/menu/menu.component.ts b/src/app/ui/menu/menu.component.ts
deleted file mode 100644
index e21108c..0000000
--- a/src/app/ui/menu/menu.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-menu',
- templateUrl: './menu.component.html',
- styleUrls: ['./menu.component.scss']
-})
-export class MenuComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/src/app/ui/navmenus/createmenus.component.html b/src/app/ui/navmenus/createmenus.component.html
deleted file mode 100644
index 3258a3d..0000000
--- a/src/app/ui/navmenus/createmenus.component.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/navmenus/editmenus.component.html b/src/app/ui/navmenus/editmenus.component.html
deleted file mode 100644
index 2c37c37..0000000
--- a/src/app/ui/navmenus/editmenus.component.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/navmenus/navmenus.component.html b/src/app/ui/navmenus/navmenus.component.html
deleted file mode 100644
index 967468b..0000000
--- a/src/app/ui/navmenus/navmenus.component.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
- {{node.name}}
- add_circle_outline
- create
- delete
-
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
- {{node.name}}
- add_circle_outline
- create
- delete
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/navmenus/navmenus.component.scss b/src/app/ui/navmenus/navmenus.component.scss
deleted file mode 100644
index f6123e2..0000000
--- a/src/app/ui/navmenus/navmenus.component.scss
+++ /dev/null
@@ -1,34 +0,0 @@
-table {
- width: 100%;
- th,td{
- text-align: center;
- }
-}
-form{
- text-align: center;
- button{
- margin: 0 12px;
- }
-}
-mat-tree{
- width: 500px;
- button{
- display: block;
- float: right;
- }
- mat-tree-node{
- position: relative;
- .deleted{
- position: absolute;
- right: 0;
- }
- .create{
- position: absolute;
- right: 80px;
- }
- .edit{
- position: absolute;
- right: 40px;
- }
- }
-}
diff --git a/src/app/ui/navmenus/navmenus.component.spec.ts b/src/app/ui/navmenus/navmenus.component.spec.ts
deleted file mode 100644
index 788f582..0000000
--- a/src/app/ui/navmenus/navmenus.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { NavmenusComponent } from './navmenus.component';
-
-describe('NavmenusComponent', () => {
- let component: NavmenusComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ NavmenusComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(NavmenusComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/navmenus/navmenus.component.ts b/src/app/ui/navmenus/navmenus.component.ts
deleted file mode 100644
index d7a9619..0000000
--- a/src/app/ui/navmenus/navmenus.component.ts
+++ /dev/null
@@ -1,228 +0,0 @@
-import { Component, OnInit,Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { HttpClient } from '@angular/common/http';
-import { TreeService } from '../../http-interceptors/tree.service'
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-
-
-
-@Component({
- selector: 'app-navmenus',
- templateUrl: './navmenus.component.html',
- styleUrls: ['./navmenus.component.scss']
-})
-export class NavmenusComponent implements OnInit {
- newdata = [];
- private _transformer = (node, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- children:node.children,
- url:node.url,
- icon:node.icon
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- constructor(private http: HttpClient,public dialog: MatDialog,private tree:TreeService,public snackBar: MatSnackBar) { }
- getlist = ():void=>{
- this.http.get('/api/NavMenus').subscribe((data: any[])=>{
- this.newdata = this.tree.toTree(data)
- const nodes = this.treeControl.dataNodes;
- const expandNodes = [];
- nodes.forEach((item) => {
- if(item.expandable && this.treeControl.isExpanded(item)){
- expandNodes.push(item.id);
- }
- });
- this.dataSource.data = this.newdata;
- let newNodes = this.treeControl.dataNodes;
- newNodes = newNodes.filter(n => {
- return expandNodes.indexOf(n.id) >= 0;
- });
- newNodes.forEach(item => {
- this.treeControl.expand(item);
- });
-
- })
- }
- treedata:any
- //初始化页面时渲染出tree
- ngOnInit() {
- this.http.get('/api/NavMenus').subscribe((data: any[])=>{
- // console.log(111,this.data)
- // this.treedata = this.tree.toTree(data)
- let _data = this.tree.toTree(data)
- this.dataSource.data = _data
- this.treedata = _data
- console.log(111,this.treedata)
- })
- }
- hasChild = (_: number, node: any) => node.expandable;
-
- //弹出创建窗口按钮
- createauthority(value){
- const dialogRef = this.dialog.open(CreateMenus, {//调用open方法打开对话框并且携带参数过去
- width: '260px',
- data: {id:value.id,children:value.children,icon:value.icon,url:value.url}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- this.newdata = []
- this.getlist()
- }
- );
- }
- //删除按钮
- deleted(authority){
- var isdeleted = confirm("确定要删除此用户吗?")
- if(isdeleted){
- //请求删除接口
- this.newdata = []
- this.http.delete(`/api/NavMenus/${authority.id}`).subscribe( data=>{
- this.getlist()
- })
- }
- }
- //编辑按钮
- edit(value){
- const dialogRef = this.dialog.open(EditMenus, {//调用open方法打开对话框并且携带参数过去
- width: '260px',
- data: {id:value.id,parentId:value.parentId,order:value.order,node:value}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- this.newdata = []
- this.getlist()
- }
- );
- }
-}
-
-//创建组件
-@Component({
- selector: 'createmenus',
- templateUrl: './createmenus.component.html',
- styleUrls: ['./navmenus.component.scss']
-})
-export class CreateMenus {
- myControl = new FormControl();
- //注入MatDialogRef,可以用来关闭对话框
- //要访问对话框组件中的数据,必须使用MAT_DIALOG_DATA注入令牌
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,
- public snackBar: MatSnackBar,@Inject(MAT_DIALOG_DATA) public data) {}
-
- onNoClick(): void {
- this.dialogRef.close();
- }
- onSubmit(value){
- if(this.data.children){
- this.http.post(
- '/api/NavMenus',
- {
- id: '',
- name: value.name,
- icon: value.icon,
- url: value.url,
- order:this.data.children[this.data.children.length -1].order + 1,
- parentId: this.data.id
- }
- ).subscribe(
- data=>{
- this.dialogRef.close();
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写正确格式','确定',config);
- }
- )
- }else{
- this.http.post(
- '/api/NavMenus',
- {
- id: '',
- name: value.name,
- icon: value.icon,
- url: value.url,
- order:0,
- parentId: this.data.id
- }
- ).subscribe(
- data=>{
- this.dialogRef.close();
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写正确格式','确定',config);
- }
- )
- }
-
- }
-}
-
-
-
-//编辑组件
-@Component({
- selector: 'editmenus',
- templateUrl: './editmenus.component.html',
- styleUrls: ['./navmenus.component.scss']
-})
-export class EditMenus {
- myControl = new FormControl();
- //注入MatDialogRef,可以用来关闭对话框
- //要访问对话框组件中的数据,必须使用MAT_DIALOG_DATA注入令牌
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,public snackBar: MatSnackBar,@Inject(MAT_DIALOG_DATA) public data) {}
- menuname:any //菜单名称
- menuiconurl:any //菜单图标地址
- menuweburl:any //菜单地址
- ngOnInit(): void {
- this.menuname = this.data.node.name;
- this.menuiconurl = this.data.node.icon;
- this.menuweburl = this.data.node.url;
- }
- onNoClick(): void {
- this.dialogRef.close();
- }
- onSubmit(value){
- if(value.icon){
- this.data.icon = value.icon
- }
- if(value.url){
- this.data.url = value.url
- }
- this.http.put(
- ` /api/NavMenus/${this.data.id}`,
- {
- id: this.data.id,
- name: value.name,
- icon: this.data.icon,
- url: this.data.url,
- order:this.data.order,
- parentId: this.data.parentId
- }
- ).subscribe(
- data=>{
- this.dialogRef.close();
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写正确格式','确定',config);
- }
- )
- }
-}
\ No newline at end of file
diff --git a/src/app/ui/organization/createorganization.component.html b/src/app/ui/organization/createorganization.component.html
deleted file mode 100644
index a3b56fb..0000000
--- a/src/app/ui/organization/createorganization.component.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 确定
- 取消
-
-
-
diff --git a/src/app/ui/organization/editorganization.component.html b/src/app/ui/organization/editorganization.component.html
deleted file mode 100644
index 7eedd0b..0000000
--- a/src/app/ui/organization/editorganization.component.html
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
- 请选择机构
-
-
-
- {{node.name}}
-
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
- {{node.name}}
-
-
-
diff --git a/src/app/ui/organization/organization.component.html b/src/app/ui/organization/organization.component.html
deleted file mode 100644
index 6f963b9..0000000
--- a/src/app/ui/organization/organization.component.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
- {{node.name}}
- add_circle_outline
- create
- arrow_upward
- arrow_downward
- block
- block
- delete
-
-
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
- {{node.name}}
- add_circle_outline
- create
- arrow_upward
- arrow_downward
- block
- block
- delete
-
-
-
-
-
-
-
diff --git a/src/app/ui/organization/organization.component.scss b/src/app/ui/organization/organization.component.scss
deleted file mode 100644
index 3e8692d..0000000
--- a/src/app/ui/organization/organization.component.scss
+++ /dev/null
@@ -1,71 +0,0 @@
-mat-tree{
- width:800px;
- button{
- display: block;
- float: right;
- }
- mat-tree-node{
- position: relative;
-
- .deleted{
- position: absolute;
- right: 0px;
- }
-
- .disabled{
- position: absolute;
- right: 40px;
- }
-
- .edit{
- position: absolute;
- right:160px;
- }
- .create{
- position: absolute;
- right: 200px;
- }
- .up{
- position: absolute;
- right: 120px;
- }
- .down{
- position: absolute;
- right: 80px;
- }
- }
-}
-form{
- text-align: center;
- button{
- margin: 0 8px;
- margin-top: 8px;
- }
-}
-
-.leftbox{
- width: 300px;
- float: left;
-}
-.treebox{
- float: right;
- height: 250px;
- width: 300px;
- /* overflow: auto; */
- overflow-x: hidden;
- overflow-y: auto;
-}
-.smalltreebox{
- width: 300px;
- mat-tree-node{
- width: 300px;
- }
-}
-.orilist{
- list-style: none;
-
-}
-.orilist:hover{
- cursor: pointer;
- background-color: rgba(225, 225, 225, 0.8);
-}
\ No newline at end of file
diff --git a/src/app/ui/organization/organization.component.ts b/src/app/ui/organization/organization.component.ts
deleted file mode 100644
index fa592ec..0000000
--- a/src/app/ui/organization/organization.component.ts
+++ /dev/null
@@ -1,558 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import { HttpClient } from '@angular/common/http';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-import { TreeService } from '../../http-interceptors/tree.service'
-@Component({
- selector: 'app-organization',
- templateUrl: './organization.component.html',
- styleUrls: ['./organization.component.scss']
-})
-export class OrganizationComponent implements OnInit {
- data:any =[] //存储所有组织机构
- newdata = [];
-
- private _transformer = (node, level: number) => {//要给渲染节点传那些属性参数
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- enabled:node.enabled,
- order:node.order,
- children:node.children,
- isTop:node.isTop,
- isBottom:node.isBottom,
- code:node.code,
- division:node.division
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
-
- constructor(private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private tree: TreeService) {
- }
- isloading:any = false //loading效果
- //重新获取列表并且展开到上次位置的方法
- getlist = ():void=>{
- this.http.get('/api/Organizations').subscribe(
- (data:any)=>{
- this.data = data;
- this.newdata = this.tree.toTree(data)
-
- const nodes = this.treeControl.dataNodes;
- const expandNodes = [];
- nodes.forEach((item) => {
- if(item.expandable && this.treeControl.isExpanded(item)){
- expandNodes.push(item.id);
- }
- });
-
-
- this.dataSource.data = this.newdata;
- let newNodes = this.treeControl.dataNodes;
- newNodes = newNodes.filter(n => {
- return expandNodes.indexOf(n.id) >= 0;
- });
- newNodes.forEach(item => {
- this.treeControl.expand(item);
- });
- this.isloading = false
-
- }
- )
- }
- //初始化视图
- ngOnInit() {
- this.http.get('/api/Organizations').subscribe(
- (data:any)=>{
- this.data = data;
- this.dataSource.data = this.tree.toTree(data);
- this.treeControl.expand(this.treeControl.dataNodes[0]);
- }
- )
- }
- hasChild = (_: number, node: any) => node.expandable;
-
- //创建组织按钮
- create(value){
- const dialogRef = this.dialog.open(CreateOrganization, {//调用open方法打开对话框并且携带参数过去
- width: '260px',
- data: {id:value.id,childlength:value.children,level:value.level}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
- this.getlist()
- }
- }
- );
- }
- //编辑组织按钮
- edit(node){
- const dialogRef = this.dialog.open(EditOrganization, {//调用open方法打开对话框并且携带参数过去
- data: node
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- this.getlist()
- }
- );
- }
- //删除组织按钮
- delete(value){
- var isdeleted = confirm("确定要删除此组织?")
- if(isdeleted){
- //请求删除接口
- this.isloading = true
- this.http.delete(`/api/Organizations/${value.id}`).subscribe( data=>{
- this.getlist()
-
- })
- }
- }
- //禁用按钮
- disable(value){
- this.isloading = true
- if(!value.enabled){
- this.http.put(
- `/api/Organizations/${value.id}`,
- {
- id:value.id,
- code:value.code,
- name: value.name,
- level:value.level,
- order: value.order,
- location: null,
- enabled: true,
- parentId: value.parentId
- }
- ).subscribe(
- data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('启用成功','确定',config);
- this.getlist()
-
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('操作无效','确定',config);
- this.isloading = false
- }
- )
-
- }else{
- // var isdeleted = confirm("确定要禁用此组织?")
- // if(isdeleted){
- this.http.put(
- `/api/Organizations/${value.id}`,
- {
- id:value.id,
- code:value.code,
- name: value.name,
- level:value.level,
- order: value.order,
- location: null,
- enabled: false,
- parentId: value.parentId
- }
- ).subscribe(
- data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('禁用成功','确定',config);
- this.getlist()
-
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('操作无效','确定',config);
- this.isloading = false
- }
- )
- // }
- }
-
-
- }
-
-
- //向上箭头
- updata = []
- up(node){
- this.isloading = true
- var olddata = this.data;
- // console.log(1,olddata)
- // console.log(2,node)
- this.updata = []
- olddata.forEach(item => {
- if(item.id == node.parentId){
- this.updata = item.children
- }
- });
- // console.log(this.updata)
- this.updata.forEach((item,index)=>{
- if(item.name == node.name){
- this.http.put(//更改点击的节点为上一节点的order
- `/api/Organizations/${this.updata[index].id}`,
- {
- id:this.updata[index].id,
- code:this.updata[index].code,
- name: this.updata[index].name,
- level: this.updata[index].level,
- order: this.updata[index - 1].order,
- location: null,
- enabled: true,
- parentId: this.updata[index].parentId,
- }
- ).subscribe(
- data=>{
- // this.getlist()
- this.http.put(//更改上一节点为点击节点的order
- `/api/Organizations/${this.updata[index - 1].id}`,
- {
- id:this.updata[index - 1].id,
- code:this.updata[index - 1].code,
- name: this.updata[index - 1].name,
- level: this.updata[index - 1].level,
- order: this.updata[index].order,
- location: null,
- enabled: true,
- parentId: this.updata[index].parentId,
- }
- ).subscribe(
- data=>{
- this.getlist()
-
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('更改order失败','确定',config);
- this.isloading = false
- }
- )
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('更改order失败','确定',config);
- this.isloading = false
- }
- )
-
-
- }
-
-
-
- })
-
- }
-
-
-
- //向下箭头
- downdata = []
- down(node){
- this.isloading = true
- var olddata = this.data;
- this.downdata = []
- olddata.forEach(item => {
- if(item.id == node.parentId){
- this.downdata = item.children
- }
- });
- // console.log(this.downdata)
- this.downdata.forEach((item,index)=>{
- if(item.name == node.name){
- this.http.put(//更改点击的节点为下一节点的order
- `/api/Organizations/${this.downdata[index].id}`,
- {
- id:this.downdata[index].id,
- code:this.downdata[index].code,
- name: this.downdata[index].name,
- level: this.downdata[index].level,
- order: this.downdata[index + 1].order,
- location: null,
- enabled: true,
- parentId: this.downdata[index].parentId,
- }
- ).subscribe(
- data=>{
- // this.getlist()
- this.http.put(//更改上一节点为点击节点的order
- `/api/Organizations/${this.downdata[index + 1].id}`,
- {
- id:this.downdata[index + 1].id,
- code:this.downdata[index + 1].code,
- name: this.downdata[index + 1].name,
- level: this.downdata[index + 1].level,
- order: this.downdata[index].order,
- location: null,
- enabled: true,
- parentId: this.downdata[index].parentId,
- }
- ).subscribe(
- data=>{
- this.getlist()
-
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('更改order失败','确定',config);
- this.isloading = false
- }
- )
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('更改order失败','确定',config);
- this.isloading = false
- }
- )
-
-
- }
-
-
-
- })
- }
-}
-
-
-
-
-
-//创建组织
-@Component({
- selector: 'createorganization',
- templateUrl: './createorganization.component.html',
- styleUrls: ['./organization.component.scss']
-})
-export class CreateOrganization {
- myControl = new FormControl();
- ishttp: boolean =false
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,
- public snackBar: MatSnackBar) {}
-
- onNoClick(): void {
- this.dialogRef.close();
- }
-
- onSubmit(value){
- if(this.data.childlength){//如果点击节点存在children
- this.http.post(
- '/api/Organizations',
- {
- id:"",
- code:value.number,
- division:value.division,
- name: value.name,
- level:this.data.level + 1,
- order: this.data.childlength[this.data.childlength.length -1].order + 1,
- location: null,
- enabled: true,
- parentId: this.data.id,
- }
- ).subscribe(
- data=>{
- this.dialogRef.close(data);
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('创建组织成功','确定',config);
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写正确格式','确定',config);
- }
- )
- }else{
- this.http.post(
- '/api/Organizations',
- {
- id:"",
- code:value.number,
- division:value.division,
- name: value.name,
- level:this.data.level + 1,
- order:0,
- location: null,
- enabled: true,
- parentId: this.data.id,
- }
- ).subscribe(
- data=>{
- this.dialogRef.close(data);
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('创建组织成功','确定',config);
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写正确格式','确定',config);
- }
- )
- }
-
- }
-}
-
-//编辑组件
-@Component({
- selector: 'editorganization',
- templateUrl: './editorganization.component.html',
- styleUrls: ['./organization.component.scss']
-})
-export class EditOrganization {
- newdata = [];
- private _transformer = (node, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- children:node.children,
- division:node.division
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- myControl = new FormControl();
- organizationname:string=""//自己组织的名字
- organizationcode:any//自己组织的编号
- organizationName:any =''//上级组织的名字
- organizationId:any =''//上级组织的id
- organizationLevel:number =null//上级组织的层级
- organizationchildlength:number = null
- allOrganizations:any //所有组织机构
- division:any //区划
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,
- private tree:TreeService,public snackBar: MatSnackBar) {}
-
- //获取所有组织机构
- getMechanism () {
- this.http.get('/api/Organizations').subscribe(
- (data:any)=>{
- this.allOrganizations = data
- this.dataSource.data = this.tree.toTree(data);
- data.forEach(item=>{
- if(item.id == this.data.parentId){
- this.organizationName = item.name
- }
- })
- }
- )
- }
-
- ngOnInit() {
- // console.log(this.data)
- this.getMechanism()
- this.organizationname = this.data.name
- this.organizationcode = this.data.code
- this.division = this.data.division
- }
- hasChild = (_: number, node: any) => node.expandable;
- onNoClick(): void {
- this.dialogRef.close();
- }
- add(e){
- this.organizationName=e.name
- this.organizationId=e.id
- this.organizationLevel=e.level
- if(e.children){//如果点击的父组织有子节点
- this.organizationchildlength = e.children.length
- }else{
- this.organizationchildlength = 0
- }
- }
- onSubmit(value){
- if(this.organizationLevel){//如果点击了右边的树
- this.http.put(
- `/api/Organizations/${this.data.id}`,
- {
- id:this.data.id,
- code:value.number,
- division:value.division,
- name: value.name,
- level:this.organizationLevel + 1,
- order: this.organizationchildlength,
- location: null,
- enabled: true,
- parentId: this.organizationId,
- }
- ).subscribe(
- data=>{
- this.dialogRef.close();
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('修改成功','确定',config);
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写正确格式','确定',config);
- }
- )
- }else{ //如果只改了姓名
- this.http.put(
- `/api/Organizations/${this.data.id}`,
- {
- id:this.data.id,
- code: value.number,
- division:value.division,
- name: value.name,
- level:this.data.level,
- order: this.data.order,
- location: null,
- enabled: true,
- parentId: this.data.parentId,
- }
- ).subscribe(
- data=>{
- this.dialogRef.close();
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('修改成功','确定',config);
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写正确格式','确定',config);
- }
- )
- }
-
- }
-}
\ No newline at end of file
diff --git a/src/app/ui/progress/progress.component.html b/src/app/ui/progress/progress.component.html
deleted file mode 100644
index a858bc9..0000000
--- a/src/app/ui/progress/progress.component.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-确定进度条
-
-
-不确定进度条
-
-
-缓冲进度条
-
-
-查询进度条
-
diff --git a/src/app/ui/progress/progress.component.scss b/src/app/ui/progress/progress.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/ui/progress/progress.component.spec.ts b/src/app/ui/progress/progress.component.spec.ts
deleted file mode 100644
index aea0b97..0000000
--- a/src/app/ui/progress/progress.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ProgressComponent } from './progress.component';
-
-describe('ProgressComponent', () => {
- let component: ProgressComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ ProgressComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ProgressComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/progress/progress.component.ts b/src/app/ui/progress/progress.component.ts
deleted file mode 100644
index 93168b5..0000000
--- a/src/app/ui/progress/progress.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-progress',
- templateUrl: './progress.component.html',
- styleUrls: ['./progress.component.scss']
-})
-export class ProgressComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/src/app/ui/role/createrole.component.html b/src/app/ui/role/createrole.component.html
deleted file mode 100644
index 4738ce2..0000000
--- a/src/app/ui/role/createrole.component.html
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
- 创建新角色
-
-
-
- 分配权限
-
-
-
-
- 关联数据权限
- 全选
-
-
-
-
- {{node.name}}
-
-
-
-
- {{node.name}}
-
-
-
-
- 关联导航菜单
- 全选
-
-
-
-
- {{node.name}}
-
-
-
-
- {{node.name}}
-
-
-
-
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/role/editrole.component.html b/src/app/ui/role/editrole.component.html
deleted file mode 100644
index 0471799..0000000
--- a/src/app/ui/role/editrole.component.html
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
- 编辑角色
-
-
-
-
-
- 分配权限
-
-
-
- 关联数据权限
-
-
-
-
- {{node.name}}
-
-
-
-
-
- {{node.name}}
-
-
-
-
-
-
- 关联导航菜单
-
-
-
-
- {{node.name}}
-
-
-
-
-
- {{node.name}}
-
-
-
-
-
-
-
-
- 确定
- 取消
-
-
-
diff --git a/src/app/ui/role/role.component.html b/src/app/ui/role/role.component.html
deleted file mode 100644
index 3eeef51..0000000
--- a/src/app/ui/role/role.component.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
创建角色
-
-
-
- 角色名称
- {{roledata.name}}
-
-
-
-
- 创建/修改时间
- {{roledata.creationTime | time }}
-
-
-
- 是否启用
- {{roledata.enabled | isno}}
-
-
-
-
- 操作
-
-
- arrow_upward
- arrow_downward
- 编辑
- 启用
- 禁用
- 删除
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/role/role.component.scss b/src/app/ui/role/role.component.scss
deleted file mode 100644
index d5b7c76..0000000
--- a/src/app/ui/role/role.component.scss
+++ /dev/null
@@ -1,49 +0,0 @@
-table {
- width: 100%;
- th,td{
- text-align: center;
- }
- button{
- margin: 0 3px;
- }
-
-}
-form{
- // text-align: center;
-
- button{
-
- margin: 0 8px;
- margin-bottom: 30px;
- }
- .mat-checkbox{
- display: block;
- text-align: left;
- }
- .btn{
- padding-top: 18px;
- text-align: center;
- }
- mat-form-field{
- margin-right:80px;
- }
- span{
- display: block;
- margin-bottom: 10px;
- }
-}
-.shareform{
- height: 300px;
-}
-.leftbox{
- width: 250px;
- float: left;
-}
-.rightbox{
- width: 250px;
- float: right;
-}
-.bigbox{
- height: 400px;
- overflow: auto;
-}
\ No newline at end of file
diff --git a/src/app/ui/role/role.component.ts b/src/app/ui/role/role.component.ts
deleted file mode 100644
index a3b7501..0000000
--- a/src/app/ui/role/role.component.ts
+++ /dev/null
@@ -1,644 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { HttpClient } from '@angular/common/http';
-import { CacheTokenService } from '../../http-interceptors/cache-token.service'
-import format from 'date-fns/format';
-import {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import { TreeService } from '../../http-interceptors/tree.service'
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-
-
-
-export interface roledata {
- id: string,
- name: string,//名称
- order: number,
- enabled: boolean,
- creationTime: string
-}
-@Component({
- selector: 'app-role',
- templateUrl: './role.component.html',
- styleUrls: ['./role.component.scss']
-})
-
-export class RoleComponent implements OnInit {
- constructor(private http: HttpClient,public dialog: MatDialog,public createtime:CacheTokenService,private tree:TreeService,public snackBar: MatSnackBar) { }
- displayedColumns: string[] = ['name','createtiome', 'edit'];
- dataSource: any
-
- public compare(property){
- return function(a,b){
- var value1 = a[property];
- var value2 = b[property];
- return value1 - value2;
- }
- }
- //获取角色列表并且给排头和排尾赋是否为首尾
- getlist(){
- this.http.get('/api/Roles').subscribe( (data:Array)=>{
- this.dataSource = data
- this.dataSource[0].isTop = true;
- this.dataSource[this.dataSource.length-1].isBottom = true
- })
- }
- //初始化视图
- ngOnInit() {
- this.getlist()
- }
- //向上按钮
- up(node){
- let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
- this.http.put(//把上一节点order换成点击的节点
- `/api/Roles/${this.dataSource[node.order -1].id}`,
- {
- id:this.dataSource[node.order -1].id,
- name: this.dataSource[node.order -1].name,
- order: node.order,
- enabled: true,
- creationTime:time,
- }
- ).subscribe(data=>{
- this.getlist()
- })
-
- this.http.put(//把当前节点order换成上一点击的节点
- `/api/Roles/${node.id}`,
- {
- id:node.id,
- name: node.name,
- order: node.order-1,
- enabled: true,
- creationTime:time,
- }
- ).subscribe(data=>{
- this.getlist()
- })
-
- }
- //向下按钮
- down(node){
- let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
- this.http.put(//把下一节点order换成点击的节点
- `/api/Roles/${this.dataSource[node.order + 1].id}`,
- {
- id:this.dataSource[node.order + 1].id,
- name: this.dataSource[node.order + 1].name,
- order: node.order,
- enabled: true,
- creationTime:time,
- }
- ).subscribe(data=>{
- this.getlist()
- })
-
- this.http.put(//把当前节点order换成下一点击的节点
- `/api/Roles/${node.id}`,
- {
- id:node.id,
- name: node.name,
- order: node.order + 1,
- enabled: true,
- creationTime:time,
- }
- ).subscribe(data=>{
- this.getlist()
- })
- }
- //创建按钮并且弹出对话框
- createuser(){
- const dialogRef = this.dialog.open(CreateRole, {//调用open方法打开对话框并且携带参数过去
- width: '600px',
- height:'658px',
- data: {name: this.createuser.name,data: this.dataSource,length:this.dataSource.length}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- this.getlist()
- }
- );
- }
-
- //删除按钮
- deleteduser(roledata){
- var isdeleted = confirm("确定要删除此用户吗?")
- if(isdeleted){
- //请求删除接口
- this.http.delete(`/api/Roles/${roledata.id}`).subscribe( data=>{
- this.getlist()
- })
- }
- }
- //编辑按钮
- allot(roledata){
- const dialogRef = this.dialog.open(EditRole, {//调用open方法打开对话框并且携带参数过去
- width: '600px',
- height:'658px',
- data: {id:roledata.id,name:roledata.name,order:roledata.order}//把点击的id传过去
- });
-
- dialogRef.afterClosed().subscribe(
- data=>{
- this.getlist()
- }
- );
- }
-
- //启用或禁用按钮
- open(roledata){
- let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
- this.http.put(
- `/api/Roles/${roledata['id']}`,
- {
- id:roledata['id'],
- name: roledata.name,
- order: roledata.order,
- enabled: !roledata.enabled,
- creationTime: time,
- }
- ).subscribe(
- data=>{
- this.getlist()
- }
- )
- }
-
- drop(event: CdkDragDrop) {//拖拽函数
- moveItemInArray(this.dataSource, event.previousIndex, event.currentIndex);
- this.dataSource.forEach((item, index) => {
- item.order = index;
- })
- const a = [...this.dataSource];
- this.dataSource = [];
- setTimeout(() => {
- this.dataSource = a;
- }, 10);
- };
-}
-
-
-
-
-
-
-//创建角色组件
-@Component({
- selector: 'createrole',
- templateUrl: './createrole.component.html',
- styleUrls: ['./role.component.scss']
-})
-export class CreateRole {
- private _transformer = (node: any, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id:node.id
- };
- }
- treeControl = new FlatTreeControl(
- node => node.level, node => node.expandable);
-
- treeFlattener = new MatTreeFlattener(
- this._transformer, node => node.level, node => node.expandable, node => node.children);
-
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- dataSource2 = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- myControl = new FormControl();
- //注入MatDialogRef,可以用来关闭对话框
- //要访问对话框组件中的数据,必须使用MAT_DIALOG_DATA注入令牌
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,private tree:TreeService,public snackBar: MatSnackBar) {}
- olddata =[]
- olddata2 = []
- xxx = {}
- jjj = {}
- //用于存放选中的数组
- checkedMap = {}
- //初始化两棵tree
- ngOnInit(){
- this.http.get('/api/Permissions').subscribe((data: any[])=>{
- this.olddata =data
- this.dataSource.data = this.tree.toTree(data);
- this.treeControl.expandAll()
- this.dataSource.data.forEach(item=>{
- if(item.children){
- var childarr = []
- item.children.forEach(n => {
- childarr.push(n.id)
- })
- this.xxx[item.id] = childarr
- }
- })
-
- })
-
- this.http.get('/api/NavMenus').subscribe((data: any[])=>{
- this.olddata2 =data
- this.dataSource2.data = this.tree.toTree(data);
- this.treeControl.expandAll()
- this.dataSource2.data.forEach(item=>{
- if(item.children){
- var childarr = []
- item.children.forEach(n => {
- childarr.push(n.id)
- })
- this.jjj[item.id] = childarr
- }
- })
- })
- }
-
- //选中后子节点默认选中
- selectedAll(event, node){
- this.olddata.forEach(item=>{
- if(item.parentId == node.id){
- this.checkedMap[item.id] = event.checked;
- }
- })
-
- // console.log(this.olddata2,node )
- var menus =[] //导航菜单可能有三级 用于存储第二级
- //选中一级菜单
- this.olddata2.forEach(item=>{
- if(item.parentId == node.id){
- this.checkedMap[item.id] = event.checked;
- menus.push(item)
- }
- })
- //将二级菜单也选中
- menus.forEach(item=>{
- if(item.children){
- item.children.forEach(n => {
- this.checkedMap[n.id] = event.checked;
- });
- }
- })
- }
-
- //数据权限tree的全选功能
- leftTreeAll(event,form){
- const values = form.value;
- for (let key in values) {
- if(key.indexOf("second")){
- this.checkedMap[key.split('.')[1]] = event.checked;
- }
- }
- }
- //菜单权限tree的全选功能
- rightTreeAll(event,form){
- const values = form.value;
- for (let key in values) {
- if(key.indexOf("first")){
- this.checkedMap[key.split('.')[1]] = event.checked;
- }
- }
- }
-
- hasChild = (_: number, node: any) => node.expandable;
-
- onNoClick(): void {
- this.dialogRef.close();
- }
- //提交
- onSubmit(value){
- let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
- this.http.post(
- '/api/Roles',
- {
- id:"",
- name: value.name,
- order: this.data.data[this.data.data.length - 1].order + 1,
- enabled: true,
- creationTime: time,
- }
- ).subscribe(
- data=>{
- var id = data['id']
- // console.log(value)
- var keydata = [] //菜单权限id集合
- var keydata2 = [] //数据权限id集合
- for(let i in value){
- if(value[i]){
- if(i.indexOf("first") && i!="name"){
- keydata.push(i.split('.')[1])
- }
- if(i.indexOf("second") && i!="name"){
- keydata2.push(i.split('.')[1])
- }
- }
- }
-
- function includes(arr1, arr2) {
- return arr2.every(val => arr1.includes(val));
- }
- const orginalList = [...keydata2];
- orginalList.forEach((item) => { // forEach 里面 splice 有问题,详见 https://blog.csdn.net/qq_38128179/article/details/92798157
- if (item in this.xxx) { // 根据 key,可以直接在 对象 里面获取数据
- const datachildarrboxArr = this.xxx[item];
- if (!includes(keydata2, datachildarrboxArr)) { // 如果不全部包含
- keydata2.splice(keydata2.findIndex(items => items == item), 1);
- }
- }
- });
-
- this.http.post(
- `/api/Roles/${id}/Permissions`,
- keydata2
- ).subscribe(
- data=>{
- this.http.post(
- `/api/Roles/${id}/NavMenus`,
- keydata
- ).subscribe(
- data=>{
- this.dialogRef.close();
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('创建成功','确定',config);
- },
- err=>{
- this.dialogRef.close();
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('创建菜单权限失败','确定',config);
- }
- )
- },
- err=>{
- this.dialogRef.close();
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('创建数据权限失败','确定',config);
- }
- )
-
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('角色名称不符合规范','确定',config);
- }
- )
- }
-}
-
-
-
-
-
-
-
-
-
-//编辑组件
-@Component({
- selector: 'editrole',
- templateUrl: './editrole.component.html',
- styleUrls: ['./role.component.scss']
-})
-export class EditRole {
- private _transformer = (node: any, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id:node.id,
- children:node.children
- };
- }
- treeControl = new FlatTreeControl(
- node => node.level, node => node.expandable);
-
- treeFlattener = new MatTreeFlattener(
- this._transformer, node => node.level, node => node.expandable, node => node.children);
-
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- dataSource2 = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
-
- myControl = new FormControl();
- //注入MatDialogRef,可以用来关闭对话框
- //要访问对话框组件中的数据,必须使用MAT_DIALOG_DATA注入令牌
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,public snackBar: MatSnackBar,@Inject(MAT_DIALOG_DATA) public data,private tree:TreeService) {}
-
- olddata =[] //原始所有--数据权限
- olddata2 =[] //原始所有--菜单权限
- newdata = []
- newdata2 = []
- placeholdername = this.data.name
- datachildarrbox = {} //数据权限存放有children的 父id:子id1 子id2 子id3
- menuchildarrbox = {} //菜单权限存放有children的 父id:子id1 子id2 子id3
- checkedMap = {}
- ngOnInit(){
- //获得角色的数据权限,选中的checked为true
- this.http.get(`/api/Roles/${this.data.id}/Permissions`).subscribe((data: any[])=>{
- this.olddata =data
- this.newdata = this.tree.toTree(this.olddata)
-
- //如果子节点存在选中则父节点默认选中
- this.newdata.forEach(item=>{
- if(item.children){
- item.children.forEach(element => {
- if(element.checked){
- this.checkedMap[item.id] = true
- }
- });
- }
- })
-
- data.forEach(item=>{
- if(item.checked){
- this.checkedMap[item.id] = true;
- }
-
- })
- this.dataSource.data = this.newdata;
- this.treeControl.expandAll()
- this.dataSource.data.forEach(item=>{
- if(item.children){
- var childarr = []
- item.children.forEach(n => {
- childarr.push(n.id)
- })
- this.datachildarrbox[item.id] = childarr
- }
- })
- })
-
-
- //获得角色的菜单权限,选中的checked为true
- this.http.get(`/api/Roles/${this.data.id}/NavMenus`).subscribe((data: any[])=>{
- this.olddata2 =data
- this.newdata2 = this.tree.toTree(this.olddata2)
- data.forEach(item => {
- if(item.checked){
- this.checkedMap[item.id] = item.checked;
- }
- });
-
- this.dataSource2.data = this.newdata2;
- this.treeControl.expandAll()
-
- this.dataSource2.data.forEach(item=>{
- if(item.children){
- var childarr = []
- item.children.forEach(n => {
- childarr.push(n.id)
- })
- this.menuchildarrbox[item.id] = childarr
- }
- })
- })
- }
-
- //选中对应小组
- selectedAll(event, node){
- this.olddata.forEach(item=>{
- if(item.parentId == node.id){
- this.checkedMap[item.id] = event.checked;
- }
- })
- // console.log(this.olddata2,node )
- var menus =[] //导航菜单可能有三级 用于存储第二级
- //选中一级菜单
- this.olddata2.forEach(item=>{
- if(item.parentId == node.id){
- this.checkedMap[item.id] = event.checked;
- menus.push(item)
- }
- })
- //将二级菜单也选中
- menus.forEach(item=>{
- if(item.children){
- item.children.forEach(n => {
- this.checkedMap[n.id] = event.checked;
- });
- }
- })
- }
-
- hasChild = (_: number, node: any) => node.expandable;
-
- onNoClick(): void {
- this.dialogRef.close();
- }
-
-
- onSubmit(value){
- var keydata = [] //存储选中的菜单权限
- var keydata2 = [] //存储选中的数据权限
-
- for(let i in value){
- if(value[i]){
- if(i.indexOf("first") && i!="name" && i!="order"){
- keydata.push(i.split('.')[1])
- }
- if(i.indexOf("second") && i!="name" && i!="order"){
- keydata2.push(i.split('.')[1])
- }
- }
- }
- let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
- if(this.data['id'] != "0" && this.data['id'] != "1"){
- this.http.put(
- `/api/Roles/${this.data['id']}`,
- {
- id:this.data['id'],
- name: value.name,
- order: this.data.order,
- enabled: true,
- creationTime:time,
- }
- ).subscribe(data=>{
-
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('修改角色姓名请求失败','确定',config);
- })
- function includes(arr1, arr2) {
- return arr2.every(val => arr1.includes(val));
- }
- const orginalList = [...keydata2];
- orginalList.forEach((item) => { // forEach 里面 splice 有问题,详见 https://blog.csdn.net/qq_38128179/article/details/92798157
- if (item in this.datachildarrbox) { // 根据 key,可以直接在 对象 里面获取数据
- const datachildarrboxArr = this.datachildarrbox[item];
- if (!includes(keydata2, datachildarrboxArr)) { // 如果不全部包含
- keydata2.splice(keydata2.findIndex(items => items == item), 1);
- }
- }
- });
- this.http.post(
- `/api/Roles/${this.data.id}/Permissions`,
- keydata2
- ).subscribe(data=>{
-
- },
- err=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('分配数据权限请求失败','确定',config);
- })
- }
- this.http.post(
- `/api/Roles/${this.data.id}/NavMenus`,
- keydata
- ).subscribe(
- data=>{
- this.dialogRef.close();
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('编辑成功','确定',config);
- },
- err=>{
- this.dialogRef.close();
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('分配菜单权限失败','确定',config);
- }
- )
- // this.http.put(
- // `/api/Roles/${this.data['id']}`,
- // {
- // id:this.data['id'],
- // name: value.name,
- // order: this.data.order,
- // enabled: true,
- // creationTime:time,
- // }
- // ).subscribe(
- // data=>{
-
-
-
- // },
- // err=>{
- // const config = new MatSnackBarConfig();
- // config.verticalPosition = 'top';
- // config.duration = 3000
- // this.snackBar.open('名称格式不正确','确定',config);
- // }
- // )
-
-
-
- }
-}
-
-
diff --git a/src/app/ui/slide/slide.component.html b/src/app/ui/slide/slide.component.html
deleted file mode 100644
index 46148bf..0000000
--- a/src/app/ui/slide/slide.component.html
+++ /dev/null
@@ -1 +0,0 @@
-{{xxx}}
diff --git a/src/app/ui/slide/slide.component.scss b/src/app/ui/slide/slide.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/ui/slide/slide.component.spec.ts b/src/app/ui/slide/slide.component.spec.ts
deleted file mode 100644
index c82efb6..0000000
--- a/src/app/ui/slide/slide.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { SlideComponent } from './slide.component';
-
-describe('SlideComponent', () => {
- let component: SlideComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ SlideComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(SlideComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/slide/slide.component.ts b/src/app/ui/slide/slide.component.ts
deleted file mode 100644
index 2310459..0000000
--- a/src/app/ui/slide/slide.component.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-slide',
- templateUrl: './slide.component.html',
- styleUrls: ['./slide.component.scss']
-})
-export class SlideComponent implements OnInit {
-
- xxx:boolean=false
- sss(){
- this.xxx = !this.xxx
- console.log(this.xxx)
- }
- constructor() {
-
- }
-
- ngOnInit() {
- }
-
-}
diff --git a/src/app/ui/snackbar/snackbar.component.html b/src/app/ui/snackbar/snackbar.component.html
deleted file mode 100644
index 49dfc20..0000000
--- a/src/app/ui/snackbar/snackbar.component.html
+++ /dev/null
@@ -1,10 +0,0 @@
-底部提示消息
-
-
-
-
-
-
-
-
-显示出来吧!
diff --git a/src/app/ui/snackbar/snackbar.component.scss b/src/app/ui/snackbar/snackbar.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/ui/snackbar/snackbar.component.spec.ts b/src/app/ui/snackbar/snackbar.component.spec.ts
deleted file mode 100644
index 664d327..0000000
--- a/src/app/ui/snackbar/snackbar.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { SnackbarComponent } from './snackbar.component';
-
-describe('SnackbarComponent', () => {
- let component: SnackbarComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ SnackbarComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(SnackbarComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/snackbar/snackbar.component.ts b/src/app/ui/snackbar/snackbar.component.ts
deleted file mode 100644
index 1fcdc8c..0000000
--- a/src/app/ui/snackbar/snackbar.component.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import {MatSnackBar} from '@angular/material/snack-bar';
-@Component({
- selector: 'app-snackbar',
- templateUrl: './snackbar.component.html',
- styleUrls: ['./snackbar.component.scss']
-})
-export class SnackbarComponent implements OnInit {
-
- constructor(private _snackBar: MatSnackBar) { }
-
- ngOnInit() {
- }
- openSnackBar(message: string, action: string) {
- this._snackBar.open(message, action, {
- duration: 2000,
- });
- }
-}
diff --git a/src/app/ui/stepper/stepper.component.html b/src/app/ui/stepper/stepper.component.html
deleted file mode 100644
index c999bd3..0000000
--- a/src/app/ui/stepper/stepper.component.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
- {{!isLinear ? '切换为线性' : '切换为非线性'}}
-
-
-
-
-
-
-
-
-
-
- 填写姓名
-
-
-
-
-
-
-
- 下一步
-
-
-
-
-
-
-
- 家庭住址
-
-
-
-
-
- 上一步
- 下一步
-
-
-
-
-
- 完成
- 你已经完成了
-
- 上一步
- 重置
-
-
-
-
-
diff --git a/src/app/ui/stepper/stepper.component.scss b/src/app/ui/stepper/stepper.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/ui/stepper/stepper.component.spec.ts b/src/app/ui/stepper/stepper.component.spec.ts
deleted file mode 100644
index 4bf2213..0000000
--- a/src/app/ui/stepper/stepper.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { StepperComponent } from './stepper.component';
-
-describe('StepperComponent', () => {
- let component: StepperComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ StepperComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(StepperComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/stepper/stepper.component.ts b/src/app/ui/stepper/stepper.component.ts
deleted file mode 100644
index 943805a..0000000
--- a/src/app/ui/stepper/stepper.component.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import {FormBuilder, FormGroup, Validators} from '@angular/forms';
-@Component({
- selector: 'app-stepper',
- templateUrl: './stepper.component.html',
- styleUrls: ['./stepper.component.scss']
-})
-export class StepperComponent implements OnInit {
- isLinear = false;
- firstFormGroup: FormGroup;
- secondFormGroup: FormGroup;
- constructor(private _formBuilder: FormBuilder) { }
-
- ngOnInit() {
- this.firstFormGroup = this._formBuilder.group({
- firstCtrl: ['', Validators.required]
- });
- this.secondFormGroup = this._formBuilder.group({
- secondCtrl: ['', Validators.required]
- });
- }
-
-}
diff --git a/src/app/ui/tabgroup/tabgroup.component.html b/src/app/ui/tabgroup/tabgroup.component.html
deleted file mode 100644
index 8df2739..0000000
--- a/src/app/ui/tabgroup/tabgroup.component.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
- 我是内容一
- 我是内容二
- 我是内容三
-
-
-
-
-
-
-
- 一 二 三
-
- 四五六
-
-
-
- thumb_down 失败者
-
- rush B!!!
-
-
diff --git a/src/app/ui/tabgroup/tabgroup.component.scss b/src/app/ui/tabgroup/tabgroup.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/ui/tabgroup/tabgroup.component.spec.ts b/src/app/ui/tabgroup/tabgroup.component.spec.ts
deleted file mode 100644
index 7e9fe94..0000000
--- a/src/app/ui/tabgroup/tabgroup.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { TabgroupComponent } from './tabgroup.component';
-
-describe('TabgroupComponent', () => {
- let component: TabgroupComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ TabgroupComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(TabgroupComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/ui/tabgroup/tabgroup.component.ts b/src/app/ui/tabgroup/tabgroup.component.ts
deleted file mode 100644
index 12e1da3..0000000
--- a/src/app/ui/tabgroup/tabgroup.component.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-tabgroup',
- templateUrl: './tabgroup.component.html',
- styleUrls: ['./tabgroup.component.scss']
-})
-export class TabgroupComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
- xxx(){
- console.log("xxxx")
- }
-}
diff --git a/src/app/ui/title/title.component.html b/src/app/ui/title/title.component.html
new file mode 100644
index 0000000..80a2c38
--- /dev/null
+++ b/src/app/ui/title/title.component.html
@@ -0,0 +1,8 @@
+
+
+ keyboard_arrow_left
+
+
+ {{title}}
+
+
\ No newline at end of file
diff --git a/src/app/ui/title/title.component.scss b/src/app/ui/title/title.component.scss
new file mode 100644
index 0000000..e22fdde
--- /dev/null
+++ b/src/app/ui/title/title.component.scss
@@ -0,0 +1,26 @@
+.tltleBox{
+ text-align: center;
+ width: 10rem;
+ height: 0.585938rem;
+ line-height: 0.585938rem;
+ position: relative;
+ background: #FFFFFF;
+ top: 0;
+ .icon{
+ position: absolute;
+ left: 0.292969rem;
+ top: 50%;
+ transform: translateY(-50%);
+ mat-icon{
+ vertical-align: text-top;
+ width: 40px;
+ height: 40px;
+ font-size: 40px;
+ }
+ }
+ .text{
+ font-size: 0.195313rem;
+ font-family: Source Han Sans CN;
+ font-weight: 500;
+ }
+}
\ No newline at end of file
diff --git a/src/app/pages/home2/home2.component.spec.ts b/src/app/ui/title/title.component.spec.ts
similarity index 57%
rename from src/app/pages/home2/home2.component.spec.ts
rename to src/app/ui/title/title.component.spec.ts
index b7d612f..df219fa 100644
--- a/src/app/pages/home2/home2.component.spec.ts
+++ b/src/app/ui/title/title.component.spec.ts
@@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { Home2Component } from './home2.component';
+import { TitleComponent } from './title.component';
-describe('Home2Component', () => {
- let component: Home2Component;
- let fixture: ComponentFixture;
+describe('TitleComponent', () => {
+ let component: TitleComponent;
+ let fixture: ComponentFixture;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ Home2Component ]
+ declarations: [ TitleComponent ]
})
.compileComponents();
}));
beforeEach(() => {
- fixture = TestBed.createComponent(Home2Component);
+ fixture = TestBed.createComponent(TitleComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
diff --git a/src/app/ui/title/title.component.ts b/src/app/ui/title/title.component.ts
new file mode 100644
index 0000000..45dee00
--- /dev/null
+++ b/src/app/ui/title/title.component.ts
@@ -0,0 +1,21 @@
+import { Component, Input, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-title',
+ templateUrl: './title.component.html',
+ styleUrls: ['./title.component.scss']
+})
+export class TitleComponent implements OnInit {
+
+ //传入标题名称
+ @Input() title
+
+ constructor() { }
+
+ ngOnInit(): void {
+
+ }
+ goBack(){
+ window.history.back();
+ }
+}
diff --git a/src/app/ui/training-recordinfo/training-recordinfo.component.html b/src/app/ui/training-recordinfo/training-recordinfo.component.html
new file mode 100644
index 0000000..98c29bc
--- /dev/null
+++ b/src/app/ui/training-recordinfo/training-recordinfo.component.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+ 行驶路线
+
+ 熟悉路线
+
+
+
+ 平面图
+ 安全疏散设施情况
+ 消防设施情况
+ 水源道路情况
+ 重点部位情况
+ 发现问题
+ 现场照片
+
+
+
+
\ No newline at end of file
diff --git a/src/app/ui/training-recordinfo/training-recordinfo.component.scss b/src/app/ui/training-recordinfo/training-recordinfo.component.scss
new file mode 100644
index 0000000..b3c59e4
--- /dev/null
+++ b/src/app/ui/training-recordinfo/training-recordinfo.component.scss
@@ -0,0 +1,23 @@
+.bigbox{
+ width: 10rem;
+ height: 100%;
+ background: #F4F5F9;
+ overflow: hidden;
+ .title{
+ width: 10rem;
+ height: 0.585938rem;
+
+ }
+ .content{
+ width: 10rem;
+ height: 6.71875rem;
+ .cardbox{
+ margin: 0 auto;
+ margin-top:0.195313rem;
+ background-color: #fff;
+ border-radius: 0.048828rem;
+ width:9.570313rem;
+ height: 6.523438rem;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/pages/homedetail/homedetail.component.spec.ts b/src/app/ui/training-recordinfo/training-recordinfo.component.spec.ts
similarity index 50%
rename from src/app/pages/homedetail/homedetail.component.spec.ts
rename to src/app/ui/training-recordinfo/training-recordinfo.component.spec.ts
index 4639de2..523082c 100644
--- a/src/app/pages/homedetail/homedetail.component.spec.ts
+++ b/src/app/ui/training-recordinfo/training-recordinfo.component.spec.ts
@@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { HomedetailComponent } from './homedetail.component';
+import { TrainingRecordinfoComponent } from './training-recordinfo.component';
-describe('HomedetailComponent', () => {
- let component: HomedetailComponent;
- let fixture: ComponentFixture;
+describe('TrainingRecordinfoComponent', () => {
+ let component: TrainingRecordinfoComponent;
+ let fixture: ComponentFixture;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ HomedetailComponent ]
+ declarations: [ TrainingRecordinfoComponent ]
})
.compileComponents();
}));
beforeEach(() => {
- fixture = TestBed.createComponent(HomedetailComponent);
+ fixture = TestBed.createComponent(TrainingRecordinfoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
diff --git a/src/app/ui/training-recordinfo/training-recordinfo.component.ts b/src/app/ui/training-recordinfo/training-recordinfo.component.ts
new file mode 100644
index 0000000..8147b0d
--- /dev/null
+++ b/src/app/ui/training-recordinfo/training-recordinfo.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-training-recordinfo',
+ templateUrl: './training-recordinfo.component.html',
+ styleUrls: ['./training-recordinfo.component.scss']
+})
+export class TrainingRecordinfoComponent implements OnInit {
+
+ constructor() { }
+ title:any = "训练记录信息"
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/ui/ui-routing.module.ts b/src/app/ui/ui-routing.module.ts
index d3e39c5..50aef13 100644
--- a/src/app/ui/ui-routing.module.ts
+++ b/src/app/ui/ui-routing.module.ts
@@ -1,60 +1,17 @@
import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { UiComponent } from './ui.component';
-import { DateselectComponent } from './dateselect/dateselect.component';
-import { MenuComponent } from './menu/menu.component';
-import { CardComponent } from './card/card.component';
-import { ListComponent } from './list/list.component';
-import { GridComponent } from './grid/grid.component';
-import { StepperComponent } from './stepper/stepper.component';
-import { TabgroupComponent } from './tabgroup/tabgroup.component';
-import { ButtonComponent } from './button/button.component';
-import { BadgeComponent } from './badge/badge.component';
-import { ProgressComponent } from './progress/progress.component';
import { PaginatorComponent } from './paginator/paginator.component';
-import { PersonaldataComponent } from '../pages/personaldata/personaldata.component';
import { UserdataComponent } from './userdata/userdata.component';
-import { OrganizationComponent } from './organization/organization.component';
-import { UnittypeComponent } from './unittype/unittype.component';
-import { AuthorityComponent } from './authority/authority.component';
-import { RoleComponent } from './role/role.component';
-import { UsermanagementComponent } from './usermanagement/usermanagement.component';
-import { NavmenusComponent } from './navmenus/navmenus.component';
-import { FireProtectionElementsComponent } from './fire-protection-elements/fire-protection-elements.component';
-import {MaterialBankComponent} from './material-bank/material-bank.component'
-import {UnitInformationComponent} from './unit-information/unit-information.component'
-import { EnterpriseuserComponent } from './enterpriseuser/enterpriseuser.component';
-import { FireFightingFacilitiesFormworkComponent } from './fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component'
import { CollectionToolsComponent } from './collection-tools/collection-tools.component';
+import { AddSixFamiliarComponent } from './add-six-familiar/add-six-familiar.component';
const routes: Routes = [
{ path: '', component: UiComponent},
- { path: 'dateselect', component:DateselectComponent},
- { path: 'menu', component:MenuComponent},
- { path: 'card', component:CardComponent},
- { path: 'list', component:ListComponent},
- { path: 'grid', component:GridComponent},
- { path: 'stepper', component:StepperComponent},
- { path: 'tabgroup', component:TabgroupComponent},
- { path: 'btn', component:ButtonComponent },
- { path: 'badge', component:BadgeComponent },
- { path: 'progress', component:ProgressComponent },
{ path: 'paginator', component:PaginatorComponent },
- { path: 'person', component:PersonaldataComponent },
{ path: 'userdata', component:UserdataComponent },
- { path: 'organization', component:OrganizationComponent },
- { path: 'unittype', component:UnittypeComponent },
- { path: 'authority', component:AuthorityComponent },
- { path: 'role', component:RoleComponent },
- { path: 'usermanagement', component:UsermanagementComponent },
- { path: 'navmenus', component:NavmenusComponent },
- { path: 'fireProtectionElements', component:FireProtectionElementsComponent },
- { path: 'materialBank', component:MaterialBankComponent },
- { path: 'unitInformation', component:UnitInformationComponent },
- { path: 'enterpriseuser', component:EnterpriseuserComponent },
- { path: 'fireFightingFacilitiesFormwork', component:FireFightingFacilitiesFormworkComponent },
{ path: 'collectionTools', component:CollectionToolsComponent },
];
diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts
index 3f98ed7..e3aec45 100644
--- a/src/app/ui/ui.module.ts
+++ b/src/app/ui/ui.module.ts
@@ -1,7 +1,6 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { UiComponent } from './ui.component';
-import { DateselectComponent } from './dateselect/dateselect.component';
import { UiRoutingModule } from './ui-routing.module';
import {A11yModule} from '@angular/cdk/a11y';
import {DragDropModule} from '@angular/cdk/drag-drop';
@@ -44,61 +43,30 @@ 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 { MenuComponent } from './menu/menu.component';
-import { CardComponent } from './card/card.component';
-import { ListComponent } from './list/list.component';
-import { GridComponent } from './grid/grid.component';
-import { StepperComponent } from './stepper/stepper.component';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
-import { TabgroupComponent } from './tabgroup/tabgroup.component';
-import { ButtonComponent } from './button/button.component';
-import { BadgeComponent } from './badge/badge.component';
-import { ProgressComponent } from './progress/progress.component';
-import { SnackbarComponent } from './snackbar/snackbar.component';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatPaginatorIntl } from '@angular/material/paginator';
import { PaginatorModule } from './paginator/paginator.module';
-import { PersonaldataComponent } from '../pages/personaldata/personaldata.component';
import { FooterComponent } from './footer/footer.component';
import { UserdataComponent, EditUser } from './userdata/userdata.component';
import { ChangepasswordComponent } from './changepassword/changepassword.component';
-import { OrganizationComponent, CreateOrganization, EditOrganization } from './organization/organization.component';
-import { UnittypeComponent,DialogOverviewExampleDialog,editorialUnit } from './unittype/unittype.component';
-import { AuthorityComponent, CreateAuthority } from './authority/authority.component';
-import { RoleComponent, CreateRole, EditRole } from './role/role.component';
-import { UsermanagementComponent,CreateNewUser,EditNewUser,allRoles,seeInformation } from './usermanagement/usermanagement.component';
-
import { IsnoPipe } from '../pipes/boolean.pipe';
import {ConfirmpswDirective} from './changepassword/equal-validator.directive'
import { TimePipe } from '../pipes/time.pipe';
-import { NavmenusComponent, CreateMenus, EditMenus } from './navmenus/navmenus.component';
-import { FireProtectionElementsComponent, Establish, EditingFireControl } from './fire-protection-elements/fire-protection-elements.component';
-import { FireFightingTemplateComponent, NewFireFighting, EditFireClassification } from './fire-fighting-template/fire-fighting-template.component';
-import { MaterialBankComponent,attributeComponent,addAttributeComponent,editAttribute } from './material-bank/material-bank.component';
-import { UnitInformationComponent,addUnitAttributeComponent,editUnitAttribute } from './unit-information/unit-information.component';
-import { AddMatLibrary } from './material-bank/addmatlibrary.component';
-import { EditMatLibrary } from './material-bank/editmatlibrary.component';
-import { AddOriginalCopy } from './material-bank/addoriginalcopy.component';
import { NzTreeModule } from 'ng-zorro-antd/tree';
-import { FileUploadModule } from 'ng2-file-upload'
-import { EditOriginalCopy } from './material-bank/editoriginalcopy.component';
-import { SelectOriginalCopy } from './material-bank/selectoriginalcopy.component';
-import { EditUnitInfo } from './unit-information/editunitinfo.component';
-import { AddUnitInfo } from './unit-information/addunitinfo.component';
-import { AddGroups } from './unit-information/addgroups.component';
-import { EditGroup } from './unit-information/editgroup.component';
-import { EnterpriseuserComponent,seeenterpriseuser,editenterpriseuser } from './enterpriseuser/enterpriseuser.component';
-import { AddEnterpriserUser } from './enterpriseuser/addenterpriseuser.component';
-import { FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent } from './fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component';
-
+import { FileUploadModule } from 'ng2-file-upload';
import { CollectionToolsComponent, CreateBuilding, EditBuilding, ViewDetails } from './collection-tools/collection-tools.component';
import { WorkingAreaComponent } from '../working-area/working-area.component';
import {leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeComponent,editDisposalNodeComponent} from './collection-tools/leftFunctionalDomain'
import { saveOneDialog, saveTwoDialog } from './collection-tools/save';
-import { KnowRouteComponent} from './know-route/know-route.component'
- import { from } from 'rxjs';
+import { AddSixFamiliarComponent, SelectUnit } from './add-six-familiar/add-six-familiar.component';
+import { TitleComponent } from './title/title.component'
+import { HomeComponent } from './home/home.component';
+import { TrainingRecordinfoComponent } from './training-recordinfo/training-recordinfo.component';
+import { BasicinfoComponent } from '../key-unit/basicinfo/basicinfo.component';
+import { KeyUnitModule } from '../key-unit/key-unit.module';
@NgModule({
- declarations: [UiComponent, DateselectComponent, MenuComponent, CardComponent, ListComponent, GridComponent, StepperComponent, TabgroupComponent, ButtonComponent, BadgeComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, FooterComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, EnterpriseuserComponent,AddEnterpriserUser,addUnitAttributeComponent,editUnitAttribute,seeenterpriseuser,editenterpriseuser, FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,KnowRouteComponent],
+ declarations: [UiComponent, FooterComponent, UserdataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,EditUser,CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,HomeComponent, AddSixFamiliarComponent, TitleComponent, SelectUnit, TrainingRecordinfoComponent],
imports: [
CommonModule,
@@ -149,7 +117,7 @@ import { KnowRouteComponent} from './know-route/know-route.component'
ReactiveFormsModule,
FormsModule,
PaginatorModule,
- FileUploadModule
+ FileUploadModule,
],
diff --git a/src/app/ui/unit-information/addUnitAttribute.html b/src/app/ui/unit-information/addUnitAttribute.html
deleted file mode 100644
index a98f573..0000000
--- a/src/app/ui/unit-information/addUnitAttribute.html
+++ /dev/null
@@ -1,71 +0,0 @@
-新增属性
-
\ No newline at end of file
diff --git a/src/app/ui/unit-information/addgroups.component.html b/src/app/ui/unit-information/addgroups.component.html
deleted file mode 100644
index c8417d5..0000000
--- a/src/app/ui/unit-information/addgroups.component.html
+++ /dev/null
@@ -1,28 +0,0 @@
-
- 新增分组
-
-
-
- *可通过/进行层级分级以及归属,例如:a/b/c
-
-
- 表单
- 表格
-
-
-
-
- 不新增
- 新增行
- 新增组
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/unit-information/addgroups.component.ts b/src/app/ui/unit-information/addgroups.component.ts
deleted file mode 100644
index b71963a..0000000
--- a/src/app/ui/unit-information/addgroups.component.ts
+++ /dev/null
@@ -1,114 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import { HttpClient } from '@angular/common/http';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-
-
-
-@Component({
- selector: 'addgroups',
- templateUrl: './addgroups.component.html',
- styleUrls: ['./unit-information.component.scss']
- })
- export class AddGroups {
- myControl = new FormControl();
- templatestatus = "0"//创建模板时的默认状态
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) {}
-
- ngOnInit(): void {}
-
- onNoClick(): void {
- this.dialogRef.close();
- }
-
- grouporder = null; //没有'/'情况的order值
-
- //提交表单新增分组
- onSubmit(value){
- if(this.data.allGrouping.length == 0){ //分组为空时
- this.http.post("/api/BasicGroups",{
- id: "",
- name: value.groupname,
- type: Number(value.propertyType),
- addMode:Number(value.databehavior),
- isOptional:true,
- order: 0,
- enabled: true,
- propertyInfos: [],
- basicCategoryId: this.data.unitInformation.id
- }).subscribe(data=>{
- this.dialogRef.close('yes');
- })
- }
- if (value.groupname.indexOf('/') == -1 && this.data.allGrouping.length != 0) { //分组name中没有'/'情况时
- this.grouporder = this.data.allGrouping[this.data.allGrouping.length - 1].order + 1
- this.http.post("/api/BasicGroups",{
- id: "",
- name: value.groupname,
- type: Number(value.propertyType),
- addMode:Number(value.databehavior),
- isOptional:true,
- order: this.grouporder,
- enabled: true,
- propertyInfos: [],
- basicCategoryId: this.data.unitInformation.id
- }).subscribe(data=>{
- this.dialogRef.close('yes');
- })
- }
- else if (value.groupname.indexOf('/') != -1 && this.data.allGrouping.length != 0) { //分组name中有'/'情况时
- let str = value.groupname.substring(0,value.groupname.lastIndexOf('/')) //截取'/'之前字符串
- for (let i=this.data.allGrouping.length;i--;i>=0) {
- if (str.indexOf(this.data.allGrouping[i].name)!=-1) {//分组name中含有新建分组'/'之前文字时
- this.grouporder = this.data.allGrouping[this.data.allGrouping.length - 1].order + 1
- this.http.post("/api/BasicGroups",{
- id: "",
- name: value.groupname,
- type: Number(value.propertyType),
- addMode:Number(value.databehavior),
- isOptional:true,
- order: this.grouporder,
- enabled: true,
- propertyInfos: [],
- basicCategoryId: this.data.unitInformation.id
- }).subscribe(data=>{
- let id = {categoryId:this.data.unitInformation.id}
- this.http.get('/api/BasicGroups',{params:id}).subscribe((data:any)=>{
- let newitem = data.pop()
- data.splice(i+1,0,newitem)
- this.dialogRef.close(data);
- })
- });break}
- else if (str.indexOf(this.data.allGrouping[i].name)==-1 && i<1) {//分组name中没有新建分组'/'之前文字时
- this.grouporder = this.data.allGrouping[this.data.allGrouping.length - 1].order + 1
- this.http.post("/api/BasicGroups",{
- id: "",
- name: value.groupname,
- type: Number(value.propertyType),
- addMode:Number(value.databehavior),
- isOptional:true,
- order: this.grouporder,
- enabled: true,
- propertyInfos: [],
- basicCategoryId: this.data.unitInformation.id
- }).subscribe(data=>{
- this.dialogRef.close('yes');
- });break}
-
- } //for循环
-
- } //else if
-
-
-
- } //onSubmit
-
-
-
-
-
-}
diff --git a/src/app/ui/unit-information/addunitinfo.component.html b/src/app/ui/unit-information/addunitinfo.component.html
deleted file mode 100644
index 4ef9240..0000000
--- a/src/app/ui/unit-information/addunitinfo.component.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
- 新增单位信息
-
-
-
-
-
-
- 禁用
- 启用
-
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/unit-information/addunitinfo.component.ts b/src/app/ui/unit-information/addunitinfo.component.ts
deleted file mode 100644
index 60a0e2f..0000000
--- a/src/app/ui/unit-information/addunitinfo.component.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import { HttpClient } from '@angular/common/http';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-@Component({
- selector: 'addunitinfo',
- templateUrl: './addunitinfo.component.html',
- styleUrls: ['./unit-information.component.scss']
- })
- export class AddUnitInfo {
- myControl = new FormControl();
- templatestatus = "0"//创建模板时的默认状态
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) {}
- onNoClick(): void {
- this.dialogRef.close();
- }
- onSubmit(value){
- this.http.post("/api/BasicCategories",{
- id: "",
- name: value.templatename,
- enabled: Boolean(Number(value.enable)) ,
- }).subscribe(data=>{
- this.dialogRef.close('ooo');
- })
- }
- }
\ No newline at end of file
diff --git a/src/app/ui/unit-information/editUnitAttribute.html b/src/app/ui/unit-information/editUnitAttribute.html
deleted file mode 100644
index 66aa164..0000000
--- a/src/app/ui/unit-information/editUnitAttribute.html
+++ /dev/null
@@ -1,76 +0,0 @@
-编辑属性
-
\ No newline at end of file
diff --git a/src/app/ui/unit-information/editgroup.component.html b/src/app/ui/unit-information/editgroup.component.html
deleted file mode 100644
index 7975ba9..0000000
--- a/src/app/ui/unit-information/editgroup.component.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
- 修改分组
-
-
-
-
-
- 表单
- 表格
-
-
-
-
- 不新增
- 新增行
- 新增组
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/unit-information/editgroup.component.ts b/src/app/ui/unit-information/editgroup.component.ts
deleted file mode 100644
index 4bc9385..0000000
--- a/src/app/ui/unit-information/editgroup.component.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import { HttpClient } from '@angular/common/http';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-
-
-
-@Component({
- selector: 'editgroup',
- templateUrl: './editgroup.component.html',
- styleUrls: ['./unit-information.component.scss']
- })
- export class EditGroup {
- myControl = new FormControl();
-
- groupname = this.data.item.name //分组名
- grouptype = String(this.data.item.type) //分组类型
- groupaddMode = String(this.data.item.addMode) //数据行为
-
- templatestatus = "0"//创建模板时的默认状态
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) {}
-
- ngOnInit(): void {
-
- }
-
- onNoClick(): void {
- this.dialogRef.close();
- }
-
- onSubmit(value){
- this.http.put(`/api/BasicGroups/${this.data.item.id}`,{
- id: this.data.item.id,
- name: value.groupname,
- type: Number(value.propertyType),
- addMode:Number(value.databehavior),
- isOptional: this.data.item.isOptional,
- order: this.data.item.order,
- enabled: this.data.item.enabled,
- propertyInfos:this.data.item.propertyInfos,
- basicCategoryId: this.data.item.basicCategoryId
- }).subscribe(data=>{
- this.dialogRef.close('ooo');
- })
- }
-
- }
\ No newline at end of file
diff --git a/src/app/ui/unit-information/editunitinfo.component.html b/src/app/ui/unit-information/editunitinfo.component.html
deleted file mode 100644
index 8fbc3a5..0000000
--- a/src/app/ui/unit-information/editunitinfo.component.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
- 修改单位信息
-
-
-
-
-
-
- 禁用
- 启用
-
-
-
-
-
- 确定
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/unit-information/editunitinfo.component.ts b/src/app/ui/unit-information/editunitinfo.component.ts
deleted file mode 100644
index 749645d..0000000
--- a/src/app/ui/unit-information/editunitinfo.component.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
-import {FlatTreeControl} from '@angular/cdk/tree';
-import { HttpClient } from '@angular/common/http';
-import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {FormControl} from '@angular/forms';
-import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-@Component({
- selector: 'editunitinfo',
- templateUrl: './editunitinfo.component.html',
- styleUrls: ['./unit-information.component.scss']
- })
- export class EditUnitInfo {
- templatenamedefault = this.data.unitInformation.name
- myControl = new FormControl();
- constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) {}
- onNoClick(): void {
- this.dialogRef.close();
- }
-
- onSubmit(value){
- this.http.put(`/api/BasicCategories/${this.data.unitInformation.id}`,{
- id: this.data.unitInformation.id,
- name: value.templatename,
- enabled: Boolean(Number(value.enable)),
- }).subscribe(data=>{
- this.dialogRef.close('ooo');
- })
- }
- }
\ No newline at end of file
diff --git a/src/app/ui/unit-information/unit-information.component.html b/src/app/ui/unit-information/unit-information.component.html
deleted file mode 100644
index 3df4935..0000000
--- a/src/app/ui/unit-information/unit-information.component.html
+++ /dev/null
@@ -1,164 +0,0 @@
-
-
-
-
keyboard_arrow_down
-
chevron_right
-
单位信息
-
-
- add_circle_outline
-
-
- create
-
-
- block
-
-
- delete
-
-
-
-
-
- {{item.name}}
- block
-
-
-
-
-
-
-
-
-
{{unitInformation.name}}
-
-
- 新增分组
-
-
- arrow_upward
-
-
- arrow_downward
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
- arrow_upward
-
- arrow_downward
-
- description
- border_color
- star
- star_border
-
- block
-
-
- block
-
- delete
-
-
-
-
-
-
-
-
- add_box
-
-
-
-
-
-
-
- 名称
-
- {{element.propertyName}}
-
-
-
-
- 类型
-
- 单行文本
- 多行文本
- 数值
-
-
-
-
- 默认值
-
- {{element.propertyValue}}
-
-
-
-
- 必填
-
- 是
- 否
-
-
-
-
- 单位
-
- {{element.physicalUnit}}
-
-
-
-
- 操作
-
-
- border_color
-
-
-
- block
-
-
- block
-
-
- delete
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/unit-information/unit-information.component.scss b/src/app/ui/unit-information/unit-information.component.scss
deleted file mode 100644
index fd0abd5..0000000
--- a/src/app/ui/unit-information/unit-information.component.scss
+++ /dev/null
@@ -1,120 +0,0 @@
-.content {
- margin: 0 0 0 10px;
- width: 100%;
- height: 90%;
- overflow-x: hidden;
- overflow-y: auto;
- display: flex;
- .leftBox {
- flex: 20%;
- padding-top: 10px;
- }
- .rightBox {
- border-left: 1px solid #999;
- flex: 80%;
- display: flex;
- flex-direction: column;
- .topBox {
- flex:1;
- .originalScript {
- width: 100%;
- background-color: #fafafa;
- padding:10px 0;
- padding-left: 20px;
- font-weight: 500;
- display: flex;
- flex-direction: row;
- p{
- margin-top: 11px;
- }
- .mat-icon {
- vertical-align:middle;
- }
- }
- }
- }
-}
-
-
-
-.bank {
- display: flex;
- font-size: 18px;
- font-weight: 500;
-}
-.mat-icon {
- width: 18px;
- height: 18px;
- vertical-align:top;
- margin-right: 8px;
- cursor:pointer;
-}
-.overFlowText {
- width: 135px;
- display: inline-block;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.material {
- cursor:pointer;
- height: 30px;
- font-size: 16px;
- margin-top: 10px;
- padding-left: 25px;
- .blockBtn {
- float: right;
- margin-right: 12px;
- width: 16px;
- height: 16px;
- }
-}
-
-.tableBox {
- margin-top: 10px;
-}
-.attribute {
- padding-left: 25px;
- display: flex;
- flex-direction: row;
- background-color: #d7d7d7;
- .attributeLeft{
- flex: 1;
- padding: 10px 0 10px 0;
- .mat-icon {
- margin-left: 5px;
- }
- }
-}
-table {
- width: 100%;
- text-align: center;
- .cdk-header-cell {
- text-align: center;
- }
-}
-
-
-
-.active {
- background-color: rgba(225,225,225,0.8)
-}
-.btn{
- text-align: center;
- button{
- margin: 0 8px;
- }
-}
-.editunitformfield{
- width:230px
-}
-
-//层级显示表格
-.twoLevel {
- padding-left: 25px;
- margin-top: 0px;
-}
-.threeLevel {
- padding-left: 50px;
- margin-top: 0px;
-}
\ No newline at end of file
diff --git a/src/app/ui/unit-information/unit-information.component.ts b/src/app/ui/unit-information/unit-information.component.ts
deleted file mode 100644
index de53143..0000000
--- a/src/app/ui/unit-information/unit-information.component.ts
+++ /dev/null
@@ -1,635 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import { AddUnitInfo } from './addunitinfo.component'
-import { EditUnitInfo } from './editunitinfo.component'
-import { AddGroups } from './addgroups.component'
-import { EditGroup } from './editgroup.component'
-import { HttpClient } from '@angular/common/http';
-import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-
-
-
-@Component({
- selector: 'app-unit-information',
- templateUrl: './unit-information.component.html',
- styleUrls: ['./unit-information.component.scss']
-})
-export class UnitInformationComponent implements OnInit {
-
- constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
-
- ngOnInit(): void {
- this.http.get('/api/BasicCategories').subscribe(data=>{
- this.allUnitInformation = data
- this.unitInformation = data[0]
- this.getAllGrouping()})
- }
-
- allUnitInformation:any; //所有单位
- unitInformation:any={name:''}; //选中的单位
- unitInformationIndex:any=0; //选中的单位index
-
- allGrouping:any; //单位信息模板对应所有分组
- groupingSelect:any=[]; //选中的分组
- groupingIndex:any=[]; //选中的分组index
- attributeSelect:any=[]; //选中的分组属性
- attributeIndex:any=[]; //选中的分组属性所属分组index
-
- displayedColumns = ['checked', 'name', 'type', 'default','required','physicalUnit','operation'];
-
- isshow = true//左侧列表的显示隐藏
- //收起左侧列表
- showlist(){
- this.isshow = !this.isshow
- }
- //获取所有的单位信息模板
- getAllUnitInformation () {
- this.http.get('/api/BasicCategories').subscribe(data=>{
- this.allUnitInformation = data
- this.unitInformation = data[this.unitInformationIndex]
- })
- }
-
- //单位信息模板对应所有分组
- getAllGrouping () {
- if (this.unitInformation) {
- let id = {categoryId:this.unitInformation.id}
- this.http.get('/api/BasicGroups',{params:id}).subscribe((data:any)=>{
- if (data.length) {
- data.forEach((item,index) => {
- if (item.name.indexOf('/')!=-1) {
- let str=item.name.substring(0,item.name.lastIndexOf('/'))
- if (str.indexOf('/')==-1 && index!=0 && data[index-1].name.indexOf(str) != -1 ) {
- item.css = true
- } else if (str.indexOf('/')!=-1 && index!=0 && data[index-1].name.indexOf(str) != -1 ){
- item.newcss = true
- }
- }
- });
- }
- this.allGrouping = data
- this.groupingSelect = []
- this.groupingIndex = []
- this.attributeSelect = []
- this.attributeIndex= []
- this.setIndex()
- })
- }
-
- }
-
- //选中单位
- add (e,index) {
- if (this.unitInformationIndex != index) {
- this.unitInformation = e
- this.unitInformationIndex = index
- this.getAllGrouping()
- }
- }
-
- //选中当前分组checked
- groupingChange (e,index,event) {
- if (event.checked === true) {
- this.groupingSelect.push(e)
- this.groupingIndex.push(index)
- } else {
- this.groupingSelect.splice(this.groupingSelect.findIndex(item => item.id == e.id), 1)
- this.groupingIndex.splice(this.groupingIndex.findIndex(items => items == index), 1)
- }
- }
-
- //分组上移
- groupingTop () {
- if (this.groupingSelect.length && this.groupingIndex.length) {
- let select = this.groupingSelect[this.groupingSelect.length-1]
- let index = this.groupingIndex[this.groupingIndex.length-1]
- if (index!=0) {
- let topOrder = this.allGrouping[index].order
- let bottomOrder = this.allGrouping[index-1].order
- this.allGrouping[index-1].order = topOrder
- this.allGrouping.forEach(item => {
- item.propertyInfos.forEach((element) => {
- delete element.index
- });
- });
- this.http.put(`/api/BasicGroups/${this.allGrouping[index-1].id}`,{
- id:this.allGrouping[index-1].id,
- name:this.allGrouping[index-1].name,
- type:this.allGrouping[index-1].type,
- addMode:this.allGrouping[index-1].addMode,
- isOptional:this.allGrouping[index-1].isOptional,
- order:this.allGrouping[index-1].order,
- enabled:this.allGrouping[index-1].enabled,
- propertyInfos:this.allGrouping[index-1].propertyInfos,
- basicCategoryId:this.allGrouping[index-1].basicCategoryId
- }).subscribe(data=>{
- this.allGrouping[index].order = bottomOrder
- this.submit(select,index)
- })
- }
- }
- }
-
- //分组下移
- groupingBottom () {
- if (this.groupingSelect.length && this.groupingIndex.length) {
- let select = this.groupingSelect[this.groupingSelect.length-1]
- let index = this.groupingIndex[this.groupingIndex.length-1]
- if (index!=this.allGrouping.length-1) {
- let topOrder = this.allGrouping[index].order
- let bottomOrder = this.allGrouping[index+1].order
- this.allGrouping[index+1].order = topOrder
- this.allGrouping.forEach(item => {
- item.propertyInfos.forEach((element) => {
- delete element.index
- });
- });
- this.http.put(`/api/BasicGroups/${this.allGrouping[index+1].id}`,{
- id:this.allGrouping[index+1].id,
- name:this.allGrouping[index+1].name,
- type:this.allGrouping[index+1].type,
- addMode:this.allGrouping[index+1].addMode,
- isOptional:this.allGrouping[index+1].isOptional,
- order:this.allGrouping[index+1].order,
- enabled:this.allGrouping[index+1].enabled,
- propertyInfos:this.allGrouping[index+1].propertyInfos,
- basicCategoryId:this.allGrouping[index+1].basicCategoryId
- }).subscribe(data=>{
- this.allGrouping[index].order = bottomOrder
- this.submit(select,index)
- })
- }
- }
- }
-
- //新增单位
- addunitinfo(){
- const dialogRef = this.dialog.open(AddUnitInfo, {//调用open方法打开对话框并且携带参数过去
- width: '260px',
- data: {}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
- this.getAllUnitInformation ()
- }
-
- }
- );
- }
-
- //编辑单位
- editunitinfo(){
- if(this.unitInformation){
- const dialogRef = this.dialog.open(EditUnitInfo, {//调用open方法打开对话框并且携带参数过去
- width: '295px',
- data: {unitInformation:this.unitInformation}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
- this.getAllUnitInformation ()
- }
- }
- );
- }else{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请先选择单位','确定',config);
- }
- }
-
- //禁启用单位
- disableunit(){
- if(this.unitInformation){
- this.http.put(`/api/BasicCategories/${this.unitInformation.id}`,{
- id: this.unitInformation.id,
- name: this.unitInformation.name,
- enabled: !this.unitInformation.enabled,
- }).subscribe(data=>{
- this.getAllUnitInformation ()
- })
- }else{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请先选择单位','确定',config);
- }
- }
-
- //删除单位
- deleteunit(){
- var isdeleted = confirm(`确定要删除${this.unitInformation.name}单位信息吗?`)
- if(isdeleted){
- //请求删除接口
- this.http.delete(`/api/BasicCategories/${this.unitInformation.id}`).subscribe( data=>{
- this.http.get('/api/BasicCategories').subscribe(data=>{
- this.allUnitInformation = data
- this.unitInformation = data[this.unitInformationIndex]
- this.getAllGrouping()})
- })
- }
- }
-
- //新增分组
- addgroups(){
- const dialogRef = this.dialog.open(AddGroups, {//调用open方法打开对话框并且携带参数过去
- width: '295px',
- data: {unitInformation:this.unitInformation,allGrouping:this.allGrouping}
- });
- dialogRef.afterClosed().subscribe(
- msg=>{
- if(msg && msg!='yes'){
- msg.forEach((item,index) => {
- this.http.put(`/api/BasicGroups/${item.id}`,{
- id: item.id,
- name: item.name,
- type:item.type,
- addMode:item.addMode,
- isOptional:item.isOptional,
- order: index,
- enabled: item.enabled,
- propertyInfos:item.propertyInfos,
- basicCategoryId: item.basicCategoryId
- }).subscribe(data=>{
- if (index===msg.length-1) {this.getAllGrouping()}
- })
- });
- // this.getAllGrouping()
- } else if (msg == 'yes') {this.getAllGrouping()}
-
- }
-
-
-
- );
- }
-
- //编辑分组
- editgroup(item,index){
- const dialogRef = this.dialog.open(EditGroup, {//调用open方法打开对话框并且携带参数过去
- width: '295px',
- data: {unitInformation:this.unitInformation,allGrouping:this.allGrouping,item:item}
- });
- dialogRef.afterClosed().subscribe(
- data=>{
- if(data){
- this.getAllGrouping ()
- }
- }
- );
- }
-
- //禁启用分组
- disablegroup(item){
- if(item.enabled){
- this.http.put(`/api/BasicGroups/${item.id}`,{
- id: item.id,
- name: item.name,
- type:item.type,
- addMode:item.addMode,
- isOptional:item.isOptional,
- order: item.order,
- enabled: false,
- propertyInfos:item.propertyInfos,
- basicCategoryId: item.basicCategoryId
- }).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('禁用成功','确定',config);
- this.getAllGrouping ()
- })
- }else{
- this.http.put(`/api/BasicGroups/${item.id}`,{
- id: item.id,
- name: item.name,
- type:item.type,
- addMode:item.addMode,
- isOptional:item.isOptional,
- order: item.order,
- enabled: true,
- propertyInfos:item.propertyInfos,
- basicCategoryId: item.basicCategoryId
- }).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('启用成功','确定',config);
- this.getAllGrouping ()
- })
- }
- }
-
- //设置是否分组可选
- optional (item) {
- if (item.isOptional) {
- this.http.put(`/api/BasicGroups/${item.id}`,{
- id: item.id,
- name: item.name,
- type:item.type,
- addMode:item.addMode,
- isOptional:false,
- order: item.order,
- enabled: item.enabled,
- propertyInfos:item.propertyInfos,
- basicCategoryId: item.basicCategoryId
- }).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('现状态为不可选','确定',config);
- this.getAllGrouping ()
- })
- } else{
- this.http.put(`/api/BasicGroups/${item.id}`,{
- id: item.id,
- name: item.name,
- type:item.type,
- addMode:item.addMode,
- isOptional:true,
- order: item.order,
- enabled: item.enabled,
- propertyInfos:item.propertyInfos,
- basicCategoryId: item.basicCategoryId
- }).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('现状态为可选','确定',config);
- this.getAllGrouping ()
- })
- }
- }
-
- //删除分组
- deletegroup(item){
- var isdeleted = confirm(`确定要删除${item.name}分组吗?`)
- if(isdeleted){
- //请求删除接口
- this.http.delete(`/api/BasicGroups/${item.id}`).subscribe( data=>{
- this.getAllGrouping ()
- })
- }
- }
-
-
-
-
-
- //分组属性操作↓
- //选中分组属性checked
- attributeChange (item,index,event) {
- if (event.checked === true) {
- this.attributeSelect.push(item)
- this.attributeIndex.push(index)
- } else {
- this.attributeSelect.splice(this.attributeSelect.findIndex(items => items == item), 1)
- this.attributeIndex.splice(this.attributeIndex.findIndex(items => items == index), 1)
- }
- }
-
- //属性上移
- attributeTop (e,index) {
- let select = this.attributeSelect[this.attributeSelect.length-1]
- let newIndex = this.attributeIndex[this.attributeIndex.length-1]
- if (this.attributeSelect.length && newIndex===index) {
- let newOrder = this.attributeSelect[this.attributeSelect.length-1].order
- if(select.index != 0) {
- this.allGrouping[index].propertyInfos[select.index].order=this.allGrouping[index].propertyInfos[select.index-1].order
- this.allGrouping[index].propertyInfos[select.index-1].order=newOrder
- this.submit(e,index)
- }
- }
- }
-
- //属性下移
- attributeBottom (e,index) {
- let select = this.attributeSelect[this.attributeSelect.length-1]
- let newIndex = this.attributeIndex[this.attributeIndex.length-1]
- if (this.attributeSelect.length && newIndex===index) {
- let newOrder = this.attributeSelect[this.attributeSelect.length-1].order
- if(select.index != this.allGrouping[index].propertyInfos.length-1) {
- this.allGrouping[index].propertyInfos[select.index].order=this.allGrouping[index].propertyInfos[select.index+1].order
- this.allGrouping[index].propertyInfos[select.index+1].order=newOrder
- this.submit(e,index)
- }
- }
- }
-
- //封装函数每条属性添加index
- setIndex () {
- if (this.allGrouping.length) {
- this.allGrouping.forEach(item => {
- item.propertyInfos.forEach((element,index) => {
- element.index = index
- });
- });
- }
- }
-
- //创建分组属性
- addGrouping (e,index) {
- let data = e
- const dialogRef = this.dialog.open(addUnitAttributeComponent,{data});
- dialogRef.afterClosed().subscribe(
- data=>{ if (data) {
- this.allGrouping[index].propertyInfos.push(data)
- this.submit(e,index)
- }})
- }
-
- //编辑分组属性
- editGrouping (e,index,element) {
- let data = element
- const dialogRef = this.dialog.open(editUnitAttribute,{data});
- dialogRef.afterClosed().subscribe(
- data=>{ if (data) {
- this.allGrouping[index].propertyInfos[data.index] = data
- this.submit(e,index)
- }})
- }
-
- //属性显示
- display (e) {
- e.visible = true
- }
-
- //属性隐藏
- noDisplay (e) {
- e.visible = false
- }
-
- //属性启用
- enabledGrouping (e) {
- e.enabled = true
- }
-
- //属性禁用
- noEnabledGrouping (e) {
- e.enabled = false
- }
-
- //属性删除
- deleteGrouping (e,index,elementIndex) {
- let isTrue = confirm('您确定要删除吗')
- if (isTrue) {
- this.allGrouping[index].propertyInfos.splice(elementIndex,1)
- this.submit(e,index)
- }
- }
-
-
-
- //提交当前分组保存数据
- submit (e,index) {
- if (this.allGrouping.length) {
- this.allGrouping.forEach(item => {
- item.propertyInfos.forEach((element) => {
- delete element.index
- });
- });
- this.http.put(`/api/BasicGroups/${e.id}`,{
- id:e.id,
- name:e.name,
- type:e.type,
- addMode:e.addMode,
- isOptional: e.isOptional,
- order:e.order,
- enabled:e.enabled,
- propertyInfos:this.allGrouping[index].propertyInfos,
- basicCategoryId:e.basicCategoryId
- }).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('数据更新成功','确定',config);
- this.getAllGrouping()
- })
- } else {
- this.http.put(`/api/BasicGroups/${e.id}`,{
- id:e.id,
- name:e.name,
- type:e.type,
- addMode:e.addMode,
- isOptional:e.isOptional,
- order:e.order,
- enabled:e.enabled,
- propertyInfos:this.allGrouping[index].propertyInfos,
- basicCategoryId:e.basicCategoryId
- }).subscribe(data=>{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('数据更新成功','确定',config);
- this.getAllGrouping()
- })
- }
- }
-
-
-
-}
-
-
-
-//新增属性弹窗
-export interface Food {
- value: number;
- viewValue: string;
-}
-@Component({
- selector: 'app-addUnitAttribute',
- templateUrl: './addUnitAttribute.html',
- styleUrls: ['./unit-information.component.scss']
-})
-export class addUnitAttributeComponent {
-
- constructor(private http:HttpClient,public dialog: MatDialog,
- public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { }
-
- ngOnInit(): void {
- if (this.data.propertyInfos.length) {
- this.order = this.data.propertyInfos[this.data.propertyInfos.length-1].order +1
- } else {
- this.order = 0
- }
- }
-
- //定义属性数据
- propertyType:Food[]=[
- {value:0, viewValue: '单行文本'},
- {value:1, viewValue: '多行文本'},
- {value:2, viewValue: '数值'},]
-
- order:number; //order
-
- //提交表单
- onSubmit (e) {
- e.order = this.order
- e.enabled = true
- e.visible = true
- e.required = e.required=='true'? true: false,
- this.dialogRef.close(e)
- }
-
-
-
-}
-
-
-
-//编辑属性弹窗
-@Component({
- selector: 'app-editUnitAttribute',
- templateUrl: './editUnitAttribute.html',
- styleUrls: ['./unit-information.component.scss']
-})
-export class editUnitAttribute {
-
- constructor(private http:HttpClient,public dialog: MatDialog,
- public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data,) { }
-
- ngOnInit(): void {
- this.propertyName = this.data.propertyName
- this.propertyValue = this.data.propertyValue
- this.propertyType = this.data.propertyType
- this.required = String(this.data.required)
- this.ruleName = this.data.ruleName
- this.ruleValue = this.data.ruleValue
- this.physicalUnit = this.data.physicalUnit
- this.tag = this.data.tag
- this.order = this.data.order}
-
-
-
- propertyName:any
- propertyValue:any;
- propertyType:number;
- required:any;
- ruleName:any;
- ruleValue:any;
- physicalUnit:any;
- tag:any;
- order:number;
-
- //定义属性数据
- type:Food[]=[
- {value:0, viewValue: '单行文本'},
- {value:1, viewValue: '多行文本'},
- {value:2, viewValue: '数值'},]
-
- //提交表单
- onSubmit (e) {
- e.enabled = this.data.enabled
- e.visible = this.data.visible
- e.index = this.data.index
- e.required = e.required=='true'? true: false,
- this.dialogRef.close(e)
- }
-
-
-
-}
diff --git a/src/app/ui/unittype/dialog-overview-example-dialog.html b/src/app/ui/unittype/dialog-overview-example-dialog.html
deleted file mode 100644
index cc7f6a1..0000000
--- a/src/app/ui/unittype/dialog-overview-example-dialog.html
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
创建单位类型
-
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
- {{food.name}}
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
- 确定
-
- 取消
-
-
-
-
-
-
-
-
- {{node.name}} check_circle_outline
-
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
- {{node.name}} check_circle_outline
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/unittype/editorialUnit.html b/src/app/ui/unittype/editorialUnit.html
deleted file mode 100644
index a0a2553..0000000
--- a/src/app/ui/unittype/editorialUnit.html
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
编辑单位类型
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
-
- {{food.name}}
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
- 确定
-
- 取消
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/unittype/unittype.component.html b/src/app/ui/unittype/unittype.component.html
deleted file mode 100644
index 5926469..0000000
--- a/src/app/ui/unittype/unittype.component.html
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
- 单位类型
- {{element.name}}
-
-
-
- 单位信息模板
- {{element.basicCategoryName}}
-
-
-
- 消防要素模板
- {{element.fireCategoryName}}
-
-
-
- 消防设施模板
- {{element.facilityCategoryName}}
-
-
-
- 操作
-
-
-
- 编辑
-
-
-
- 启用
-
-
- 禁用
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/unittype/unittype.component.scss b/src/app/ui/unittype/unittype.component.scss
deleted file mode 100644
index d4186d3..0000000
--- a/src/app/ui/unittype/unittype.component.scss
+++ /dev/null
@@ -1,30 +0,0 @@
-.left {
- margin: 10px;
-}
-.marginLeft {
- margin-left: 5px;
-}
-table {
- width: 100%;
- text-align: center;
- .cdk-header-cell {
- text-align: center;
- }
- }
-
-.leftBox {
- width: 200px;
- float: left;
-}
-.tree {
- float: right;
- width: 300px;
- height: 350px;
- overflow-y: auto;
-}
-.mat-icon {
- font-size: 22px;
-}
-mat-form-field{
- width: 200px;
-}
\ No newline at end of file
diff --git a/src/app/ui/unittype/unittype.component.ts b/src/app/ui/unittype/unittype.component.ts
deleted file mode 100644
index c9d8dd5..0000000
--- a/src/app/ui/unittype/unittype.component.ts
+++ /dev/null
@@ -1,307 +0,0 @@
-import { Component, OnInit, Inject } from '@angular/core';
-import {HttpClient} from '@angular/common/http'
-import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { FlatTreeControl } from '@angular/cdk/tree';
-import { MatTreeFlattener, MatTreeFlatDataSource } from '@angular/material/tree';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-
-
-
-@Component({
- selector: 'app-unittype',
- templateUrl: './unittype.component.html',
- styleUrls: ['./unittype.component.scss']
-})
-export class UnittypeComponent implements OnInit {
-
- constructor(public http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
-
- displayedColumns: string[]=['company', 'template','fireControl','facilityCategory','operation'];
- dataSource:any=[]; //所有单位类型
- allFireControl:any=[]; //所有消防要素模板
-
- ngOnInit() {
- this.getList()
- this.getFireControl()
- }
-
-
- //获取所有单位类型
- getList () {
- this.http.get('/api/BuildingTypes').subscribe(
- (data: any[]) => {
- this.dataSource=data
- }
- )
- }
-
- //获取所有消防要素模板
- getFireControl () {
- this.http.get('/api/FireCategories').subscribe(
- (data:any)=>{
- this.allFireControl=data
- }
- )}
-
- //创建单位弹窗
- open() {
- let data = this.allFireControl || []
- let dialogRef = this.dialog.open(DialogOverviewExampleDialog,{data});
- dialogRef.afterClosed().subscribe(
- (data)=>{if (data) {this.getList()}}
- );
- }
-
- //编辑弹窗
- edit (e) {
- let data= e
- let allFireControl= this.allFireControl || []
- let dialogRef = this.dialog.open(editorialUnit,
- {
- width:"260px",
- data:{data,allFireControl}
- });
- dialogRef.afterClosed().subscribe(
- (data)=>{if (data) {this.getList()}}
- );
- }
-
- //启用
- enabled(e) {
- this.http.put(
- `/api/BuildingTypes/${e.id}`,
- {
- id:e.id,
- name: e.name,
- enabled: true,
- basicCategoryId:e.basicCategoryId,
- fireCategoryId:e.fireCategoryId,
- facilityCategoryId: e.facilityCategoryId,
- }
- ).subscribe(
- ()=> {
- this.getList()
- }
- )
- }
-
- //禁用
- prohibit (e) {
- this.http.put(
- `/api/BuildingTypes/${e.id}`,
- {
- id:e.id,
- name: e.name,
- enabled: false,
- basicCategoryId:e.basicCategoryId,
- fireCategoryId:e.fireCategoryId,
- facilityCategoryId: e.facilityCategoryId,
- }
- ).subscribe(
- ()=> {
- this.getList()
- }
- )
- }
-
- //删除
- delete(e) {
- let isTrue = confirm('您确定要删除吗')
- if(isTrue) {
- this.http.delete(`/api/BuildingTypes/${e}`).subscribe(
- ()=>{
- this.getList()
- }
- )
- }
- }
-
-
-
-}
-
-//创建单位弹窗组件
-@Component({
- selector: 'dialog-overview-example-dialog',
- templateUrl: 'dialog-overview-example-dialog.html',
- styleUrls: ['./unittype.component.scss']
-})
-export class DialogOverviewExampleDialog {
- data:any =[]
- newdata = [];
-
- private _transformer = (node, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- computed:node.computed,
- order:node.order,
- checked:node.checked,
- tag:node.tag
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
-
- constructor(public http: HttpClient,public snackBar: MatSnackBar,
- public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public allFireControl) {}
-
- ngOnInit() {
- this.getunitmsg()
- this.getAllFacilityCategory()
- }
-
- oldSelected:any; //选中的单位信息模板id
- selected:any; //选中的消防要素模板id
- allunitmsg:any //所有单位信息
- allFacilityCategory:any; //所有消防设施模板
-
- //获得所有单位信息模板
- getunitmsg(){
- this.http.get('/api/BasicCategories').subscribe(data=>{
- this.allunitmsg = data
- })
- }
-
- //获取所有消防设施模板
- getAllFacilityCategory () {
- this.http.get('/api/FacilityCategories').subscribe(data=>{
- this.allFacilityCategory = data
- })
- }
-
- //封装实现select框切换渲染更新Tree函数
- select () {
- this.newdata=[]
- let id = this.selected
- this.http.get(`/api/FireCategories/${id}/FireElements`).subscribe(
- (data:any)=>{
- function getparentNode(parentId){
- return data.find((item)=>{
- return item.id == parentId
- })
- }
- data.forEach(item => {
- var parentNode = getparentNode(item.parentId);
- if(parentNode){
- if(!parentNode.children){
- parentNode.children = []
- }
- parentNode.children.push(item)
- }else{
- if(!item.parentId){
- this.newdata.push(item)
- }
- }
- });
- this.dataSource.data = this.newdata;
- }
- )
-
- }
-
- //select选择切换Tree
- toggleDisplay() {
- this.select()
- }
-
- hasChild = (_: number, node: any) => node.expandable;
-
- //创建单位类型
- onSubmit (e) {
- if(this.selected) {
- this.http.post('/api/BuildingTypes',{
- name:e.name,
- enabled:true,
- basicCategoryId:e.basicCategoryName,
- fireCategoryId:this.selected,
- facilityCategoryId: e.facilityCategoryName
- }).subscribe(data=>{
- this.dialogRef.close('success')
- })
- } else {
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写完整','确定',config);
- }
- }
-
-
-
-}
-
-
-//编辑单位弹窗组件
-@Component({
- selector: 'app-editorialUnit',
- templateUrl: './editorialUnit.html',
- styleUrls: ['./unittype.component.scss']
-})
-export class editorialUnit {
-
-constructor(public http: HttpClient,public snackBar: MatSnackBar,
- public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) {}
-
- ngOnInit() {
- this.companyName=this.data.data.name
- this.oldSelected = this.data.data.basicCategoryId
- this.selected=this.data.data.fireCategoryId
- this.facilityCategoryId = this.data.data.facilityCategoryId
- this.getunitmsg()
- this.getAllFacilityCategory()
- }
-
- companyName:any; //单位类型name
- oldSelected:any; //单位信息模板id
- selected:any; //消防要素模板id
- facilityCategoryId:any; //消防设施模板id
- allunitmsg:any //所有单位信息模板
- allFacilityCategory:any; //所有消防设施模板
-
- //获得所有单位信息模板
- getunitmsg(){
- this.http.get('/api/BasicCategories').subscribe(data=>{
- this.allunitmsg = data
- })
- }
-
- //获取所有消防设施模板
- getAllFacilityCategory () {
- this.http.get('/api/FacilityCategories').subscribe(data=>{
- this.allFacilityCategory = data
- })
- }
-
- //编辑功能
- onSubmit (e) {
- let id = this.data.data.id
- let enabled = this.data.data.enabled
- if(e.name&&this.selected&&this.oldSelected) {
- this.http.put(`/api/BuildingTypes/${id}`,{
- id:id,
- name:e.name,
- enabled: enabled,
- basicCategoryId:this.oldSelected,
- fireCategoryId:this.selected,
- facilityCategoryId: e.facilityCategoryName
- }).subscribe(data=>{
- this.dialogRef.close('success')
- })
- } else {
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请填写完整','确定',config);
- }
- }
-
-
-
-}
diff --git a/src/app/ui/usermanagement/allRoles.html b/src/app/ui/usermanagement/allRoles.html
deleted file mode 100644
index 1b5dfd3..0000000
--- a/src/app/ui/usermanagement/allRoles.html
+++ /dev/null
@@ -1,29 +0,0 @@
-分配角色
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
-
- 确定
-
- 取消
-
\ No newline at end of file
diff --git a/src/app/ui/usermanagement/createUser.html b/src/app/ui/usermanagement/createUser.html
deleted file mode 100644
index aa9fa1b..0000000
--- a/src/app/ui/usermanagement/createUser.html
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
- 请选择所属机构
-
-
-
- {{node.name}}
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
- {{node.name}}
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/usermanagement/editUser.html b/src/app/ui/usermanagement/editUser.html
deleted file mode 100644
index 2f5e2c5..0000000
--- a/src/app/ui/usermanagement/editUser.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
- 请选择所属机构
-
-
-
- {{node.name}}
-
-
-
-
-
- {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
-
-
- {{node.name}}
-
-
-
\ No newline at end of file
diff --git a/src/app/ui/usermanagement/seeInformation.html b/src/app/ui/usermanagement/seeInformation.html
deleted file mode 100644
index a627ce7..0000000
--- a/src/app/ui/usermanagement/seeInformation.html
+++ /dev/null
@@ -1,29 +0,0 @@
-查看用户
-
-
-
- 登录账号:
- {{data.name}}
-
- 真实姓名:
- {{data.realName}}
-
- 所属机构:
- {{data.organizationName}}
-
- 所属角色:
- {{item}}
-
- 创建时间:
- {{data.creationTime|date:'yyyy-MM-dd'}}
-
- 是否禁用:
- 否
- 是
-
-
-
-
-
- 关闭
-
\ No newline at end of file
diff --git a/src/app/ui/usermanagement/usermanagement.component.html b/src/app/ui/usermanagement/usermanagement.component.html
deleted file mode 100644
index 1b78d66..0000000
--- a/src/app/ui/usermanagement/usermanagement.component.html
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-
-
-
- 登录账号
- {{element.name}}
-
-
-
- 真实姓名
- {{element.realName}}
-
-
-
- 所属机构
- {{element.organizationName}}
-
-
-
- 所属角色
-
- {{item}}
-
-
-
-
- 创建时间
-
- {{element.creationTime|date:'yyyy-MM-dd'}}
-
-
-
-
- 操作
-
- 重置密码
-
- 分配角色
-
-
-
- 编辑
-
- 启用
- 禁用
-
- 删除
-
-
-
-
-
-
-
-
-
diff --git a/src/app/ui/usermanagement/usermanagement.component.scss b/src/app/ui/usermanagement/usermanagement.component.scss
deleted file mode 100644
index 5466063..0000000
--- a/src/app/ui/usermanagement/usermanagement.component.scss
+++ /dev/null
@@ -1,155 +0,0 @@
-table {
- width: 100%;
- text-align: center;
- .cdk-header-cell {
- text-align: center;
- }
- }
-.maginleft {
- margin-left: 5px;
-}
-
-.header {
- width: 100%;
- padding: 10px;
- margin-bottom: 10px;
- box-sizing: border-box;
- border-bottom: 1px solid rgba(0, 0, 0, 0.12);
- .queryBox {
- box-sizing: border-box;
- padding: 5px 15px;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-items:center;
- justify-content:center;
- .queryField {
- margin: 0 15px;
- input {
- width: 180px;
- height: 22px;
- line-height: 22px;
- border-radius: 3px;}
- }
-
- } //queryBox
-}
-
-
-
-//创建用户
-.alert-danger{
- font-size: 14px;
- color: red;
-}
-.leftTree {
- width: 200px;
- float: left;
-}
-.tree {
- width: 300px;
- height: 400px;
- float: right;
- overflow-y: auto;
-}
-
-
-
-//分配角色
-.example-margin {
- display: block;
- margin-top: 5px;
-}
-.clearfix:after{/*伪元素是行内元素 正常浏览器清除浮动方法*/
- content: "";
- display: block;
- height: 0;
- clear:both;
- visibility: hidden;
-}
-.clearfix{
- *zoom: 1;/*ie6清除浮动的方式 *号只有IE6-IE7执行,其他浏览器不执行*/
-}
-.leftBox {
- float: left;
- width: 250px;
- border-radius: 10px;;
- border: 1px solid #999;
-}
-.rightBox {
- float: right;
- width: 250px;
- border-radius: 10px;;
- border: 1px solid #999;
-}
-.Userheader {
- height: 30px;
- line-height: 30px;
- border-radius: 10px 10px 0 0;
- padding-left: 10px;
- background-color: #f9fafc;
-}
-.select {
- height: 300px;
- padding-left: 10px;
- border-top: 1px solid #999;
- overflow: auto;
- p{
- height: 24px;
- line-height: 24px;
- }
-}
-.organizationlist{
- list-style: none
-}
-.organizationlist:hover{
- background: rgba(225, 225, 225, 0.8);
- cursor: pointer;
-}
-
-
-//滚动条样式
-::-webkit-scrollbar{
- width: 5px;
- background-color: white;
-}
-::-webkit-scrollbar-thumb{
- background-color: #999;
-}
-.organizationbox{
- width:450px;
- height: 200px;
- background: white;
- position: absolute;
- top: 25px;
- left: 78px;
- z-index: 999;
- border: 1px solid grey;
- overflow-y: auto;
- li{
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- mat-tree-node{
- cursor: pointer;
- white-space:pre;
- }
- mat-tree-node:hover{
- background: rgba(225, 225, 225, 0.8);
- }
- .closediv{
- z-index: 100;
- position: absolute;
- right: 0;
- top: 0;
- width: 30px;
- height: 30px;
- cursor: pointer;
- line-height: 30px;
- text-align: center;
- }
- .closediv:hover{
- background:rgba(225, 225, 225, 0.8);
- }
-}
\ No newline at end of file
diff --git a/src/app/ui/usermanagement/usermanagement.component.ts b/src/app/ui/usermanagement/usermanagement.component.ts
deleted file mode 100644
index 0c6bd09..0000000
--- a/src/app/ui/usermanagement/usermanagement.component.ts
+++ /dev/null
@@ -1,549 +0,0 @@
-import { Component, OnInit, ViewChild, Inject } from '@angular/core';
-import {HttpClient} from '@angular/common/http'
-import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { MatPaginator } from '@angular/material/paginator';
-import { MatTableDataSource } from '@angular/material/table';
-import { FlatTreeControl } from '@angular/cdk/tree';
-import { MatTreeFlattener, MatTreeFlatDataSource } from '@angular/material/tree';
-import { PageEvent } from '@angular/material/paginator';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-import { TreeService } from '../../http-interceptors/tree.service'
-import { FormControl } from '@angular/forms';
-
-
-
-@Component({
- selector: 'app-usermanagement',
- templateUrl: './usermanagement.component.html',
- styleUrls: ['./usermanagement.component.scss']
-})
-export class UsermanagementComponent implements OnInit {
-
- constructor(public http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private tree: TreeService) { }
- private _transformer = (node, level: number) => { //初始化tree
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- children: node.children
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- treedataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- myControl = new FormControl();
- hasChild = (_: number, node: any) => node.expandable;
-
- ngOnInit() {
- this.initData()
- this.getAllMechanism()
- }
-
-
- displayedColumns: string[] = ['loginName', 'realName', 'mechanism','role','time', 'operation'];
- dataSource:any; //所有用户
- allMechanism:any; //所有机构
-
- userLogin:string; //搜索账号
- userName:string; //搜索名称
- userMechanism:string //搜索机构
-
- //分页
- @ViewChild(MatPaginator, {static: true})
- pageEvent: PageEvent;
- paginator: MatPaginator;
- length:any; //共多少条数据
- pageSize:any; //每页条数
- pageSizeOptions: number[] = [10] //设置每页条数
- pageNumber:number = 1; //第几页
-
- //分页切换
- chagePage (e) {
- this.pageNumber = e.pageIndex+1
- let data = {
- Name: this.userLogin ||'',
- RealName:this.userName ||'',
- OrganizationId:this.userMechanism ||'',
- PageNumber: String(this.pageNumber),
- }
- this.http.get('/api/Users',{params:data}).subscribe(
- (data:any[])=> {
- this.length = data['totalCount']
- this.pageSize = data['pageSize']
- this.dataSource = new MatTableDataSource(data['items']);
- }
- )
- }
-
- isorganizationbox:any = false
- stopclose(e){
- e.stopPropagation();
- }
- js:any
- // jsId:any
- //点击辖区中队树,将选择的辖区中队添加到变量
- add(node) {
- this.isorganizationbox = false
- this.js = node.name
- console.log(this.js)
- this.userMechanism = node.id
- }
-
- //打开辖区中队隐藏框
- openorganizationbox() {
- this.isorganizationbox = true
- }
-
- //关闭出现的组织机构div
- closediv(){
- this.isorganizationbox = false
- }
-
- //页面初始化 + 查询 + 重置
- initData () {
- let data = {
- Name: this.userLogin ||'',
- RealName:this.userName ||'',
- OrganizationId:this.userMechanism ||'',
- PageNumber: '1',
- }
- this.http.get('/api/Users',{params:data}).subscribe(
- (data:any[])=> {
- this.length = data['totalCount']
- this.pageSize = data['pageSize']
- this.pageEvent.pageIndex = 0
- this.dataSource = new MatTableDataSource(data['items']);
- }
- )
- }
-
- //更新当前页数据
- getUsers () {
- let data = {
- Name: this.userLogin ||'',
- RealName:this.userName ||'',
- OrganizationId:this.userMechanism ||'',
- PageNumber: String(this.pageNumber),
- }
- this.http.get('/api/Users',{params:data}).subscribe(
- (data:any[])=> {
- this.length = data['totalCount']
- this.pageSize = data['pageSize']
- this.dataSource = new MatTableDataSource(data['items']);
- }
- )
-
- }
-
- //清空自动搜索
- empty () {
- this.userLogin=''
- this.userName=''
- this.userMechanism=''
- this.js = ''
- this.isorganizationbox = false
- this.initData()
- }
- allorganizations:any//所有组织机构
- treedata:any//所有组织机构变成树
- newallorganizations:any
-
- //获取所有机构
- getAllMechanism() {
- this.http.get('/api/Organizations').subscribe(data=>{
- this.allorganizations = data
- this.treedata = this.tree.toTree(data);
- this.treedataSource.data = this.treedata
- })
- }
-
- //打开创建用户窗口
- open() {
- let dialogRef = this.dialog.open(CreateNewUser,{
- width: '600px',
- });
- dialogRef.afterClosed().subscribe(
- (data)=>{
- if (data) {this.getUsers()}
- }
- );
- }
-
- //打开分配角色窗口
- openuser (e) {
- let dialogRef = this.dialog.open(allRoles,
- {
- width:'600px',
- data: {e}
- });
- dialogRef.afterClosed().subscribe(
- (data)=>{
- if (data) {this.getUsers()}
- }
- );
- }
-
- //启用
- enable (e) {
- this.http.put(`/api/Users/${e.name}`,{
- name: e.name,
- realName:e.realName,
- post: e.post,
- phone: e.phone,
- enabled: true,
- creationTime:e.creationTime,
- organizationId:e.organizationId
- }).subscribe(
- data=> {
- this.getUsers()
- }
- )
- }
-
- //禁用
- prohibit (e) {
- this.http.put(`/api/Users/${e.name}`,{
- name: e.name,
- realName:e.realName,
- post: e.post,
- phone: e.phone,
- enabled: false,
- creationTime:e.creationTime,
- organizationId:e.organizationId
- }).subscribe(
- data=> {
- this.getUsers()
- }
- )
- }
-
- //编辑
- edit (e) {
- let allMechanism=this.allMechanism
- let dialogRef = this.dialog.open(EditNewUser,
- {
- data: {e,allMechanism}
- });
-
- dialogRef.afterClosed().subscribe(
- (data)=>{
- if (data) {this.getUsers()}
- }
- );
- }
-
- //查看
- see (e) {
- this.http.get(`/api/Users/${e}`).subscribe(
- data=> {
- let dialogRef = this.dialog.open(seeInformation,
- {
- width:'600px',
- data
- });
- dialogRef.afterClosed().subscribe();
- }
-
- )
- }
-
- //重置密码
- reset (e) {
- this.http.put(`/api/Users/${e}/ResetPassword`,{}).subscribe(
- data=> {
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('重置密码成功!','确定',config);
- }
- )
- }
-
- //删除
- delete (e) {
- let isTrue = confirm('您确定要删除吗')
- if (isTrue) {
- this.http.delete(`/api/Users/${e}`).subscribe(
- data=>{
- this.getUsers()
- }
- )
- }
- }
-
-
-
-}
-
-//创建用户组件
-@Component({
- selector: 'app-createUser',
- templateUrl: './createUser.html',
- styleUrls: ['./usermanagement.component.scss']
-})
-export class CreateNewUser {
-
- newdata = [];
-
- private _transformer = (node, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- enabled:node.enabled,
- order:node.order,
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
-
- constructor(public http: HttpClient,public snackBar: MatSnackBar,
- public dialogRef: MatDialogRef) {}
-
- organizationId:any=''; //所属机构id
- organizationName:any; //所属机构name
-
- ngOnInit() {
- this.tree()
- }
-
- //渲染Tree
- tree () {
- this.newdata=[]
- this.http.get('/api/Organizations').subscribe(
- (data:any)=>{
- function getparentNode(parentId){
- return data.find((item)=>{
- return item.id == parentId
- })
- }
- data.forEach(item => {
- var parentNode = getparentNode(item.parentId);
- if(parentNode){
- if(!parentNode.children){
- parentNode.children = []
- }
- parentNode.children.push(item)
- }else{
- if(!item.parentId){
- this.newdata.push(item)
- }
- }
- });
- this.dataSource.data = this.newdata;
- }
- )
-
- }
- hasChild = (_: number, node: any) => node.expandable;
-
- //选择机构
- add (e) {
- this.organizationId = e.id
- this.organizationName = e.name
- }
-
- errmsg:any; //捕获错误信息
- //新增用户
- onSubmit(e) {
- let time =new Date()
- if(this.organizationId) {
- this.http.post('/api/Users',{
- name:e.name,
- realName:e.user,
- post:e.post,
- phone:e.phone,
- enabled:true,
- creationTime:time,
- organizationId:this.organizationId
- }).subscribe(data=> {
- this.dialogRef.close('success')},
- error=>{this.errmsg = error}
- )
- }else{
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择机构','确定',config);
- }
- }
-
-
-
-}
-
-
-
-//编辑用户组件
-@Component({
- selector: 'app-editUser',
- templateUrl: './editUser.html',
- styleUrls: ['./usermanagement.component.scss']
-})
-export class EditNewUser {
- constructor(public http: HttpClient,public snackBar: MatSnackBar,
- public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) {}
-
- ngOnInit() {
- this.getTreeData()
- this.name=this.data.e.name
- this.realName=this.data.e.realName
- this.post=this.data.e.post,
- this.phone=this.data.e.phone,
- this.affiliate=this.data.e.organizationId
- this.affiliateName=this.data.e.organizationName
- }
-
- private _transformer = (node, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- id: node.id,
- parentId: node.parentId,
- enabled:node.enabled,
- order:node.order,
- };
- }
- treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
- treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
- hasChild = (_: number, node: any) => node.expandable;
-
- name:any; //登录账号
- realName:any; //真实姓名
- post:any; //职务
- phone:any; //联系电话
- affiliate:any; //所属机构id
- affiliateName:any; //所属机构name
-
- //获取tree数据
- getTreeData () {
- this.http.get('/api/Organizations').subscribe((data:any)=>{
- let treeData = []
- data.forEach(element => {
- element.children = []
- data.forEach(item => { if (item.parentId==element.id) {element.children.push(item)} });
- if(!element.parentId) {treeData.push(element)}
- }); //forEach
- this.dataSource.data = treeData
-
- })
- }
-
- //选择组织机构
- add (e) {
- this.affiliate = e.id
- this.affiliateName = e.name
- }
-
- //编辑
- onSubmit (e) {
- this.http.put(`/api/Users/${this.data.e.name}`,{
- name:this.data.e.name,
- realName:this.realName,
- post:this.post,
- phone:this.phone,
- roleNames:this.data.e.roleNames,
- enabled: this.data.e.enabled,
- creationTime:this.data.e.creationTime,
- organizationId:this.affiliate
- }).subscribe(data=>{
- this.dialogRef.close('success')
- })
-
- }
-
-
-
-}
-
-
-
-//分配角色组件
-@Component({
- selector: 'app-allRoles',
- templateUrl: './allRoles.html',
- styleUrls: ['./usermanagement.component.scss']
-})
-export class allRoles {
-
- constructor(public http: HttpClient,public snackBar: MatSnackBar,
- public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) {}
-
- ngOnInit() {
- this.getUsers()
- }
-
- allRoles:any; //所有角色
- checked:any=[]; //选中的角色
-
- //获取所有角色
- getUsers () {
- this.http.get('/api/Roles').subscribe( data=>{
- this.allRoles=data
- this.allRoles.forEach(element => { //所有角色
- element.checked = false
- this.data.e.roleNames.forEach(elements=> { //当前账号已有角色
- if (element.name == elements) {
- element.checked = true
- this.checked.push(element)} });
- });
-
- })
- }
-
- //check框change事件
- fill (e) {
- e.checked = !e.checked
- if (e.checked) {
- this.checked.push(e)
- } else {
- this.checked.splice(this.checked.findIndex(item => item==e), 1)
- }
- }
-
- //分配角色
- onSubmit () {
- if (this.checked.length) {
- let data:any=[]
- this.checked.forEach(item=>{
- data.push(item.id)
- })
- this.http.post(`/api/Users/${this.data.e.name}/Roles`,data).subscribe( data=> {
- this.dialogRef.close('success')
- })
- } else {
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('请选择分配角色','确定',config);
- }
- }
-
-
-
-}
-
-
-//查看用户组件
-@Component({
- selector: 'app-seeInformation',
- templateUrl: './seeInformation.html',
- styleUrls: ['./usermanagement.component.scss']
-})
-export class seeInformation {
- constructor(public http: HttpClient,
- public dialogRef: MatDialogRef,
- @Inject(MAT_DIALOG_DATA) public data) {}
-
- ngOnInit() {
- }
-
-}
diff --git a/src/assets/images/pic.png b/src/assets/images/pic.png
new file mode 100644
index 0000000..40ddc8d
Binary files /dev/null and b/src/assets/images/pic.png differ
diff --git a/src/index.html b/src/index.html
index b93b2a9..0b6bcda 100644
--- a/src/index.html
+++ b/src/index.html
@@ -2,7 +2,7 @@
- 数字化预案编制管理平台
+ 六熟悉演练记录系统
@@ -15,4 +15,5 @@
+