diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 5207e6a..ecd66ce 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -2,28 +2,36 @@ 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 {HomeComponent} from './ui/home/home.component'
+import { HomeComponent } from './ui/home/home.component'
//路由守卫
-import {AuthGuard} from './auth.guard'
+import { AuthGuard } from './auth.guard'
+import { AddSixFamiliarComponent } from './ui/add-six-familiar/add-six-familiar.component';
+import { TrainingRecordinfoComponent } from './ui/training-recordinfo/training-recordinfo.component';
const routes: Routes = [
{path:'',redirectTo:'login',pathMatch:'full'},
- {
- path:'',
- component:NavigationComponent,
- canActivate: [AuthGuard],//守卫验证
- 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:'login',component:LoginComponent},
+ // {
+ // path:'',
+ // component:NavigationComponent,
+ // canActivate: [AuthGuard],//守卫验证
+ // 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:'addsixfamiliar',
+ component:AddSixFamiliarComponent,canActivate: [AuthGuard],},
+ {path:'trainingrecordinfo',
+ component:TrainingRecordinfoComponent,canActivate: [AuthGuard],},
+ {path:'login',
+ component:LoginComponent},
+
{path:'home', component:HomeComponent,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/key-unit/edit-unit-info/edit-unit-info.component.html b/src/app/key-unit/edit-unit-info/edit-unit-info.component.html
index e0d9853..15ef7a7 100644
--- a/src/app/key-unit/edit-unit-info/edit-unit-info.component.html
+++ b/src/app/key-unit/edit-unit-info/edit-unit-info.component.html
@@ -54,7 +54,7 @@
-
+
diff --git a/src/app/key-unit/key-unit.module.ts b/src/app/key-unit/key-unit.module.ts
index 6bc8ca4..f41b0c5 100644
--- a/src/app/key-unit/key-unit.module.ts
+++ b/src/app/key-unit/key-unit.module.ts
@@ -74,12 +74,10 @@ 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'
@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,FireFightingDeviceComponent],
imports: [
CommonModule,
KeyUnitRoutingModule,
@@ -128,7 +126,6 @@ import { UiModule } from '../../app/ui/ui.module'
FormsModule,
CountdownModule,
FileUploadModule,
- UiModule
]
})
export class KeyUnitModule { }
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/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/home/home.component.scss b/src/app/ui/home/home.component.scss
index 775dc6c..f5a0c67 100644
--- a/src/app/ui/home/home.component.scss
+++ b/src/app/ui/home/home.component.scss
@@ -12,7 +12,7 @@
line-height: 0.585938rem;
text-align: center;
position: relative;
- label { font-weight: 550; }
+ label { font-weight: 550; font-size: 0.195313rem; }
.floatRight {
position: absolute;
top: 0.146484rem;
diff --git a/src/app/ui/home/home.component.ts b/src/app/ui/home/home.component.ts
index 28a0862..9024e44 100644
--- a/src/app/ui/home/home.component.ts
+++ b/src/app/ui/home/home.component.ts
@@ -60,7 +60,7 @@ export class HomeComponent implements OnInit {
//新增
add () {
- console.log('新增')
+ this.router.navigate([`/addsixfamiliar`])
}
//查看详情
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..14329f2
--- /dev/null
+++ b/src/app/ui/training-recordinfo/training-recordinfo.component.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+ 熟悉路线
+
+
+
+ 平面图
+ 安全疏散设施情况
+
+
+
+ 水源道路情况
+ 重点部位情况
+ 发现问题
+ 现场照片
+
+
+
+
\ 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..3f5246a
--- /dev/null
+++ b/src/app/ui/training-recordinfo/training-recordinfo.component.scss
@@ -0,0 +1,26 @@
+.bigbox{
+ width: 100%;
+ height: 100%;
+ background: #F4F5F9;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ .title{
+ width: 100%;
+ height: 0.585938rem;
+ }
+ .content{
+ flex: 1;
+ .cardbox{
+ margin: 0 auto;
+ margin-top:0.195313rem;
+ background-color: #fff;
+ border-radius: 0.048828rem;
+ width:100%;
+ height: 100%;
+ }
+ }
+}
+.mat-tab-body-wrapper {
+ height: 100%;
+}
\ 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 94ebf06..50aef13 100644
--- a/src/app/ui/ui-routing.module.ts
+++ b/src/app/ui/ui-routing.module.ts
@@ -2,19 +2,16 @@ import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { UiComponent } from './ui.component';
import { PaginatorComponent } from './paginator/paginator.component';
-import { PersonaldataComponent } from '../pages/personaldata/personaldata.component';
import { UserdataComponent } from './userdata/userdata.component';
-import {UnitInformationComponent} from './unit-information/unit-information.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: 'paginator', component:PaginatorComponent },
- { path: 'person', component:PersonaldataComponent },
{ path: 'userdata', component:UserdataComponent },
- { path: 'unitInformation', component:UnitInformationComponent },
{ path: 'collectionTools', component:CollectionToolsComponent },
];
diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts
index ab6c747..37c2d89 100644
--- a/src/app/ui/ui.module.ts
+++ b/src/app/ui/ui.module.ts
@@ -47,29 +47,26 @@ import { ReactiveFormsModule, FormsModule } from '@angular/forms';
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 { IsnoPipe } from '../pipes/boolean.pipe';
import {ConfirmpswDirective} from './changepassword/equal-validator.directive'
import { TimePipe } from '../pipes/time.pipe';
-import { UnitInformationComponent,addUnitAttributeComponent,editUnitAttribute } from './unit-information/unit-information.component';
import { NzTreeModule } from 'ng-zorro-antd/tree';
-import { FileUploadModule } from 'ng2-file-upload'
-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 { 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 { 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 { RouterGISComponent } from './router-gis/router-gis.component';
+import { KeyUnitModule } from '../key-unit/key-unit.module';
@NgModule({
- declarations: [UiComponent,PersonaldataComponent, FooterComponent, UserdataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,EditUser,UnitInformationComponent,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup,addUnitAttributeComponent,editUnitAttribute,CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,HomeComponent, RouterGISComponent],
+ 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,RouterGISComponent],
imports: [
CommonModule,
@@ -120,7 +117,8 @@ import { RouterGISComponent } from './router-gis/router-gis.component';
ReactiveFormsModule,
FormsModule,
PaginatorModule,
- FileUploadModule
+ FileUploadModule,
+ KeyUnitModule
],
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)
- }
-
-
-
-}