Kaynağa Gözat

feat: initial potential-hazard module

Signed-off-by: carlos <568187512@qq.com>
carlos 2 ay önce
ebeveyn
işleme
60e49e9fea

+ 1 - 0
src/app/pages/manager/hazard/hazard-tracking/hazard-tracking.component.html

@@ -0,0 +1 @@
+<p>hazard-tracking works!</p>

+ 0 - 0
src/app/pages/manager/hazard/hazard-tracking/hazard-tracking.component.less


+ 23 - 0
src/app/pages/manager/hazard/hazard-tracking/hazard-tracking.component.spec.ts

@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HazardTrackingComponent } from './hazard-tracking.component';
+
+describe('HazardTrackingComponent', () => {
+  let component: HazardTrackingComponent;
+  let fixture: ComponentFixture<HazardTrackingComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      imports: [HazardTrackingComponent]
+    })
+    .compileComponents();
+
+    fixture = TestBed.createComponent(HazardTrackingComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 12 - 0
src/app/pages/manager/hazard/hazard-tracking/hazard-tracking.component.ts

@@ -0,0 +1,12 @@
+import { Component } from '@angular/core';
+
+@Component({
+  selector: 'app-hazard-tracking',
+  standalone: true,
+  imports: [],
+  templateUrl: './hazard-tracking.component.html',
+  styleUrl: './hazard-tracking.component.less'
+})
+export class HazardTrackingComponent {
+
+}

+ 23 - 0
src/app/pages/manager/hazard/hazard.component.spec.ts

@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HazardComponent } from './hazard.component';
+
+describe('HazardComponent', () => {
+  let component: HazardComponent;
+  let fixture: ComponentFixture<HazardComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      imports: [HazardComponent]
+    })
+    .compileComponents();
+
+    fixture = TestBed.createComponent(HazardComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 10 - 0
src/app/pages/manager/hazard/hazard.component.ts

@@ -0,0 +1,10 @@
+import { Component } from '@angular/core';
+import { RouterOutlet } from '@angular/router';
+
+@Component({
+  selector: 'app-hazard',
+  standalone: true,
+  imports: [RouterOutlet],
+  template: `<router-outlet></router-outlet>`,
+})
+export class HazardComponent {}

+ 22 - 0
src/app/pages/manager/hazard/hazard.route.ts

@@ -0,0 +1,22 @@
+import { Routes } from '@angular/router';
+
+export const hazardRoutes: Routes = [
+  {
+    path: 'hazard-tracking',
+    loadComponent: () => import('./hazard-tracking/hazard-tracking.component').then(m => m.HazardTrackingComponent),
+    data: {
+      title: '隐患追踪',
+      icon: 'icons:hazard-tracking',
+      weight: 1,
+    },
+  },
+  {
+    path: 'inspection-plan',
+    loadComponent: () => import('./inspection-plan/inspection-plan.component').then(m => m.InspectionPlanComponent),
+    data: {
+      title: '排查计划',
+      icon: 'icons:inspection-plan',
+      weight: 2,
+    },
+  },
+];

+ 1 - 0
src/app/pages/manager/hazard/inspection-plan/inspection-plan.component.html

@@ -0,0 +1 @@
+<p>inspection-plan works!</p>

+ 0 - 0
src/app/pages/manager/hazard/inspection-plan/inspection-plan.component.less


+ 23 - 0
src/app/pages/manager/hazard/inspection-plan/inspection-plan.component.spec.ts

@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { InspectionPlanComponent } from './inspection-plan.component';
+
+describe('InspectionPlanComponent', () => {
+  let component: InspectionPlanComponent;
+  let fixture: ComponentFixture<InspectionPlanComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      imports: [InspectionPlanComponent]
+    })
+    .compileComponents();
+
+    fixture = TestBed.createComponent(InspectionPlanComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 12 - 0
src/app/pages/manager/hazard/inspection-plan/inspection-plan.component.ts

@@ -0,0 +1,12 @@
+import { Component } from '@angular/core';
+
+@Component({
+  selector: 'app-inspection-plan',
+  standalone: true,
+  imports: [],
+  templateUrl: './inspection-plan.component.html',
+  styleUrl: './inspection-plan.component.less'
+})
+export class InspectionPlanComponent {
+
+}

+ 1 - 1
src/app/pages/manager/layout/header/header.component.ts

@@ -41,7 +41,7 @@ export class HeaderComponent {
       icon: 'assets/images/nav/knowledge.png',
     },
     {
-      path: '/manager/potential-hazard',
+      path: '/manager/potential-hazard/hazard-tracking',
       label: '隐患管理',
       icon: 'assets/images/nav/potential-hazard.png',
     },

+ 3 - 1
src/app/pages/manager/manager.routes.ts

@@ -1,5 +1,6 @@
 import { Routes } from '@angular/router';
 import { basicRoutes } from './basic/basic.route';
+import { hazardRoutes } from './hazard/hazard.route';
 import { riskRoutes } from './risk/risk.route';
 import { userRoutes } from './user/user.route';
 import { workbenchRoutes } from './workbench/workbench.route';
@@ -46,7 +47,8 @@ export const managerRoutes: Routes = [
   },
   {
     path: 'potential-hazard',
-    loadComponent: () => import('./placeholder/placeholder.component').then(m => m.PlaceholderComponent),
+    loadComponent: () => import('./hazard/hazard.component').then(m => m.HazardComponent),
+    children: hazardRoutes,
     data: {
       title: '隐患管理',
     },

+ 1 - 1
src/app/pages/manager/risk/risk-bank/risk-item-detail/risk-item-detail.component.html

@@ -18,7 +18,7 @@
           <th nzWidth="156px">风险等级</th>
           <th>可能导致的后果</th>
           <th>涉及场所/作业/设备</th>
-          <th nzWidth="156px">责任岗位</th>
+          <th nzWidth="224px">责任岗位</th>
           <th>判定风险等级的主要事项、近期事故关联</th>
           <th>规章制度</th>
           <th nzWidth="400px">主要作业要求</th>

+ 1 - 1
src/app/pages/manager/risk/risk-bank/risk-item-detail/risk-item-detail.component.ts

@@ -86,7 +86,7 @@ export class RiskItemDetailComponent extends RiskItemModel {
   }
 
   scrollConfig = {
-    x: '2600px',
+    x: '2660px',
     y: 'calc(100vh - 324px)',
   };
 }

+ 2 - 2
src/app/pages/manager/risk/risk-bank/risk-item-table/risk-item-table.component.html

@@ -8,7 +8,7 @@
   [nzTotal]="pageConfig.total"
   [nzPageIndex]="pageConfig.page + 1"
   (nzPageIndexChange)="onCurrentPageChange($event - 1)"
-  [nzScroll]="{ x: '2300px' }"
+  [nzScroll]="{ x: '2360px' }"
   [nzLoading]="loading"
 >
   <thead>
@@ -19,7 +19,7 @@
       <th nzWidth="120px">导致后果</th>
       <th nzWidth="120px">风险等级</th>
       <th nzWidth="200px">涉及场所/作业/设备</th>
-      <th nzWidth="144px">责任岗位</th>
+      <th nzWidth="224px">责任岗位</th>
       <th nzWidth="200px">判定风险等级的主要事项、近期事故关联</th>
       <th>规章制度</th>
       <th nzWidth="200px">主要作业要求</th>

+ 11 - 0
src/assets/icons/hazard-tracking.svg

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="23px" height="23px" viewBox="0 0 23 23" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title></title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="工作台-隐患列表" transform="translate(-73.000000, -212.000000)" fill="currentColor" fill-rule="nonzero">
+            <g id="编组" transform="translate(73.000000, 212.000000)">
+                <path d="M18.5329325,11.5000169 C18.5329325,11.0387775 18.9072871,10.664086 19.3677164,10.664086 L23,10.664086 C22.5964355,4.95713176 18.0424818,0.403191463 12.3351727,0 L12.3351727,3.63119106 C12.3351727,4.09239664 11.9608519,4.46712195 11.4992393,4.46712195 C11.0380324,4.46712195 10.6637117,4.09276851 10.6637117,3.63119106 L10.6637117,0 C4.95674062,0.403225261 0.402415035,4.95716556 0,10.6641198 L3.57315361,10.6641198 C4.03469862,10.6641198 4.40908696,11.0388113 4.40908696,11.5000507 C4.40908696,11.9612563 4.03473242,12.3355759 3.57315361,12.3355759 L0,12.3355759 C0.402415069,18.0428682 4.95674062,22.5964705 10.6637117,23 L10.6637117,19.4260455 C10.6637117,18.9648399 11.0380324,18.5901146 11.4992393,18.5901146 C11.9608181,18.5901146 12.3351727,18.9648399 12.3351727,19.4260455 L12.3351727,23 C18.0424818,22.5964029 22.5964693,18.0428344 23,12.335914 L19.3677502,12.335914 C18.9072871,12.3359478 18.5329325,11.9612225 18.5329325,11.5000169 Z M11.4992731,15.0686636 C9.52834198,15.0686636 7.93098782,13.4709422 7.93098782,11.5000169 C7.93098782,9.52868591 9.52834198,7.93133642 11.4992731,7.93133642 C13.4706099,7.93133642 15.0683022,9.52868588 15.0683022,11.5000169 C15.0683022,13.4709422 13.4706099,15.0686636 11.4992731,15.0686636 Z" id="形状"></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 11 - 0
src/assets/icons/inspection-plan.svg

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="19px" height="23px" viewBox="0 0 19 23" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title></title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="工作台-隐患列表" transform="translate(-75.000000, -268.000000)" fill="currentColor" fill-rule="nonzero">
+            <g id="编组" transform="translate(75.000000, 268.000000)">
+                <path d="M17.4166667,0 L1.58333334,0 C0.7089375,0 0,0.708961191 0,1.58336013 L0,21.3798003 C0,22.724688 1.51920834,23.4792454 2.55866666,22.6508463 L8.51754166,18.2171151 C9.09015351,17.7607309 9.89404556,17.7603981 10.4670208,18.2163081 L16.442125,22.6552849 C17.4819792,23.4824735 19,22.7275125 19,21.3830284 L19,1.58336013 C19,0.708961191 18.2910625,0 17.4166667,0 Z M13.7449167,8.26381636 L12.2941875,9.74347528 C12.1498316,9.89179377 12.0845363,10.1019947 12.1188333,10.3079811 L12.4612292,12.3969351 C12.5467292,12.9178622 12.0242292,13.3149127 11.5769375,13.0691772 L9.7838125,12.0830069 C9.60686881,11.9853584 9.39352703,11.9853584 9.21658334,12.0830069 L7.42345834,13.0691772 C6.97616668,13.3149127 6.45366668,12.9178622 6.53916666,12.3969351 L6.8815625,10.3079811 C6.91585955,10.1019947 6.85056421,9.89179377 6.70620834,9.74347528 L5.25547916,8.26381636 C4.8936875,7.89501128 5.0931875,7.25222517 5.593125,7.17636593 L7.59802084,6.87171839 C7.79832963,6.84028993 7.97024501,6.70949656 8.05679166,6.52268514 L8.95335416,4.62216878 C9.05223863,4.40538953 9.26547692,4.26674349 9.5,4.26674349 C9.73452308,4.26674349 9.94776137,4.40538953 10.0466458,4.62216878 L10.9432083,6.52268514 C11.031875,6.71071925 11.2036667,6.84145541 11.4019792,6.87171839 L13.406875,7.17636593 C13.9068125,7.25222517 14.1063125,7.89501128 13.7449167,8.26381636 Z" id="形状"></path>
+            </g>
+        </g>
+    </g>
+</svg>