Browse Source

[新增]大队查看双随机详情

master
邵佳豪 3 months ago
parent
commit
a52dde9daf
  1. 6
      src/app/home/home.module.ts
  2. 7
      src/app/home/statistic-analysis/home/home.component.ts
  3. 7
      src/app/home/statistic-analysis/home/unit-list/unit-list.component.ts
  4. 9
      src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html
  5. 31
      src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts
  6. 54
      src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.html
  7. 0
      src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.scss
  8. 25
      src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.spec.ts
  9. 15
      src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.ts

6
src/app/home/home.module.ts

@ -81,7 +81,8 @@ import { TaskListComponent } from './statistic-analysis/home/task-list/task-list
import { FormComponent } from './statistic-analysis/form/form.component';
import { ExamineComponent } from './statistic-analysis/form/examine/examine.component';
import { ReviewComponent } from './statistic-analysis/form/review/review.component';
import { UnitListComponent } from './statistic-analysis/home/unit-list/unit-list.component';
import { UnitListComponent } from './statistic-analysis/home/unit-list/unit-list.component';
import { LookShuangsjComponent } from './task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component';
@NgModule({
declarations: [
NavComponent,
@ -132,7 +133,8 @@ import { UnitListComponent } from './statistic-analysis/home/unit-list/unit-list
FormComponent,
ExamineComponent,
ReviewComponent,
UnitListComponent
UnitListComponent,
LookShuangsjComponent
],
imports: [
CommonModule,

7
src/app/home/statistic-analysis/home/home.component.ts

@ -731,8 +731,7 @@ export class HomeComponent implements OnInit {
}
echartsSetData_taskStatByOrg() {
console.log()
console.log();
this.completionOfTaskPie.clear();
this.completionOfTaskBar.clear();
@ -746,8 +745,7 @@ export class HomeComponent implements OnInit {
this.completionOfTaskPie &&
this.completionOfTaskPie.setOption(this.completionOfTaskPieOption);
console.log(666,this.statisticalData_taskStatByOrg)
console.log(666, this.statisticalData_taskStatByOrg);
let taskBar = task['组织机构数据'];
let taskBarx = [];
let taskBary1 = [];
@ -900,7 +898,6 @@ export class HomeComponent implements OnInit {
nzFooter: null,
nzComponentParams: {
name: item.name,
data: item.data,
},
});
} else {

7
src/app/home/statistic-analysis/home/unit-list/unit-list.component.ts

@ -9,14 +9,11 @@ import { NzMessageService } from 'ng-zorro-antd/message';
})
export class UnitListComponent implements OnInit {
@Input() name?: any;
@Input() data?: any;
constructor(private http: HttpClient, private message: NzMessageService) {}
ngOnInit(): void {
if (this.data.length !== 0) {
this.getUnitList();
}
this.getUnitList();
}
listOfData: any = [];
@ -28,9 +25,9 @@ export class UnitListComponent implements OnInit {
getUnitList() {
this.isloading = true;
let params = {
CompanyIds: this.data,
PageNumber: this.PageNumber,
PageSize: this.PageSize,
CheckType: this.name === '不合格单位数量' ? '不合格单位' : '隐患单位',
};
this.http
.get('/api/Companies', {

9
src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html

@ -463,6 +463,15 @@
检查时间
</span>
</div>
<div class="flexcol" style="flex: 1;">
<span class="ellipsi">
<span style="cursor: pointer;" (click)="look(i)">查看</span>
</span>
<span>
操作
</span>
</div>
</div>
</div>

31
src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts

@ -5,6 +5,7 @@ import { NzModalService } from 'ng-zorro-antd/modal';
import { AllotPersonComponent } from '../da-subordinate-audit/allot-person/allot-person.component';
import signalR from '../../../../signalR';
import * as moment from 'moment';
import { LookShuangsjComponent } from './look-shuangsj/look-shuangsj.component';
@Component({
selector: 'app-da-monthly-task-overview',
templateUrl: './da-monthly-task-overview.component.html',
@ -681,7 +682,6 @@ export class DaMonthlyTaskOverviewComponent implements OnInit {
}
checkTime(e, i, element) {
if (e) {
let time = new Date(
moment(e).format('yyyy-MM-DD HH:mm:ss')
@ -691,11 +691,11 @@ export class DaMonthlyTaskOverviewComponent implements OnInit {
} else {
i.planTime = null;
}
let month = moment(e).format('yyyy-MM-01')
let month = moment(e).format('yyyy-MM-01');
element.isLoading = true;
let body = {
planTime: i.planTime,
month:month
month: month,
};
this.http.patch(`/api/PlanTasks/${i.id}`, body).subscribe({
@ -709,4 +709,29 @@ export class DaMonthlyTaskOverviewComponent implements OnInit {
},
});
}
look(item) {
console.log(item);
// console.log(JSON.parse(item.resultData));
let data = JSON.parse(item.resultData);
if (!data) {
this.message.create('warning', '无数据');
return;
}
if (item.taskType !== '双随机') {
this.message.create('warning', '只能查看双随机');
return;
}
this.modal.create({
nzTitle: '双随机详情',
nzContent: LookShuangsjComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 800,
nzFooter: null,
nzComponentParams: {
data: data,
},
});
}
}

54
src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.html

@ -0,0 +1,54 @@
<div>
<div class="rowItem">
<span>单位名称:</span><span>{{data.company?.companyName}}</span>
</div>
<div class="rowItem">
<span>单位管理人:</span><span>{{data.company?.directorName}}</span>
</div>
<div class="rowItem">
<span>联系方式:</span><span>{{data.company?.directorPhone}}</span>
</div>
<div class="rowItem">
<span>单位地址:</span><span>{{data.company?.address}}</span>
</div>
<div class="rowItem">
<span>建筑结构:</span><span>{{data.company?.datas?.basicInfo.structure}}</span>
</div>
<div class="rowItem">
<span>建筑高度:</span><span>{{data.company?.datas?.basicInfo.height}}</span>
</div>
<div class="rowItem">
<span>建筑层数:</span><span>{{data.company?.datas?.basicInfo.layer}}</span>
</div>
<div class="rowItem">
<span>控制室位置:</span><span>{{data.company?.datas?.facilities.controlPosition}}</span>
</div>
<div class="rowItem">
<span>安全重点部位:</span><span>{{data.company?.useNature}}</span>
</div>
<div class="rowItem">
<span>单位性质:</span><span>{{data.company?.datas?.basicInfo.nature}}</span>
</div>
<div class="rowItem">
<span>消防设施及器材:</span><span>{{data.company?.datas?.facilities.fireFightingFacilities.title}}</span>
</div>
<div class="rowItem">
<span>单位主要消防设施:</span><span>{{data.company?.zhuyaosheshi?.title}}</span>
</div>
<div class="rowItem">
<span>位置:</span><span>{{data.position.name}}</span>
</div>
<div class="rowItem">
<span>姓名:</span><span>{{data.name}}</span>
</div>
<div class="rowItem">
<span>职务:</span><span>{{data.post}}</span>
</div>
<div class="rowItem">
<span>备注:</span><span>{{data.remarks}}</span>
</div>
<div class="rowItem">
<span>图片列表:</span>
<img *ngFor="let item of data.imgShow2" [src]="item" alt="" width="100" height="100">
</div>
</div>

0
src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.scss

25
src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.spec.ts

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

15
src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.ts

@ -0,0 +1,15 @@
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'app-look-shuangsj',
templateUrl: './look-shuangsj.component.html',
styleUrls: ['./look-shuangsj.component.scss'],
})
export class LookShuangsjComponent implements OnInit {
@Input() data?: any;
constructor() {}
ngOnInit(): void {
console.log(this.data);
}
}
Loading…
Cancel
Save