|
|
@ -10,7 +10,8 @@ import { TaskDetailsComponent } from './task-details/task-details.component'; |
|
|
|
import { CreateTaskComponent } from './create-task/create-task.component'; |
|
|
|
import { CreateTaskComponent } from './create-task/create-task.component'; |
|
|
|
import { differenceInCalendarDays, setHours } from 'date-fns' |
|
|
|
import { differenceInCalendarDays, setHours } from 'date-fns' |
|
|
|
import { PlanAdjustmentComponent } from '../da-oneself-plan/plan-adjustment/plan-adjustment.component'; |
|
|
|
import { PlanAdjustmentComponent } from '../da-oneself-plan/plan-adjustment/plan-adjustment.component'; |
|
|
|
import { MethodService } from 'src/app/method.service'; |
|
|
|
import { MethodService } from 'src/app/service/method.service'; |
|
|
|
|
|
|
|
import { NewTaskMessageService } from 'src/app/service/new-task-message.service'; |
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-station-weekly-plan', |
|
|
|
selector: 'app-station-weekly-plan', |
|
|
|
templateUrl: './station-weekly-plan.component.html', |
|
|
|
templateUrl: './station-weekly-plan.component.html', |
|
|
@ -18,7 +19,7 @@ import { MethodService } from 'src/app/method.service'; |
|
|
|
}) |
|
|
|
}) |
|
|
|
export class StationWeeklyPlanComponent implements OnInit { |
|
|
|
export class StationWeeklyPlanComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
constructor(private http: HttpClient, private modal: NzModalService, private message: NzMessageService, private viewContainerRef: ViewContainerRef, private methodService: MethodService) { } |
|
|
|
constructor(private http: HttpClient, private modal: NzModalService, private message: NzMessageService, private viewContainerRef: ViewContainerRef, public methodService: MethodService, private newTaskMessage: NewTaskMessageService) { } |
|
|
|
OrganizationId |
|
|
|
OrganizationId |
|
|
|
userId |
|
|
|
userId |
|
|
|
isSupervisor |
|
|
|
isSupervisor |
|
|
@ -79,6 +80,7 @@ export class StationWeeklyPlanComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
openDetails(data, type) { |
|
|
|
openDetails(data, type) { |
|
|
|
data.isDetails = type |
|
|
|
data.isDetails = type |
|
|
|
|
|
|
|
data.badgeNum = 0 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
radioChange(e, i, element) { |
|
|
|
radioChange(e, i, element) { |
|
|
@ -146,24 +148,24 @@ export class StationWeeklyPlanComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
cardData = [ |
|
|
|
cardData = [ |
|
|
|
{ name: '双随机', isDetails: false, isLoading: false, background: '#1D9DFF', icon: 'suiji.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '双随机', badgeNum: 0, isDetails: false, isLoading: false, background: '#1D9DFF', icon: 'suiji.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '行政许可', isDetails: false, isLoading: false, background: '#42B983', icon: 'xuke.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '行政许可', badgeNum: 0, isDetails: false, isLoading: false, background: '#42B983', icon: 'xuke.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '熟悉演练', isDetails: false, isLoading: false, background: '#9D80FF', icon: 'yanlian.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '熟悉演练', badgeNum: 0, isDetails: false, isLoading: false, background: '#9D80FF', icon: 'yanlian.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '联络指导', isDetails: false, isLoading: false, background: '#5483EA', icon: 'zhidao.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '联络指导', badgeNum: 0, isDetails: false, isLoading: false, background: '#5483EA', icon: 'zhidao.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '消防宣传', isDetails: false, isLoading: false, background: '#FF5D2A', icon: 'xuanchuan.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '消防宣传', badgeNum: 0, isDetails: false, isLoading: false, background: '#FF5D2A', icon: 'xuanchuan.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '投诉举报', isDetails: false, isLoading: false, background: '#5087FF', icon: 'tousu.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '投诉举报', badgeNum: 0, isDetails: false, isLoading: false, background: '#5087FF', icon: 'tousu.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '火灾调查', isDetails: false, isLoading: false, background: '#FF404D', icon: 'huozai.png', passed: 0, inspected: 0, percentage: 0, data: [] } |
|
|
|
{ name: '火灾调查', badgeNum: 0, isDetails: false, isLoading: false, background: '#FF404D', icon: 'huozai.png', passed: 0, inspected: 0, percentage: 0, data: [] } |
|
|
|
] |
|
|
|
] |
|
|
|
//初始化数据
|
|
|
|
//初始化数据
|
|
|
|
initializeData() { |
|
|
|
initializeData() { |
|
|
|
this.cardData = [ |
|
|
|
this.cardData = [ |
|
|
|
{ name: '双随机', isDetails: false, isLoading: false, background: '#1D9DFF', icon: 'suiji.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '双随机', badgeNum: 0, isDetails: false, isLoading: false, background: '#1D9DFF', icon: 'suiji.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '行政许可', isDetails: false, isLoading: false, background: '#42B983', icon: 'xuke.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '行政许可', badgeNum: 0, isDetails: false, isLoading: false, background: '#42B983', icon: 'xuke.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '熟悉演练', isDetails: false, isLoading: false, background: '#9D80FF', icon: 'yanlian.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '熟悉演练', badgeNum: 0, isDetails: false, isLoading: false, background: '#9D80FF', icon: 'yanlian.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '联络指导', isDetails: false, isLoading: false, background: '#5483EA', icon: 'zhidao.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '联络指导', badgeNum: 0, isDetails: false, isLoading: false, background: '#5483EA', icon: 'zhidao.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '消防宣传', isDetails: false, isLoading: false, background: '#FF5D2A', icon: 'xuanchuan.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '消防宣传', badgeNum: 0, isDetails: false, isLoading: false, background: '#FF5D2A', icon: 'xuanchuan.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '投诉举报', isDetails: false, isLoading: false, background: '#5087FF', icon: 'tousu.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '投诉举报', badgeNum: 0, isDetails: false, isLoading: false, background: '#5087FF', icon: 'tousu.png', passed: 0, inspected: 0, percentage: 0, data: [] }, |
|
|
|
{ name: '火灾调查', isDetails: false, isLoading: false, background: '#FF404D', icon: 'huozai.png', passed: 0, inspected: 0, percentage: 0, data: [] } |
|
|
|
{ name: '火灾调查', badgeNum: 0, isDetails: false, isLoading: false, background: '#FF404D', icon: 'huozai.png', passed: 0, inspected: 0, percentage: 0, data: [] } |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
this.stationData.forEach(element => { |
|
|
|
this.stationData.forEach(element => { |
|
|
@ -190,7 +192,7 @@ export class StationWeeklyPlanComponent implements OnInit { |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
Month: selectedTime, |
|
|
|
Month: selectedTime, |
|
|
|
SupervisorId: this.isSupervisor ? this.userId : null, |
|
|
|
SupervisorId: this.isSupervisor ? this.userId : null, |
|
|
|
AssitantOrganizationId: this.isSupervisor ? null : this.OrganizationId, |
|
|
|
assistantOrganizationId: this.isSupervisor ? null : this.OrganizationId, |
|
|
|
PageNumber: this.PageNumber, |
|
|
|
PageNumber: this.PageNumber, |
|
|
|
PageSize: this.PageSize, |
|
|
|
PageSize: this.PageSize, |
|
|
|
approvalStatuses: ['待处理', '通过', '驳回', '待检查', '已检查'] |
|
|
|
approvalStatuses: ['待处理', '通过', '驳回', '待检查', '已检查'] |
|
|
@ -232,7 +234,7 @@ export class StationWeeklyPlanComponent implements OnInit { |
|
|
|
Month: selectedTime, |
|
|
|
Month: selectedTime, |
|
|
|
approvalStatuses: ['通过', '待检查', '已检查'], |
|
|
|
approvalStatuses: ['通过', '待检查', '已检查'], |
|
|
|
SupervisorId: this.isSupervisor ? this.userId : null, |
|
|
|
SupervisorId: this.isSupervisor ? this.userId : null, |
|
|
|
AssitantOrganizationId: this.isSupervisor ? null : this.OrganizationId, |
|
|
|
assistantOrganizationId: this.isSupervisor ? null : this.OrganizationId, |
|
|
|
PageNumber: this.PageNumber, |
|
|
|
PageNumber: this.PageNumber, |
|
|
|
PageSize: this.PageSize |
|
|
|
PageSize: this.PageSize |
|
|
|
} |
|
|
|
} |
|
|
@ -382,13 +384,26 @@ export class StationWeeklyPlanComponent implements OnInit { |
|
|
|
this.rollStart() |
|
|
|
this.rollStart() |
|
|
|
}, 0); |
|
|
|
}, 0); |
|
|
|
|
|
|
|
|
|
|
|
//滚动消息
|
|
|
|
|
|
|
|
this.methodService.getNotifications().then((data: any) => { |
|
|
|
|
|
|
|
this.messageList = data |
|
|
|
this.newTaskMessage.getMessage().subscribe((data: any) => { |
|
|
|
}) |
|
|
|
console.log('具体任务信息', data); |
|
|
|
|
|
|
|
this.cardData.forEach((item: any) => { |
|
|
|
|
|
|
|
if (item.name == data.taskType) { |
|
|
|
|
|
|
|
item.data.unshift(data) |
|
|
|
|
|
|
|
if (!item.isDetails) { |
|
|
|
|
|
|
|
item.badgeNum += 1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (data.approvalStatus == '通过') { |
|
|
|
|
|
|
|
item.passed += 1 |
|
|
|
|
|
|
|
this.getTaskListPass(this.stationData[0]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
messageList = [] |
|
|
|
|
|
|
|
timer |
|
|
|
timer |
|
|
|
rollStart() { |
|
|
|
rollStart() { |
|
|
|
var ROLL_SPEED = 100 |
|
|
|
var ROLL_SPEED = 100 |
|
|
|