16 changed files with 2577 additions and 2555 deletions
@ -1,344 +1,344 @@ |
|||||||
<!-- <p>月度任务总览</p> --> |
<!-- <p>月度任务总览</p> --> |
||||||
<div class="box"> |
<div class="box"> |
||||||
<div class="timebox"> |
<div class="timebox"> |
||||||
<nz-select [(ngModel)]="selectedYear" (ngModelChange)="selectYear($event)"> |
<nz-select [(ngModel)]="selectedYear" (ngModelChange)="selectYear($event)"> |
||||||
<nz-option [nzValue]="2021" nzLabel="2021年"></nz-option> |
<nz-option [nzValue]="2021" nzLabel="2021年"></nz-option> |
||||||
<nz-option [nzValue]="2022" nzLabel="2022年"></nz-option> |
<nz-option [nzValue]="2022" nzLabel="2022年"></nz-option> |
||||||
</nz-select> |
</nz-select> |
||||||
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)" |
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)" |
||||||
[ngClass]="{'selectedMonth': item.id == selectedMonth}"> |
[ngClass]="{'selectedMonth': item.id == selectedMonth}"> |
||||||
{{item.name}} |
{{item.name}} |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div style="flex: 1;overflow-y: auto;"> |
<div style="flex: 1;overflow-y: auto;"> |
||||||
<!-- 上部仪表盘 --> |
<!-- 上部仪表盘 --> |
||||||
<div class="instrumentpanelbox"> |
<div class="instrumentpanelbox"> |
||||||
<div class="instrumentpanelheader"> |
<div class="instrumentpanelheader"> |
||||||
<span><img src="../../../../assets/images/icon/task1.png" alt=""> 上级任务指标</span> |
<span><img src="../../../../assets/images/icon/task1.png" alt=""> 上级任务指标</span> |
||||||
</div> |
</div> |
||||||
<div class="instrumentpanel"> |
<div class="instrumentpanel"> |
||||||
<div class="instrumentpanelitem instrumentpanelitemclose" *ngFor="let item of cardData"> |
<div class="instrumentpanelitem instrumentpanelitemclose" *ngFor="let item of cardData"> |
||||||
<div class="itemone" *ngIf="!item.isDetails"> |
<div class="itemone" *ngIf="!item.isDetails"> |
||||||
<div class="instrumentpanelitemleft"> |
<div class="instrumentpanelitemleft"> |
||||||
<div class="panelheadername" [style]="'background:'+ item.background"> |
<div class="panelheadername" [style]="'background:'+ item.background"> |
||||||
<img [src]="'../../../../assets/images/icon/'+ item.icon" alt=""> |
<img [src]="'../../../../assets/images/icon/'+ item.icon" alt=""> |
||||||
{{item.name}} |
{{item.name}} |
||||||
</div> |
</div> |
||||||
<div class="tasknum"> |
<div class="tasknum"> |
||||||
<p> |
<p> |
||||||
<span style="margin-right: 6px;">任务分配</span> |
<span style="margin-right: 6px;">任务分配</span> |
||||||
<i (click)="openDetails(item,true)" |
<i (click)="openDetails(item,true)" |
||||||
style="vertical-align: text-top;cursor: pointer;" nz-icon nzType="right-circle" |
style="vertical-align: text-top;cursor: pointer;" nz-icon nzType="right-circle" |
||||||
nzTheme="outline"></i> |
nzTheme="outline"></i> |
||||||
</p> |
</p> |
||||||
<p style="font-weight: 900;font-size: 36px;text-align: left;">5/9</p> |
<p style="font-weight: 900;font-size: 36px;text-align: left;">5/9</p> |
||||||
</div> |
</div> |
||||||
<div class="jindu"> |
<div class="jindu"> |
||||||
<p> |
<p> |
||||||
<span>完成率</span> |
<span>完成率</span> |
||||||
<span>60%</span> |
<span>60%</span> |
||||||
</p> |
</p> |
||||||
<nz-progress style="width: 100%;" [nzPercent]="75" nzStrokeColor="#42B983" |
<nz-progress style="width: 100%;" [nzPercent]="75" nzStrokeColor="#42B983" |
||||||
[nzShowInfo]="false"></nz-progress> |
[nzShowInfo]="false"></nz-progress> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="itemtwo" *ngIf="item.isDetails"> |
<div class="itemtwo" *ngIf="item.isDetails"> |
||||||
<p class="itemtwotitle"> |
<p class="itemtwotitle"> |
||||||
<span>{{item.name}}</span> |
<span>{{item.name}}</span> |
||||||
<span class="back" (click)="openDetails(item,false)"><i nz-icon nzType="rollback" |
<span class="back" (click)="openDetails(item,false)"><i nz-icon nzType="rollback" |
||||||
nzTheme="outline"></i>返回</span> |
nzTheme="outline"></i>返回</span> |
||||||
</p> |
</p> |
||||||
<div class="itemtwocontent"> |
<div class="itemtwocontent"> |
||||||
<div class="itemtwocontentitem"> |
<div class="itemtwocontentitem"> |
||||||
<p class="itemtwocontentitemp1"> |
<p class="itemtwocontentitemp1"> |
||||||
<span class="itemtwocontentitemp1name">济南历下森豪室内娱乐场</span> |
<span class="itemtwocontentitemp1name">济南历下森豪室内娱乐场</span> |
||||||
</p> |
</p> |
||||||
<p> |
<p> |
||||||
<span class="green" style="margin-right: 12px;">已分配</span> |
<span class="green" style="margin-right: 12px;">已分配</span> |
||||||
<span class="green">已检查</span> |
<span class="green">已检查</span> |
||||||
</p> |
</p> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
|
||||||
<!-- 下级任务申请 --> |
<!-- 下级任务申请 --> |
||||||
<div class="taskaudit"> |
<div class="taskaudit"> |
||||||
<div class="taskauditheader"> |
<div class="taskauditheader"> |
||||||
<span><img src="../../../../assets/images/icon/task.png" alt=""> 下级任务申请</span> |
<span><img src="../../../../assets/images/icon/task.png" alt=""> 下级任务申请</span> |
||||||
<span (click)="istaskauditexpand()" class="expand blue"> |
<span (click)="istaskauditexpand()" class="expand blue"> |
||||||
{{istaskauditExpanded ? '收起' :'展开'}} |
{{istaskauditExpanded ? '收起' :'展开'}} |
||||||
<i nz-icon [nzType]="istaskauditExpanded ? 'down' : 'up'" nzTheme="outline"></i> |
<i nz-icon [nzType]="istaskauditExpanded ? 'down' : 'up'" nzTheme="outline"></i> |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<!-- 任务 --> |
<!-- 任务 --> |
||||||
<div *ngIf="istaskauditExpanded"> |
<div *ngIf="istaskauditExpanded"> |
||||||
|
|
||||||
<div class="taskauditbox" *ngFor="let item of taskData"> |
<div class="taskauditbox" *ngFor="let item of taskData"> |
||||||
<div class="header"> |
<div class="header"> |
||||||
<span>{{item.name}}</span> |
<span>{{item.name}}</span> |
||||||
<span (click)="expand(item)" class="expand blue"> |
<span (click)="expand(item)" class="expand blue"> |
||||||
{{item.isExpand ? '收起' :'展开'}} |
{{item.isExpand ? '收起' :'展开'}} |
||||||
<i nz-icon [nzType]="item.isExpand ? 'down' : 'up'" nzTheme="outline"></i> |
<i nz-icon [nzType]="item.isExpand ? 'down' : 'up'" nzTheme="outline"></i> |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="content" *ngIf="item.isExpand"> |
<div class="content" *ngIf="item.isExpand"> |
||||||
<div *ngFor="let i of item.list" class="card greencard" |
<div *ngFor="let i of item.list" class="card greencard" |
||||||
[ngClass]="{'redcard': i.approvalStatus == 'reject'}"> |
[ngClass]="{'redcard': i.approvalStatus == 'reject'}"> |
||||||
<div class="unitname"> |
<div class="unitname"> |
||||||
<img src="../../../../assets/images/icon/unit.png" alt=""> |
<img src="../../../../assets/images/icon/unit.png" alt=""> |
||||||
<span>{{i.company.companyName}}</span> |
<span>{{i.company.companyName}}</span> |
||||||
</div> |
</div> |
||||||
<div class="info"> |
<div class="info"> |
||||||
<span> |
<span> |
||||||
<img src="../../../../assets/images/icon/main.png" alt=""> |
<img src="../../../../assets/images/icon/main.png" alt=""> |
||||||
{{i.mainSupervisor ? i.mainSupervisor.name : '未分配'}} |
{{i.mainSupervisor ? i.mainSupervisor.name : '未分配'}} |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
<img src="../../../../assets/images/icon/assist.png" alt=""> |
<img src="../../../../assets/images/icon/assist.png" alt=""> |
||||||
{{i.assitantSupervisor ? i.assitantSupervisor.name : '未分配'}} |
{{i.assitantSupervisor ? i.assitantSupervisor.name : '未分配'}} |
||||||
</span> |
</span> |
||||||
<span class="blue" (click)="allot(i)">分配</span> |
<span class="blue" (click)="allot(i)">分配</span> |
||||||
<span>|</span> |
<span>|</span> |
||||||
<span>申请人: {{i.assitantOrganization.name}}</span> |
<span>申请人: {{i.assitantOrganization.name}}</span> |
||||||
<!-- <span class="blue">修改</span> --> |
<!-- <span class="blue">修改</span> --> |
||||||
</div> |
</div> |
||||||
<div class="btn"> |
<div class="btn"> |
||||||
<button [ngClass]="{'forbidbtn': i.approvalStatus}" [disabled]="i.approvalStatus" |
<button [ngClass]="{'forbidbtn': i.approvalStatus}" [disabled]="i.approvalStatus" |
||||||
nz-button (click)="agree(i)">同意</button> |
nz-button (click)="agree(i)">同意</button> |
||||||
<button [ngClass]="{'forbidbtn': i.approvalStatus}" [disabled]="i.approvalStatus" |
<button [ngClass]="{'forbidbtn': i.approvalStatus}" [disabled]="i.approvalStatus" |
||||||
nz-button (click)="reject(i)">驳回</button> |
nz-button (click)="reject(i)">驳回</button> |
||||||
</div> |
</div> |
||||||
<img *ngIf="i.approvalStatus == 'reject'" class="auditimg" |
<img *ngIf="i.approvalStatus == 'reject'" class="auditimg" |
||||||
src="../../../../assets/images/icon/reject.png" alt=""> |
src="../../../../assets/images/icon/reject.png" alt=""> |
||||||
<img *ngIf="i.approvalStatus == 'approved'" class="auditimg" |
<img *ngIf="i.approvalStatus == 'approved'" class="auditimg" |
||||||
src="../../../../assets/images/icon/agree.png" alt=""> |
src="../../../../assets/images/icon/agree.png" alt=""> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
|
|
||||||
<!-- 本级部署 --> |
<!-- 本级部署 --> |
||||||
<div class="deploybox"> |
<div class="deploybox"> |
||||||
<div class="deployboxheader"> |
<div class="deployboxheader"> |
||||||
<span><img src="../../../../assets/images/icon/task0.png" alt=""> 本级部署</span> |
<span><img src="../../../../assets/images/icon/task0.png" alt=""> 本级部署</span> |
||||||
<span (click)="isdeployboxexpand()" class="expand blue"> |
<span (click)="isdeployboxexpand()" class="expand blue"> |
||||||
{{isdeployboxExpanded ? '收起' :'展开'}} |
{{isdeployboxExpanded ? '收起' :'展开'}} |
||||||
<i nz-icon [nzType]="isdeployboxExpanded ? 'down' : 'up'" nzTheme="outline"></i> |
<i nz-icon [nzType]="isdeployboxExpanded ? 'down' : 'up'" nzTheme="outline"></i> |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="deploycontent" *ngIf="isdeployboxExpanded"> |
<div class="deploycontent" *ngIf="isdeployboxExpanded"> |
||||||
<div class="deploycontentitem"> |
<div class="deploycontentitem"> |
||||||
<div class="title"> |
<div class="title"> |
||||||
月计划统计 |
月计划统计 |
||||||
</div> |
</div> |
||||||
<div class="details"> |
<div class="details"> |
||||||
<div class="detailsname"> |
<div class="detailsname"> |
||||||
月计划总数 |
月计划总数 |
||||||
<span style="font-weight: 18;font-size: 26px;margin-left: 10px;">15</span> |
<span style="font-weight: 18;font-size: 26px;margin-left: 10px;">15</span> |
||||||
</div> |
</div> |
||||||
<span>已完成 15</span> |
<span>已完成 15</span> |
||||||
<span class="progresssquare"> |
<span class="progresssquare"> |
||||||
<span>完成率</span> |
<span>完成率</span> |
||||||
<nz-progress nzStrokeLinecap="square" style="width: 70%;margin-bottom: 3px;" |
<nz-progress nzStrokeLinecap="square" style="width: 70%;margin-bottom: 3px;" |
||||||
[nzPercent]="75" nzStrokeColor="#42B983" [nzShowInfo]="false" [nzStrokeWidth]="18"> |
[nzPercent]="75" nzStrokeColor="#42B983" [nzShowInfo]="false" [nzStrokeWidth]="18"> |
||||||
</nz-progress> |
</nz-progress> |
||||||
<span>75%</span> |
<span>75%</span> |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="deploycontentitem"> |
<div class="deploycontentitem"> |
||||||
<div class="title"> |
<div class="title"> |
||||||
周计划统计 |
周计划统计 |
||||||
</div> |
</div> |
||||||
<div class="details"> |
<div class="details"> |
||||||
<div class="detailsname"> |
<div class="detailsname"> |
||||||
周计划总数 |
周计划总数 |
||||||
<span style="font-weight: 18;font-size: 26px;margin-left: 10px;">15</span> |
<span style="font-weight: 18;font-size: 26px;margin-left: 10px;">15</span> |
||||||
</div> |
</div> |
||||||
<span>已完成 15</span> |
<span>已完成 15</span> |
||||||
<span class="progresssquare"> |
<span class="progresssquare"> |
||||||
<span>完成率</span> |
<span>完成率</span> |
||||||
<nz-progress nzStrokeLinecap="square" style="width: 70%;margin-bottom: 3px;" |
<nz-progress nzStrokeLinecap="square" style="width: 70%;margin-bottom: 3px;" |
||||||
[nzPercent]="75" nzStrokeColor="#42B983" [nzShowInfo]="false" [nzStrokeWidth]="18"> |
[nzPercent]="75" nzStrokeColor="#42B983" [nzShowInfo]="false" [nzStrokeWidth]="18"> |
||||||
</nz-progress> |
</nz-progress> |
||||||
<span>75%</span> |
<span>75%</span> |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
|
||||||
<!-- 救援站列表 --> |
<!-- 救援站列表 --> |
||||||
<div class="stationcardlistbox"> |
<div class="stationcardlistbox"> |
||||||
<div class="stationcardlistitembox" *ngFor="let item of stationData"> |
<div class="stationcardlistitembox" *ngFor="let item of stationData"> |
||||||
<div class="stationcardlistitem"> |
<div class="stationcardlistitem"> |
||||||
<div class="header"> |
<div class="header"> |
||||||
<span style="width: 16%;"> |
<span style="width: 16%;"> |
||||||
<img src="../../../../assets//images/icon/station.png" alt=""> |
<img src="../../../../assets//images/icon/station.png" alt=""> |
||||||
{{item.name}} |
{{item.name}} |
||||||
</span> |
</span> |
||||||
<span style="width: 8%;">单位总数: 7/8</span> |
<span style="width: 8%;">单位总数: 7/8</span> |
||||||
<div style="width: 66%;" class="progress progresssquare"> |
<div style="width: 66%;" class="progress progresssquare"> |
||||||
<span>完成进度</span> |
<span>完成进度</span> |
||||||
<nz-progress nzStrokeLinecap="square" nzStrokeWidth="16" nzStrokeColor="#42B983" |
<nz-progress nzStrokeLinecap="square" nzStrokeWidth="16" nzStrokeColor="#42B983" |
||||||
[nzPercent]="30"></nz-progress> |
[nzPercent]="30"></nz-progress> |
||||||
</div> |
</div> |
||||||
<button nz-button nzType="primary">任务下派</button> |
<button nz-button nzType="primary">任务下派</button> |
||||||
<span (click)="expandcarditem(item)" class="expand blue"> |
<span (click)="expandcarditem(item)" class="expand blue"> |
||||||
{{item.isExpand ? '收起' :'展开'}} |
{{item.isExpand ? '收起' :'展开'}} |
||||||
<i nz-icon [nzType]="item.isExpand ? 'down' : 'up'" nzTheme="outline"></i> |
<i nz-icon [nzType]="item.isExpand ? 'down' : 'up'" nzTheme="outline"></i> |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="maincontent" *ngIf="item.isExpand"> |
<div class="maincontent" *ngIf="item.isExpand"> |
||||||
<div class="maincontentitem"> |
<div class="maincontentitem"> |
||||||
<div class="maincontentitemleft"> |
<div class="maincontentitemleft"> |
||||||
<div class="panelheadername panelheadernameor"> |
<div class="panelheadername panelheadernameor"> |
||||||
<img src="'../../../../assets/images/icon/huodong.png" alt=""> |
<img src="'../../../../assets/images/icon/huodong.png" alt=""> |
||||||
重大活动 |
重大活动 |
||||||
</div> |
</div> |
||||||
<div class="num"> |
<div class="num"> |
||||||
<div class="round" style="background: #2C4DC0;"></div> |
<div class="round" style="background: #2C4DC0;"></div> |
||||||
<span class="word">已分配</span> |
<span class="word">已分配</span> |
||||||
<span class="boldspan">1</span> |
<span class="boldspan">1</span> |
||||||
</div> |
</div> |
||||||
<div class="num"> |
<div class="num"> |
||||||
<div class="round" style="background: #42B983;"></div> |
<div class="round" style="background: #42B983;"></div> |
||||||
<span class="word">已完成</span> |
<span class="word">已完成</span> |
||||||
<span class="boldspan">1</span> |
<span class="boldspan">1</span> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="maincontentitemright"> |
<div class="maincontentitemright"> |
||||||
<div class="maincontentitemrightitem"> |
<div class="maincontentitemrightitem"> |
||||||
<div class="flexcol namebox"> |
<div class="flexcol namebox"> |
||||||
<span> |
<span> |
||||||
尬粒酒店管理有限公司济南泺文路分公司 |
尬粒酒店管理有限公司济南泺文路分公司 |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
单位名称 |
单位名称 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="flexcol"> |
<div class="flexcol"> |
||||||
<span> |
<span> |
||||||
重点单位 |
重点单位 |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
级别 |
级别 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="flexcol"> |
<div class="flexcol"> |
||||||
<span> |
<span> |
||||||
历下区A消防救援站 |
历下区A消防救援站 |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
责任机构 |
责任机构 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="flexcol"> |
<div class="flexcol"> |
||||||
<span> |
<span> |
||||||
历下区B消防救援站 |
历下区B消防救援站 |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
协助机构 |
协助机构 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="flexcol"> |
<div class="flexcol"> |
||||||
<span> |
<span> |
||||||
宣传 |
宣传 |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
同步工作 |
同步工作 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="flexcol progressbox progresssquare"> |
<div class="flexcol progressbox progresssquare"> |
||||||
<span> |
<span> |
||||||
<nz-progress style="width: 200px;" nzStrokeLinecap="square" |
<nz-progress style="width: 200px;" nzStrokeLinecap="square" |
||||||
nzStrokeWidth="16" nzStrokeColor="#42B983" [nzPercent]="30"> |
nzStrokeWidth="16" nzStrokeColor="#42B983" [nzPercent]="30"> |
||||||
</nz-progress> |
</nz-progress> |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
进度 |
进度 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="btnbox"> |
<div class="btnbox"> |
||||||
<button nz-button nzType="primary">提交审核</button> |
<button nz-button nzType="primary">提交审核</button> |
||||||
<button style="margin-left: 12px;" nz-button nzType="primary">取消</button> |
<button style="margin-left: 12px;" nz-button nzType="primary">取消</button> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="maincontentitemrightitem"> |
<div class="maincontentitemrightitem"> |
||||||
<div class="flexcol namebox"> |
<div class="flexcol namebox"> |
||||||
<span> |
<span> |
||||||
尬粒酒店管理有限公司济南泺文路分公司 |
尬粒酒店管理有限公司济南泺文路分公司 |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
单位名称 |
单位名称 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="flexcol"> |
<div class="flexcol"> |
||||||
<span> |
<span> |
||||||
重点单位 |
重点单位 |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
级别 |
级别 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="flexcol"> |
<div class="flexcol"> |
||||||
<span> |
<span> |
||||||
历下区A消防救援站 |
历下区A消防救援站 |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
责任机构 |
责任机构 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="flexcol"> |
<div class="flexcol"> |
||||||
<span> |
<span> |
||||||
历下区B消防救援站 |
历下区B消防救援站 |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
协助机构 |
协助机构 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="flexcol"> |
<div class="flexcol"> |
||||||
<span> |
<span> |
||||||
宣传 |
宣传 |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
同步工作 |
同步工作 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="flexcol progressbox progresssquare"> |
<div class="flexcol progressbox progresssquare"> |
||||||
<span> |
<span> |
||||||
<nz-progress style="width: 200px;" nzStrokeLinecap="square" |
<nz-progress style="width: 200px;" nzStrokeLinecap="square" |
||||||
nzStrokeWidth="16" nzStrokeColor="#42B983" [nzPercent]="30"> |
nzStrokeWidth="16" nzStrokeColor="#42B983" [nzPercent]="30"> |
||||||
</nz-progress> |
</nz-progress> |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
进度 |
进度 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="btnbox"> |
<div class="btnbox"> |
||||||
<button nz-button nzType="primary">提交审核</button> |
<button nz-button nzType="primary">提交审核</button> |
||||||
<button style="margin-left: 12px;" nz-button nzType="primary">取消</button> |
<button style="margin-left: 12px;" nz-button nzType="primary">取消</button> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<!-- --> |
<!-- --> |
||||||
<div class="cutoffrule"></div> |
<div class="cutoffrule"></div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
File diff suppressed because it is too large
Load Diff
@ -1,280 +1,280 @@ |
|||||||
import { HttpClient } from '@angular/common/http'; |
import { HttpClient } from '@angular/common/http'; |
||||||
import { Component, OnInit, ViewContainerRef } from '@angular/core'; |
import { Component, OnInit, ViewContainerRef } from '@angular/core'; |
||||||
import { NzMessageService } from 'ng-zorro-antd/message'; |
import { NzMessageService } from 'ng-zorro-antd/message'; |
||||||
import { NzModalService } from 'ng-zorro-antd/modal'; |
import { NzModalService } from 'ng-zorro-antd/modal'; |
||||||
import { AllotPersonComponent } from '../da-subordinate-audit/allot-person/allot-person.component'; |
import { AllotPersonComponent } from '../da-subordinate-audit/allot-person/allot-person.component'; |
||||||
|
|
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-da-monthly-task-overview', |
selector: 'app-da-monthly-task-overview', |
||||||
templateUrl: './da-monthly-task-overview.component.html', |
templateUrl: './da-monthly-task-overview.component.html', |
||||||
styleUrls: ['./da-monthly-task-overview.component.scss'] |
styleUrls: ['./da-monthly-task-overview.component.scss'] |
||||||
}) |
}) |
||||||
export class DaMonthlyTaskOverviewComponent implements OnInit { |
export class DaMonthlyTaskOverviewComponent implements OnInit { |
||||||
|
|
||||||
constructor(private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { } |
constructor(private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { } |
||||||
|
|
||||||
OrganizationId |
OrganizationId |
||||||
ngOnInit(): void { |
ngOnInit(): void { |
||||||
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId |
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId |
||||||
this.selectedMonth = new Date().getMonth() + 1 |
this.selectedMonth = new Date().getMonth() + 1 |
||||||
|
|
||||||
this.getTaskList() |
this.getTaskList() |
||||||
//获得主协调查人员
|
//获得主协调查人员
|
||||||
this.getSupervisor('main') |
this.getSupervisor('main') |
||||||
this.getSupervisor('assisted') |
this.getSupervisor('assisted') |
||||||
} |
} |
||||||
|
|
||||||
selectedMonth |
selectedMonth |
||||||
selectedYear = 2022 |
selectedYear = 2022 |
||||||
selectedTime |
selectedTime |
||||||
selectMonth(item) { |
selectMonth(item) { |
||||||
this.selectedMonth = item.id |
this.selectedMonth = item.id |
||||||
this.getTaskList() |
this.getTaskList() |
||||||
} |
} |
||||||
selectYear(e) { |
selectYear(e) { |
||||||
this.selectedYear = e |
this.selectedYear = e |
||||||
console.log('年', e) |
console.log('年', e) |
||||||
this.getTaskList() |
this.getTaskList() |
||||||
} |
} |
||||||
months = [ |
months = [ |
||||||
{ id: 1, name: '1月', isable: true }, |
{ id: 1, name: '1月', isable: true }, |
||||||
{ id: 2, name: '2月', isable: true }, |
{ id: 2, name: '2月', isable: true }, |
||||||
{ id: 3, name: '3月', isable: true }, |
{ id: 3, name: '3月', isable: true }, |
||||||
{ id: 4, name: '4月', isable: true }, |
{ id: 4, name: '4月', isable: true }, |
||||||
{ id: 5, name: '5月', isable: true }, |
{ id: 5, name: '5月', isable: true }, |
||||||
{ id: 6, name: '6月', isable: true }, |
{ id: 6, name: '6月', isable: true }, |
||||||
{ id: 7, name: '7月', isable: true }, |
{ id: 7, name: '7月', isable: true }, |
||||||
{ id: 8, name: '8月', isable: true }, |
{ id: 8, name: '8月', isable: true }, |
||||||
{ id: 9, name: '9月', isable: true }, |
{ id: 9, name: '9月', isable: true }, |
||||||
{ id: 10, name: '10月', isable: true }, |
{ id: 10, name: '10月', isable: true }, |
||||||
{ id: 11, name: '11月', isable: true }, |
{ id: 11, name: '11月', isable: true }, |
||||||
{ id: 12, name: '12月', isable: true } |
{ id: 12, name: '12月', isable: true } |
||||||
] |
] |
||||||
|
|
||||||
|
|
||||||
istaskauditExpanded = true |
istaskauditExpanded = true |
||||||
istaskauditexpand() { |
istaskauditexpand() { |
||||||
this.istaskauditExpanded = !this.istaskauditExpanded |
this.istaskauditExpanded = !this.istaskauditExpanded |
||||||
} |
} |
||||||
|
|
||||||
isdeployboxExpanded = true |
isdeployboxExpanded = true |
||||||
isdeployboxexpand() { |
isdeployboxexpand() { |
||||||
this.isdeployboxExpanded = !this.isdeployboxExpanded |
this.isdeployboxExpanded = !this.isdeployboxExpanded |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
shuxiTaskData = { |
shuxiTaskData = { |
||||||
isExpand: true |
isExpand: true |
||||||
} |
} |
||||||
zhidaoTaskData = { |
zhidaoTaskData = { |
||||||
isExpand: true |
isExpand: true |
||||||
} |
} |
||||||
PageNumber = 1 |
PageNumber = 1 |
||||||
PageSize = 9999 |
PageSize = 9999 |
||||||
|
|
||||||
taskData = [ |
taskData = [ |
||||||
{ id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [], isExpand: true }, |
{ id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [], isExpand: true }, |
||||||
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [], isExpand: true } |
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [], isExpand: true } |
||||||
] |
] |
||||||
|
|
||||||
isloading = false |
isloading = false |
||||||
getTaskList() { |
getTaskList() { |
||||||
this.isloading = true |
this.isloading = true |
||||||
this.taskData = [ |
this.taskData = [ |
||||||
{ id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [], isExpand: true }, |
{ id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [], isExpand: true }, |
||||||
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [], isExpand: true } |
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [], isExpand: true } |
||||||
] |
] |
||||||
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' |
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' |
||||||
console.log('查询时间', selectedTime) |
console.log('查询时间', selectedTime) |
||||||
let params = { |
let params = { |
||||||
Month: selectedTime, |
Month: selectedTime, |
||||||
OrganizationId: this.OrganizationId, |
OrganizationId: this.OrganizationId, |
||||||
PageNumber: this.PageNumber, |
PageNumber: this.PageNumber, |
||||||
PageSize: this.PageSize |
PageSize: this.PageSize |
||||||
} |
} |
||||||
this.http.get('/api/PlanTasks', { |
this.http.get('/api/PlanTasks', { |
||||||
params: params |
params: params |
||||||
}).subscribe((data: any) => { |
}).subscribe((data: any) => { |
||||||
let arr1 = [] |
let arr1 = [] |
||||||
let arr2 = [] |
let arr2 = [] |
||||||
data.items.forEach(element => { |
data.items.forEach(element => { |
||||||
if (element.taskName == '熟悉演练') { |
if (element.taskName == '熟悉演练') { |
||||||
arr1.push(element) |
arr1.push(element) |
||||||
} |
} |
||||||
if (element.taskName == '联络指导') { |
if (element.taskName == '联络指导') { |
||||||
arr2.push(element) |
arr2.push(element) |
||||||
} |
} |
||||||
}); |
}); |
||||||
arr1.forEach(item => { |
arr1.forEach(item => { |
||||||
if (!!item.approvalStatus) { |
if (!!item.approvalStatus) { |
||||||
this.taskData[0].finished += 1 |
this.taskData[0].finished += 1 |
||||||
} |
} |
||||||
}); |
}); |
||||||
arr2.forEach(item => { |
arr2.forEach(item => { |
||||||
if (!!item.approvalStatus) { |
if (!!item.approvalStatus) { |
||||||
this.taskData[1].finished += 1 |
this.taskData[1].finished += 1 |
||||||
} |
} |
||||||
}); |
}); |
||||||
this.taskData[0].totalCount = arr1.length |
this.taskData[0].totalCount = arr1.length |
||||||
this.taskData[0].list = [...arr1] |
this.taskData[0].list = [...arr1] |
||||||
this.taskData[1].totalCount = arr2.length |
this.taskData[1].totalCount = arr2.length |
||||||
this.taskData[1].list = [...arr2] |
this.taskData[1].list = [...arr2] |
||||||
|
|
||||||
this.isloading = false |
this.isloading = false |
||||||
}) |
}) |
||||||
} |
} |
||||||
assitantsupervisorList |
assitantsupervisorList |
||||||
mainsupervisorList |
mainsupervisorList |
||||||
getSupervisor(type) { |
getSupervisor(type) { |
||||||
let params = { |
let params = { |
||||||
inspectorType: type |
inspectorType: type |
||||||
} |
} |
||||||
this.http.get('/api/Users/Inspectors', { |
this.http.get('/api/Users/Inspectors', { |
||||||
params: params |
params: params |
||||||
}).subscribe((data: any) => { |
}).subscribe((data: any) => { |
||||||
console.log('检查员列表', data) |
console.log('检查员列表', data) |
||||||
if (type == 'main') { |
if (type == 'main') { |
||||||
this.mainsupervisorList = data |
this.mainsupervisorList = data |
||||||
} else { |
} else { |
||||||
this.assitantsupervisorList = data |
this.assitantsupervisorList = data |
||||||
} |
} |
||||||
}) |
}) |
||||||
} |
} |
||||||
|
|
||||||
allot(item) { |
allot(item) { |
||||||
console.log(item) |
console.log(item) |
||||||
if (this.mainsupervisorList.length == 0 || this.assitantsupervisorList.length == 0) { |
if (this.mainsupervisorList.length == 0 || this.assitantsupervisorList.length == 0) { |
||||||
this.message.create('warning', '请从用户管理添加检查人员'); |
this.message.create('warning', '请从用户管理添加检查人员'); |
||||||
return |
return |
||||||
} |
} |
||||||
const modal = this.modal.create({ |
const modal = this.modal.create({ |
||||||
nzTitle: '分配监督检查员', |
nzTitle: '分配监督检查员', |
||||||
nzContent: AllotPersonComponent, |
nzContent: AllotPersonComponent, |
||||||
nzViewContainerRef: this.viewContainerRef, |
nzViewContainerRef: this.viewContainerRef, |
||||||
nzWidth: 485, |
nzWidth: 485, |
||||||
nzMaskClosable: false, |
nzMaskClosable: false, |
||||||
nzComponentParams: { |
nzComponentParams: { |
||||||
mainsupervisorList: this.mainsupervisorList, |
mainsupervisorList: this.mainsupervisorList, |
||||||
assitantsupervisorList: this.assitantsupervisorList |
assitantsupervisorList: this.assitantsupervisorList |
||||||
}, |
}, |
||||||
nzOnOk: async () => { |
nzOnOk: async () => { |
||||||
if (instance.validateForm.valid) { |
if (instance.validateForm.valid) { |
||||||
await new Promise((resolve, reject) => { |
await new Promise((resolve, reject) => { |
||||||
let body = { |
let body = { |
||||||
mainSupervisorId: instance.validateForm.value.main, |
mainSupervisorId: instance.validateForm.value.main, |
||||||
assitantSupervisorId: instance.validateForm.value.assitant |
assitantSupervisorId: instance.validateForm.value.assitant |
||||||
} |
} |
||||||
this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({ |
this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({ |
||||||
next: async (data) => { |
next: async (data) => { |
||||||
this.message.create('success', '分配成功'); |
this.message.create('success', '分配成功'); |
||||||
resolve(data) |
resolve(data) |
||||||
this.getTaskList() |
this.getTaskList() |
||||||
return true |
return true |
||||||
}, |
}, |
||||||
error: (err) => { |
error: (err) => { |
||||||
this.message.create('warning', '分配失败'); |
this.message.create('warning', '分配失败'); |
||||||
reject(err) |
reject(err) |
||||||
return false |
return false |
||||||
} |
} |
||||||
}) |
}) |
||||||
}) |
}) |
||||||
} else { |
} else { |
||||||
this.message.create('warning', '请填写完整!'); |
this.message.create('warning', '请填写完整!'); |
||||||
return false |
return false |
||||||
} |
} |
||||||
} |
} |
||||||
}); |
}); |
||||||
const instance = modal.getContentComponent(); |
const instance = modal.getContentComponent(); |
||||||
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); |
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); |
||||||
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); |
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); |
||||||
} |
} |
||||||
|
|
||||||
agree(item) { |
agree(item) { |
||||||
this.modal.confirm({ |
this.modal.confirm({ |
||||||
nzTitle: `确定要同意该申请吗?`, |
nzTitle: `确定要同意该申请吗?`, |
||||||
nzOkText: '确定', |
nzOkText: '确定', |
||||||
nzOkType: 'default', |
nzOkType: 'default', |
||||||
nzOnOk: () => { |
nzOnOk: () => { |
||||||
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, { |
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, { |
||||||
params: { |
params: { |
||||||
approvalStatus: 'approved' |
approvalStatus: 'approved' |
||||||
} |
} |
||||||
}).subscribe({ |
}).subscribe({ |
||||||
next: (data) => { |
next: (data) => { |
||||||
this.message.create('success', '审核成功'); |
this.message.create('success', '审核成功'); |
||||||
this.getTaskList() |
this.getTaskList() |
||||||
}, |
}, |
||||||
error: (err) => { |
error: (err) => { |
||||||
this.message.create('warning', '审核失败'); |
this.message.create('warning', '审核失败'); |
||||||
} |
} |
||||||
}) |
}) |
||||||
}, |
}, |
||||||
nzCancelText: '取消' |
nzCancelText: '取消' |
||||||
}); |
}); |
||||||
} |
} |
||||||
|
|
||||||
reject(item) { |
reject(item) { |
||||||
this.modal.confirm({ |
this.modal.confirm({ |
||||||
nzTitle: `确定要驳回该申请吗?`, |
nzTitle: `确定要驳回该申请吗?`, |
||||||
nzOkText: '确定', |
nzOkText: '确定', |
||||||
nzOkType: 'default', |
nzOkType: 'default', |
||||||
nzOnOk: () => { |
nzOnOk: () => { |
||||||
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, { |
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, { |
||||||
params: { |
params: { |
||||||
approvalStatus: 'reject' |
approvalStatus: 'reject' |
||||||
} |
} |
||||||
}).subscribe({ |
}).subscribe({ |
||||||
next: (data) => { |
next: (data) => { |
||||||
this.message.create('success', '审核成功'); |
this.message.create('success', '审核成功'); |
||||||
this.getTaskList() |
this.getTaskList() |
||||||
}, |
}, |
||||||
error: (err) => { |
error: (err) => { |
||||||
this.message.create('warning', '审核失败'); |
this.message.create('warning', '审核失败'); |
||||||
} |
} |
||||||
}) |
}) |
||||||
}, |
}, |
||||||
nzCancelText: '取消' |
nzCancelText: '取消' |
||||||
}); |
}); |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
expand(data) { |
expand(data) { |
||||||
data.isExpand = !data.isExpand |
data.isExpand = !data.isExpand |
||||||
} |
} |
||||||
|
|
||||||
formatOne = (percent: number): string => `${percent}%\n完成率`; |
formatOne = (percent: number): string => `${percent}%\n完成率`; |
||||||
|
|
||||||
|
|
||||||
cardData = [ |
cardData = [ |
||||||
{ name: '重大活动', isDetails: false, background: '#FF9203', icon: 'huodong.png' }, |
{ name: '重大活动', isDetails: false, background: '#FF9203', icon: 'huodong.png' }, |
||||||
{ name: '双随机', isDetails: false, background: '#1D9DFF', icon: 'suiji.png' }, |
{ name: '双随机', isDetails: false, background: '#1D9DFF', icon: 'suiji.png' }, |
||||||
{ name: '行政许可', isDetails: false, background: '#42B983', icon: 'xuke.png' }, |
{ name: '行政许可', isDetails: false, background: '#42B983', icon: 'xuke.png' }, |
||||||
{ name: '熟悉演练', isDetails: false, background: '#9D80FF', icon: 'yanlian.png' }, |
{ name: '熟悉演练', isDetails: false, background: '#9D80FF', icon: 'yanlian.png' }, |
||||||
{ name: '联络指导', isDetails: false, background: '#5483EA', icon: 'zhidao.png' }, |
{ name: '联络指导', isDetails: false, background: '#5483EA', icon: 'zhidao.png' }, |
||||||
{ name: '消防宣传', isDetails: false, background: '#FF5D2A', icon: 'xuanchuan.png' }, |
{ name: '消防宣传', isDetails: false, background: '#FF5D2A', icon: 'xuanchuan.png' }, |
||||||
{ name: '投诉举报', isDetails: false, background: '#5087FF', icon: 'tousu.png' }, |
{ name: '投诉举报', isDetails: false, background: '#5087FF', icon: 'tousu.png' }, |
||||||
{ name: '火灾调查', isDetails: false, background: '#FF404D', icon: 'huozai.png' } |
{ name: '火灾调查', isDetails: false, background: '#FF404D', icon: 'huozai.png' } |
||||||
] |
] |
||||||
|
|
||||||
openDetails(data, type) { |
openDetails(data, type) { |
||||||
data.isDetails = type |
data.isDetails = type |
||||||
} |
} |
||||||
xxx = false |
xxx = false |
||||||
radioChange(e) { |
radioChange(e) { |
||||||
|
|
||||||
setTimeout(() => { |
setTimeout(() => { |
||||||
this.xxx = !this.xxx |
this.xxx = !this.xxx |
||||||
}, 0); |
}, 0); |
||||||
|
|
||||||
} |
} |
||||||
stationData = [ |
stationData = [ |
||||||
{ name: '历下区A消防救援站', isExpand: true }, |
{ name: '历下区A消防救援站', isExpand: true }, |
||||||
{ name: '历下区B消防救援站', isExpand: false }, |
{ name: '历下区B消防救援站', isExpand: false }, |
||||||
{ name: '历下区C消防救援站', isExpand: false } |
{ name: '历下区C消防救援站', isExpand: false } |
||||||
] |
] |
||||||
expandcarditem(item) { |
expandcarditem(item) { |
||||||
item.isExpand = !item.isExpand |
item.isExpand = !item.isExpand |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
@ -1,22 +1,22 @@ |
|||||||
<div class="box"> |
<div class="box"> |
||||||
<form nz-form [formGroup]="validateForm"> |
<form nz-form [formGroup]="validateForm"> |
||||||
<nz-form-item> |
<nz-form-item> |
||||||
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="检查员(主)">检查员(主)</nz-form-label> |
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="检查员(主)">检查员(主)</nz-form-label> |
||||||
<nz-form-control> |
<nz-form-control> |
||||||
<nz-select formControlName="main" nzPlaceHolder="请选择消防监督检查员(主)"> |
<nz-select formControlName="main" nzPlaceHolder="请选择消防监督检查员(主)"> |
||||||
<nz-option *ngFor="let item of mainsupervisorList" [nzValue]="item.id" [nzLabel]="item.name"> |
<nz-option *ngFor="let item of mainsupervisorList" [nzValue]="item.id" [nzLabel]="item.name"> |
||||||
</nz-option> |
</nz-option> |
||||||
</nz-select> |
</nz-select> |
||||||
</nz-form-control> |
</nz-form-control> |
||||||
</nz-form-item> |
</nz-form-item> |
||||||
<nz-form-item> |
<nz-form-item> |
||||||
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="检查员(协)">检查员(协)</nz-form-label> |
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="检查员(协)">检查员(协)</nz-form-label> |
||||||
<nz-form-control> |
<nz-form-control> |
||||||
<nz-select formControlName="assitant" nzPlaceHolder="请选择消防监督检查员(协)"> |
<nz-select formControlName="assitant" nzPlaceHolder="请选择消防监督检查员(协)"> |
||||||
<nz-option *ngFor="let item of assitantsupervisorList" [nzValue]="item.id" [nzLabel]="item.name"> |
<nz-option *ngFor="let item of assitantsupervisorList" [nzValue]="item.id" [nzLabel]="item.name"> |
||||||
</nz-option> |
</nz-option> |
||||||
</nz-select> |
</nz-select> |
||||||
</nz-form-control> |
</nz-form-control> |
||||||
</nz-form-item> |
</nz-form-item> |
||||||
</form> |
</form> |
||||||
</div> |
</div> |
@ -1,33 +1,33 @@ |
|||||||
import { Component, OnInit, Input } from '@angular/core'; |
import { Component, OnInit, Input } from '@angular/core'; |
||||||
import { NzModalRef } from 'ng-zorro-antd/modal'; |
import { NzModalRef } from 'ng-zorro-antd/modal'; |
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
||||||
import { HttpClient } from '@angular/common/http'; |
import { HttpClient } from '@angular/common/http'; |
||||||
import { TreeService } from 'src/app/service/tree.service'; |
import { TreeService } from 'src/app/service/tree.service'; |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-allot-person', |
selector: 'app-allot-person', |
||||||
templateUrl: './allot-person.component.html', |
templateUrl: './allot-person.component.html', |
||||||
styleUrls: ['./allot-person.component.scss'] |
styleUrls: ['./allot-person.component.scss'] |
||||||
}) |
}) |
||||||
export class AllotPersonComponent implements OnInit { |
export class AllotPersonComponent implements OnInit { |
||||||
|
|
||||||
@Input() mainsupervisorList?: any; |
@Input() mainsupervisorList?: any; |
||||||
@Input() assitantsupervisorList?: any; |
@Input() assitantsupervisorList?: any; |
||||||
validateForm!: FormGroup; |
validateForm!: FormGroup; |
||||||
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } |
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } |
||||||
|
|
||||||
ngOnInit(): void { |
ngOnInit(): void { |
||||||
this.validateForm = this.fb.group({ |
this.validateForm = this.fb.group({ |
||||||
main: [null, [Validators.required]], |
main: [null, [Validators.required]], |
||||||
assitant: [null, [Validators.required]] |
assitant: [null, [Validators.required]] |
||||||
}); |
}); |
||||||
|
|
||||||
|
|
||||||
} |
} |
||||||
destroyModal(): void { |
destroyModal(): void { |
||||||
this.modal.destroy({ data: 'this the result data' }); |
this.modal.destroy({ data: 'this the result data' }); |
||||||
} |
} |
||||||
|
|
||||||
listOfData: any[] = []; |
listOfData: any[] = []; |
||||||
|
|
||||||
|
|
||||||
} |
} |
||||||
|
@ -1,61 +1,61 @@ |
|||||||
<!-- <p>下级任务申请</p> --> |
<!-- <p>下级任务申请</p> --> |
||||||
<div class="box"> |
<div class="box"> |
||||||
<div class="timebox"> |
<div class="timebox"> |
||||||
<nz-select [(ngModel)]="selectedYear" (ngModelChange)="selectYear($event)"> |
<nz-select [(ngModel)]="selectedYear" (ngModelChange)="selectYear($event)"> |
||||||
<nz-option [nzValue]="2021" nzLabel="2021年"></nz-option> |
<nz-option [nzValue]="2021" nzLabel="2021年"></nz-option> |
||||||
<nz-option [nzValue]="2022" nzLabel="2022年"></nz-option> |
<nz-option [nzValue]="2022" nzLabel="2022年"></nz-option> |
||||||
</nz-select> |
</nz-select> |
||||||
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)" |
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)" |
||||||
[ngClass]="{'selectedMonth': item.id == selectedMonth}"> |
[ngClass]="{'selectedMonth': item.id == selectedMonth}"> |
||||||
{{item.name}} |
{{item.name}} |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="content"> |
<div class="content"> |
||||||
<div class="spin" *ngIf="isloading"> |
<div class="spin" *ngIf="isloading"> |
||||||
<nz-spin nzSimple></nz-spin> |
<nz-spin nzSimple></nz-spin> |
||||||
</div> |
</div> |
||||||
<div class="tabheader"> |
<div class="tabheader"> |
||||||
<div *ngFor="let item of data" class="tabtitle" [ngClass]="{'selectedTab': selectedTab == item.id}" |
<div *ngFor="let item of data" class="tabtitle" [ngClass]="{'selectedTab': selectedTab == item.id}" |
||||||
(click)="selectTab(item)"> |
(click)="selectTab(item)"> |
||||||
<div [ngClass]="{'blue': selectedTab == item.id}"> |
<div [ngClass]="{'blue': selectedTab == item.id}"> |
||||||
<span>{{item.name}}</span> |
<span>{{item.name}}</span> |
||||||
<span style="margin: 0 8px;"></span> |
<span style="margin: 0 8px;"></span> |
||||||
<span>已审批: {{item.finished}}/{{item.totalCount}}</span> |
<span>已审批: {{item.finished}}/{{item.totalCount}}</span> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="tabbody"> |
<div class="tabbody"> |
||||||
<div class="card greencard" [ngClass]="{'redcard': item.approvalStatus == 'reject'}" |
<div class="card greencard" [ngClass]="{'redcard': item.approvalStatus == 'reject'}" |
||||||
*ngFor="let item of atPresentData.list"> |
*ngFor="let item of atPresentData.list"> |
||||||
<div class="unitname"> |
<div class="unitname"> |
||||||
<img src="../../../../assets/images/icon/unit.png" alt=""> |
<img src="../../../../assets/images/icon/unit.png" alt=""> |
||||||
<span>{{item.company.companyName}}</span> |
<span>{{item.company.companyName}}</span> |
||||||
</div> |
</div> |
||||||
<div class="info"> |
<div class="info"> |
||||||
<span> |
<span> |
||||||
<img src="../../../../assets/images/icon/main.png" alt=""> |
<img src="../../../../assets/images/icon/main.png" alt=""> |
||||||
{{item.mainSupervisor ? item.mainSupervisor.name : '未分配'}} |
{{item.mainSupervisor ? item.mainSupervisor.name : '未分配'}} |
||||||
</span> |
</span> |
||||||
<span> |
<span> |
||||||
<img src="../../../../assets/images/icon/assist.png" alt=""> |
<img src="../../../../assets/images/icon/assist.png" alt=""> |
||||||
{{item.assitantSupervisor ? item.assitantSupervisor.name : '未分配'}} |
{{item.assitantSupervisor ? item.assitantSupervisor.name : '未分配'}} |
||||||
</span> |
</span> |
||||||
<span class="blue" (click)="allot(item)">分配</span> |
<span class="blue" (click)="allot(item)">分配</span> |
||||||
<span>|</span> |
<span>|</span> |
||||||
<span>申请人: {{item.assitantOrganization.name}}</span> |
<span>申请人: {{item.assitantOrganization.name}}</span> |
||||||
<!-- <span class="blue">修改</span> --> |
<!-- <span class="blue">修改</span> --> |
||||||
</div> |
</div> |
||||||
<div class="btn"> |
<div class="btn"> |
||||||
<button [ngClass]="{'forbidbtn': item.approvalStatus}" [disabled]="item.approvalStatus" nz-button |
<button [ngClass]="{'forbidbtn': item.approvalStatus}" [disabled]="item.approvalStatus" nz-button |
||||||
(click)="agree(item)">同意</button> |
(click)="agree(item)">同意</button> |
||||||
<button [ngClass]="{'forbidbtn': item.approvalStatus}" [disabled]="item.approvalStatus" nz-button |
<button [ngClass]="{'forbidbtn': item.approvalStatus}" [disabled]="item.approvalStatus" nz-button |
||||||
(click)="reject(item)">驳回</button> |
(click)="reject(item)">驳回</button> |
||||||
</div> |
</div> |
||||||
<img *ngIf="item.approvalStatus == 'reject'" class="auditimg" |
<img *ngIf="item.approvalStatus == 'reject'" class="auditimg" |
||||||
src="../../../../assets/images/icon/reject.png" alt=""> |
src="../../../../assets/images/icon/reject.png" alt=""> |
||||||
<img *ngIf="item.approvalStatus == 'approved'" class="auditimg" |
<img *ngIf="item.approvalStatus == 'approved'" class="auditimg" |
||||||
src="../../../../assets/images/icon/agree.png" alt=""> |
src="../../../../assets/images/icon/agree.png" alt=""> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
@ -1,161 +1,161 @@ |
|||||||
.box { |
.box { |
||||||
width: 100%; |
width: 100%; |
||||||
height: 100%; |
height: 100%; |
||||||
display: flex; |
display: flex; |
||||||
flex-direction: column; |
flex-direction: column; |
||||||
overflow: hidden; |
overflow: hidden; |
||||||
} |
} |
||||||
|
|
||||||
.timebox { |
.timebox { |
||||||
width: 100%; |
width: 100%; |
||||||
height: 68px; |
height: 68px; |
||||||
box-sizing: border-box; |
box-sizing: border-box; |
||||||
padding: 0 20px; |
padding: 0 20px; |
||||||
display: flex; |
display: flex; |
||||||
align-items: center; |
align-items: center; |
||||||
|
|
||||||
nz-select { |
nz-select { |
||||||
margin-right: 16px; |
margin-right: 16px; |
||||||
border-radius: 4px 4px 4px 4px; |
border-radius: 4px 4px 4px 4px; |
||||||
} |
} |
||||||
|
|
||||||
.monthbtn { |
.monthbtn { |
||||||
width: 80px; |
width: 80px; |
||||||
height: 32px; |
height: 32px; |
||||||
line-height: 32px; |
line-height: 32px; |
||||||
background: #FFFFFF; |
background: #FFFFFF; |
||||||
border-radius: 4px 4px 4px 4px; |
border-radius: 4px 4px 4px 4px; |
||||||
opacity: 1; |
opacity: 1; |
||||||
border: 1px solid #E4E7EC; |
border: 1px solid #E4E7EC; |
||||||
color: #303133; |
color: #303133; |
||||||
margin-right: 16px; |
margin-right: 16px; |
||||||
cursor: pointer; |
cursor: pointer; |
||||||
} |
} |
||||||
|
|
||||||
.selectedMonth { |
.selectedMonth { |
||||||
|
|
||||||
background: #2C4DC0; |
background: #2C4DC0; |
||||||
color: #FFFFFF; |
color: #FFFFFF; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.content { |
.content { |
||||||
flex: 1; |
flex: 1; |
||||||
overflow: hidden; |
overflow: hidden; |
||||||
margin: 20px; |
margin: 20px; |
||||||
margin-top: 0px; |
margin-top: 0px; |
||||||
background: #fff; |
background: #fff; |
||||||
box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800); |
box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800); |
||||||
border-radius: 4px 4px 4px 4px; |
border-radius: 4px 4px 4px 4px; |
||||||
opacity: 1; |
opacity: 1; |
||||||
border: 1px solid #E4E7EC; |
border: 1px solid #E4E7EC; |
||||||
color: #303133; |
color: #303133; |
||||||
text-align: left; |
text-align: left; |
||||||
display: flex; |
display: flex; |
||||||
flex-direction: column; |
flex-direction: column; |
||||||
position: relative; |
position: relative; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.tabheader { |
.tabheader { |
||||||
width: 100%; |
width: 100%; |
||||||
height: 52px; |
height: 52px; |
||||||
background: #E4E7EC; |
background: #E4E7EC; |
||||||
display: flex; |
display: flex; |
||||||
|
|
||||||
.tabtitle { |
.tabtitle { |
||||||
width: 205px; |
width: 205px; |
||||||
height: 52px; |
height: 52px; |
||||||
line-height: 52px; |
line-height: 52px; |
||||||
text-align: center; |
text-align: center; |
||||||
display: flex; |
display: flex; |
||||||
justify-content: center; |
justify-content: center; |
||||||
cursor: pointer; |
cursor: pointer; |
||||||
|
|
||||||
div { |
div { |
||||||
border-top: 2px solid #E4E7EC; |
border-top: 2px solid #E4E7EC; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.selectedTab { |
.selectedTab { |
||||||
background: #fff; |
background: #fff; |
||||||
|
|
||||||
div { |
div { |
||||||
border-top: 2px solid #2C4DC0; |
border-top: 2px solid #2C4DC0; |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.tabbody { |
.tabbody { |
||||||
flex: 1; |
flex: 1; |
||||||
overflow-y: auto; |
overflow-y: auto; |
||||||
color: #000; |
color: #000; |
||||||
box-sizing: border-box; |
box-sizing: border-box; |
||||||
padding: 18px; |
padding: 18px; |
||||||
|
|
||||||
.card { |
.card { |
||||||
color: #303133; |
color: #303133; |
||||||
width: 100%; |
width: 100%; |
||||||
height: 70px; |
height: 70px; |
||||||
border-radius: 4px 4px 4px 4px; |
border-radius: 4px 4px 4px 4px; |
||||||
opacity: 1; |
opacity: 1; |
||||||
display: flex; |
display: flex; |
||||||
margin-bottom: 18px; |
margin-bottom: 18px; |
||||||
box-sizing: border-box; |
box-sizing: border-box; |
||||||
padding: 0 20px; |
padding: 0 20px; |
||||||
position: relative; |
position: relative; |
||||||
|
|
||||||
div { |
div { |
||||||
display: flex; |
display: flex; |
||||||
align-items: center; |
align-items: center; |
||||||
|
|
||||||
img { |
img { |
||||||
margin-top: -3px; |
margin-top: -3px; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.unitname { |
.unitname { |
||||||
flex: 3; |
flex: 3; |
||||||
} |
} |
||||||
|
|
||||||
.info { |
.info { |
||||||
flex: 6; |
flex: 6; |
||||||
|
|
||||||
span { |
span { |
||||||
margin-right: 20px; |
margin-right: 20px; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.btn { |
.btn { |
||||||
flex: 1; |
flex: 1; |
||||||
|
|
||||||
button:nth-child(1) { |
button:nth-child(1) { |
||||||
background: #42B983; |
background: #42B983; |
||||||
color: white; |
color: white; |
||||||
} |
} |
||||||
|
|
||||||
button:nth-child(2) { |
button:nth-child(2) { |
||||||
background: #FF0000; |
background: #FF0000; |
||||||
color: white; |
color: white; |
||||||
margin-left: 20px; |
margin-left: 20px; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.auditimg { |
.auditimg { |
||||||
position: absolute; |
position: absolute; |
||||||
right: 18%; |
right: 18%; |
||||||
top: 9%; |
top: 9%; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.greencard { |
.greencard { |
||||||
background: rgba(66, 185, 131, 0.0400); |
background: rgba(66, 185, 131, 0.0400); |
||||||
border: 1px solid rgba(66, 185, 131, 0.1600); |
border: 1px solid rgba(66, 185, 131, 0.1600); |
||||||
} |
} |
||||||
|
|
||||||
.redcard { |
.redcard { |
||||||
background: rgba(255, 0, 0, 0.0200); |
background: rgba(255, 0, 0, 0.0200); |
||||||
border: 1px solid rgba(255, 0, 0, 0.1000); |
border: 1px solid rgba(255, 0, 0, 0.1000); |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,239 +1,239 @@ |
|||||||
import { HttpClient } from '@angular/common/http'; |
import { HttpClient } from '@angular/common/http'; |
||||||
import { Component, OnInit, ViewContainerRef } from '@angular/core'; |
import { Component, OnInit, ViewContainerRef } from '@angular/core'; |
||||||
import { NzMessageService } from 'ng-zorro-antd/message'; |
import { NzMessageService } from 'ng-zorro-antd/message'; |
||||||
import { NzModalService } from 'ng-zorro-antd/modal'; |
import { NzModalService } from 'ng-zorro-antd/modal'; |
||||||
import { AllotPersonComponent } from './allot-person/allot-person.component'; |
import { AllotPersonComponent } from './allot-person/allot-person.component'; |
||||||
|
|
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-da-subordinate-audit', |
selector: 'app-da-subordinate-audit', |
||||||
templateUrl: './da-subordinate-audit.component.html', |
templateUrl: './da-subordinate-audit.component.html', |
||||||
styleUrls: ['./da-subordinate-audit.component.scss'] |
styleUrls: ['./da-subordinate-audit.component.scss'] |
||||||
}) |
}) |
||||||
export class DaSubordinateAuditComponent implements OnInit { |
export class DaSubordinateAuditComponent implements OnInit { |
||||||
|
|
||||||
constructor(private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { } |
constructor(private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { } |
||||||
|
|
||||||
OrganizationId |
OrganizationId |
||||||
selectedTab = 0 |
selectedTab = 0 |
||||||
|
|
||||||
atPresentData = { id: 0, name: '', finished: 0, totalCount: 0, list: [] } |
atPresentData = { id: 0, name: '', finished: 0, totalCount: 0, list: [] } |
||||||
|
|
||||||
selectTab(item) { |
selectTab(item) { |
||||||
this.selectedTab = item.id |
this.selectedTab = item.id |
||||||
this.atPresentData = item |
this.atPresentData = item |
||||||
} |
} |
||||||
ngOnInit(): void { |
ngOnInit(): void { |
||||||
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId |
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId |
||||||
this.selectedMonth = new Date().getMonth() + 1 |
this.selectedMonth = new Date().getMonth() + 1 |
||||||
|
|
||||||
this.getTaskList(0) |
this.getTaskList(0) |
||||||
|
|
||||||
|
|
||||||
//获得主协调查人员
|
//获得主协调查人员
|
||||||
this.getSupervisor('main') |
this.getSupervisor('main') |
||||||
this.getSupervisor('assisted') |
this.getSupervisor('assisted') |
||||||
|
|
||||||
|
|
||||||
} |
} |
||||||
months = [ |
months = [ |
||||||
{ id: 1, name: '1月', isable: true }, |
{ id: 1, name: '1月', isable: true }, |
||||||
{ id: 2, name: '2月', isable: true }, |
{ id: 2, name: '2月', isable: true }, |
||||||
{ id: 3, name: '3月', isable: true }, |
{ id: 3, name: '3月', isable: true }, |
||||||
{ id: 4, name: '4月', isable: true }, |
{ id: 4, name: '4月', isable: true }, |
||||||
{ id: 5, name: '5月', isable: true }, |
{ id: 5, name: '5月', isable: true }, |
||||||
{ id: 6, name: '6月', isable: true }, |
{ id: 6, name: '6月', isable: true }, |
||||||
{ id: 7, name: '7月', isable: true }, |
{ id: 7, name: '7月', isable: true }, |
||||||
{ id: 8, name: '8月', isable: true }, |
{ id: 8, name: '8月', isable: true }, |
||||||
{ id: 9, name: '9月', isable: true }, |
{ id: 9, name: '9月', isable: true }, |
||||||
{ id: 10, name: '10月', isable: true }, |
{ id: 10, name: '10月', isable: true }, |
||||||
{ id: 11, name: '11月', isable: true }, |
{ id: 11, name: '11月', isable: true }, |
||||||
{ id: 12, name: '12月', isable: true } |
{ id: 12, name: '12月', isable: true } |
||||||
] |
] |
||||||
selectedMonth |
selectedMonth |
||||||
selectedYear = 2022 |
selectedYear = 2022 |
||||||
selectedTime |
selectedTime |
||||||
selectMonth(item) { |
selectMonth(item) { |
||||||
this.selectedMonth = item.id |
this.selectedMonth = item.id |
||||||
|
|
||||||
this.getTaskList(this.selectedTab) |
this.getTaskList(this.selectedTab) |
||||||
} |
} |
||||||
selectYear(e) { |
selectYear(e) { |
||||||
this.selectedYear = e |
this.selectedYear = e |
||||||
console.log('年', e) |
console.log('年', e) |
||||||
this.getTaskList(this.selectedTab) |
this.getTaskList(this.selectedTab) |
||||||
} |
} |
||||||
|
|
||||||
PageNumber = 1 |
PageNumber = 1 |
||||||
PageSize = 9999 |
PageSize = 9999 |
||||||
|
|
||||||
data = [ |
data = [ |
||||||
{ id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [] }, |
{ id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [] }, |
||||||
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] } |
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] } |
||||||
] |
] |
||||||
|
|
||||||
isloading = false |
isloading = false |
||||||
getTaskList(index) { |
getTaskList(index) { |
||||||
this.isloading = true |
this.isloading = true |
||||||
this.data = [ |
this.data = [ |
||||||
{ id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [] }, |
{ id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [] }, |
||||||
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] } |
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] } |
||||||
] |
] |
||||||
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' |
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' |
||||||
console.log('查询时间', selectedTime) |
console.log('查询时间', selectedTime) |
||||||
let params = { |
let params = { |
||||||
Month: selectedTime, |
Month: selectedTime, |
||||||
OrganizationId: this.OrganizationId, |
OrganizationId: this.OrganizationId, |
||||||
PageNumber: this.PageNumber, |
PageNumber: this.PageNumber, |
||||||
PageSize: this.PageSize |
PageSize: this.PageSize |
||||||
} |
} |
||||||
this.http.get('/api/PlanTasks', { |
this.http.get('/api/PlanTasks', { |
||||||
params: params |
params: params |
||||||
}).subscribe((data: any) => { |
}).subscribe((data: any) => { |
||||||
let arr1 = [] |
let arr1 = [] |
||||||
let arr2 = [] |
let arr2 = [] |
||||||
data.items.forEach(element => { |
data.items.forEach(element => { |
||||||
if (element.taskName == '熟悉演练') { |
if (element.taskName == '熟悉演练') { |
||||||
arr1.push(element) |
arr1.push(element) |
||||||
} |
} |
||||||
if (element.taskName == '联络指导') { |
if (element.taskName == '联络指导') { |
||||||
arr2.push(element) |
arr2.push(element) |
||||||
} |
} |
||||||
}); |
}); |
||||||
arr1.forEach(item => { |
arr1.forEach(item => { |
||||||
if (!!item.approvalStatus) { |
if (!!item.approvalStatus) { |
||||||
this.data[0].finished += 1 |
this.data[0].finished += 1 |
||||||
} |
} |
||||||
}); |
}); |
||||||
arr2.forEach(item => { |
arr2.forEach(item => { |
||||||
if (!!item.approvalStatus) { |
if (!!item.approvalStatus) { |
||||||
this.data[1].finished += 1 |
this.data[1].finished += 1 |
||||||
} |
} |
||||||
}); |
}); |
||||||
this.data[0].totalCount = arr1.length |
this.data[0].totalCount = arr1.length |
||||||
this.data[0].list = [...arr1] |
this.data[0].list = [...arr1] |
||||||
this.data[1].totalCount = arr2.length |
this.data[1].totalCount = arr2.length |
||||||
this.data[1].list = [...arr2] |
this.data[1].list = [...arr2] |
||||||
|
|
||||||
this.atPresentData = this.data[index] |
this.atPresentData = this.data[index] |
||||||
console.log(this.atPresentData) |
console.log(this.atPresentData) |
||||||
this.isloading = false |
this.isloading = false |
||||||
}) |
}) |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
assitantsupervisorList |
assitantsupervisorList |
||||||
mainsupervisorList |
mainsupervisorList |
||||||
getSupervisor(type) { |
getSupervisor(type) { |
||||||
let params = { |
let params = { |
||||||
inspectorType: type |
inspectorType: type |
||||||
} |
} |
||||||
this.http.get('/api/Users/Inspectors', { |
this.http.get('/api/Users/Inspectors', { |
||||||
params: params |
params: params |
||||||
}).subscribe((data: any) => { |
}).subscribe((data: any) => { |
||||||
console.log('检查员列表', data) |
console.log('检查员列表', data) |
||||||
if (type == 'main') { |
if (type == 'main') { |
||||||
this.mainsupervisorList = data |
this.mainsupervisorList = data |
||||||
} else { |
} else { |
||||||
this.assitantsupervisorList = data |
this.assitantsupervisorList = data |
||||||
} |
} |
||||||
}) |
}) |
||||||
} |
} |
||||||
|
|
||||||
allot(item) { |
allot(item) { |
||||||
console.log(item) |
console.log(item) |
||||||
if (this.mainsupervisorList.length == 0 || this.assitantsupervisorList.length == 0) { |
if (this.mainsupervisorList.length == 0 || this.assitantsupervisorList.length == 0) { |
||||||
this.message.create('warning', '请从用户管理添加检查人员'); |
this.message.create('warning', '请从用户管理添加检查人员'); |
||||||
return |
return |
||||||
} |
} |
||||||
const modal = this.modal.create({ |
const modal = this.modal.create({ |
||||||
nzTitle: '分配监督检查员', |
nzTitle: '分配监督检查员', |
||||||
nzContent: AllotPersonComponent, |
nzContent: AllotPersonComponent, |
||||||
nzViewContainerRef: this.viewContainerRef, |
nzViewContainerRef: this.viewContainerRef, |
||||||
nzWidth: 485, |
nzWidth: 485, |
||||||
nzMaskClosable: false, |
nzMaskClosable: false, |
||||||
nzComponentParams: { |
nzComponentParams: { |
||||||
mainsupervisorList: this.mainsupervisorList, |
mainsupervisorList: this.mainsupervisorList, |
||||||
assitantsupervisorList: this.assitantsupervisorList |
assitantsupervisorList: this.assitantsupervisorList |
||||||
}, |
}, |
||||||
nzOnOk: async () => { |
nzOnOk: async () => { |
||||||
if (instance.validateForm.valid) { |
if (instance.validateForm.valid) { |
||||||
await new Promise((resolve, reject) => { |
await new Promise((resolve, reject) => { |
||||||
let body = { |
let body = { |
||||||
mainSupervisorId: instance.validateForm.value.main, |
mainSupervisorId: instance.validateForm.value.main, |
||||||
assitantSupervisorId: instance.validateForm.value.assitant |
assitantSupervisorId: instance.validateForm.value.assitant |
||||||
} |
} |
||||||
this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({ |
this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({ |
||||||
next: async (data) => { |
next: async (data) => { |
||||||
this.message.create('success', '分配成功'); |
this.message.create('success', '分配成功'); |
||||||
resolve(data) |
resolve(data) |
||||||
this.getTaskList(this.selectedTab) |
this.getTaskList(this.selectedTab) |
||||||
return true |
return true |
||||||
}, |
}, |
||||||
error: (err) => { |
error: (err) => { |
||||||
this.message.create('warning', '分配失败'); |
this.message.create('warning', '分配失败'); |
||||||
reject(err) |
reject(err) |
||||||
return false |
return false |
||||||
} |
} |
||||||
}) |
}) |
||||||
}) |
}) |
||||||
} else { |
} else { |
||||||
this.message.create('warning', '请填写完整!'); |
this.message.create('warning', '请填写完整!'); |
||||||
return false |
return false |
||||||
} |
} |
||||||
} |
} |
||||||
}); |
}); |
||||||
const instance = modal.getContentComponent(); |
const instance = modal.getContentComponent(); |
||||||
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); |
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); |
||||||
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); |
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); |
||||||
} |
} |
||||||
|
|
||||||
agree(item) { |
agree(item) { |
||||||
this.modal.confirm({ |
this.modal.confirm({ |
||||||
nzTitle: `确定要同意该申请吗?`, |
nzTitle: `确定要同意该申请吗?`, |
||||||
nzOkText: '确定', |
nzOkText: '确定', |
||||||
nzOkType: 'default', |
nzOkType: 'default', |
||||||
nzOnOk: () => { |
nzOnOk: () => { |
||||||
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, { |
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, { |
||||||
params: { |
params: { |
||||||
approvalStatus: 'approved' |
approvalStatus: 'approved' |
||||||
} |
} |
||||||
}).subscribe({ |
}).subscribe({ |
||||||
next: (data) => { |
next: (data) => { |
||||||
this.message.create('success', '审核成功'); |
this.message.create('success', '审核成功'); |
||||||
this.getTaskList(this.selectedTab) |
this.getTaskList(this.selectedTab) |
||||||
}, |
}, |
||||||
error: (err) => { |
error: (err) => { |
||||||
this.message.create('warning', '审核失败'); |
this.message.create('warning', '审核失败'); |
||||||
} |
} |
||||||
}) |
}) |
||||||
}, |
}, |
||||||
nzCancelText: '取消' |
nzCancelText: '取消' |
||||||
}); |
}); |
||||||
} |
} |
||||||
|
|
||||||
reject(item) { |
reject(item) { |
||||||
this.modal.confirm({ |
this.modal.confirm({ |
||||||
nzTitle: `确定要驳回该申请吗?`, |
nzTitle: `确定要驳回该申请吗?`, |
||||||
nzOkText: '确定', |
nzOkText: '确定', |
||||||
nzOkType: 'default', |
nzOkType: 'default', |
||||||
nzOnOk: () => { |
nzOnOk: () => { |
||||||
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, { |
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, { |
||||||
params: { |
params: { |
||||||
approvalStatus: 'reject' |
approvalStatus: 'reject' |
||||||
} |
} |
||||||
}).subscribe({ |
}).subscribe({ |
||||||
next: (data) => { |
next: (data) => { |
||||||
this.message.create('success', '审核成功'); |
this.message.create('success', '审核成功'); |
||||||
this.getTaskList(this.selectedTab) |
this.getTaskList(this.selectedTab) |
||||||
}, |
}, |
||||||
error: (err) => { |
error: (err) => { |
||||||
this.message.create('warning', '审核失败'); |
this.message.create('warning', '审核失败'); |
||||||
} |
} |
||||||
}) |
}) |
||||||
}, |
}, |
||||||
nzCancelText: '取消' |
nzCancelText: '取消' |
||||||
}); |
}); |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
|
@ -1,111 +1,111 @@ |
|||||||
<!-- <p>任务申请</p> --> |
<!-- <p>任务申请</p> --> |
||||||
<div class="box"> |
<div class="box"> |
||||||
|
|
||||||
<div class="fffbox"> |
<div class="fffbox"> |
||||||
<div class="header"> |
<div class="header"> |
||||||
<span> |
<span> |
||||||
任务申请 |
任务申请 |
||||||
</span> |
</span> |
||||||
<span style="font-size: 14px; color: #42B983;"> |
<span style="font-size: 14px; color: #42B983;"> |
||||||
<i nz-icon nzType="info-circle" nzTheme="outline"></i> |
<i nz-icon nzType="info-circle" nzTheme="outline"></i> |
||||||
任务申请已开始!剩余时间 3天13小时 / 生成周计划已开始!剩余时间 23:54:03 |
任务申请已开始!剩余时间 3天13小时 / 生成周计划已开始!剩余时间 23:54:03 |
||||||
</span> |
</span> |
||||||
</div> |
</div> |
||||||
<div class="searchbox"> |
<div class="searchbox"> |
||||||
<div class="search"> |
<div class="search"> |
||||||
<nz-select nzPlaceHolder="任务名称" [(ngModel)]="searchForm.taskname"> |
<nz-select nzPlaceHolder="任务名称" [(ngModel)]="searchForm.taskname"> |
||||||
<nz-option nzValue="监督检查" nzLabel="监督检查"></nz-option> |
<nz-option nzValue="监督检查" nzLabel="监督检查"></nz-option> |
||||||
<nz-option nzValue="熟悉演练" nzLabel="熟悉演练"></nz-option> |
<nz-option nzValue="熟悉演练" nzLabel="熟悉演练"></nz-option> |
||||||
</nz-select> |
</nz-select> |
||||||
<input type="text" nz-input placeholder="单位名称" [(ngModel)]="searchForm.unitname" /> |
<input type="text" nz-input placeholder="单位名称" [(ngModel)]="searchForm.unitname" /> |
||||||
<!-- <nz-select nzPlaceHolder="单位级别" [(ngModel)]="searchForm.unitlevel"> |
<!-- <nz-select nzPlaceHolder="单位级别" [(ngModel)]="searchForm.unitlevel"> |
||||||
<nz-option nzValue="一般单位" nzLabel="一般单位"></nz-option> |
<nz-option nzValue="一般单位" nzLabel="一般单位"></nz-option> |
||||||
<nz-option nzValue="重点单位" nzLabel="重点单位"></nz-option> |
<nz-option nzValue="重点单位" nzLabel="重点单位"></nz-option> |
||||||
</nz-select> --> |
</nz-select> --> |
||||||
<nz-tree-select [nzExpandedKeys]="expandKeys" [nzNodes]="nodes" nzShowSearch nzPlaceHolder="协助机构" |
<nz-tree-select [nzExpandedKeys]="expandKeys" [nzNodes]="nodes" nzShowSearch nzPlaceHolder="协助机构" |
||||||
[(ngModel)]="searchForm.or" [nzExpandedIcon]="multiExpandedIconTpl" |
[(ngModel)]="searchForm.or" [nzExpandedIcon]="multiExpandedIconTpl" |
||||||
[nzDropdownClassName]="'maxHeightTreeSelect'" [nzAllowClear]="false"></nz-tree-select> |
[nzDropdownClassName]="'maxHeightTreeSelect'" [nzAllowClear]="false"></nz-tree-select> |
||||||
<ng-template #multiExpandedIconTpl let-node let-origin="origin"> |
<ng-template #multiExpandedIconTpl let-node let-origin="origin"> |
||||||
<ng-container *ngIf="node.children.length == 0; else elseTemplate"> |
<ng-container *ngIf="node.children.length == 0; else elseTemplate"> |
||||||
</ng-container> |
</ng-container> |
||||||
<ng-template #elseTemplate> |
<ng-template #elseTemplate> |
||||||
<i nz-icon [nzType]="node.isExpanded ? 'caret-down' : 'caret-right'" |
<i nz-icon [nzType]="node.isExpanded ? 'caret-down' : 'caret-right'" |
||||||
class="ant-tree-switcher-line-icon"></i> |
class="ant-tree-switcher-line-icon"></i> |
||||||
</ng-template> |
</ng-template> |
||||||
</ng-template> |
</ng-template> |
||||||
<button (click)="search()" nz-button nzType="primary"><i nz-icon nzType="search" |
<button (click)="search()" nz-button nzType="primary"><i nz-icon nzType="search" |
||||||
nzTheme="outline"></i>查询</button> |
nzTheme="outline"></i>查询</button> |
||||||
<button (click)="reset()" nz-button nzType="default"><i nz-icon nzType="reload" |
<button (click)="reset()" nz-button nzType="default"><i nz-icon nzType="reload" |
||||||
nzTheme="outline"></i>重置</button> |
nzTheme="outline"></i>重置</button> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="content"> |
<div class="content"> |
||||||
<div class="applybtn"> |
<div class="applybtn"> |
||||||
<button (click)="apply()" nz-button nzType="primary"><i nz-icon nzType="form" |
<button (click)="apply()" nz-button nzType="primary"><i nz-icon nzType="form" |
||||||
nzTheme="outline"></i>申请</button> |
nzTheme="outline"></i>申请</button> |
||||||
</div> |
</div> |
||||||
<div class="tablebox"> |
<div class="tablebox"> |
||||||
<nz-table nzBordered #basicTable [nzLoading]="nzLoading" [nzData]="taskLIst" [nzShowPagination]='false' |
<nz-table nzBordered #basicTable [nzLoading]="nzLoading" [nzData]="taskLIst" [nzShowPagination]='false' |
||||||
[nzPageSize]='10'> |
[nzPageSize]='10'> |
||||||
<thead> |
<thead> |
||||||
<tr> |
<tr> |
||||||
<th [width]="'15%'">任务名称</th> |
<th [width]="'15%'">任务名称</th> |
||||||
<th [width]="'20%'">单位名称</th> |
<th [width]="'20%'">单位名称</th> |
||||||
<!-- <th>单位级别</th> --> |
<!-- <th>单位级别</th> --> |
||||||
<th>协助机构</th> |
<th>协助机构</th> |
||||||
<th>时间</th> |
<th>时间</th> |
||||||
<th>申请结果</th> |
<th>申请结果</th> |
||||||
<th>检查结果</th> |
<th>检查结果</th> |
||||||
<th [width]="'8%'">操作</th> |
<th [width]="'8%'">操作</th> |
||||||
</tr> |
</tr> |
||||||
</thead> |
</thead> |
||||||
<tbody> |
<tbody> |
||||||
<tr *ngFor="let item of basicTable.data"> |
<tr *ngFor="let item of basicTable.data"> |
||||||
<td> |
<td> |
||||||
{{item.taskName}} |
{{item.taskName}} |
||||||
</td> |
</td> |
||||||
<td nzBreakWord> |
<td nzBreakWord> |
||||||
{{item.company.companyName}} |
{{item.company.companyName}} |
||||||
</td> |
</td> |
||||||
<!-- <td> |
<!-- <td> |
||||||
一般单位 |
一般单位 |
||||||
</td> --> |
</td> --> |
||||||
<td> |
<td> |
||||||
{{item.assitantOrganization.name}} |
{{item.assitantOrganization.name}} |
||||||
</td> |
</td> |
||||||
<td> |
<td> |
||||||
{{item.creationTime | date:"yyyy-MM-dd hh:mm:ss"}} |
{{item.creationTime | date:"yyyy-MM-dd hh:mm:ss"}} |
||||||
</td> |
</td> |
||||||
<td> |
<td> |
||||||
<ng-container *ngIf="item.approvalStatus; else elseTemplate"> |
<ng-container *ngIf="item.approvalStatus; else elseTemplate"> |
||||||
<ng-container *ngIf="item.approvalStatus == 'reject'; else elseTemplate2"> |
<ng-container *ngIf="item.approvalStatus == 'reject'; else elseTemplate2"> |
||||||
<span class="green">审核驳回</span> |
<span class="green">审核驳回</span> |
||||||
</ng-container> |
</ng-container> |
||||||
<ng-template #elseTemplate2> |
<ng-template #elseTemplate2> |
||||||
<span class="red">审核通过</span> |
<span class="red">审核通过</span> |
||||||
</ng-template> |
</ng-template> |
||||||
</ng-container> |
</ng-container> |
||||||
<ng-template #elseTemplate> |
<ng-template #elseTemplate> |
||||||
未审核 |
未审核 |
||||||
</ng-template> |
</ng-template> |
||||||
</td> |
</td> |
||||||
<td> |
<td> |
||||||
/ |
/ |
||||||
</td> |
</td> |
||||||
<td class="operation"> |
<td class="operation"> |
||||||
<a class="blue" (click)="look(item)">查看</a> |
<a class="blue" (click)="look(item)">查看</a> |
||||||
</td> |
</td> |
||||||
</tr> |
</tr> |
||||||
</tbody> |
</tbody> |
||||||
</nz-table> |
</nz-table> |
||||||
</div> |
</div> |
||||||
<div class="pagination"> |
<div class="pagination"> |
||||||
<nz-pagination [nzHideOnSinglePage]="false" [nzPageIndex]="1" [nzTotal]="totalCount" [nzPageSize]="10" |
<nz-pagination [nzHideOnSinglePage]="false" [nzPageIndex]="1" [nzTotal]="totalCount" [nzPageSize]="10" |
||||||
[nzShowTotal]="totalTemplate" nzShowQuickJumper (nzPageIndexChange)="pageChange($event)"> |
[nzShowTotal]="totalTemplate" nzShowQuickJumper (nzPageIndexChange)="pageChange($event)"> |
||||||
</nz-pagination> |
</nz-pagination> |
||||||
<ng-template #totalTemplate let-total> 10条/页,共{{totalCount}}条 </ng-template> |
<ng-template #totalTemplate let-total> 10条/页,共{{totalCount}}条 </ng-template> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
@ -1,198 +1,198 @@ |
|||||||
import { Component, OnInit, TemplateRef, ViewContainerRef } from '@angular/core'; |
import { Component, OnInit, TemplateRef, ViewContainerRef } from '@angular/core'; |
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
||||||
import { NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree'; |
import { NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree'; |
||||||
import { NzModalService } from 'ng-zorro-antd/modal'; |
import { NzModalService } from 'ng-zorro-antd/modal'; |
||||||
import { NzMessageService } from 'ng-zorro-antd/message'; |
import { NzMessageService } from 'ng-zorro-antd/message'; |
||||||
import { HttpClient } from '@angular/common/http'; |
import { HttpClient } from '@angular/common/http'; |
||||||
import { TreeService } from 'src/app/service/tree.service'; |
import { TreeService } from 'src/app/service/tree.service'; |
||||||
import { ApplyComponent } from './apply/apply.component'; |
import { ApplyComponent } from './apply/apply.component'; |
||||||
import { ApplyLookComponent } from './apply-look/apply-look.component'; |
import { ApplyLookComponent } from './apply-look/apply-look.component'; |
||||||
|
|
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-station-task-apply', |
selector: 'app-station-task-apply', |
||||||
templateUrl: './station-task-apply.component.html', |
templateUrl: './station-task-apply.component.html', |
||||||
styleUrls: ['./station-task-apply.component.scss'] |
styleUrls: ['./station-task-apply.component.scss'] |
||||||
}) |
}) |
||||||
export class StationTaskApplyComponent implements OnInit { |
export class StationTaskApplyComponent implements OnInit { |
||||||
|
|
||||||
validateForm!: FormGroup; |
validateForm!: FormGroup; |
||||||
constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService) { } |
constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService) { } |
||||||
searchForm = { |
searchForm = { |
||||||
taskname: '', |
taskname: '', |
||||||
unitname: '', |
unitname: '', |
||||||
unitlevel: '', |
unitlevel: '', |
||||||
or: '' |
or: '' |
||||||
} |
} |
||||||
OrganizationId |
OrganizationId |
||||||
ngOnInit(): void { |
ngOnInit(): void { |
||||||
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId |
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId |
||||||
this.getAllOrganization() |
this.getAllOrganization() |
||||||
this.getTaskList() |
this.getTaskList() |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
cancel(item, type) { |
cancel(item, type) { |
||||||
|
|
||||||
} |
} |
||||||
delete(item) { |
delete(item) { |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
nzLoading = false |
nzLoading = false |
||||||
totalCount |
totalCount |
||||||
PageNumber = 1 |
PageNumber = 1 |
||||||
PageSize = 10 |
PageSize = 10 |
||||||
taskLIst = [] |
taskLIst = [] |
||||||
getTaskList() { |
getTaskList() { |
||||||
this.nzLoading = true |
this.nzLoading = true |
||||||
let params = { |
let params = { |
||||||
OrganizationId: this.OrganizationId, |
OrganizationId: this.OrganizationId, |
||||||
TaskName: this.searchForm.taskname, |
TaskName: this.searchForm.taskname, |
||||||
CompanyName: this.searchForm.unitname, |
CompanyName: this.searchForm.unitname, |
||||||
AssitantOrganizationId: this.searchForm.or, |
AssitantOrganizationId: this.searchForm.or, |
||||||
PageNumber: this.PageNumber, |
PageNumber: this.PageNumber, |
||||||
PageSize: this.PageSize |
PageSize: this.PageSize |
||||||
} |
} |
||||||
this.http.get('/api/PlanTasks', { |
this.http.get('/api/PlanTasks', { |
||||||
params: params |
params: params |
||||||
}).subscribe((data: any) => { |
}).subscribe((data: any) => { |
||||||
this.nzLoading = false |
this.nzLoading = false |
||||||
console.log('任务申请列表', data); |
console.log('任务申请列表', data); |
||||||
this.totalCount = data.totalCount |
this.totalCount = data.totalCount |
||||||
this.taskLIst = [...data.items] |
this.taskLIst = [...data.items] |
||||||
}) |
}) |
||||||
} |
} |
||||||
pageChange($event) { |
pageChange($event) { |
||||||
this.PageNumber = $event |
this.PageNumber = $event |
||||||
this.getTaskList() |
this.getTaskList() |
||||||
} |
} |
||||||
search() { |
search() { |
||||||
this.PageNumber = 1 |
this.PageNumber = 1 |
||||||
this.getTaskList() |
this.getTaskList() |
||||||
} |
} |
||||||
reset() { |
reset() { |
||||||
this.PageNumber = 1 |
this.PageNumber = 1 |
||||||
this.searchForm = { |
this.searchForm = { |
||||||
taskname: '', |
taskname: '', |
||||||
unitname: '', |
unitname: '', |
||||||
unitlevel: '', |
unitlevel: '', |
||||||
or: '' |
or: '' |
||||||
} |
} |
||||||
this.getTaskList() |
this.getTaskList() |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
expandKeys |
expandKeys |
||||||
defaultOrId: string |
defaultOrId: string |
||||||
//获取所有组织机构
|
//获取所有组织机构
|
||||||
nodes: any = [] |
nodes: any = [] |
||||||
getAllOrganization() { |
getAllOrganization() { |
||||||
let params = { |
let params = { |
||||||
PageNumber: 1, |
PageNumber: 1, |
||||||
PageSize: 9999 |
PageSize: 9999 |
||||||
} |
} |
||||||
this.http.get('/api/Organizations', { |
this.http.get('/api/Organizations', { |
||||||
params: params |
params: params |
||||||
}).subscribe((data: any) => { |
}).subscribe((data: any) => { |
||||||
data.items.forEach(element => { |
data.items.forEach(element => { |
||||||
element.key = element.id |
element.key = element.id |
||||||
element.title = element.name |
element.title = element.name |
||||||
}); |
}); |
||||||
this.nodes = [...this.toTree.toTree(data.items)] |
this.nodes = [...this.toTree.toTree(data.items)] |
||||||
}) |
}) |
||||||
} |
} |
||||||
|
|
||||||
apply() { |
apply() { |
||||||
if (this.nodes.length == 0) { |
if (this.nodes.length == 0) { |
||||||
this.message.create('warning', '组织机构初始化中,请稍后重试'); |
this.message.create('warning', '组织机构初始化中,请稍后重试'); |
||||||
return |
return |
||||||
} |
} |
||||||
const modal = this.modal.create({ |
const modal = this.modal.create({ |
||||||
nzTitle: '申请', |
nzTitle: '申请', |
||||||
nzContent: ApplyComponent, |
nzContent: ApplyComponent, |
||||||
nzViewContainerRef: this.viewContainerRef, |
nzViewContainerRef: this.viewContainerRef, |
||||||
nzWidth: 660, |
nzWidth: 660, |
||||||
nzMaskClosable: false, |
nzMaskClosable: false, |
||||||
nzComponentParams: { |
nzComponentParams: { |
||||||
title: "熟悉演练", |
title: "熟悉演练", |
||||||
nodes: this.nodes, |
nodes: this.nodes, |
||||||
}, |
}, |
||||||
nzOnOk: async () => { |
nzOnOk: async () => { |
||||||
if (instance.validateForm.valid) { |
if (instance.validateForm.valid) { |
||||||
await new Promise((resolve, reject) => { |
await new Promise((resolve, reject) => { |
||||||
let body = { |
let body = { |
||||||
organizationId: this.OrganizationId, |
organizationId: this.OrganizationId, |
||||||
taskName: "联络指导", |
taskName: "联络指导", |
||||||
companyId: instance.validateForm.value.unitname, |
companyId: instance.validateForm.value.unitname, |
||||||
assitantOrganizationId: instance.validateForm.value.organization, |
assitantOrganizationId: instance.validateForm.value.organization, |
||||||
} |
} |
||||||
this.http.post('/api/PlanTasks', body).subscribe({ |
this.http.post('/api/PlanTasks', body).subscribe({ |
||||||
next: (data) => { |
next: (data) => { |
||||||
this.message.create('success', '创建成功'); |
this.message.create('success', '创建成功'); |
||||||
resolve(data) |
resolve(data) |
||||||
this.getTaskList() |
this.getTaskList() |
||||||
return true |
return true |
||||||
}, |
}, |
||||||
error: (err) => { |
error: (err) => { |
||||||
this.message.create('warning', '创建失败'); |
this.message.create('warning', '创建失败'); |
||||||
reject(err) |
reject(err) |
||||||
return false |
return false |
||||||
} |
} |
||||||
}) |
}) |
||||||
}) |
}) |
||||||
} else { |
} else { |
||||||
this.message.create('warning', '请填写完整!'); |
this.message.create('warning', '请填写完整!'); |
||||||
return false |
return false |
||||||
} |
} |
||||||
} |
} |
||||||
}); |
}); |
||||||
const instance = modal.getContentComponent(); |
const instance = modal.getContentComponent(); |
||||||
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); |
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); |
||||||
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); |
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); |
||||||
} |
} |
||||||
look(item) { |
look(item) { |
||||||
const modal = this.modal.create({ |
const modal = this.modal.create({ |
||||||
nzTitle: '详情', |
nzTitle: '详情', |
||||||
nzContent: ApplyLookComponent, |
nzContent: ApplyLookComponent, |
||||||
nzViewContainerRef: this.viewContainerRef, |
nzViewContainerRef: this.viewContainerRef, |
||||||
nzWidth: 660, |
nzWidth: 660, |
||||||
nzMaskClosable: false, |
nzMaskClosable: false, |
||||||
nzComponentParams: { |
nzComponentParams: { |
||||||
data: item, |
data: item, |
||||||
}, |
}, |
||||||
nzFooter: null, |
nzFooter: null, |
||||||
nzOnOk: async () => { |
nzOnOk: async () => { |
||||||
if (instance.validateForm.valid) { |
if (instance.validateForm.valid) { |
||||||
await new Promise(resolve => { |
await new Promise(resolve => { |
||||||
let roleNames = [...instance.validateForm.value.role, ...instance.validateForm.value.role2] |
let roleNames = [...instance.validateForm.value.role, ...instance.validateForm.value.role2] |
||||||
let body = { |
let body = { |
||||||
userName: instance.validateForm.value.account, |
userName: instance.validateForm.value.account, |
||||||
name: instance.validateForm.value.name, |
name: instance.validateForm.value.name, |
||||||
organizationUnitId: Number(instance.validateForm.value.organization), |
organizationUnitId: Number(instance.validateForm.value.organization), |
||||||
roleNames: roleNames, |
roleNames: roleNames, |
||||||
phoneNumber: instance.validateForm.value.phonenum, |
phoneNumber: instance.validateForm.value.phonenum, |
||||||
isActive: true |
isActive: true |
||||||
} |
} |
||||||
// this.http.post(this.addUrl, body).subscribe(data => {
|
// this.http.post(this.addUrl, body).subscribe(data => {
|
||||||
// resolve(data)
|
// resolve(data)
|
||||||
// this.message.create('success', '创建成功!');
|
// this.message.create('success', '创建成功!');
|
||||||
// this.SkipCount = 0
|
// this.SkipCount = 0
|
||||||
// this.getAllUsers()
|
// this.getAllUsers()
|
||||||
// return true
|
// return true
|
||||||
// }, err => {
|
// }, err => {
|
||||||
// resolve(err)
|
// resolve(err)
|
||||||
// this.message.create('warning', err.error.error.message);
|
// this.message.create('warning', err.error.error.message);
|
||||||
// return false
|
// return false
|
||||||
// })
|
// })
|
||||||
}) |
}) |
||||||
} else { |
} else { |
||||||
this.message.create('warning', '请填写完整!'); |
this.message.create('warning', '请填写完整!'); |
||||||
return false |
return false |
||||||
} |
} |
||||||
} |
} |
||||||
}); |
}); |
||||||
const instance = modal.getContentComponent(); |
const instance = modal.getContentComponent(); |
||||||
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); |
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); |
||||||
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); |
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,47 +1,47 @@ |
|||||||
<div class="box"> |
<div class="box"> |
||||||
<div class="nav"> |
<div class="nav"> |
||||||
<ul *ngIf="level == 'brigade'"> |
<ul *ngIf="level == 'brigade'"> |
||||||
<li [routerLink]="['/task/indicators']" routerLinkActive="router-link-active"> |
<li [routerLink]="['/task/indicators']" routerLinkActive="router-link-active"> |
||||||
<i nz-icon nzType="book" nzTheme="outline"></i> |
<i nz-icon nzType="book" nzTheme="outline"></i> |
||||||
任务指标 |
任务指标 |
||||||
</li> |
</li> |
||||||
<li [routerLink]="['/task/audit']" routerLinkActive="router-link-active"> |
<li [routerLink]="['/task/audit']" routerLinkActive="router-link-active"> |
||||||
<i nz-icon nzType="audit" nzTheme="outline"></i> |
<i nz-icon nzType="audit" nzTheme="outline"></i> |
||||||
工作审批 |
工作审批 |
||||||
</li> |
</li> |
||||||
</ul> |
</ul> |
||||||
<ul *ngIf="level == 'battalion'"> |
<ul *ngIf="level == 'battalion'"> |
||||||
<li [routerLink]="['/task/monthlytaskoverview']" routerLinkActive="router-link-active"> |
<li [routerLink]="['/task/monthlytaskoverview']" routerLinkActive="router-link-active"> |
||||||
<i nz-icon nzType="appstore" nzTheme="outline"></i> |
<i nz-icon nzType="appstore" nzTheme="outline"></i> |
||||||
月度任务总览 |
月度任务总览 |
||||||
</li> |
</li> |
||||||
<li [routerLink]="['/task/subordinateaudit']" routerLinkActive="router-link-active"> |
<li [routerLink]="['/task/subordinateaudit']" routerLinkActive="router-link-active"> |
||||||
<i nz-icon nzType="file-protect" nzTheme="outline"></i> |
<i nz-icon nzType="file-protect" nzTheme="outline"></i> |
||||||
下级任务申请 |
下级任务申请 |
||||||
</li> |
</li> |
||||||
<li [routerLink]="['/task/oneselfplan']" routerLinkActive="router-link-active"> |
<li [routerLink]="['/task/oneselfplan']" routerLinkActive="router-link-active"> |
||||||
<i nz-icon nzType="file-text" nzTheme="outline"></i> |
<i nz-icon nzType="file-text" nzTheme="outline"></i> |
||||||
本级计划 |
本级计划 |
||||||
</li> |
</li> |
||||||
</ul> |
</ul> |
||||||
<ul *ngIf="level == 'squadron'"> |
<ul *ngIf="level == 'squadron'"> |
||||||
<li [routerLink]="['/task/taskexecution']" routerLinkActive="router-link-active"> |
<li [routerLink]="['/task/taskexecution']" routerLinkActive="router-link-active"> |
||||||
<i nz-icon nzType="file-protect" nzTheme="outline"></i> |
<i nz-icon nzType="file-protect" nzTheme="outline"></i> |
||||||
任务执行 |
任务执行 |
||||||
</li> |
</li> |
||||||
<li [routerLink]="['/task/taskapply']" routerLinkActive="router-link-active"> |
<li [routerLink]="['/task/taskapply']" routerLinkActive="router-link-active"> |
||||||
<i nz-icon nzType="file-text" nzTheme="outline"></i> |
<i nz-icon nzType="file-text" nzTheme="outline"></i> |
||||||
任务申请 |
任务申请 |
||||||
</li> |
</li> |
||||||
<li [routerLink]="['/task/weeklyplan']" routerLinkActive="router-link-active"> |
<li [routerLink]="['/task/weeklyplan']" routerLinkActive="router-link-active"> |
||||||
<i nz-icon nzType="container" nzTheme="outline"></i> |
<i nz-icon nzType="container" nzTheme="outline"></i> |
||||||
生成周计划 |
生成周计划 |
||||||
</li> |
</li> |
||||||
</ul> |
</ul> |
||||||
</div> |
</div> |
||||||
<div class="content"> |
<div class="content"> |
||||||
<div class="routerbox"> |
<div class="routerbox"> |
||||||
<router-outlet></router-outlet> |
<router-outlet></router-outlet> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
@ -1,17 +1,27 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from '@angular/core'; |
||||||
import { Router } from '@angular/router'; |
import { Router } from '@angular/router'; |
||||||
|
|
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-task', |
selector: 'app-task', |
||||||
templateUrl: './task.component.html', |
templateUrl: './task.component.html', |
||||||
styleUrls: ['./task.component.scss'] |
styleUrls: ['./task.component.scss'] |
||||||
}) |
}) |
||||||
export class TaskComponent implements OnInit { |
export class TaskComponent implements OnInit { |
||||||
level="" |
level="" |
||||||
constructor(private router: Router) { } |
constructor(private router: Router) { } |
||||||
|
|
||||||
ngOnInit(): void { |
ngOnInit(): void { |
||||||
|
|
||||||
this.level=JSON.parse(sessionStorage.getItem('userData')).organizationLevel |
this.level=JSON.parse(sessionStorage.getItem('userData')).organizationLevel |
||||||
} |
if(this.router.url=="/task"){ |
||||||
} |
if(this.level=="brigade"){ |
||||||
|
this.router.navigate(['/task/indicators']) |
||||||
|
}else if(this.level=="battalion"){ |
||||||
|
this.router.navigate(['/task/monthlytaskoverview']) |
||||||
|
}else if(this.level=="squadron"){ |
||||||
|
this.router.navigate(['/task/taskexecution']) |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
@ -1,83 +1,83 @@ |
|||||||
import { Injectable } from '@angular/core'; |
import { Injectable } from '@angular/core'; |
||||||
import { |
import { |
||||||
HttpClient, HttpInterceptor, HttpHandler, HttpRequest, |
HttpClient, HttpInterceptor, HttpHandler, HttpRequest, |
||||||
HttpErrorResponse |
HttpErrorResponse |
||||||
} from '@angular/common/http'; |
} from '@angular/common/http'; |
||||||
import { throwError } from 'rxjs' |
import { throwError } from 'rxjs' |
||||||
import { catchError } from 'rxjs/operators'; |
import { catchError } from 'rxjs/operators'; |
||||||
import { Router } from '@angular/router' |
import { Router } from '@angular/router' |
||||||
import { CacheTokenService } from '../service/cache-token.service' |
import { CacheTokenService } from '../service/cache-token.service' |
||||||
import { NzMessageService } from 'ng-zorro-antd/message'; |
import { NzMessageService } from 'ng-zorro-antd/message'; |
||||||
//baseurl
|
//baseurl
|
||||||
// const baseurl = 'http://39.106.78.171:8008';
|
// const baseurl = 'http://39.106.78.171:8008';
|
||||||
|
|
||||||
@Injectable() |
@Injectable() |
||||||
export class BaseInterceptor implements HttpInterceptor { |
export class BaseInterceptor implements HttpInterceptor { |
||||||
|
|
||||||
constructor(private router: Router, public token: CacheTokenService, private message: NzMessageService) { } |
constructor(private router: Router, public token: CacheTokenService, private message: NzMessageService) { } |
||||||
|
|
||||||
intercept(req: any, next: HttpHandler) { |
intercept(req: any, next: HttpHandler) { |
||||||
|
|
||||||
let params = req.params; |
let params = req.params; |
||||||
for (const key of req.params.keys()) { |
for (const key of req.params.keys()) { |
||||||
if (params.get(key) === undefined || params.get(key) === null) { |
if (params.get(key) === undefined || params.get(key) === null) { |
||||||
params = params.delete(key, undefined); |
params = params.delete(key, undefined); |
||||||
} |
} |
||||||
} |
} |
||||||
req = req.clone({ params }); |
req = req.clone({ params }); |
||||||
// debugger
|
// debugger
|
||||||
// console.log('xxxxxx',req)
|
// console.log('xxxxxx',req)
|
||||||
let newReq = req.clone({ |
let newReq = req.clone({ |
||||||
url: req.hadBaseurl ? `${req.url}` : `${req.url}`, |
url: req.hadBaseurl ? `${req.url}` : `${req.url}`, |
||||||
}); |
}); |
||||||
if (!req.cancelToken) { |
if (!req.cancelToken) { |
||||||
/*获取token*/ |
/*获取token*/ |
||||||
let token = sessionStorage.getItem('token') |
let token = sessionStorage.getItem('token') |
||||||
/*此处设置额外请求头,token令牌*/ |
/*此处设置额外请求头,token令牌*/ |
||||||
newReq.headers = |
newReq.headers = |
||||||
newReq.headers.set('Authorization', `Bearer ${token}`) |
newReq.headers.set('Authorization', `Bearer ${token}`) |
||||||
} |
} |
||||||
|
|
||||||
// 携带请求头发送下一次请求
|
// 携带请求头发送下一次请求
|
||||||
return next.handle(newReq) |
return next.handle(newReq) |
||||||
.pipe( |
.pipe( |
||||||
//箭头函数,注意this指向
|
//箭头函数,注意this指向
|
||||||
catchError((err) => this.handleError(err)) |
catchError((err) => this.handleError(err)) |
||||||
) |
) |
||||||
} |
} |
||||||
|
|
||||||
// 捕获错误
|
// 捕获错误
|
||||||
//401 token过期 403没权限!!! 400参数错误 404未找到 614刷新令牌过期!!!
|
//401 token过期 403没权限!!! 400参数错误 404未找到 614刷新令牌过期!!!
|
||||||
|
|
||||||
private handleError(error: HttpErrorResponse) { |
private handleError(error: HttpErrorResponse) { |
||||||
console.log('http错误', error) |
console.log('http错误', error) |
||||||
// 用户认证失败返回登录页
|
// 用户认证失败返回登录页
|
||||||
if (error.status === 401) { |
if (error.status === 401) { |
||||||
this.token.delete() |
this.token.delete() |
||||||
sessionStorage.clear() |
sessionStorage.clear() |
||||||
localStorage.removeItem("isautologin") |
localStorage.removeItem("isautologin") |
||||||
this.message.create('error', `认证失败!`); |
this.message.create('error', `认证失败!`); |
||||||
this.router.navigate(['/login']) |
this.router.navigate(['/login']) |
||||||
return |
return |
||||||
} |
} |
||||||
if (error.status === 403) { |
if (error.status === 403) { |
||||||
this.message.create('error', `无权限!`); |
this.message.create('error', `无权限!`); |
||||||
return |
return |
||||||
} |
} |
||||||
if (error.error instanceof ErrorEvent) { |
if (error.error instanceof ErrorEvent) { |
||||||
// 发生客户端或网络错误。相应处理。
|
// 发生客户端或网络错误。相应处理。
|
||||||
console.error('An error occurred:', error.message); |
console.error('An error occurred:', error.message); |
||||||
} else { |
} else { |
||||||
// 服务端返回http状态码
|
// 服务端返回http状态码
|
||||||
// 服务端返回错误信息
|
// 服务端返回错误信息
|
||||||
console.error( |
console.error( |
||||||
`状态码${error.status}, ` + |
`状态码${error.status}, ` + |
||||||
`错误内容:${error.error}`); |
`错误内容:${error.error}`); |
||||||
this.message.create('error', error.error.title); |
this.message.create('error', error.error.title); |
||||||
} |
} |
||||||
// 返回带有面向用户的错误信息
|
// 返回带有面向用户的错误信息
|
||||||
return throwError(() => { |
return throwError(() => { |
||||||
new Error('error') |
new Error('error') |
||||||
}); |
}); |
||||||
}; |
}; |
||||||
} |
} |
||||||
|
@ -1,127 +1,139 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from '@angular/core'; |
||||||
import { HttpClient } from '@angular/common/http' |
import { HttpClient } from '@angular/common/http' |
||||||
import { Router } from '@angular/router' |
import { Router } from '@angular/router' |
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
||||||
import { NzMessageService } from 'ng-zorro-antd/message'; |
import { NzMessageService } from 'ng-zorro-antd/message'; |
||||||
import { Base64 } from 'js-base64'; |
import { Base64 } from 'js-base64'; |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-login', |
selector: 'app-login', |
||||||
templateUrl: './login.component.html', |
templateUrl: './login.component.html', |
||||||
styleUrls: ['./login.component.scss'], |
styleUrls: ['./login.component.scss'], |
||||||
|
|
||||||
}) |
}) |
||||||
export class LoginComponent implements OnInit { |
export class LoginComponent implements OnInit { |
||||||
|
|
||||||
validateForm!: FormGroup; |
validateForm!: FormGroup; |
||||||
constructor(private http: HttpClient, private router: Router, private fb: FormBuilder, private message: NzMessageService) { } |
constructor(private http: HttpClient, private router: Router, private fb: FormBuilder, private message: NzMessageService) { } |
||||||
|
|
||||||
ngOnInit() { |
ngOnInit() { |
||||||
this.validateForm = this.fb.group({ |
this.validateForm = this.fb.group({ |
||||||
userName: [null, [Validators.required]], |
userName: [null, [Validators.required]], |
||||||
password: [null, [Validators.required]], |
password: [null, [Validators.required]], |
||||||
remember: [null], |
remember: [null], |
||||||
autologin: [null], |
autologin: [null], |
||||||
}); |
}); |
||||||
//如果本地储存了账号密码信息,那就回显在输入框
|
//如果本地储存了账号密码信息,那就回显在输入框
|
||||||
let account = localStorage.getItem('account') |
let account = localStorage.getItem('account') |
||||||
let password = localStorage.getItem('password') |
let password = localStorage.getItem('password') |
||||||
if (account && password) { |
if (account && password) { |
||||||
this.validateForm.patchValue({ |
this.validateForm.patchValue({ |
||||||
userName: Base64.decode(localStorage.getItem('account')), |
userName: Base64.decode(localStorage.getItem('account')), |
||||||
password: Base64.decode(localStorage.getItem('password')) |
password: Base64.decode(localStorage.getItem('password')) |
||||||
}); |
}); |
||||||
this.remember = true //这一步是回显后让勾选框为选中状态
|
this.remember = true //这一步是回显后让勾选框为选中状态
|
||||||
} |
} |
||||||
//自动登录
|
//自动登录
|
||||||
if (localStorage.getItem('isautologin') == 'true') { |
if (localStorage.getItem('isautologin') == 'true') { |
||||||
this.submitForm() |
this.submitForm() |
||||||
this.autologin = true //这一步是回显后让勾选框为选中状态
|
this.autologin = true //这一步是回显后让勾选框为选中状态
|
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
errmsg: string = ''; //错误信息
|
errmsg: string = ''; //错误信息
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// //跳转注册页面
|
// //跳转注册页面
|
||||||
// toRegister() {
|
// toRegister() {
|
||||||
// this.router.navigate(['/register'])
|
// this.router.navigate(['/register'])
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
//记住密码
|
//记住密码
|
||||||
rememberInfo() { |
rememberInfo() { |
||||||
// 判断用户是否勾选记住密码,如果勾选,在本地储存中储存登录信息
|
// 判断用户是否勾选记住密码,如果勾选,在本地储存中储存登录信息
|
||||||
if (this.remember) { |
if (this.remember) { |
||||||
localStorage.setItem("account", Base64.encode(this.validateForm.value.userName)) |
localStorage.setItem("account", Base64.encode(this.validateForm.value.userName)) |
||||||
localStorage.setItem("password", Base64.encode(this.validateForm.value.password)) |
localStorage.setItem("password", Base64.encode(this.validateForm.value.password)) |
||||||
} |
} |
||||||
} |
} |
||||||
//自动登录
|
//自动登录
|
||||||
autoLogin() { |
autoLogin() { |
||||||
if (this.autologin) { |
if (this.autologin) { |
||||||
localStorage.setItem("isautologin", 'true') |
localStorage.setItem("isautologin", 'true') |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
remember: any//记住密码
|
remember: any//记住密码
|
||||||
autologin: any//自动登录
|
autologin: any//自动登录
|
||||||
isLoading = false; |
isLoading = false; |
||||||
messages: any |
messages: any |
||||||
encryptedAccessToken: any |
encryptedAccessToken: any |
||||||
submitForm(): void { |
submitForm(): void { |
||||||
|
|
||||||
if (!this.remember) { |
if (!this.remember) { |
||||||
localStorage.removeItem("account") |
localStorage.removeItem("account") |
||||||
localStorage.removeItem("password") |
localStorage.removeItem("password") |
||||||
} |
} |
||||||
if (!this.autologin) { |
if (!this.autologin) { |
||||||
localStorage.removeItem("isautologin") |
localStorage.removeItem("isautologin") |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
for (const i in this.validateForm.controls) { |
for (const i in this.validateForm.controls) { |
||||||
this.validateForm.controls[i].markAsDirty(); |
this.validateForm.controls[i].markAsDirty(); |
||||||
this.validateForm.controls[i].updateValueAndValidity(); |
this.validateForm.controls[i].updateValueAndValidity(); |
||||||
} |
} |
||||||
if (!this.validateForm.valid) { |
if (!this.validateForm.valid) { |
||||||
this.message.create('error', `请输入账号密码`); |
this.message.create('error', `请输入账号密码`); |
||||||
return |
return |
||||||
} |
} |
||||||
this.isLoading = true; |
this.isLoading = true; |
||||||
this.http.post('/api/Accounts/SignIn', { |
this.http.post('/api/Accounts/SignIn', { |
||||||
username: this.validateForm.value.userName, |
username: this.validateForm.value.userName, |
||||||
password: this.validateForm.value.password |
password: this.validateForm.value.password |
||||||
}).subscribe({ |
}).subscribe({ |
||||||
next: (data: any) => { |
next: (data: any) => { |
||||||
sessionStorage.setItem("token", data.token); |
sessionStorage.setItem("token", data.token); |
||||||
sessionStorage.setItem("refreshToken", data.refreshToken); |
sessionStorage.setItem("refreshToken", data.refreshToken); |
||||||
this.http.get('/api/Accounts/Profile').subscribe({ |
this.http.get('/api/Accounts/Profile').subscribe({ |
||||||
next: (data: any) => { |
next: async (data: any) => { |
||||||
console.log('登录用户信息', data) |
console.log('登录用户信息', data) |
||||||
this.isLoading = false; |
this.isLoading = false; |
||||||
this.rememberInfo() |
this.rememberInfo() |
||||||
this.autoLogin() |
this.autoLogin() |
||||||
this.router.navigate(['/system']) |
this.router.navigate(['/system']) |
||||||
this.message.create('success', `登录成功`); |
this.message.create('success', `登录成功`); |
||||||
sessionStorage.setItem("userData", JSON.stringify(data)); |
sessionStorage.setItem("userData", JSON.stringify(data)); |
||||||
}, |
await this.getLevel() |
||||||
error: (err) => { |
}, |
||||||
this.isLoading = false; |
error: (err) => { |
||||||
} |
this.isLoading = false; |
||||||
}) |
} |
||||||
|
}) |
||||||
}, |
|
||||||
error: (err) => { |
}, |
||||||
this.isLoading = false; |
error: (err) => { |
||||||
} |
this.isLoading = false; |
||||||
}) |
} |
||||||
} |
}) |
||||||
|
} |
||||||
forget() { |
|
||||||
this.message.create('warning', `请联系管理员`); |
forget() { |
||||||
} |
this.message.create('warning', `请联系管理员`); |
||||||
} |
} |
||||||
|
getLevel(){ |
||||||
|
const a = JSON.parse(sessionStorage.getItem("userData")).organizationLevel |
||||||
|
if(a=="brigade"){ |
||||||
|
sessionStorage.setItem('levelRouter',"/task/indicators") |
||||||
|
}else if(a=="battalion"){ |
||||||
|
sessionStorage.setItem('levelRouter',"/task/monthlytaskoverview") |
||||||
|
}else{ |
||||||
|
sessionStorage.setItem('levelRouter',"/task/taskexecution") |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
||||||
|
@ -1,42 +1,42 @@ |
|||||||
import { Injectable } from '@angular/core'; |
import { Injectable } from '@angular/core'; |
||||||
import { HttpClient } from '@angular/common/http' |
import { HttpClient } from '@angular/common/http' |
||||||
|
|
||||||
@Injectable({ |
@Injectable({ |
||||||
providedIn: 'root' |
providedIn: 'root' |
||||||
}) |
}) |
||||||
export class CacheTokenService { |
export class CacheTokenService { |
||||||
|
|
||||||
constructor(private http: HttpClient) { } |
constructor(private http: HttpClient) { } |
||||||
|
|
||||||
public timer: number | undefined; |
public timer: number | undefined; |
||||||
|
|
||||||
//刷新token令牌定时器
|
//刷新token令牌定时器
|
||||||
startUp = (): void => { |
startUp = (): void => { |
||||||
window.clearInterval(this.timer) |
window.clearInterval(this.timer) |
||||||
this.timer = window.setInterval(() => { |
this.timer = window.setInterval(() => { |
||||||
var token = sessionStorage.getItem("token"); |
var token = sessionStorage.getItem("token"); |
||||||
var refreshToken = sessionStorage.getItem("refreshToken"); |
var refreshToken = sessionStorage.getItem("refreshToken"); |
||||||
this.http.post('/api/Accounts/RefreshToken', { |
this.http.post('/api/Accounts/RefreshToken', { |
||||||
token: token, |
token: token, |
||||||
refreshToken: refreshToken |
refreshToken: refreshToken |
||||||
}).subscribe((data: any) => { |
}).subscribe((data: any) => { |
||||||
console.log('定时刷新token成功', data) |
console.log('定时刷新token成功', data) |
||||||
sessionStorage.setItem("token", data.token); |
sessionStorage.setItem("token", data.token); |
||||||
sessionStorage.setItem("refreshToken", data.refreshToken); |
sessionStorage.setItem("refreshToken", data.refreshToken); |
||||||
}) |
}) |
||||||
}, 60 * 1000) |
}, 60 * 1000) |
||||||
console.log('启动定时刷新token') |
console.log('启动定时刷新token') |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//删除定时器
|
//删除定时器
|
||||||
delete = (): void => { |
delete = (): void => { |
||||||
console.log('消除定时刷新token') |
console.log('消除定时刷新token') |
||||||
window.clearInterval(this.timer) |
window.clearInterval(this.timer) |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
} |
} |
||||||
|
@ -1,223 +1,223 @@ |
|||||||
@import "~ng-zorro-antd/ng-zorro-antd.min.css"; |
@import "~ng-zorro-antd/ng-zorro-antd.min.css"; |
||||||
|
|
||||||
@import "~ng-zorro-antd/style/index.min.css"; |
@import "~ng-zorro-antd/style/index.min.css"; |
||||||
/* 引入基本样式 */ |
/* 引入基本样式 */ |
||||||
@import "~ng-zorro-antd/button/style/index.min.css"; |
@import "~ng-zorro-antd/button/style/index.min.css"; |
||||||
/* 引入组件样式 */ |
/* 引入组件样式 */ |
||||||
|
|
||||||
@font-face { |
@font-face { |
||||||
font-family: synormal; |
font-family: synormal; |
||||||
src: url("./assets/font-family/synormal.OTF"); |
src: url("./assets/font-family/synormal.OTF"); |
||||||
} |
} |
||||||
|
|
||||||
/* css初始化 */ |
/* css初始化 */ |
||||||
html, |
html, |
||||||
body { |
body { |
||||||
margin: 0; |
margin: 0; |
||||||
padding: 0; |
padding: 0; |
||||||
width: 100%; |
width: 100%; |
||||||
height: 100%; |
height: 100%; |
||||||
overflow: hidden; |
overflow: hidden; |
||||||
font-family: synormal !important; |
font-family: synormal !important; |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
body { |
body { |
||||||
font-family: Roboto, "Helvetica Neue", sans-serif; |
font-family: Roboto, "Helvetica Neue", sans-serif; |
||||||
} |
} |
||||||
|
|
||||||
ul, |
ul, |
||||||
ol, |
ol, |
||||||
dl, |
dl, |
||||||
li, |
li, |
||||||
dt, |
dt, |
||||||
dd, |
dd, |
||||||
p, |
p, |
||||||
form, |
form, |
||||||
input, |
input, |
||||||
h1, |
h1, |
||||||
h2, |
h2, |
||||||
h3, |
h3, |
||||||
h4, |
h4, |
||||||
h5, |
h5, |
||||||
h6, |
h6, |
||||||
section, |
section, |
||||||
article, |
article, |
||||||
aside, |
aside, |
||||||
header, |
header, |
||||||
footer, |
footer, |
||||||
nav, |
nav, |
||||||
figure, |
figure, |
||||||
time, |
time, |
||||||
mark, |
mark, |
||||||
main, |
main, |
||||||
canvas { |
canvas { |
||||||
margin: 0; |
margin: 0; |
||||||
padding: 0; |
padding: 0; |
||||||
} |
} |
||||||
|
|
||||||
b, |
b, |
||||||
strong, |
strong, |
||||||
i, |
i, |
||||||
em, |
em, |
||||||
h1, |
h1, |
||||||
h2, |
h2, |
||||||
h3, |
h3, |
||||||
h4, |
h4, |
||||||
h5, |
h5, |
||||||
h6 { |
h6 { |
||||||
font-weight: 500; |
font-weight: 500; |
||||||
font-style: normal; |
font-style: normal; |
||||||
} |
} |
||||||
|
|
||||||
img { |
img { |
||||||
border: none; |
border: none; |
||||||
outline: none; |
outline: none; |
||||||
} |
} |
||||||
|
|
||||||
a { |
a { |
||||||
text-decoration: none; |
text-decoration: none; |
||||||
color: #000; |
color: #000; |
||||||
} |
} |
||||||
|
|
||||||
p { |
p { |
||||||
color: #000; |
color: #000; |
||||||
} |
} |
||||||
|
|
||||||
ul, |
ul, |
||||||
ol, |
ol, |
||||||
li { |
li { |
||||||
list-style: none; |
list-style: none; |
||||||
overflow-x: hidden; |
overflow-x: hidden; |
||||||
} |
} |
||||||
|
|
||||||
textarea { |
textarea { |
||||||
resize: none; |
resize: none; |
||||||
} |
} |
||||||
|
|
||||||
/* 滚动条样式 */ |
/* 滚动条样式 */ |
||||||
// ::-webkit-scrollbar:horizontal { width: 5px; background-color: white; } |
// ::-webkit-scrollbar:horizontal { width: 5px; background-color: white; } |
||||||
::-webkit-scrollbar-thumb { |
::-webkit-scrollbar-thumb { |
||||||
background: #E4E7EC; |
background: #E4E7EC; |
||||||
} |
} |
||||||
|
|
||||||
::-webkit-scrollbar { |
::-webkit-scrollbar { |
||||||
width: 5px; |
width: 5px; |
||||||
} |
} |
||||||
|
|
||||||
::-webkit-scrollbar-track { |
::-webkit-scrollbar-track { |
||||||
// background-color: #999; |
// background-color: #999; |
||||||
} |
} |
||||||
|
|
||||||
app-root { |
app-root { |
||||||
height: 100%; |
height: 100%; |
||||||
} |
} |
||||||
|
|
||||||
.blue { |
.blue { |
||||||
cursor: pointer; |
cursor: pointer; |
||||||
color: #2C4DC0 !important; |
color: #2C4DC0 !important; |
||||||
} |
} |
||||||
|
|
||||||
.green { |
.green { |
||||||
cursor: pointer; |
cursor: pointer; |
||||||
color: #42B983 !important; |
color: #42B983 !important; |
||||||
} |
} |
||||||
|
|
||||||
.red { |
.red { |
||||||
cursor: pointer; |
cursor: pointer; |
||||||
color: #FF0000 !important; |
color: #FF0000 !important; |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
.forbid { |
.forbid { |
||||||
color: gray; |
color: gray; |
||||||
pointer-events: none |
pointer-events: none |
||||||
} |
} |
||||||
|
|
||||||
.forbidbtn { |
.forbidbtn { |
||||||
background: gray !important; |
background: gray !important; |
||||||
pointer-events: none |
pointer-events: none |
||||||
} |
} |
||||||
|
|
||||||
.box { |
.box { |
||||||
width: 100%; |
width: 100%; |
||||||
height: 100%; |
height: 100%; |
||||||
overflow-y: auto; |
overflow-y: auto; |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
.ant-tabs-content { |
.ant-tabs-content { |
||||||
height: 100%; |
height: 100%; |
||||||
} |
} |
||||||
|
|
||||||
.ant-pagination-next, |
.ant-pagination-next, |
||||||
.ant-pagination-prev { |
.ant-pagination-prev { |
||||||
overflow: hidden; |
overflow: hidden; |
||||||
} |
} |
||||||
|
|
||||||
.pagination { |
.pagination { |
||||||
margin: 15px 0; |
margin: 15px 0; |
||||||
display: flex; |
display: flex; |
||||||
align-items: center; |
align-items: center; |
||||||
justify-content: center; |
justify-content: center; |
||||||
} |
} |
||||||
|
|
||||||
.maxHeightTreeSelect { |
.maxHeightTreeSelect { |
||||||
max-height: 280px; |
max-height: 280px; |
||||||
} |
} |
||||||
|
|
||||||
// 可展开面板 |
// 可展开面板 |
||||||
.panel { |
.panel { |
||||||
width: 100%; |
width: 100%; |
||||||
background: #FFFFFF; |
background: #FFFFFF; |
||||||
box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800); |
box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800); |
||||||
border-radius: 4px 4px 4px 4px; |
border-radius: 4px 4px 4px 4px; |
||||||
opacity: 1; |
opacity: 1; |
||||||
border: 1px solid #E4E7EC; |
border: 1px solid #E4E7EC; |
||||||
box-sizing: border-box; |
box-sizing: border-box; |
||||||
padding: 16px; |
padding: 16px; |
||||||
|
|
||||||
.panelheader { |
.panelheader { |
||||||
height: 46px; |
height: 46px; |
||||||
display: flex; |
display: flex; |
||||||
align-items: center; |
align-items: center; |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
.panelheadernameblue { |
.panelheadernameblue { |
||||||
background-color: #1D9DFF; |
background-color: #1D9DFF; |
||||||
} |
} |
||||||
|
|
||||||
.panelheadernamepurple { |
.panelheadernamepurple { |
||||||
background-color: #9D80FF; |
background-color: #9D80FF; |
||||||
} |
} |
||||||
|
|
||||||
.panelheadernameblue2 { |
.panelheadernameblue2 { |
||||||
background-color: #5087FF; |
background-color: #5087FF; |
||||||
} |
} |
||||||
|
|
||||||
.panelheadernamegreen { |
.panelheadernamegreen { |
||||||
background-color: #42B983; |
background-color: #42B983; |
||||||
} |
} |
||||||
|
|
||||||
.panelheadernameor { |
.panelheadernameor { |
||||||
background-color: #FF9203; |
background-color: #FF9203; |
||||||
} |
} |
||||||
|
|
||||||
.panelheadernameor2 { |
.panelheadernameor2 { |
||||||
background-color: #FF5D2A; |
background-color: #FF5D2A; |
||||||
} |
} |
||||||
|
|
||||||
.panelheadernamered { |
.panelheadernamered { |
||||||
background-color: #FF404D; |
background-color: #FF404D; |
||||||
} |
} |
||||||
.spin { |
.spin { |
||||||
background: rgb(134, 131, 131, 0.2); |
background: rgb(134, 131, 131, 0.2); |
||||||
position: absolute; |
position: absolute; |
||||||
width: 100%; |
width: 100%; |
||||||
height: 100%; |
height: 100%; |
||||||
display: flex; |
display: flex; |
||||||
align-items: center; |
align-items: center; |
||||||
justify-content: center; |
justify-content: center; |
||||||
} |
} |
Loading…
Reference in new issue