Browse Source

[完善]复制任务协助机构显示,bug修改

非煤矿山灾害智能感知和预警系统
邵佳豪 2 years ago
parent
commit
e45b6d229c
  1. 24
      src/app/home/nav/nav.component.ts
  2. 48
      src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html
  3. 49
      src/app/home/task/da-oneself-plan/da-oneself-plan.component.html
  4. 43
      src/app/home/task/station-task-apply/station-task-apply.component.html
  5. 47
      src/app/home/task/station-task-execution/station-task-execution.component.html
  6. 46
      src/app/home/task/station-weekly-plan/station-weekly-plan.component.html
  7. 13
      src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts
  8. 3
      src/app/home/task/zhi-indicators/zhi-indicators.component.html
  9. 2
      src/app/home/task/zhi-indicators/zhi-indicators.component.ts

24
src/app/home/nav/nav.component.ts

@ -42,18 +42,24 @@ export class NavComponent implements OnInit {
//1.右下角弹窗(新增任务提示)
console.log('收到消息---', message)
this.methodService.notificationsList.unshift(message)
// if (message.planTaskState == 'added') {
this.createBasicNotification(message)
// }
this.createBasicNotification(message)
//2.右上角消息栏目(全部消息)
//3.生成周计划新增徽章(新增任务提示)
if (this.router.url.indexOf('weeklyplan') != -1) {
this.methodService.getTaskDetails(message.planTaskId).then((data: any) => {
if (message.content == '您参与的任务已取消,请点击查看详情。') {
let data = { signalRData: '' }
data.signalRData = message
this.newTaskMessage.sendMessage(data);//发布一条消息
})
} else {
this.methodService.getTaskDetails(message.planTaskId).then((data: any) => {
data.signalRData = message
this.newTaskMessage.sendMessage(data);//发布一条消息
})
}
}
})
@ -61,11 +67,11 @@ export class NavComponent implements OnInit {
}
createBasicNotification(data): void {
createBasicNotification(message): void {
this.notification.blank(
'任务提示',
data.content,
{ nzPlacement: 'bottomRight', nzDuration: 5 }
'任务消息',
message.content,
{ nzPlacement: 'bottomRight' }
);
}

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

@ -103,20 +103,44 @@
</div>
<div class="info">
<span class="assistant" nz-tooltip [nzTooltipTitle]="titleTemplate">
<span *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
<ng-container *ngIf="i.relatedTaskId; else elseTemplate">
<span *ngFor="let o of i.relatedTask.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of i.relatedTask.assistantOrganizations">
{{o.name}}
</span>
</ng-container>
<ng-template #elseTemplate>
<span *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
</ng-template>
</span>
<ng-template #titleTemplate let-thing>
<span style="margin-right: 6px;" *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<span style="margin-right: 6px;" *ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
<ng-container *ngIf="i.relatedTaskId; else elseTemplate">
<span style="margin-right: 6px;" *ngFor="let o of i.relatedTask.supervisors">
{{o.name}}
</span>
<span style="margin-right: 6px;"
*ngFor="let o of i.relatedTask.assistantOrganizations">
{{o.name}}
</span>
</ng-container>
<ng-template #elseTemplate>
<span style="margin-right: 6px;" *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<span style="margin-right: 6px;" *ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
</ng-template>
</ng-template>
<span>|</span>
<span>申请人: {{i.organization.level == 'battalion'? i.creator.name :

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

@ -157,21 +157,46 @@
</div>
<div class="flexcol flexcolassistant">
<span class="assistant ellipsi" nz-tooltip [nzTooltipTitle]="titleTemplate">
<span *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
<ng-container *ngIf="i.relatedTaskId; else elseTemplate">
<span *ngFor="let o of i.relatedTask.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of i.relatedTask.assistantOrganizations">
{{o.name}}
</span>
</ng-container>
<ng-template #elseTemplate>
<span *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
</ng-template>
<span></span>
</span>
<ng-template #titleTemplate let-thing>
<span style="margin-right: 6px;" *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<span style="margin-right: 6px;" *ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
<ng-container *ngIf="i.relatedTaskId; else elseTemplate">
<span style="margin-right: 6px;"
*ngFor="let o of i.relatedTask.supervisors">
{{o.name}}
</span>
<span style="margin-right: 6px;"
*ngFor="let o of i.relatedTask.assistantOrganizations">
{{o.name}}
</span>
</ng-container>
<ng-template #elseTemplate>
<span style="margin-right: 6px;" *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<span style="margin-right: 6px;"
*ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
</ng-template>
</ng-template>
<span>
协助人员

43
src/app/home/task/station-task-apply/station-task-apply.component.html

@ -120,36 +120,39 @@
</div>
<div class="flexcol flexcolassistant">
<span class="assistant" nz-tooltip [nzTooltipTitle]="titleTemplate">
<ng-container *ngIf="isSupervisor; else elseTemplate2">
<span *ngFor="let i of item.assistantOrganizations">
{{i.name}}
<ng-container *ngIf="item.relatedTaskId; else elseTemplate">
<span *ngFor="let o of item.relatedTask.supervisors">
{{o.name}}
</span>
<span *ngFor="let i of item.supervisors;let key = index">
<img *ngIf="key == 0" src="../../../../assets/images/icon/main.png" alt="">
<img *ngIf="key == 1" src="../../../../assets/images/icon/assist.png" alt="">
{{i.name}}
<span *ngFor="let o of item.relatedTask.assistantOrganizations">
{{o.name}}
</span>
</ng-container>
<ng-template #elseTemplate2>
<span *ngFor="let i of item.supervisors">
{{i.name}}
<ng-template #elseTemplate>
<span *ngFor="let o of item.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of item.assistantOrganizations">
{{o.name}}
</span>
</ng-template>
</span>
<ng-template #titleTemplate let-thing>
<ng-container *ngIf="isSupervisor; else elseTemplate3">
<span style="margin-right: 6px;" *ngFor="let i of item.assistantOrganizations">
{{i.name}}
<ng-container *ngIf="item.relatedTaskId; else elseTemplate">
<span style="margin-right: 6px;" *ngFor="let o of item.relatedTask.supervisors">
{{o.name}}
</span>
<span style="margin-right: 6px;" *ngFor="let i of item.supervisors;let key = index">
<img *ngIf="key == 0" src="../../../../assets/images/icon/main.png" alt="">
<img *ngIf="key == 1" src="../../../../assets/images/icon/assist.png" alt="">
{{i.name}}
<span style="margin-right: 6px;"
*ngFor="let o of item.relatedTask.assistantOrganizations">
{{o.name}}
</span>
</ng-container>
<ng-template #elseTemplate3>
<span style="margin-right: 6px;" *ngFor="let i of item.supervisors">
{{i.name}}
<ng-template #elseTemplate>
<span style="margin-right: 6px;" *ngFor="let o of item.supervisors">
{{o.name}}
</span>
<span style="margin-right: 6px;" *ngFor="let o of item.assistantOrganizations">
{{o.name}}
</span>
</ng-template>

47
src/app/home/task/station-task-execution/station-task-execution.component.html

@ -126,20 +126,43 @@
</div>
<div class="flexcol flexcolassistant">
<span class="assistant" nz-tooltip [nzTooltipTitle]="titleTemplate">
<span *ngFor="let i of item.assistantOrganizations">
{{i.name}}
</span>
<span *ngFor="let i of item.supervisors">
{{i.name}}
</span>
<ng-container *ngIf="item.relatedTaskId; else elseTemplate">
<span *ngFor="let o of item.relatedTask.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of item.relatedTask.assistantOrganizations">
{{o.name}}
</span>
</ng-container>
<ng-template #elseTemplate>
<span *ngFor="let o of item.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of item.assistantOrganizations">
{{o.name}}
</span>
</ng-template>
</span>
<ng-template #titleTemplate let-thing>
<span *ngFor="let i of item.assistantOrganizations">
{{i.name}}
</span>
<span *ngFor="let i of item.supervisors">
{{i.name}}
</span>
<ng-container *ngIf="item.relatedTaskId; else elseTemplate">
<span *ngFor="let i of item.relatedTask.assistantOrganizations">
{{i.name}}
</span>
<span *ngFor="let i of item.relatedTask.supervisors">
{{i.name}}
</span>
</ng-container>
<ng-template #elseTemplate>
<span *ngFor="let i of item.assistantOrganizations">
{{i.name}}
</span>
<span *ngFor="let i of item.supervisors">
{{i.name}}
</span>
</ng-template>
</ng-template>
<span>
{{'协助机构/人员'}}

46
src/app/home/task/station-weekly-plan/station-weekly-plan.component.html

@ -196,20 +196,40 @@
</div>
<div class="flexcol flexcolassistant">
<span class="assistant" nz-tooltip [nzTooltipTitle]="titleTemplate">
<span *ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
<span *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<ng-container *ngIf="i.relatedTaskId; else elseTemplate">
<span *ngFor="let o of i.relatedTask.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of i.relatedTask.assistantOrganizations">
{{o.name}}
</span>
</ng-container>
<ng-template #elseTemplate>
<span *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
</ng-template>
</span>
<ng-template #titleTemplate let-thing>
<span *ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
<span *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<ng-container *ngIf="i.relatedTaskId; else elseTemplate">
<span *ngFor="let o of i.relatedTask.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of i.relatedTask.assistantOrganizations">
{{o.name}}
</span>
</ng-container>
<ng-template #elseTemplate>
<span *ngFor="let o of i.supervisors">
{{o.name}}
</span>
<span *ngFor="let o of i.assistantOrganizations">
{{o.name}}
</span>
</ng-template>
</ng-template>
<span>
协助机构/人员
@ -226,7 +246,7 @@
</div>
<div class="flexcol">
<span>
<nz-date-picker [nzDisabledDate]="disabledDate" [(ngModel)]="i.checkTime"
<nz-date-picker [nzDisabledDate]="disabledDate" [(ngModel)]="i.planTime"
nzPlaceHolder="请选择检查日期" nzBorderless
(ngModelChange)="checkTime($event,i,element)">
</nz-date-picker>

13
src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts

@ -201,7 +201,7 @@ export class StationWeeklyPlanComponent implements OnInit {
this.http.get('/api/PlanTasks', {
params: params
}).subscribe((data: any) => {
this.isLoading = false
// console.log('任务申请列表', data.items);
data.items.forEach(element => {
@ -245,8 +245,8 @@ export class StationWeeklyPlanComponent implements OnInit {
this.http.get('/api/PlanTasks', {
params: params
}).subscribe((data: any) => {
item.isLoading = false
let listData = [
{ name: '双随机', background: '#1D9DFF', icon: 'suiji.png', scale: '0/0', data: [], inspected: 0, finished: 0 },
@ -391,7 +391,7 @@ export class StationWeeklyPlanComponent implements OnInit {
this.newTaskMessage.getMessage().subscribe((data: any) => {
console.log('具体任务信息', data);
if (data.signalRData.planTaskState == 'added') {
if (data.signalRData.content == '您有一条新的一体化任务,请注意查收。') {
this.cardData.forEach((item: any) => {
if (item.name == data.taskType) {
item.data.unshift(data)
@ -405,10 +405,9 @@ export class StationWeeklyPlanComponent implements OnInit {
}
})
}
if (data.signalRData.planTaskState == 'deleted') {
if (data.signalRData.content == '您参与的任务已取消,请点击查看详情。') {
this.cardData.forEach((item: any) => {
if (item.name == data.taskType) {
for (let index = 0; index < item.data.length; index++) {
const element = item.data[index];
if (element.id == data.signalRData.planTaskId) {
@ -416,8 +415,6 @@ export class StationWeeklyPlanComponent implements OnInit {
index--
}
}
if (!item.isDetails) {
item.badgeNum -= 1
}

3
src/app/home/task/zhi-indicators/zhi-indicators.component.html

@ -669,7 +669,8 @@
</div>
</div>
<div class="panelcontent" *ngIf="rehearsal.isExpand">
<nz-table #colSpanTable [nzData]="rehearsal.data" nzBordered nzSize="small" [nzShowPagination]="false">
<nz-table [nzPageSize]="99" #colSpanTable [nzData]="rehearsal.data" nzBordered nzSize="small"
[nzShowPagination]="false">
<thead>
<tr>
<th nzWidth="25%">责任机构</th>

2
src/app/home/task/zhi-indicators/zhi-indicators.component.ts

@ -513,6 +513,7 @@ export class ZhiIndicatorsComponent implements OnInit {
type == '行政许可' ? this.getTaskList('行政许可', data) : null
},
error: (err) => {
data.isLoading = false
this.message.create('warning', '创建失败');
}
})
@ -539,6 +540,7 @@ export class ZhiIndicatorsComponent implements OnInit {
},
error: (err) => {
data.isLoading = false
this.message.create('warning', '创建失败');
}
})

Loading…
Cancel
Save