Browse Source

Merge branch 'master' of http://121.36.37.70:3000/shaojiahao/Jinan_project

非煤矿山灾害智能感知和预警系统
邵佳豪 3 years ago
parent
commit
364076ddbd
  1. 6
      src/app/home/home.module.ts
  2. 474
      src/app/home/task/da-oneself-plan/da-oneself-plan.component.html
  3. 163
      src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts
  4. 35
      src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.html
  5. 28
      src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.scss
  6. 70
      src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.ts

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

@ -57,6 +57,8 @@ import { NzSpinModule } from 'ng-zorro-antd/spin';
import { AllotPersonComponent } from './task/da-subordinate-audit/allot-person/allot-person.component';
import { ChangePasswordComponent } from './change-password/change-password.component';
import { NzUploadModule } from 'ng-zorro-antd/upload';
import { NzCardModule } from 'ng-zorro-antd/card';
import { PlanAdjustmentComponent } from './task/da-oneself-plan/plan-adjustment/plan-adjustment.component';
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
@NgModule({
declarations: [
@ -90,7 +92,8 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
LookTaskComponent,
UnitEditComponent,
AllotPersonComponent,
ChangePasswordComponent
ChangePasswordComponent,
PlanAdjustmentComponent
],
imports: [
CommonModule,
@ -120,6 +123,7 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
NzRadioModule,
NzDatePickerModule,
NzSpinModule,
NzCardModule,
NzUploadModule,
NzToolTipModule
],

474
src/app/home/task/da-oneself-plan/da-oneself-plan.component.html

@ -1,238 +1,238 @@
<!-- <p>本级计划</p> -->
<div class="box">
<div class="timebox">
<nz-select ngModel="2022">
<nz-option nzValue="2021" nzLabel="2021年"></nz-option>
<nz-option nzValue="2022" nzLabel="2022年"></nz-option>
</nz-select>
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)"
[ngClass]="{'selectedMonth': item.name == selectedMonth}">
{{item.name}}
</div>
</div>
<div style="flex: 1;overflow-y: auto;">
<!-- 上部仪表盘 -->
<div class="instrumentpanelbox">
<div class="instrumentpanelheader">
<span>本级部署</span>
<span (click)="expand()" class="expand blue">
{{isExpand ? '收起' :'展开'}}
<i nz-icon [nzType]="isExpand ? 'down' : 'up'" nzTheme="outline"></i>
</span>
</div>
<div class="instrumentpanel">
<div class="instrumentpanelitem" *ngFor="let item of cardData"
[ngClass]="{'instrumentpanelitemopen': isExpand,'instrumentpanelitemclose': !isExpand}">
<div class="itemone" *ngIf="!item.isDetails">
<div class="instrumentpanelitemleft">
<div class="panelheadername" [style]="'background:'+ item.background">
<img [src]="'../../../../assets/images/icon/'+ item.icon" alt="">
{{item.name}}
</div>
<div class="tasknum">
<p>
<span style="margin-right: 6px;">任务分配</span>
<i (click)="openDetails(item,true)"
style="vertical-align: text-top;cursor: pointer;" nz-icon nzType="right-circle"
nzTheme="outline"></i>
</p>
<p style="font-weight: 900;font-size: 36px;text-align: left;">5/9</p>
</div>
<button *ngIf="isExpand" nz-button class="btn">快速派发</button>
</div>
<div class="instrumentpanelitemright" *ngIf="isExpand">
<nz-progress [nzPercent]="75" nzType="circle" [nzFormat]="formatOne"
nzStrokeColor="#42B983">
</nz-progress>
</div>
</div>
<div class="itemtwo" *ngIf="item.isDetails">
<p class="itemtwotitle">
<span>{{item.name}}</span>
<span class="back" (click)="openDetails(item,false)"><i nz-icon nzType="rollback"
nzTheme="outline"></i>返回</span>
</p>
<div class="itemtwocontent">
<div class="itemtwocontentitem">
<p class="itemtwocontentitemp1">
<span class="itemtwocontentitemp1name">济南历下森豪室内娱乐场</span>
<span>
<span class="blue" *ngIf="isExpand">派发</span>
</span>
</p>
<p>A消防救援站</p>
<p><span class="blue" *ngIf="!isExpand">派发</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 救援站列表 -->
<div class="stationcardlistbox">
<div class="stationcardlistitembox" *ngFor="let item of stationData">
<div class="stationcardlistitem">
<div class="header">
<span style="width: 16%;">
<img src="../../../../assets//images/icon/station.png" alt="">
{{item.name}}
</span>
<span style="width: 8%;">单位总数: 7/8</span>
<div style="width: 66%;" class="progress progresssquare">
<span>完成进度</span>
<nz-progress nzStrokeLinecap="square" nzStrokeWidth="16"
nzStrokeColor="#42B983" [nzPercent]="30"></nz-progress>
</div>
<button nz-button nzType="primary">任务下派</button>
<span (click)="expandcarditem(item)" class="expand blue">
{{item.isExpand ? '收起' :'展开'}}
<i nz-icon [nzType]="item.isExpand ? 'down' : 'up'" nzTheme="outline"></i>
</span>
</div>
<div class="maincontent" *ngIf="item.isExpand">
<div class="maincontentitem">
<div class="maincontentitemleft">
<div class="panelheadername panelheadernameor">
<img src="'../../../../assets/images/icon/huodong.png" alt="">
重大活动
</div>
<div class="num">
<div class="round" style="background: #2C4DC0;"></div>
<span class="word">已分配</span>
<span class="boldspan">1</span>
</div>
<div class="num">
<div class="round" style="background: #42B983;"></div>
<span class="word">已完成</span>
<span class="boldspan">1</span>
</div>
</div>
<div class="maincontentitemright">
<div class="maincontentitemrightitem">
<div class="flexcol namebox">
<span>
尬粒酒店管理有限公司济南泺文路分公司
</span>
<span>
单位名称
</span>
</div>
<div class="flexcol">
<span>
重点单位
</span>
<span>
级别
</span>
</div>
<div class="flexcol">
<span>
历下区A消防救援站
</span>
<span>
责任机构
</span>
</div>
<div class="flexcol">
<span>
历下区B消防救援站
</span>
<span>
协助机构
</span>
</div>
<div class="flexcol">
<span>
<label nz-radio ngModel [ngModel]="xxx"
(click)="radioChange($event)">宣传</label>
</span>
<span>
同步工作
</span>
</div>
<div class="flexcol progressbox progresssquare">
<span>
<nz-progress style="width: 200px;" nzStrokeLinecap="square"
nzStrokeWidth="16" nzStrokeColor="#42B983" [nzPercent]="30">
</nz-progress>
</span>
<span>
进度
</span>
</div>
<div class="btnbox">
<button nz-button nzType="primary">提交审核</button>
<button style="margin-left: 12px;" nz-button nzType="primary">取消</button>
</div>
</div>
<div class="maincontentitemrightitem">
<div class="flexcol namebox">
<span>
尬粒酒店管理有限公司济南泺文路分公司
</span>
<span>
单位名称
</span>
</div>
<div class="flexcol">
<span>
重点单位
</span>
<span>
级别
</span>
</div>
<div class="flexcol">
<span>
历下区A消防救援站
</span>
<span>
责任机构
</span>
</div>
<div class="flexcol">
<span>
历下区B消防救援站
</span>
<span>
协助机构
</span>
</div>
<div class="flexcol">
<span>
<label nz-radio ngModel [ngModel]="xxx"
(click)="radioChange($event)">宣传</label>
</span>
<span>
同步工作
</span>
</div>
<div class="flexcol progressbox progresssquare">
<span>
<nz-progress style="width: 200px;" nzStrokeLinecap="square"
nzStrokeWidth="16" nzStrokeColor="#42B983" [nzPercent]="30">
</nz-progress>
</span>
<span>
进度
</span>
</div>
<div class="btnbox">
<button nz-button nzType="primary">提交审核</button>
<button style="margin-left: 12px;" nz-button nzType="primary">取消</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- -->
<div class="cutoffrule"></div>
</div>
<!-- <p>本级计划</p> -->
<div class="box">
<div class="timebox">
<nz-select ngModel="2022">
<nz-option nzValue="2021" nzLabel="2021年"></nz-option>
<nz-option nzValue="2022" nzLabel="2022年"></nz-option>
</nz-select>
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)"
[ngClass]="{'selectedMonth': item.name == selectedMonth}">
{{item.name}}
</div>
</div>
<div style="flex: 1;overflow-y: auto;">
<!-- 上部仪表盘 -->
<div class="instrumentpanelbox">
<div class="instrumentpanelheader">
<span>本级部署</span>
<span (click)="expand()" class="expand blue">
{{isExpand ? '收起' :'展开'}}
<i nz-icon [nzType]="isExpand ? 'down' : 'up'" nzTheme="outline"></i>
</span>
</div>
<div class="instrumentpanel">
<div class="instrumentpanelitem" *ngFor="let item of cardData"
[ngClass]="{'instrumentpanelitemopen': isExpand,'instrumentpanelitemclose': !isExpand}">
<div class="itemone" *ngIf="!item.isDetails">
<div class="instrumentpanelitemleft">
<div class="panelheadername" [style]="'background:'+ item.background">
<img [src]="'../../../../assets/images/icon/'+ item.icon" alt="">
{{item.name}}
</div>
<div class="tasknum">
<p>
<span style="margin-right: 6px;">任务分配</span>
<i (click)="openDetails(item,true)"
style="vertical-align: text-top;cursor: pointer;" nz-icon nzType="right-circle"
nzTheme="outline"></i>
</p>
<p style="font-weight: 900;font-size: 36px;text-align: left;">5/9</p>
</div>
<button *ngIf="isExpand" nz-button class="btn">快速派发</button>
</div>
<div class="instrumentpanelitemright" *ngIf="isExpand">
<nz-progress [nzPercent]="75" nzType="circle" [nzFormat]="formatOne"
nzStrokeColor="#42B983">
</nz-progress>
</div>
</div>
<div class="itemtwo" *ngIf="item.isDetails">
<p class="itemtwotitle">
<span>{{item.name}}</span>
<span class="back" (click)="openDetails(item,false)"><i nz-icon nzType="rollback"
nzTheme="outline"></i>返回</span>
</p>
<div class="itemtwocontent">
<div class="itemtwocontentitem">
<p class="itemtwocontentitemp1">
<span class="itemtwocontentitemp1name">济南历下森豪室内娱乐场</span>
<span>
<span class="blue" *ngIf="isExpand">派发</span>
</span>
</p>
<p>A消防救援站</p>
<p><span class="blue" *ngIf="!isExpand">派发</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 救援站列表 -->
<div class="stationcardlistbox">
<div class="stationcardlistitembox" *ngFor="let item of stationData">
<div class="stationcardlistitem">
<div class="header">
<span style="width: 16%;">
<img src="../../../../assets//images/icon/station.png" alt="">
{{item.name}}
</span>
<span style="width: 8%;">单位总数: 7/8</span>
<div style="width: 66%;" class="progress progresssquare">
<span>完成进度</span>
<nz-progress nzStrokeLinecap="square" nzStrokeWidth="16"
nzStrokeColor="#42B983" [nzPercent]="30"></nz-progress>
</div>
<button nz-button nzType="primary" (click)="adjustment()">任务调整</button>
<span (click)="expandcarditem(item)" class="expand blue">
{{item.isExpand ? '收起' :'展开'}}
<i nz-icon [nzType]="item.isExpand ? 'down' : 'up'" nzTheme="outline"></i>
</span>
</div>
<div class="maincontent" *ngIf="item.isExpand">
<div class="maincontentitem">
<div class="maincontentitemleft">
<div class="panelheadername panelheadernameor">
<img src="'../../../../assets/images/icon/huodong.png" alt="">
重大活动
</div>
<div class="num">
<div class="round" style="background: #2C4DC0;"></div>
<span class="word">已分配</span>
<span class="boldspan">1</span>
</div>
<div class="num">
<div class="round" style="background: #42B983;"></div>
<span class="word">已完成</span>
<span class="boldspan">1</span>
</div>
</div>
<div class="maincontentitemright">
<div class="maincontentitemrightitem">
<div class="flexcol namebox">
<span>
尬粒酒店管理有限公司济南泺文路分公司
</span>
<span>
单位名称
</span>
</div>
<div class="flexcol">
<span>
重点单位
</span>
<span>
级别
</span>
</div>
<div class="flexcol">
<span>
历下区A消防救援站
</span>
<span>
责任机构
</span>
</div>
<div class="flexcol">
<span>
历下区B消防救援站
</span>
<span>
协助机构
</span>
</div>
<div class="flexcol">
<span>
<label nz-radio ngModel [ngModel]="xxx"
(click)="radioChange($event)">宣传</label>
</span>
<span>
同步工作
</span>
</div>
<div class="flexcol progressbox progresssquare">
<span>
<nz-progress style="width: 200px;" nzStrokeLinecap="square"
nzStrokeWidth="16" nzStrokeColor="#42B983" [nzPercent]="30">
</nz-progress>
</span>
<span>
进度
</span>
</div>
<div class="btnbox">
<button nz-button nzType="primary">提交审核</button>
<button style="margin-left: 12px;" nz-button nzType="primary">取消</button>
</div>
</div>
<div class="maincontentitemrightitem">
<div class="flexcol namebox">
<span>
尬粒酒店管理有限公司济南泺文路分公司
</span>
<span>
单位名称
</span>
</div>
<div class="flexcol">
<span>
重点单位
</span>
<span>
级别
</span>
</div>
<div class="flexcol">
<span>
历下区A消防救援站
</span>
<span>
责任机构
</span>
</div>
<div class="flexcol">
<span>
历下区B消防救援站
</span>
<span>
协助机构
</span>
</div>
<div class="flexcol">
<span>
<label nz-radio ngModel [ngModel]="xxx"
(click)="radioChange($event)">宣传</label>
</span>
<span>
同步工作
</span>
</div>
<div class="flexcol progressbox progresssquare">
<span>
<nz-progress style="width: 200px;" nzStrokeLinecap="square"
nzStrokeWidth="16" nzStrokeColor="#42B983" [nzPercent]="30">
</nz-progress>
</span>
<span>
进度
</span>
</div>
<div class="btnbox">
<button nz-button nzType="primary">提交审核</button>
<button style="margin-left: 12px;" nz-button nzType="primary">取消</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- -->
<div class="cutoffrule"></div>
</div>
</div>

163
src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts

@ -1,71 +1,92 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-da-oneself-plan',
templateUrl: './da-oneself-plan.component.html',
styleUrls: ['./da-oneself-plan.component.scss']
})
export class DaOneselfPlanComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
months = [
{ name: '1月', isable: true },
{ name: '2月', isable: true },
{ name: '3月', isable: true },
{ name: '4月', isable: true },
{ name: '5月', isable: true },
{ name: '6月', isable: true },
{ name: '7月', isable: true },
{ name: '8月', isable: true },
{ name: '9月', isable: true },
{ name: '10月', isable: true },
{ name: '11月', isable: true },
{ name: '12月', isable: true }
]
selectedMonth
selectMonth(item) {
this.selectedMonth = item.name
}
isExpand = false
expand() {
this.isExpand = !this.isExpand
}
formatOne = (percent: number): string => `${percent}%\n完成率`;
cardData = [
{ name: '重大活动', isDetails: false, background: '#FF9203', icon: 'huodong.png' },
{ name: '双随机', isDetails: false, background: '#1D9DFF', icon: 'suiji.png' },
{ name: '行政许可', isDetails: false, background: '#42B983', icon: 'xuke.png' },
{ name: '熟悉演练', isDetails: false, background: '#9D80FF', icon: 'yanlian.png' },
{ name: '联络指导', isDetails: false, background: '#5483EA', icon: 'zhidao.png' },
{ name: '消防宣传', isDetails: false, background: '#FF5D2A', icon: 'xuanchuan.png' },
{ name: '投诉举报', isDetails: false, background: '#5087FF', icon: 'tousu.png' },
{ name: '火灾调查', isDetails: false, background: '#FF404D', icon: 'huozai.png' }
]
openDetails(data, type) {
data.isDetails = type
}
xxx = false
radioChange(e) {
setTimeout(() => {
this.xxx = !this.xxx
}, 0);
}
stationData = [
{ name: '历下区A消防救援站', isExpand: true },
{ name: '历下区B消防救援站', isExpand: false },
{ name: '历下区C消防救援站', isExpand: false }
]
expandcarditem(item) {
item.isExpand = !item.isExpand
}
}
import { Component, OnInit,ViewContainerRef } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import {PlanAdjustmentComponent} from './plan-adjustment/plan-adjustment.component'
@Component({
selector: 'app-da-oneself-plan',
templateUrl: './da-oneself-plan.component.html',
styleUrls: ['./da-oneself-plan.component.scss']
})
export class DaOneselfPlanComponent implements OnInit {
constructor(private modal: NzModalService,private message: NzMessageService,private viewContainerRef: ViewContainerRef) { }
validateForm!: FormGroup;
ngOnInit(): void {
}
months = [
{ name: '1月', isable: true },
{ name: '2月', isable: true },
{ name: '3月', isable: true },
{ name: '4月', isable: true },
{ name: '5月', isable: true },
{ name: '6月', isable: true },
{ name: '7月', isable: true },
{ name: '8月', isable: true },
{ name: '9月', isable: true },
{ name: '10月', isable: true },
{ name: '11月', isable: true },
{ name: '12月', isable: true }
]
selectedMonth
selectMonth(item) {
this.selectedMonth = item.name
}
isExpand = false
expand() {
this.isExpand = !this.isExpand
}
formatOne = (percent: number): string => `${percent}%\n完成率`;
cardData = [
{ name: '重大活动', isDetails: false, background: '#FF9203', icon: 'huodong.png' },
{ name: '双随机', isDetails: false, background: '#1D9DFF', icon: 'suiji.png' },
{ name: '行政许可', isDetails: false, background: '#42B983', icon: 'xuke.png' },
{ name: '熟悉演练', isDetails: false, background: '#9D80FF', icon: 'yanlian.png' },
{ name: '联络指导', isDetails: false, background: '#5483EA', icon: 'zhidao.png' },
{ name: '消防宣传', isDetails: false, background: '#FF5D2A', icon: 'xuanchuan.png' },
{ name: '投诉举报', isDetails: false, background: '#5087FF', icon: 'tousu.png' },
{ name: '火灾调查', isDetails: false, background: '#FF404D', icon: 'huozai.png' }
]
openDetails(data, type) {
data.isDetails = type
}
xxx = false
radioChange(e) {
setTimeout(() => {
this.xxx = !this.xxx
}, 0);
}
stationData = [
{ name: '历下区A消防救援站', isExpand: true },
{ name: '历下区B消防救援站', isExpand: false },
{ name: '历下区C消防救援站', isExpand: false }
]
expandcarditem(item) {
item.isExpand = !item.isExpand
}
nodes: any = []
BuildingTypes
adjustment(){
const modal = this.modal.create({
nzTitle: "任务调整",
nzContent: PlanAdjustmentComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 900,
nzComponentParams: {
},
nzOnOk: async () => {
console.log(123);
}
});
const instance = modal.getContentComponent();
}
}

35
src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.html

@ -0,0 +1,35 @@
<div class="box">
<div style="border: 1px solid #E4E7EC; padding: 20px; width:400px; margin: 0 20px;">
<div class="title"><span>未接任务</span><span>任务总数:{{taskNumber}}/8</span></div>
<div class="missed">
<div *ngFor="let item of list" class="item">
<i [style]="'background:'+item.class+';'">&nbsp;&nbsp;</i>
<span>{{item.tag}}</span>
<div (click)="aaa(data)" class="checked" *ngFor="let data of item.item">
<label [nzDisabled]="task" nz-checkbox [(ngModel)]="data.checked" (change)="aaa(data)">{{data.name}}</label>
</div>
</div>
</div>
</div>
<div style="border: 1px solid #E4E7EC; padding: 20px; width:400px; margin: 0 20px;" >
<div class="title">已接任务</div>
<div class="missed">
<div *ngFor="let item2 of list" class="item">
<div>
<i [style]="'background:'+item2.class+';'">&nbsp;&nbsp;</i>
<span>{{item2.tag}}</span>
</div>
<div *ngFor="let data of item2.item">
<div class="received checked" *ngIf="data.checked">
<div class="name">{{data.name}}</div>
<div><i nz-icon nzType="close" nzTheme="outline" (click)="bbb(data)"></i></div>
</div>
</div>
</div>
</div>
</div>
</div>

28
src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.scss

@ -0,0 +1,28 @@
.box {
display: flex;
}
.title{
span{
margin-right: 14px;
}
}
.missed {
.item {
margin: 20px 0;
border-bottom: 1px dotted #C7CAD0;
i {
width: 4px;
height: 12px;
margin-right: 5px;
}
.checked{
margin: 10px 0;
}
}
.received{
display: flex;
.name{
flex: 1;
}
}
}

70
src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.ts

@ -0,0 +1,70 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-plan-adjustment',
templateUrl: './plan-adjustment.component.html',
styleUrls: ['./plan-adjustment.component.scss']
})
export class PlanAdjustmentComponent implements OnInit {
constructor() { }
list = [
{
tag: "行政许可",
class: "#42B983",
item: [
{
name: "想啥吃啥餐饮有限公司",
checked: false
},
{
name: "想啥吃啥餐饮有限公司",
checked: false
}
]
},
{
tag: "双随机",
class: "#1D9DFF",
item: [
{
name: "想啥吃啥餐饮有限公司",
checked: false
}
]
},
]
list2 = [
]
taskNumber=0
task=false
ngOnInit(): void {
}
aaa(data) {
if(data.checked && !this.task){
this.list2.push({meu:this.list2.length,data})
console.log(this.list2);
this.taskNumber=this.list2.length
if(this.taskNumber==8){
this.task=true
}
}else{
this.bbb(data)
}
}
bbb(e) {
console.log(e);
e.checked=false
for (let index = 0; index < this.list2.length; index++) {
if(e==this.list2[index].data){
this.list2.splice(this.list2[index].meu,1)
this.taskNumber=this.list2.length
if(this.taskNumber!=8){
this.task=false
}
}
}
}
}
Loading…
Cancel
Save