|
|
|
@ -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 |
|
|
|
|
} |
|
|
|
|