diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts index df6c515..f98e4ba 100644 --- a/src/app/home/home-routing.module.ts +++ b/src/app/home/home-routing.module.ts @@ -42,7 +42,7 @@ const routes: Routes = [ }, { path: 'audit', - component: ZhiAuditComponent, + component: ZhiAuditComponent }, { path: 'monthlytaskoverview', diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index dbfa8d2..08f291f 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -59,8 +59,11 @@ import { ChangePasswordComponent } from './change-password/change-password.compo import { NzUploadModule } from 'ng-zorro-antd/upload'; import { NzCardModule } from 'ng-zorro-antd/card'; import { PlanAdjustmentComponent } from './task/da-oneself-plan/plan-adjustment/plan-adjustment.component'; -import { NzToolTipModule } from 'ng-zorro-antd/tooltip'; +import { NzToolTipModule } from 'ng-zorro-antd/tooltip'; import { TaskDetailsComponent } from './task/station-weekly-plan/task-details/task-details.component'; +import { EditOrComponent } from './task/zhi-indicators/edit-or/edit-or.component'; +import { NzInputNumberModule } from 'ng-zorro-antd/input-number'; +import { CreateTaskComponent } from './task/station-weekly-plan/create-task/create-task.component'; @NgModule({ declarations: [ NavComponent, @@ -95,7 +98,9 @@ import { TaskDetailsComponent } from './task/station-weekly-plan/task-details/ta AllotPersonComponent, ChangePasswordComponent, PlanAdjustmentComponent, - TaskDetailsComponent + TaskDetailsComponent, + EditOrComponent, + CreateTaskComponent ], imports: [ CommonModule, @@ -127,8 +132,9 @@ import { TaskDetailsComponent } from './task/station-weekly-plan/task-details/ta NzSpinModule, NzCardModule, NzUploadModule, - NzToolTipModule + NzToolTipModule, + NzInputNumberModule ], - entryComponents: [AddroleComponent, EditroleComponent, AdduserComponent, EdituserComponent, AddorComponent, EditorComponent, ApplyComponent, ApplyLookComponent, LookTaskComponent, AllotPersonComponent] + entryComponents: [AddroleComponent, EditroleComponent, AdduserComponent, EdituserComponent, AddorComponent, EditorComponent, ApplyComponent, ApplyLookComponent, LookTaskComponent, AllotPersonComponent, EditOrComponent, CreateTaskComponent] }) export class HomeModule { } diff --git a/src/app/home/nav/nav.component.html b/src/app/home/nav/nav.component.html index 49c2ab9..37515db 100644 --- a/src/app/home/nav/nav.component.html +++ b/src/app/home/nav/nav.component.html @@ -14,7 +14,7 @@
  • 统计分析
  • -
  • +
  • 系统管理
  • diff --git a/src/app/home/nav/nav.component.ts b/src/app/home/nav/nav.component.ts index a812a6f..079c311 100644 --- a/src/app/home/nav/nav.component.ts +++ b/src/app/home/nav/nav.component.ts @@ -12,12 +12,20 @@ import { NzMessageService } from 'ng-zorro-antd/message'; }) export class NavComponent implements OnInit { - constructor( private modal: NzModalService,private http: HttpClient,private message: NzMessageService,private viewContainerRef: ViewContainerRef,private router: Router, public token: CacheTokenService) { } - user:"" + constructor(private modal: NzModalService, private http: HttpClient, private message: NzMessageService, private viewContainerRef: ViewContainerRef, private router: Router, public token: CacheTokenService) { } + user = null + + isSuperAdmin ngOnInit(): void { //调用服务中的function刷新token this.token.startUp() - this.user=JSON.parse(sessionStorage.getItem('userData')).name + this.user = JSON.parse(sessionStorage.getItem('userData')).name + + let roles = JSON.parse(sessionStorage.getItem('userData')).roles + let isTrue = roles.find(item => { + return item.name == '超级管理员' + }) + isTrue ? this.isSuperAdmin = true : this.isSuperAdmin = false } signOut() { this.router.navigate(['/login']) @@ -25,7 +33,7 @@ export class NavComponent implements OnInit { ngOnDestroy(): void { this.token.delete() } - + changePassword() { const modal: any = this.modal.create({ nzTitle: '修改密码', diff --git a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html index 173595b..042f91c 100644 --- a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html +++ b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html @@ -32,14 +32,15 @@ style="vertical-align: text-top;cursor: pointer;" nz-icon nzType="right-circle" nzTheme="outline">

    -

    5/9

    +

    + {{item.passed}}/{{item.data.length}}

    完成率 - 60% + {{item.percentage}}%

    -
    @@ -51,13 +52,12 @@ nzTheme="outline">返回

    -
    +

    - 济南历下森豪室内娱乐场 + {{i.company.companyName}}

    - 已分配 - 已检查 + {{i.approvalStatus}}

    @@ -81,7 +81,14 @@
    - {{item.name}} +
    + {{item.name}} + + 已审批: {{item.finished}}/{{item.list.length}} + +
    + + {{item.isExpand ? '收起' :'展开'}} @@ -89,39 +96,38 @@
    + [ngClass]="{'redcard': i.approvalStatus == '驳回'}">
    {{i.company.companyName}}
    -
    - - - {{i.mainSupervisor ? i.mainSupervisor.name : '未分配'}} + + + + + {{o.name}} - - - {{i.assitantSupervisor ? i.assitantSupervisor.name : '未分配'}} + + + + + + {{o.name}} - 分配 - | - 申请人: {{i.organization.name}} - -
    + + + | + 申请人: {{i.organization.name}} +
    +
    + +
    - -
    - - -
    @@ -144,40 +150,46 @@
    任务总数 + {{countStat.statistics1.num}}
    完成 -
    + [nzPercent]="countStat.statistics1.percentageComplete" nzStrokeColor="#87D068" + [nzShowInfo]="false" [nzStrokeWidth]="18"> - 75% + {{countStat.statistics1.percentageComplete}}% - -
    -
    -
    + [nzPercent]="countStat.statistics1.item1+countStat.statistics1.item2" + nzStrokeLinecap="square" [nzShowInfo]="false" + [nzSuccessPercent]="countStat.statistics1.item1">
    -
    -
    上级指派46%
    +
    +
    上级指派{{countStat.statistics1.item1}}% +
    -
    自主任务46%
    +
    自主任务{{countStat.statistics1.item2}}% +
    -
    申领任务46%
    +
    申领任务{{countStat.statistics1.item3}}% +
    @@ -185,7 +197,9 @@
    - 任务总数 + 消防救援任务总数 + {{countStat.statistics2.num}}
    @@ -195,28 +209,37 @@ + [nzPercent]="countStat.statistics2.percentageComplete" nzStrokeColor="#87D068" + [nzShowInfo]="false" [nzStrokeWidth]="18"> - 75% + {{countStat.statistics2.percentageComplete}}% - -
    -
    - +
    + [nzPercent]="countStat.statistics2.item1+countStat.statistics2.item2" + nzStrokeColor="#3658c8" nzStrokeLinecap="square" [nzShowInfo]="false" + [nzSuccessPercent]="countStat.statistics2.item1">
    -
    -
    自主任务46%
    +
    +
    上级指派{{countStat.statistics2.item1}}% +
    +
    +
    +
    +
    自主任务{{countStat.statistics2.item2}}% +
    -
    -
    申领任务46%
    +
    申领任务{{countStat.statistics2.item3}}% +
    @@ -224,7 +247,9 @@
    - 任务总数 + 检查员任务总数 + {{countStat.statistics3.num}}
    @@ -234,30 +259,39 @@ + [nzPercent]="countStat.statistics3.percentageComplete" nzStrokeColor="#E6D91D" + [nzShowInfo]="false" [nzStrokeWidth]="18"> - 75% + {{countStat.statistics3.percentageComplete}}% - -
    -
    - +
    -
    -
    -
    -
    自主任务46%
    + [nzPercent]="countStat.statistics3.item1+countStat.statistics3.item2" + nzStrokeColor="#E6D91D" [nzShowInfo]="false" + [nzSuccessPercent]="countStat.statistics3.item1"> +
    +
    +
    +
    上级指派{{countStat.statistics3.item1}}%
    - -
    -
    -
    申领任务46%
    +
    +
    +
    +
    自主任务{{countStat.statistics3.item2}}%
    +
    +
    +
    申领任务{{countStat.statistics3.item3}}% +
    +
    +
    @@ -276,14 +310,18 @@ {{element.name}} - 单位总数: 7/8 -
    + + + 单位总数:{{element.awaitInspect}}/{{element.allUnitsNum}} + + +
    完成进度 - +
    - + {{element.isExpand ? '收起' :'展开'}} @@ -298,12 +336,12 @@
    已分配 - 0 + {{item.inspected}}
    -
    +
    已完成 - 0 + {{item.finished}}
    @@ -366,7 +404,7 @@
    - 未发现违法违规情况 + {{i.inspectionResult}} 检查结果 diff --git a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.scss b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.scss index 350fe09..3eae21b 100644 --- a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.scss +++ b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.scss @@ -261,22 +261,19 @@ border-radius: 4px 4px 4px 4px; opacity: 1; display: flex; + margin-bottom: 18px; + align-items: center; box-sizing: border-box; padding: 0 20px; position: relative; - margin-bottom: 18px; div { display: flex; align-items: center; - - img { - margin-top: -3px; - } } .unitname { - width: 30%; + flex: 1; } .info { @@ -285,33 +282,38 @@ justify-content: center; align-items: center; - span { - margin-right: 20px; - } - } + .assistant { + width: 50%; - .btn { - flex: 1; + span { + color: #303133; + margin-right: 6px; + } - button:nth-child(1) { - background: #42B983; - color: white; + img { + width: 16px; + height: 16px; + vertical-align: text-bottom; + } + + display: inline-block; + text-align: left; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } - button:nth-child(2) { - background: #FF0000; - color: white; - margin-left: 20px; + span { + margin-right: 20px; } } + .img { - width: 30%; + flex: 1; - .auditimg { - position: absolute; - right: 18%; - top: 9%; + img { + margin-left: 40%; } } @@ -329,9 +331,8 @@ } } - .taskauditbox:nth-child(2) { + .taskauditbox:nth-child(3) { margin-bottom: 0px; - } } @@ -358,7 +359,7 @@ justify-content: space-between; .deploycontentitem { - width: 32%; + width: 33%; height: 110px; background: linear-gradient(180deg, #7AA3FC 0%, #2C4DC0 100%); box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800); @@ -379,6 +380,8 @@ .title { text-align: left; + display: flex; + align-items: center; } .details { @@ -433,7 +436,7 @@ .tips { width: 10px; height: 10px; - + border-radius: 10px; margin-right: 5px; } @@ -453,7 +456,7 @@ .deploycontentitem:nth-child(3) { - background: linear-gradient(180deg, #73D9AA 0%, #42B983 100%); + background: linear-gradient(180deg, #9ef3cc 0%, #42B983 100%); } } } @@ -646,4 +649,4 @@ .cutoffrule { width: 100%; border-top: 1px dashed #C7CAD0; -} \ No newline at end of file +} diff --git a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts index 8668009..2e9a563 100644 --- a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts +++ b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts @@ -1,5 +1,5 @@ import { HttpClient } from '@angular/common/http'; -import { Component, OnInit, ViewContainerRef } from '@angular/core'; +import { Component, NgZone, OnInit, ViewContainerRef } from '@angular/core'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; import { AllotPersonComponent } from '../da-subordinate-audit/allot-person/allot-person.component'; @@ -10,19 +10,24 @@ import { AllotPersonComponent } from '../da-subordinate-audit/allot-person/allot }) export class DaMonthlyTaskOverviewComponent implements OnInit { - constructor(private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { } + constructor(private ngZone: NgZone, private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { } selectedMonth selectedYear = 2022 selectedTime selectMonth(item) { this.selectedMonth = item.id + this.getHigherTasks() this.getTaskList() + this.getAllStation() + this.getCountStat() } selectYear(e) { this.selectedYear = e - console.log('年', e) + this.getHigherTasks() this.getTaskList() + this.getAllStation() + this.getCountStat() } months = [ { id: 1, name: '1月', isable: true }, @@ -40,51 +45,125 @@ export class DaMonthlyTaskOverviewComponent implements OnInit { ] - istaskauditExpanded = true - istaskauditexpand() { - this.istaskauditExpanded = !this.istaskauditExpanded - } - isdeployboxExpanded = true - isdeployboxexpand() { - this.isdeployboxExpanded = !this.isdeployboxExpanded + OrganizationId + ngOnInit(): void { + this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId + this.selectedMonth = new Date().getMonth() + 1 + + //上级任务指标 + this.getHigherTasks() + + + // 下级任务申请 + this.getTaskList() + this.getSupervisor('main') + this.getSupervisor('assisted') + + //统计信息 + this.getCountStat() + + //本级部署 + this.getAllStation() } - shuxiTaskData = { - isExpand: true + //上级任务指标 + cardData = [ + { name: '双随机', 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: '熟悉演练', isDetails: false, isLoading: false, background: '#9D80FF', icon: 'yanlian.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: '投诉举报', 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: [] } + ] + + getHigherTasks() { + this.cardData.forEach((item, key) => { + item.data = [] + item.passed = 0 + item.inspected = 0 + }); + let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' + let params = { + Month: selectedTime, + OrganizationId: this.OrganizationId, + PageNumber: 1, + CreationTypes: ['上级指派'], + PageSize: 9999 + } + + this.http.get('/api/PlanTasks', { + params: params + }).subscribe((data: any) => { + + data.items.forEach(element => { + this.cardData.forEach((item, key) => { + element.taskType == item.name ? this.cardData[key].data.push(element) : null + }); + }); + + this.cardData.forEach(element => { + element.data.forEach(item => { + item.approvalStatus == '通过' ? element.passed += 1 : null + item.approvalStatus == '已检查 ' ? element.inspected += 1 : null + }) + }) + this.cardData.forEach(element => { + element.percentage = Math.round(element.inspected / element.data.length) * 100 || 0 + }) + this.cardData = [...this.cardData] + + }) } - zhidaoTaskData = { - isExpand: true + + openDetails(data, type) { + this.ngZone.run(() => { + //这里写需要立即渲染的代码 + data.isDetails = type + }); + } - PageNumber = 1 - PageSize = 9999 + //下级任务申请打开关闭 + expand(data) { + this.ngZone.run(() => { + //这里写需要立即渲染的代码 + data.isExpand = !data.isExpand + }); + + } + istaskauditExpanded = true + istaskauditexpand() { + this.istaskauditExpanded = !this.istaskauditExpanded + } taskData = [ { 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 }, + { id: 2, name: '双随机任务', finished: 0, totalCount: 0, list: [], isExpand: true } ] - isloading = false getTaskList() { - this.isloading = true this.taskData = [ { 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 }, + { id: 2, name: '双随机任务', finished: 0, totalCount: 0, list: [], isExpand: true } + ] let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' - console.log('查询时间', selectedTime) let params = { Month: selectedTime, OrganizationId: this.OrganizationId, - PageNumber: this.PageNumber, - PageSize: this.PageSize + CreationTypes: ['申领任务'], + PageNumber: 1, + PageSize: 9999 } this.http.get('/api/PlanTasks', { params: params }).subscribe((data: any) => { let arr1 = [] let arr2 = [] + let arr3 = [] data.items.forEach(element => { if (element.taskName == '熟悉演练') { arr1.push(element) @@ -92,27 +171,33 @@ export class DaMonthlyTaskOverviewComponent implements OnInit { if (element.taskName == '联络指导') { arr2.push(element) } + if (element.taskName == '双随机') { + arr3.push(element) + } }); arr1.forEach(item => { - if (!!item.approvalStatus) { + if (item.approvalStatus == '通过') { this.taskData[0].finished += 1 } }); arr2.forEach(item => { - if (!!item.approvalStatus) { + if (item.approvalStatus == '通过') { this.taskData[1].finished += 1 } }); - this.taskData[0].totalCount = arr1.length + arr3.forEach(item => { + if (item.approvalStatus == '通过') { + this.taskData[2].finished += 1 + } + }); this.taskData[0].list = [...arr1] - this.taskData[1].totalCount = arr2.length this.taskData[1].list = [...arr2] - - this.isloading = false - + this.taskData[2].list = [...arr3] console.log('下级任务申请', this.taskData) + }) } + assitantsupervisorList mainsupervisorList getSupervisor(type) { @@ -130,7 +215,6 @@ export class DaMonthlyTaskOverviewComponent implements OnInit { } }) } - allot(item) { console.log(item) if (this.mainsupervisorList.length == 0 || this.assitantsupervisorList.length == 0) { @@ -159,7 +243,7 @@ export class DaMonthlyTaskOverviewComponent implements OnInit { this.message.create('success', '分配成功'); resolve(data) console.log(data); - + this.getTaskList() return true }, @@ -183,52 +267,60 @@ export class DaMonthlyTaskOverviewComponent implements OnInit { - - - expand(data) { - data.isExpand = !data.isExpand + //获得统计信息 + countStat: any = { + statistics1: { + num: 0, percentageComplete: 0, item1: 0, item2: 0, item3: 0 + }, + statistics2: { + num: 0, percentageComplete: 0, item1: 0, item2: 0, item3: 0 + }, + statistics3: { + num: 0, percentageComplete: 0, item1: 0, item2: 0, item3: 0 + } } - - formatOne = (percent: number): string => `${percent}%\n完成率`; - - - cardData = [ - { name: '双随机', isDetails: false, background: '#1D9DFF', icon: 'suiji.png' }, - { name: '熟悉演练', isDetails: false, background: '#9D80FF', icon: 'yanlian.png' }, - { name: '投诉举报', isDetails: false, background: '#5087FF', icon: 'tousu.png' }, - { name: '行政许可', isDetails: false, background: '#42B983', icon: 'xuke.png' }, - { name: '消防宣传', isDetails: false, background: '#FF5D2A', icon: 'xuanchuan.png' }, - { name: '火灾调查', isDetails: false, background: '#FF404D', icon: 'huozai.png' } - ] - - openDetails(data, type) { - data.isDetails = type + getCountStat() { + function integer(num) { + return Math.round(num * 100) || 0 + } + let selectedMonth = this.selectedMonth < 10 ? "0" + this.selectedMonth : this.selectedMonth; + let selectedTime = this.selectedYear + '-' + selectedMonth + '-' + '01' + this.http.get('/api/PlanTasks/GetCountStat', { + params: { + month: selectedTime + } + }).subscribe(data => { + console.log('统计信息', data) + this.countStat = { + statistics1: { + num: data['任务总数']['总数'], percentageComplete: integer(data['任务总数']['已完成'] / data['任务总数']['总数']), item1: integer(data['任务总数']['上级指派'] / data['任务总数']['总数']), item2: integer(data['任务总数']['自主任务'] / data['任务总数']['总数']), item3: integer(data['任务总数']['申领任务'] / data['任务总数']['总数']) + }, + statistics2: { + num: data['消防救援任务总数']['总数'], percentageComplete: integer(data['任务总数']['已完成'] / data['任务总数']['总数']), item1: integer(data['消防救援任务总数']['上级指派'] / data['消防救援任务总数']['总数']), item2: integer(data['消防救援任务总数']['自主任务'] / data['消防救援任务总数']['总数']), item3: integer(data['消防救援任务总数']['申领任务'] / data['消防救援任务总数']['总数']) + }, + statistics3: { + num: data['检查员任务总数']['总数'], percentageComplete: integer(data['任务总数']['已完成'] / data['任务总数']['总数']), item1: integer(data['检查员任务总数']['上级指派'] / data['检查员任务总数']['总数']), item2: integer(data['检查员任务总数']['自主任务'] / data['检查员任务总数']['总数']), item3: integer(data['检查员任务总数']['申领任务'] / data['检查员任务总数']['总数']) + } + } + }) } - xxx = false - radioChange(e) { - setTimeout(() => { - this.xxx = !this.xxx - }, 0); - } - OrganizationId - ngOnInit(): void { - this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId - this.selectedMonth = new Date().getMonth() + 1 - this.getTaskList() - //获得主协调查人员 - this.getSupervisor('main') - this.getSupervisor('assisted') - this.getAllStation() + + //本级部署打开关闭 + isdeployboxExpanded = true + isdeployboxexpand() { + this.isdeployboxExpanded = !this.isdeployboxExpanded } + formatOne = (percent: number): string => `${percent}%\n完成率`; + //获得辖区下所有救援站 stationData = [] @@ -240,23 +332,26 @@ export class DaMonthlyTaskOverviewComponent implements OnInit { this.http.get('/api/Organizations', { params: params }).subscribe((data: any) => { - data.items = data.items.filter(element => { - return element.level == 'squadron' - }); - data.items.forEach(element => { - element.isExpand = false - element.isLoading = false - }); - this.stationData = data.items + this.ngZone.run(() => { + data.items = data.items.filter(element => { + return element.level == 'squadron' + }); + data.items.forEach(element => { + element.isExpand = false + element.isLoading = false + }); + this.stationData = data.items + this.stationData[0].isExpand = true + this.stationData.forEach(item => { + this.getTaskListOfStation(item) + }) + }) + }) } expandcarditem(item) { item.isExpand = !item.isExpand - console.log(item) - if (item.isExpand) { - this.getTaskListOfStation(item) - } } //获得消防站下的所有任务 @@ -265,9 +360,9 @@ export class DaMonthlyTaskOverviewComponent implements OnInit { let params = { Month: selectedTime, CompanyOrganizationId: item.id, - PageNumber: this.PageNumber, + PageNumber: 1, approvalStatuses: '通过', - PageSize: this.PageSize + PageSize: 9999 } item.isLoading = true this.http.get('/api/PlanTasks', { @@ -276,13 +371,13 @@ export class DaMonthlyTaskOverviewComponent implements OnInit { next: (data: any) => { item.isLoading = false let listData = [ - { name: '双随机', background: '#1D9DFF', icon: 'suiji.png', scale: '0/0', data: [] }, - { name: '行政许可', background: '#42B983', icon: 'xuke.png', scale: '0/0', data: [] }, - { name: '熟悉演练', background: '#9D80FF', icon: 'yanlian.png', scale: '0/0', data: [] }, - { name: '联络指导', background: '#5483EA', icon: 'zhidao.png', scale: '0/0', data: [] }, - { name: '消防宣传', background: '#FF5D2A', icon: 'xuanchuan.png', scale: '0/0', data: [] }, - { name: '投诉举报', background: '#5087FF', icon: 'tousu.png', scale: '0/0', data: [] }, - { name: '火灾调查', background: '#FF404D', icon: 'huozai.png', scale: '0/0', data: [] } + { name: '双随机', background: '#1D9DFF', icon: 'suiji.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '行政许可', background: '#42B983', icon: 'xuke.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '熟悉演练', background: '#9D80FF', icon: 'yanlian.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '联络指导', background: '#5483EA', icon: 'zhidao.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '消防宣传', background: '#FF5D2A', icon: 'xuanchuan.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '投诉举报', background: '#5087FF', icon: 'tousu.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '火灾调查', background: '#FF404D', icon: 'huozai.png', scale: '0/0', data: [], inspected: 0, finished: 0 } ] data.items.forEach(element => { listData.forEach((item, key) => { @@ -297,7 +392,22 @@ export class DaMonthlyTaskOverviewComponent implements OnInit { } } item.data = listData - // console.log('点击的救援站通过数据', item) + console.log('当前登录用户所有通过的任务', item); + item.allUnitsNum = 0 + item.awaitInspect = 0 + item.inspected = 0 + item.finished = 0 + item.data.forEach(element => { + item.allUnitsNum += element.data.length + element.data.forEach(i => { + i.approvalStatus == '待检查' ? item.awaitInspect += 1 : null + i.approvalStatus == '已检查' ? item.inspected += 1 : null + i.approvalStatus == '待检查' ? element.inspected += 1 : null + i.approvalStatus == '已检查' ? element.finished += 1 : null + }); + }); + item.percentage = Math.round(item.inspected / item.allUnitsNum) * 100 + }, error: (err) => { this.message.create('warning', '获取数据失败'); diff --git a/src/app/home/task/da-oneself-plan/da-oneself-plan.component.html b/src/app/home/task/da-oneself-plan/da-oneself-plan.component.html index fbd0388..bf7885d 100644 --- a/src/app/home/task/da-oneself-plan/da-oneself-plan.component.html +++ b/src/app/home/task/da-oneself-plan/da-oneself-plan.component.html @@ -1,17 +1,18 @@
    - - - + + +
    + [ngClass]="{'selectedMonth': item.id == selectedMonth}"> {{item.name}}
    +
    @@ -24,6 +25,9 @@
    +
    + +
    @@ -37,12 +41,13 @@ style="vertical-align: text-top;cursor: pointer;" nz-icon nzType="right-circle" nzTheme="outline">

    -

    5/9

    +

    + {{item.passed}}/{{item.data.length}}

    - +
    -
    @@ -50,19 +55,25 @@

    {{item.name}} - 返回 + + + + 返回 + +

    -
    +

    - 济南历下森豪室内娱乐场 - - 派发 + {{i.company.companyName}} + + {{i.approvalStatus}}

    -

    A消防救援站

    -

    派发

    +

    {{i.company.organization.name}}

    +

    + {{i.approvalStatus}} +

    @@ -72,48 +83,55 @@
    -
    +
    +
    + +
    - {{item.name}} + {{element.name}} + + + + 单位总数:{{element.awaitInspect}}/{{element.allUnitsNum}} + - 单位总数: 7/8
    完成进度 - +
    - - - {{item.isExpand ? '收起' :'展开'}} - + + + {{element.isExpand ? '收起' :'展开'}} +
    -
    -
    +
    +
    -
    - - 重大活动 +
    + + {{item.name}}
    已分配 - 1 + {{item.inspected}}
    已完成 - 1 + {{item.finished}}
    -
    +
    - 尬粒酒店管理有限公司济南泺文路分公司 + {{i.company.companyName}} 单位名称 @@ -121,7 +139,7 @@
    - 重点单位 + {{i.company.useNature}} 级别 @@ -129,100 +147,52 @@
    - 历下区A消防救援站 + {{i.organization.name}} 责任机构
    -
    - - 历下区B消防救援站 - - - 协助机构 +
    + + + + + {{o.name}} + + + + + + + {{o.name}} + + + + 协助人员
    - + 宣传 同步工作
    -
    - - - - - - 进度 - -
    -
    - - -
    -
    -
    -
    - - 尬粒酒店管理有限公司济南泺文路分公司 - - - 单位名称 - -
    -
    - - 重点单位 - - - 级别 - -
    -
    - - 历下区A消防救援站 - - - 责任机构 - -
    -
    - - 历下区B消防救援站 - - - 协助机构 - -
    +
    - - - - 同步工作 - -
    -
    - - - + {{i.inspectionResult}} - 进度 + 检查结果
    -
    - - -
    @@ -231,7 +201,6 @@
    -
    diff --git a/src/app/home/task/da-oneself-plan/da-oneself-plan.component.scss b/src/app/home/task/da-oneself-plan/da-oneself-plan.component.scss index d59d3b0..f2f9c3f 100644 --- a/src/app/home/task/da-oneself-plan/da-oneself-plan.component.scss +++ b/src/app/home/task/da-oneself-plan/da-oneself-plan.component.scss @@ -45,18 +45,21 @@ box-sizing: border-box; padding: 18px; color: #303133; + padding-bottom: 0; + padding-right: 0; .instrumentpanelheader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; + box-sizing: border-box; + padding-right: 22px; } .instrumentpanel { display: flex; flex-wrap: wrap; - justify-content: space-between; } .instrumentpanelitem { @@ -66,7 +69,7 @@ opacity: 1; border: 1px solid #E4E7EC; display: flex; - + position: relative; .itemone { width: 100%; @@ -193,6 +196,7 @@ width: 24.3%; height: 260px; margin-bottom: 18px; + margin-right: 8px; .itemone { .instrumentpanelitemleft { @@ -204,7 +208,8 @@ .instrumentpanelitemclose { width: 11.7%; height: 200px; - margin-bottom: 0px; + margin-bottom: 18px; + margin-right: 1%; .itemone { .instrumentpanelitemleft { @@ -230,6 +235,7 @@ color: #303133; box-sizing: border-box; padding: 0 18px; + position: relative; .header { width: 100%; @@ -331,7 +337,13 @@ padding: 12px 0px; border-bottom: 1px dashed #C7CAD0; + div { + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } .flexcol { display: flex; @@ -350,21 +362,33 @@ } .namebox { - width: 28%; + flex: 2; } - .progressbox { - width: 220px; + .flexcolassistant { + flex: 2; + overflow: hidden; - span:nth-child(1) { + .assistant { width: 100%; - } - } - .btnbox { - display: flex; - justify-content: flex-end; - align-self: flex-start; + span { + color: #303133; + margin-right: 6px; + } + + img { + width: 16px; + height: 16px; + vertical-align: text-bottom; + } + + display: inline-block; + text-align: left; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } } } diff --git a/src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts b/src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts index 8494edf..c834595 100644 --- a/src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts +++ b/src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts @@ -1,8 +1,9 @@ -import { Component, OnInit,ViewContainerRef } from '@angular/core'; +import { Component, OnInit, ViewContainerRef } from '@angular/core'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import {PlanAdjustmentComponent} from './plan-adjustment/plan-adjustment.component' +import { PlanAdjustmentComponent } from './plan-adjustment/plan-adjustment.component' +import { HttpClient } from '@angular/common/http'; @Component({ selector: 'app-da-oneself-plan', templateUrl: './da-oneself-plan.component.html', @@ -10,28 +11,43 @@ import {PlanAdjustmentComponent} from './plan-adjustment/plan-adjustment.compone }) export class DaOneselfPlanComponent implements OnInit { - constructor(private modal: NzModalService,private message: NzMessageService,private viewContainerRef: ViewContainerRef) { } + constructor(private http: HttpClient, private modal: NzModalService, private message: NzMessageService, private viewContainerRef: ViewContainerRef) { } validateForm!: FormGroup; + OrganizationId ngOnInit(): void { + this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId + this.selectedMonth = new Date().getMonth() + 1 + this.getTasks() + this.getAllStation() } - months = [ - { name: '1月', isable: true }, - { name: '2月', isable: true }, - { name: '3月', isable: true }, - { name: '4月', isable: true }, - { name: '5月', isable: true }, - { name: '6月', isable: true }, - { name: '7月', isable: true }, - { name: '8月', isable: true }, - { name: '9月', isable: true }, - { name: '10月', isable: true }, - { name: '11月', isable: true }, - { name: '12月', isable: true } - ] selectedMonth + selectedYear = 2022 + selectedTime selectMonth(item) { - this.selectedMonth = item.name + this.selectedMonth = item.id + this.getTasks() + this.getAllStation() + } + selectYear(e) { + this.selectedYear = e + console.log('年', e) + this.getTasks() + this.getAllStation() } + months = [ + { id: 1, name: '1月', isable: true }, + { id: 2, name: '2月', isable: true }, + { id: 3, name: '3月', isable: true }, + { id: 4, name: '4月', isable: true }, + { id: 5, name: '5月', isable: true }, + { id: 6, name: '6月', isable: true }, + { id: 7, name: '7月', isable: true }, + { id: 8, name: '8月', isable: true }, + { id: 9, name: '9月', isable: true }, + { id: 10, name: '10月', isable: true }, + { id: 11, name: '11月', isable: true }, + { id: 12, name: '12月', isable: true } + ] isExpand = false expand() { @@ -41,52 +57,169 @@ export class DaOneselfPlanComponent implements OnInit { formatOne = (percent: number): string => `${percent}%\n完成率`; + //上部卡片 cardData = [ - { name: '重大活动', isDetails: false, background: '#FF9203', icon: 'huodong.png' }, - { name: '双随机', isDetails: false, background: '#1D9DFF', icon: 'suiji.png' }, - { name: '行政许可', isDetails: false, background: '#42B983', icon: 'xuke.png' }, - { name: '熟悉演练', isDetails: false, background: '#9D80FF', icon: 'yanlian.png' }, - { name: '联络指导', isDetails: false, background: '#5483EA', icon: 'zhidao.png' }, - { name: '消防宣传', isDetails: false, background: '#FF5D2A', icon: 'xuanchuan.png' }, - { name: '投诉举报', isDetails: false, background: '#5087FF', icon: 'tousu.png' }, - { name: '火灾调查', isDetails: false, background: '#FF404D', icon: 'huozai.png' } + { name: '双随机', 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: '熟悉演练', 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: '消防宣传', 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: '火灾调查', isDetails: false, isLoading: false, background: '#FF404D', icon: 'huozai.png', passed: 0, inspected: 0, percentage: 0, data: [] } ] - openDetails(data, type) { data.isDetails = type } - xxx = false - radioChange(e) { - setTimeout(() => { - this.xxx = !this.xxx - }, 0); - + async getTasks() { + this.cardData.forEach((item, key) => { + item.data = [] + item.passed = 0 + item.inspected = 0 + }); + let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' + let params = { + Month: selectedTime, + OrganizationId: this.OrganizationId, + PageNumber: 1, + PageSize: 9999 + } + return await new Promise((resolve, reject) => { + this.http.get('/api/PlanTasks', { + params: params + }).subscribe((data: any) => { + // console.log('任务申请列表', data.items); + data.items.forEach(element => { + this.cardData.forEach((item, key) => { + element.taskType == item.name ? this.cardData[key].data.push(element) : null + }); + }); + + this.cardData.forEach(element => { + element.data.forEach(item => { + item.approvalStatus == '通过' ? element.passed += 1 : null + item.approvalStatus == '已检查 ' ? element.inspected += 1 : null + }) + }) + this.cardData.forEach(element => { + element.percentage = Math.round(element.inspected / element.data.length) * 100 || 0 + }) + + resolve(data) + console.log('并入卡片数据', this.cardData) + }) + }) + } + + + + //获得辖区下所有救援站 + stationData = [] + getAllStation() { + let params = { + ContainsChildren: true, + pageSize: 9999 + } + this.http.get('/api/Organizations', { + params: params + }).subscribe((data: any) => { + data.items = data.items.filter(element => { + return element.level == 'squadron' + }); + data.items.forEach(element => { + element.isExpand = false + element.isLoading = false + }); + this.stationData = data.items + this.stationData[0].isExpand = true + this.stationData.forEach(item => { + this.getTaskListOfStation(item) + }) + }) } - stationData = [ - { name: '历下区A消防救援站', isExpand: true }, - { name: '历下区B消防救援站', isExpand: false }, - { name: '历下区C消防救援站', isExpand: false } - ] expandcarditem(item) { item.isExpand = !item.isExpand } - nodes: any = [] - BuildingTypes - adjustment(){ + //获得消防站下的所有任务 + PageNumber = 1 + PageSize = 9999 + getTaskListOfStation(item) { + let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' + let params = { + Month: selectedTime, + CompanyOrganizationId: item.id, + PageNumber: this.PageNumber, + approvalStatuses: ['通过', '待检查'], + PageSize: this.PageSize + } + item.isLoading = true + this.http.get('/api/PlanTasks', { + params: params + }).subscribe({ + next: (data: any) => { + item.isLoading = false + let listData = [ + { name: '双随机', background: '#1D9DFF', icon: 'suiji.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '行政许可', background: '#42B983', icon: 'xuke.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '熟悉演练', background: '#9D80FF', icon: 'yanlian.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '联络指导', background: '#5483EA', icon: 'zhidao.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '消防宣传', background: '#FF5D2A', icon: 'xuanchuan.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '投诉举报', background: '#5087FF', icon: 'tousu.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '火灾调查', background: '#FF404D', icon: 'huozai.png', scale: '0/0', data: [], inspected: 0, finished: 0 } + ] + data.items.forEach(element => { + listData.forEach((item, key) => { + element.taskType == item.name ? listData[key].data.push(element) : null + }); + }); + for (let index = 0; index < listData.length; index++) { + const element = listData[index]; + if (element.data.length == 0) { + listData.splice(index, 1) + index-- + } + } + item.data = listData + console.log('当前登录用户所有通过的任务', item); + item.allUnitsNum = 0 + item.awaitInspect = 0 + item.inspected = 0 + item.finished = 0 + item.data.forEach(element => { + item.allUnitsNum += element.data.length + element.data.forEach(i => { + i.approvalStatus == '待检查' ? item.awaitInspect += 1 : null + i.approvalStatus == '已检查' ? item.inspected += 1 : null + i.approvalStatus == '待检查' ? element.inspected += 1 : null + i.approvalStatus == '已检查' ? element.finished += 1 : null + }); + }); + item.percentage = Math.round(item.inspected / item.allUnitsNum) * 100 + }, + error: (err) => { + this.message.create('warning', '获取数据失败'); + item.isLoading = false + } + }) + } + + adjustment(item) { + let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' const modal = this.modal.create({ nzTitle: "任务调整", nzContent: PlanAdjustmentComponent, nzViewContainerRef: this.viewContainerRef, nzWidth: 900, + nzFooter: null, nzComponentParams: { - - }, - nzOnOk: async () => { - console.log(123); + data: JSON.parse(JSON.stringify(item)), + time: selectedTime, + level: '大队' } }); const instance = modal.getContentComponent(); - + modal.afterClose.subscribe(result => { + this.getTaskListOfStation(item) + }); } } diff --git a/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.html b/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.html index 8ebc569..cbd2070 100644 --- a/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.html +++ b/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.html @@ -1,35 +1,39 @@
    -
    -
    未接任务任务总数:{{taskNumber}}/8
    +
    +
    + +
    +
    未接任务
    -
    -    - {{item.tag}} -
    - +
    +    + {{item.name}} +
    +
    -
    -
    +
    +
    + +
    已接任务
    -
    +
    -    - {{item2.tag}} +    + {{item.name}}
    -
    -
    -
    {{data.name}}
    -
    +
    +
    +
    {{i.company.companyName}}
    +
    -
    - -
    \ No newline at end of file diff --git a/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.scss b/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.scss index 53bf912..168eb3f 100644 --- a/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.scss +++ b/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.scss @@ -1,5 +1,7 @@ .box { display: flex; + max-height: 800px; + overflow-y: auto; } .title{ span{ diff --git a/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.ts b/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.ts index c7e8546..431b430 100644 --- a/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.ts +++ b/src/app/home/task/da-oneself-plan/plan-adjustment/plan-adjustment.component.ts @@ -1,4 +1,6 @@ -import { Component, OnInit } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Component, Input, OnInit } from '@angular/core'; +import { NzMessageService } from 'ng-zorro-antd/message'; @Component({ selector: 'app-plan-adjustment', @@ -6,65 +8,190 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./plan-adjustment.component.scss'] }) export class PlanAdjustmentComponent implements OnInit { + @Input() data?: any; + @Input() time?: any; + @Input() level?: any; - constructor() { } - list = [ - { - tag: "行政许可", - class: "#42B983", - item: [ - { - name: "想啥吃啥餐饮有限公司", - checked: false - }, - { - name: "想啥吃啥餐饮有限公司", - checked: false - } - ] - }, - { - tag: "双随机", - class: "#1D9DFF", - item: [ - { - name: "想啥吃啥餐饮有限公司", - checked: false - } - ] - }, - ] - list2 = [ + constructor(private http: HttpClient, private message: NzMessageService) { } - ] - taskNumber=0 - task=false + spin1 = false + spin2 = false + userId ngOnInit(): void { + this.userId = JSON.parse(sessionStorage.getItem('userData')).id + this.getTaskListOfStation(this.data, '未接任务') } - aaa(data) { - if(data.checked && !this.task){ - this.list2.push({meu:this.list2.length,data}) - console.log(this.list2); - this.taskNumber=this.list2.length - if(this.taskNumber==8){ - this.task=true - } - }else{ - this.bbb(data) + push(i, item, e) { + let body = { + approvalStatus: e ? '通过' : '待处理' } + this.http.patch(`/api/PlanTasks/${i.id}`, body).subscribe({ + next: (data) => { + this.message.create('success', '处理成功'); + if (e) { + i.approvalStatus = '通过' + let isTrue = this.data.data.find((item) => { + return item.name == i.taskType + }) + if (isTrue) { + this.data.data.forEach(item => { + if (item.name == i.taskType) { + item.data.push(i) + } + }); + } else { + this.data.data.push({ + name: item.name, + background: item.background, + data: [i] + }) + } + } else { + this.data.data.forEach((item, key) => { + if (item.name == i.taskType) { + for (let index = 0; index < item.data.length; index++) { + const element = item.data[index]; + if (element.id == i.id) { + item.data.splice(index, 1) + index-- + } + } + } + }); + } + }, + error: (err) => { + this.message.create('warning', '处理失败'); + + } + }) } - bbb(e) { - console.log(e); - e.checked=false - for (let index = 0; index < this.list2.length; index++) { - if(e==this.list2[index].data){ - this.list2.splice(this.list2[index].meu,1) - this.taskNumber=this.list2.length - if(this.taskNumber!=8){ - this.task=false + cancel(i, item) { + // console.log(i) + // console.log(item) + // console.log(this.allTasks) + let body = { + approvalStatus: '待处理' + } + this.http.patch(`/api/PlanTasks/${i.id}`, body).subscribe({ + next: (data) => { + this.message.create('success', '处理成功'); + this.allTasks.forEach(element => { + if (element.name == item.name) { + element.data.forEach(item => { + if (item.id == i.id) { + item.checked = false + item.approvalStatus = '待处理' + } + }); + } + }); + + for (let index = 0; index < item.data.length; index++) { + const element = item.data[index]; + if (element.id == i.id) { + item.data.splice(index, 1) + index-- + } } + }, + error: (err) => { + this.message.create('warning', '处理失败'); + } + }) + + + } + + //获得消防站下的所有任务 + PageNumber = 1 + PageSize = 9999 + allTasks + async getTaskListOfStation(item, type) { + let statuses = [] + if (type == '未接任务') { + statuses = ['待处理', '通过', '驳回', '待检查', '已检查'] + this.spin1 = true + } + if (type == '已接任务') { + statuses = ['通过', '待检查'] + this.spin2 = true + } + let params + if (this.level == '大队') { + params = { + Month: this.time, + CompanyOrganizationId: item.id, + PageNumber: this.PageNumber, + approvalStatuses: statuses, + PageSize: this.PageSize + } + } else { + params = { + Month: this.time, + SupervisorId: this.userId, + PageNumber: this.PageNumber, + approvalStatuses: statuses, + PageSize: this.PageSize } - } + return new Promise((resolve, reject) => { + this.http.get('/api/PlanTasks', { + params: params + }).subscribe({ + next: (data: any) => { + let checkedList = [] + this.data.data.forEach(element => { + element.data.forEach(item => { + checkedList.push(item) + }); + }); + data.items.forEach(element => { + element.checked = false + checkedList.forEach(item => { + if (item.id == element.id) { + element.checked = true + } + }); + }); + + let listData = [ + { name: '双随机', background: '#1D9DFF', icon: 'suiji.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '行政许可', background: '#42B983', icon: 'xuke.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '熟悉演练', background: '#9D80FF', icon: 'yanlian.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '联络指导', background: '#5483EA', icon: 'zhidao.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '消防宣传', background: '#FF5D2A', icon: 'xuanchuan.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '投诉举报', background: '#5087FF', icon: 'tousu.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '火灾调查', background: '#FF404D', icon: 'huozai.png', scale: '0/0', data: [], inspected: 0, finished: 0 } + ] + data.items.forEach(element => { + listData.forEach((item, key) => { + element.taskType == item.name ? listData[key].data.push(element) : null + }); + }); + for (let index = 0; index < listData.length; index++) { + const element = listData[index]; + if (element.data.length == 0) { + listData.splice(index, 1) + index-- + } + } + this.allTasks = listData + if (type == '未接任务') { + this.spin1 = false + } + if (type == '已接任务') { + this.spin2 = false + } + resolve(data) + }, + error: (err) => { + reject(err) + } + }) + }) + } + + } diff --git a/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.html b/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.html index 0415b4e..f43ee10 100644 --- a/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.html +++ b/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.html @@ -3,7 +3,7 @@ 检查员(主) - + @@ -12,7 +12,7 @@ 检查员(协) - + diff --git a/src/app/home/task/station-task-apply/apply/apply.component.html b/src/app/home/task/station-task-apply/apply/apply.component.html index d621d3a..7b568fa 100644 --- a/src/app/home/task/station-task-apply/apply/apply.component.html +++ b/src/app/home/task/station-task-apply/apply/apply.component.html @@ -1,4 +1,4 @@ -
    +
    任务名称 @@ -10,7 +10,7 @@ 单位名称 - + +
    + + {{selectedUnitData.name}} + + + 请点击选择单位 + + +
    +
    + 单位名称 + | + 组织机构 +
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    + + + + + + + +
    +
    +
    + + + +
    + + + {{ node.title }} + +
    +
    + + + + + + + + +
    +
    +
    + + +
    +
    +
    +
    协助机构 diff --git a/src/app/home/task/station-task-apply/apply/apply.component.scss b/src/app/home/task/station-task-apply/apply/apply.component.scss index e69de29..6ccbeba 100644 --- a/src/app/home/task/station-task-apply/apply/apply.component.scss +++ b/src/app/home/task/station-task-apply/apply/apply.component.scss @@ -0,0 +1,78 @@ +.selectUnit { + width: 85%; + position: relative; + background-color: #fff; + border: 1px solid #d9d9d9; + border-radius: 2px; + transition: all 0.3s; + height: 32px; + line-height: 30px; + cursor: pointer; + box-sizing: border-box; + padding-left: 10px; + + .gray { + color: #C7C8C7; + } + + .selectUnitPopover { + position: absolute; + left: -1px; + top: 35px; + width: 520px; + height: 438px; + z-index: 9999; + background-color: #fff; + border: 1px solid #d9d9d9; + box-sizing: border-box; + padding: 10px; + nz-form-item { + margin: 12px 0; + } + + display: flex; + flex-direction: column; + + .popoverTitle { + display: flex; + align-items: center; + + span { + color: #C7CAD0; + cursor: pointer; + } + + .selectedspan { + color: #2C4DC0; + } + } + + .popoverContent { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; + + .popoverContentitem { + flex: 1; + overflow-y: auto; + display: flex; + flex-direction: column; + + p { + text-align: center; + } + } + } + + .popoverBtn { + display: flex; + justify-content: flex-end; + margin-top: 16px; + + button { + margin-left: 18px; + } + } + } +} diff --git a/src/app/home/task/station-task-apply/apply/apply.component.ts b/src/app/home/task/station-task-apply/apply/apply.component.ts index c3c5730..81d11c7 100644 --- a/src/app/home/task/station-task-apply/apply/apply.component.ts +++ b/src/app/home/task/station-task-apply/apply/apply.component.ts @@ -5,6 +5,7 @@ import { HttpClient } from '@angular/common/http'; import { TreeService } from 'src/app/service/tree.service'; import { Observable, of } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; +import { NzMessageService } from 'ng-zorro-antd/message'; @Component({ selector: 'app-apply', templateUrl: './apply.component.html', @@ -18,72 +19,169 @@ export class ApplyComponent implements OnInit { @Input() users?: any; validateForm!: FormGroup; - constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { } + constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private toTree: TreeService, private message: NzMessageService) { } newTree ngOnInit(): void { this.validateForm = this.fb.group({ taskname: [null, [Validators.required]], - unitname: [null, [Validators.required]], organization: [null, [Validators.required]] }); - // let arr = [...this.supervisorList, ...this.organizationList] - // this.newTree = this.toTree.toTree(arr) - this.newTree = this.nodes - } + this.newTree = this.nodes + + + Promise.all([this.getCompanies(), this.getAllOrganization()]) + .then((results) => { - destroyModal(): void { - this.modal.destroy({ data: 'this the result data' }); + let arr = [...JSON.parse(JSON.stringify(this.allOrList)), ...JSON.parse(JSON.stringify(this.unitList))] + console.log(789456, this.allOrList) + console.log(789456, this.unitList) + let nodes = [...this.toTree.toTree(arr)] + this.unitPopover.nodes = JSON.parse(JSON.stringify(nodes)) + + }); } - optionList = []; - selectedUser = null; + + isLoading = false; - PageNumber = 0 - PageSize = 50 - totalCount - loadMore(): Promise { - if (this.optionList.length >= this.totalCount) { - return - } - this.PageNumber += 1 - this.isLoading = true; - this.getCompanies() - } - search(value: string) { - this.optionList = [] - this.PageNumber = 1 - this.isLoading = true; - this.getCompanies(value) - } + allOrList: any - async getCompanies(CompanyName?: string) { + async getAllOrganization() { let params = { - CompanyName: CompanyName, + ContainsChildren: true, + pageSize: 9999 + } + return new Promise((resolve, reject) => { + this.http.get('/api/Organizations', { + params: params + }).subscribe((data: any) => { + data.items.forEach(element => { + element.key = element.id + element.title = element.name + element.selectable = false + element.disableCheckbox = true + }); + this.allOrList = JSON.parse(JSON.stringify(data.items)) + this.allOrList.length == 1 ? this.allOrList[0].parentId = null : null + resolve(data) + }) + }) + } + unitList + async getCompanies(incomingData?: any) { + let params = { + CompanyName: incomingData ? incomingData.search1 : '', OrganizationId: JSON.parse(sessionStorage.getItem('userData')).organizationId, - PageNumber: this.PageNumber, - PageSize: this.PageSize + PageNumber: 1, + PageSize: 9999 } - await new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { this.http.get('/api/Companies', { params: params }).subscribe((data: any) => { - this.totalCount = data.totalCount - this.isLoading = false; - this.optionList = [...this.optionList, ...data.items]; - let map = new Map(); - for (let item of this.optionList) { - if (!map.has(item.id)) { - map.set(item.id, item); - }; - }; - this.optionList = [...map.values()]; + data.items.forEach(element => { + element.label = element.companyName + element.value = element.id + element.parentId = element.organizationId + element.key = element.id + element.title = element.companyName + element.level = 4 + }); + this.unitList = data.items + + this.unitPopover.unitList = JSON.parse(JSON.stringify(this.unitList)) + + resolve(data) }) }) } + + + selectedUnitData = { + name: '', + id: '' + } + selectedUnit(data, e?: any) { + e ? e.stopPropagation() : null + let arr = [...data.search1Value, ...data.search2Value] + let arrSet = [...new Set(arr)] + + if (arrSet.length > 1) { + this.message.create('warning', '只能选择一个单位'); + return + } else { + this.unitList.forEach(element => { + if (element.id == arrSet[0]) { + this.selectedUnitData.name = element.companyName + this.selectedUnitData.id = element.id + } + }); + console.log(this.selectedUnitData) + console.log(this.unitPopover) + this.unitPopover.isPopover = false + } + } + // + unitPopover = { + allocated: 0, + isExpand: true,//卡片展开 + isPopover: false,//选择单位气泡卡片 + isLoading: false, + search1: '',//选择单位气泡卡片---单位选择列表 + search1Value: [], + search2: '',//选择单位气泡卡片---组织选择列表 + search2Value: [], + searchAll: [], + selectedMenu: 1,//选择单位气泡卡片 + data: [ + ],//表格数据 + nodes: [], + unitList: [] + } + isPopover(data, e?: any) { + e ? e.stopPropagation() : null + console.log(data) + data.isPopover = !data.isPopover + // data.unitList.forEach(element => { + // element.checked = false + // }); + + } + // 弹出 tab + popoverMenuSelect(data, type) { + data.selectedMenu = type + } + //搜索框提交 + submitForm(data): void { + console.log(data) + data.unitList = [] + this.getCompanies(data) + } + log(data) { + let arr = [] + data.unitList.forEach(item => { + item.checked ? arr.push(item.id) : null + }); + data.search1Value = arr + } + orcheckbox(data, $event, node) { + if ($event) { + data.search2Value.push(node.origin.id) + } else { + for (let index = 0; index < data.search2Value.length; index++) { + const element = data.search2Value[index]; + if (element == node.origin.id) { + data.search2Value.splice(index, 1) + index-- + } + } + } + console.log(data.search2Value) + } } diff --git a/src/app/home/task/station-task-apply/station-task-apply.component.html b/src/app/home/task/station-task-apply/station-task-apply.component.html index 450c929..03cc44b 100644 --- a/src/app/home/task/station-task-apply/station-task-apply.component.html +++ b/src/app/home/task/station-task-apply/station-task-apply.component.html @@ -118,19 +118,19 @@
    - - + + {{i.name}} - - + + {{i.name}} @@ -148,19 +148,25 @@
    - - - 待处理 + + + + + + {{item.approvalStatus}} + 结果
    - - 查看 + + 查看 + 删除 操作 diff --git a/src/app/home/task/station-task-apply/station-task-apply.component.ts b/src/app/home/task/station-task-apply/station-task-apply.component.ts index c70daeb..0e1d83b 100644 --- a/src/app/home/task/station-task-apply/station-task-apply.component.ts +++ b/src/app/home/task/station-task-apply/station-task-apply.component.ts @@ -278,14 +278,18 @@ export class StationTaskApplyComponent implements OnInit { }, nzOnOk: async () => { console.log(instance.validateForm.value) - if (instance.validateForm.valid) { + if (instance.validateForm.valid && instance.selectedUnitData.id) { await new Promise((resolve, reject) => { + let selectedMonth = this.selectedMonth < 10 ? "0" + this.selectedMonth : this.selectedMonth; + let selectedTime = this.selectedYear + '-' + selectedMonth + '-' + '01' let body = { + month: selectedTime, taskName: instance.validateForm.value.taskname, taskType: instance.validateForm.value.taskname, - companyId: instance.validateForm.value.unitname, + companyId: instance.selectedUnitData.id, organizationId: this.OrganizationId, supervisorIds: instance.validateForm.value.organization, + creationType: '申领任务', approvalStatus: '待处理' } this.http.post('/api/PlanTasks', body).subscribe({ @@ -330,7 +334,35 @@ export class StationTaskApplyComponent implements OnInit { modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); } + //删除任务 + deleteTask(item, incomingData) { + console.log(item) + console.log(incomingData) + this.modal.confirm({ + nzTitle: `确定要删除该任务吗?`, + nzOkText: '确定', + nzOkType: 'primary', + nzOnOk: () => { + this.http.delete(`/api/PlanTasks/${item.id}`).subscribe(data => { + for (let index = 0; index < incomingData.length; index++) { + const element = incomingData[index]; + if (element.id == item.id) { + incomingData.splice(index, 1) + index-- + } + } + + this.message.create('success', '删除成功!'); + + }) + }, + nzCancelText: '取消', + nzOnCancel: () => { + + } + }); + } } export enum ApprovalStatus { diff --git a/src/app/home/task/station-task-execution/station-task-execution.component.html b/src/app/home/task/station-task-execution/station-task-execution.component.html index 1e41d8e..07e01e0 100644 --- a/src/app/home/task/station-task-execution/station-task-execution.component.html +++ b/src/app/home/task/station-task-execution/station-task-execution.component.html @@ -39,7 +39,7 @@
    - 任务申请 + 任务执行 @@ -76,10 +76,10 @@
    -
    +
    @@ -150,7 +150,7 @@
    - 待检查 + {{item.inspectionResult}} 检查结果 diff --git a/src/app/home/task/station-task-execution/station-task-execution.component.ts b/src/app/home/task/station-task-execution/station-task-execution.component.ts index 69b5612..b10e9ac 100644 --- a/src/app/home/task/station-task-execution/station-task-execution.component.ts +++ b/src/app/home/task/station-task-execution/station-task-execution.component.ts @@ -64,16 +64,17 @@ export class StationTaskExecutionComponent implements OnInit { PageSize = 10 taskLIst = [] getTaskList() { - this.isloading = true + // this.isloading = true let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' let params = { Month: selectedTime, - OrganizationId: this.OrganizationId, + // OrganizationId: this.OrganizationId, TaskName: this.searchForm.taskname, CompanyName: this.searchForm.unitname, AssitantOrganizationId: this.searchForm.or, + approvalStatuses: ['已检查'], + SupervisorId: this.userId, PageNumber: this.PageNumber, - CreatorId: this.userId, PageSize: this.PageSize } this.http.get('/api/PlanTasks', { @@ -254,7 +255,7 @@ export class StationTaskExecutionComponent implements OnInit { } - + look(item) { } diff --git a/src/app/home/task/station-weekly-plan/create-task/create-task.component.html b/src/app/home/task/station-weekly-plan/create-task/create-task.component.html new file mode 100644 index 0000000..237d5cd --- /dev/null +++ b/src/app/home/task/station-weekly-plan/create-task/create-task.component.html @@ -0,0 +1,24 @@ +
    +
    + + 任务名称 + + + + + + + + 单位名称 + + + + + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/home/task/station-weekly-plan/create-task/create-task.component.scss b/src/app/home/task/station-weekly-plan/create-task/create-task.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/home/task/station-weekly-plan/create-task/create-task.component.ts b/src/app/home/task/station-weekly-plan/create-task/create-task.component.ts new file mode 100644 index 0000000..a2a45c5 --- /dev/null +++ b/src/app/home/task/station-weekly-plan/create-task/create-task.component.ts @@ -0,0 +1,83 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { HttpClient } from '@angular/common/http'; +import { TreeService } from 'src/app/service/tree.service'; +import { Observable, of } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; +@Component({ + selector: 'app-create-task', + templateUrl: './create-task.component.html', + styleUrls: ['./create-task.component.scss'] +}) +export class CreateTaskComponent implements OnInit { + + @Input() title?: any; + + + validateForm!: FormGroup; + constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { } + + + newTree + ngOnInit(): void { + this.validateForm = this.fb.group({ + taskname: [null, [Validators.required]], + unitname: [null, [Validators.required]] + }); + } + + destroyModal(): void { + this.modal.destroy({ data: 'this the result data' }); + } + + optionList = []; + selectedUser = null; + isLoading = false; + + PageNumber = 0 + PageSize = 50 + totalCount + loadMore(): Promise { + if (this.optionList.length >= this.totalCount) { + return + } + this.PageNumber += 1 + this.isLoading = true; + this.getCompanies() + } + + search(value: string) { + this.optionList = [] + this.PageNumber = 1 + this.isLoading = true; + this.getCompanies(value) + } + + async getCompanies(CompanyName?: string) { + let params = { + CompanyName: CompanyName, + OrganizationId: JSON.parse(sessionStorage.getItem('userData')).organizationId, + PageNumber: this.PageNumber, + PageSize: this.PageSize + } + await new Promise((resolve, reject) => { + this.http.get('/api/Companies', { + params: params + }).subscribe((data: any) => { + this.totalCount = data.totalCount + this.isLoading = false; + this.optionList = [...this.optionList, ...data.items]; + let map = new Map(); + for (let item of this.optionList) { + if (!map.has(item.id)) { + map.set(item.id, item); + }; + }; + this.optionList = [...map.values()]; + resolve(data) + }) + }) + } + +} diff --git a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html index ed9ec49..231be00 100644 --- a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html +++ b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.html @@ -33,7 +33,7 @@
    -
    +
    @@ -48,7 +48,7 @@
    -
    +
    @@ -64,12 +64,13 @@ style="vertical-align: text-top;cursor: pointer;" nz-icon nzType="right-circle" nzTheme="outline">

    -

    {{item.scale}}

    +

    + {{item.passed}}/{{item.data.length}}

    - +
    -
    @@ -77,14 +78,17 @@

    {{item.name}} - - + 新增 + 新增 + 返回 -

    @@ -121,17 +125,19 @@
    - + {{element.name}} - 单位总数: 7/8 -
    + 单位总数: {{element.awaitInspect}}/{{element.allUnitsNum}} +
    完成进度 - +
    - + + {{element.isExpand ? '收起' :'展开'}} @@ -147,12 +153,12 @@
    已分配 - 0 + {{item.inspected}}
    已完成 - 0 + {{item.finished}}
    @@ -215,8 +221,9 @@
    - + diff --git a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts index 8b7b56e..619415b 100644 --- a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts +++ b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts @@ -6,6 +6,10 @@ import { NzMessageService } from 'ng-zorro-antd/message'; import { HttpClient } from '@angular/common/http'; import { TreeService } from 'src/app/service/tree.service'; import * as moment from 'moment'; +import { TaskDetailsComponent } from './task-details/task-details.component'; +import { CreateTaskComponent } from './create-task/create-task.component'; +import { differenceInCalendarDays, setHours } from 'date-fns' +import { PlanAdjustmentComponent } from '../da-oneself-plan/plan-adjustment/plan-adjustment.component'; @Component({ selector: 'app-station-weekly-plan', templateUrl: './station-weekly-plan.component.html', @@ -13,11 +17,13 @@ import * as moment from 'moment'; }) export class StationWeeklyPlanComponent implements OnInit { - constructor(private http: HttpClient, private modal: NzModalService, private message: NzMessageService) { } + constructor(private http: HttpClient, private modal: NzModalService, private message: NzMessageService, private viewContainerRef: ViewContainerRef) { } OrganizationId userId isSupervisor + today = new Date(); + disabledDate = (current: Date): boolean => differenceInCalendarDays(current, this.today) <= 0; months = [ { id: 1, name: '1月', isable: true }, { id: 2, name: '2月', isable: true }, @@ -39,11 +45,13 @@ export class StationWeeklyPlanComponent implements OnInit { this.selectedMonth = item.id this.initializeData() this.getTaskList() + this.getTaskListPass(this.stationData[0]) } selectYear(e) { this.selectedYear = e this.initializeData() this.getTaskList() + this.getTaskListPass(this.stationData[0]) } isExpand = true @@ -97,7 +105,7 @@ export class StationWeeklyPlanComponent implements OnInit { } - stationData = [] + //获得辖区下所有救援站 totalCount: string @@ -123,28 +131,28 @@ export class StationWeeklyPlanComponent implements OnInit { } cardData = [ - { name: '双随机', isDetails: false, isloading: false, background: '#1D9DFF', icon: 'suiji.png', scale: '0/0', data: [] }, - { name: '行政许可', isDetails: false, isloading: false, background: '#42B983', icon: 'xuke.png', scale: '0/0', data: [] }, - { name: '熟悉演练', isDetails: false, isloading: false, background: '#9D80FF', icon: 'yanlian.png', scale: '0/0', data: [] }, - { name: '联络指导', isDetails: false, isloading: false, background: '#5483EA', icon: 'zhidao.png', scale: '0/0', data: [] }, - { name: '消防宣传', isDetails: false, isloading: false, background: '#FF5D2A', icon: 'xuanchuan.png', scale: '0/0', data: [] }, - { name: '投诉举报', isDetails: false, isloading: false, background: '#5087FF', icon: 'tousu.png', scale: '0/0', data: [] }, - { name: '火灾调查', isDetails: false, isloading: false, background: '#FF404D', icon: 'huozai.png', scale: '0/0', data: [] } + { name: '双随机', 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: '熟悉演练', 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: '消防宣传', 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: '火灾调查', isDetails: false, isLoading: false, background: '#FF404D', icon: 'huozai.png', passed: 0, inspected: 0, percentage: 0, data: [] } ] //初始化数据 initializeData() { this.cardData = [ - { name: '双随机', isDetails: false, isloading: false, background: '#1D9DFF', icon: 'suiji.png', scale: '0/0', data: [] }, - { name: '行政许可', isDetails: false, isloading: false, background: '#42B983', icon: 'xuke.png', scale: '0/0', data: [] }, - { name: '熟悉演练', isDetails: false, isloading: false, background: '#9D80FF', icon: 'yanlian.png', scale: '0/0', data: [] }, - { name: '联络指导', isDetails: false, isloading: false, background: '#5483EA', icon: 'zhidao.png', scale: '0/0', data: [] }, - { name: '消防宣传', isDetails: false, isloading: false, background: '#FF5D2A', icon: 'xuanchuan.png', scale: '0/0', data: [] }, - { name: '投诉举报', isDetails: false, isloading: false, background: '#5087FF', icon: 'tousu.png', scale: '0/0', data: [] }, - { name: '火灾调查', isDetails: false, isloading: false, background: '#FF404D', icon: 'huozai.png', scale: '0/0', data: [] } + { name: '双随机', 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: '熟悉演练', 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: '消防宣传', 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: '火灾调查', isDetails: false, isLoading: false, background: '#FF404D', icon: 'huozai.png', passed: 0, inspected: 0, percentage: 0, data: [] } ] this.stationData.forEach(element => { - element.isExpand = false + element.isExpand = true element.isLoading = false element.data = [] }); @@ -152,38 +160,114 @@ export class StationWeeklyPlanComponent implements OnInit { - isloading = false + isLoading = false PageNumber = 1 PageSize = 9999 async getTaskList() { - this.isloading = true + this.cardData.forEach(item => { + item.data = [] + }) + this.isLoading = true let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' let params = { Month: selectedTime, - // OrganizationId: this.isSupervisor ? this.OrganizationId : "", SupervisorId: this.userId, PageNumber: this.PageNumber, PageSize: this.PageSize } - var p = await new Promise((resolve, reject) => { + return await new Promise((resolve, reject) => { this.http.get('/api/PlanTasks', { params: params }).subscribe((data: any) => { - this.isloading = false + this.isLoading = false // console.log('任务申请列表', data.items); data.items.forEach(element => { this.cardData.forEach((item, key) => { element.taskType == item.name ? this.cardData[key].data.push(element) : null }); }); + + this.cardData.forEach(element => { + element.data.forEach(item => { + item.approvalStatus == '通过' ? element.passed += 1 : null + item.approvalStatus == '已检查 ' ? element.inspected += 1 : null + }) + }) + this.cardData.forEach(element => { + element.percentage = Math.round(element.inspected / element.data.length) * 100 + }) + resolve(data) console.log('并入卡片数据', this.cardData) }) }) - return p + } + + stationData = [ + { name: '', isExpand: true, isLoading: false, data: [], allUnitsNum: 0, awaitInspect: 0, inspected: 0, percentage: 0 } + ] + async getTaskListPass(item) { + let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' + let params = { + Month: selectedTime, + approvalStatuses: ['通过', '待检查', '已检查'], + SupervisorId: this.userId, + PageNumber: this.PageNumber, + PageSize: this.PageSize + } + item.isLoading = true + return await new Promise((resolve, reject) => { + 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 }, + { name: '行政许可', background: '#42B983', icon: 'xuke.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '熟悉演练', background: '#9D80FF', icon: 'yanlian.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '联络指导', background: '#5483EA', icon: 'zhidao.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '消防宣传', background: '#FF5D2A', icon: 'xuanchuan.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '投诉举报', background: '#5087FF', icon: 'tousu.png', scale: '0/0', data: [], inspected: 0, finished: 0 }, + { name: '火灾调查', background: '#FF404D', icon: 'huozai.png', scale: '0/0', data: [], inspected: 0, finished: 0 } + ] + data.items.forEach(element => { + listData.forEach((item, key) => { + element.taskType == item.name ? listData[key].data.push(element) : null + }); + }); + for (let index = 0; index < listData.length; index++) { + const element = listData[index]; + if (element.data.length == 0) { + listData.splice(index, 1) + index-- + } + } + item.data = listData + console.log('当前登录用户所有通过的任务', item); + item.allUnitsNum = 0 + item.awaitInspect = 0 + item.inspected = 0 + item.finished = 0 + item.data.forEach(element => { + item.allUnitsNum += element.data.length + element.data.forEach(i => { + i.approvalStatus == '待检查' ? item.awaitInspect += 1 : null + i.approvalStatus == '已检查' ? item.inspected += 1 : null + i.approvalStatus == '待检查' ? element.inspected += 1 : null + i.approvalStatus == '已检查' ? element.finished += 1 : null + }); + }); + item.percentage = Math.round(item.inspected / item.allUnitsNum) * 100 + resolve(data) + }) + }) + } + + //接受任务 accept(i, item) { this.modal.confirm({ @@ -191,7 +275,7 @@ export class StationWeeklyPlanComponent implements OnInit { nzOkText: '确定', nzOkType: 'default', nzOnOk: () => { - item.isloading = true + item.isLoading = true this.http.post(`/api/PlanTasks/Approval/${i.id}`, null, { params: { approvalStatus: '通过' @@ -200,19 +284,14 @@ export class StationWeeklyPlanComponent implements OnInit { next: (data) => { this.message.create('success', '已接受'); i.approvalStatus = '通过' - item.isloading = false - this.stationData.forEach(element => { - if (element.id == i.company.organizationId) { - if (element.isExpand) { - this.getTaskListOfStation(element) - } - } - }); + item.isLoading = false + item.passed += 1 + this.getTaskListPass(this.stationData[0]) }, error: (err) => { this.message.create('warning', '接受失败'); - item.isloading = false + item.isLoading = false } }) }, @@ -226,7 +305,7 @@ export class StationWeeklyPlanComponent implements OnInit { nzOkText: '确定', nzOkType: 'default', nzOnOk: () => { - item.isloading = true + item.isLoading = true this.http.post(`/api/PlanTasks/Approval/${i.id}`, null, { params: { approvalStatus: '驳回' @@ -235,27 +314,27 @@ export class StationWeeklyPlanComponent implements OnInit { next: (data) => { this.message.create('success', '已拒绝'); i.approvalStatus = '驳回' - item.isloading = false - this.stationData.forEach(element => { - if (element.id == i.company.organizationId) { - if (element.isExpand) { - this.getTaskListOfStation(element) - } - } - }); + item.isLoading = false + item.passed -= 1 + this.getTaskListPass(this.stationData[0]) }, error: (err) => { this.message.create('warning', '拒绝失败'); - item.isloading = false + item.isLoading = false } }) }, nzCancelText: '取消' }); } + + userName + ngOnInit(): void { this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId this.userId = JSON.parse(sessionStorage.getItem('userData')).id + this.userName = JSON.parse(sessionStorage.getItem('userData')).name + this.stationData[0].name = this.userName let roles = JSON.parse(sessionStorage.getItem('userData')).roles let isSupervisor = roles.find(item => { return item.name.indexOf('检查') != -1 @@ -263,9 +342,9 @@ export class StationWeeklyPlanComponent implements OnInit { isSupervisor ? this.isSupervisor = true : this.isSupervisor = false this.selectedMonth = new Date().getMonth() + 1 - this.getAllStation() + // this.getAllStation() this.getTaskList() - + this.getTaskListPass(this.stationData[0]) setTimeout(() => { this.rollStart() @@ -312,10 +391,10 @@ export class StationWeeklyPlanComponent implements OnInit { expandcarditem(item) { item.isExpand = !item.isExpand - console.log(item) - if (item.isExpand) { - this.getTaskListOfStation(item) - } + // console.log(item) + // if (item.isExpand) { + // this.getTaskListOfStation(item) + // } } //获得消防站下的所有任务 @@ -325,7 +404,7 @@ export class StationWeeklyPlanComponent implements OnInit { Month: selectedTime, CompanyOrganizationId: item.id, PageNumber: this.PageNumber, - approvalStatuses: '通过', + approvalStatuses: ['通过', '待检查', '已检查'], PageSize: this.PageSize } item.isLoading = true @@ -364,7 +443,156 @@ export class StationWeeklyPlanComponent implements OnInit { } }) } - taskDetails(){ - + taskDetails(item) { + // console.log(item) + const modal = this.modal.create({ + nzTitle: item.name, + nzContent: TaskDetailsComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 900, + nzMaskClosable: false, + nzFooter: null, + nzComponentParams: { + data: item, + parent: this + } + }); + const instance = modal.getContentComponent(); + modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); + modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); + } + + + apply(item) { + const modal = this.modal.create({ + nzTitle: '新增' + item.name + '任务', + nzContent: CreateTaskComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 660, + nzMaskClosable: false, + nzComponentParams: { + title: item.name, + }, + nzOnOk: async () => { + console.log(instance.validateForm.value) + if (instance.validateForm.valid) { + await new Promise((resolve, reject) => { + let selectedMonth = this.selectedMonth < 10 ? "0" + this.selectedMonth : this.selectedMonth; + let selectedTime = this.selectedYear + '-' + selectedMonth + '-' + '01' + let body = { + month: selectedTime, + taskName: instance.validateForm.value.taskname, + taskType: instance.validateForm.value.taskname, + companyId: instance.validateForm.value.unitname.id, + organizationId: this.OrganizationId, + supervisorIds: [this.userId], + creationType: '自主任务', + approvalStatus: '通过' + } + this.http.post('/api/PlanTasks', body).subscribe({ + next: (data: any) => { + console.log(item) + data.company = instance.validateForm.value.unitname + item.data.push(data) + item.passed += 1 + // this.getTaskList() + this.getTaskListPass(this.stationData[0]) + this.message.create('success', '创建成功'); + resolve(data) + return true + }, + error: (err) => { + this.message.create('warning', '创建失败'); + reject(err) + return false + } + }) + }) + } else { + this.message.create('warning', '请填写完整!'); + return false + } + } + }); + const instance = modal.getContentComponent(); + modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); + modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); + } + + + createTask(element) { + console.log(element) + let taskIds = [] + element.data.forEach(item => { + item.data.forEach(i => { + i.checkTime ? taskIds.push(i.id) : null + }); + }); + let params = { + ids: taskIds, + approvalStatus: '待检查' + } + this.http.post('/api/PlanTasks/ApprovalMany', null, { params: params }).subscribe({ + next: (data: any) => { + this.message.create('success', '发布成功'); + }, + error: (err) => { + this.message.create('warning', '发布失败'); + } + }) + } + + + adjustment(item) { + let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' + const modal = this.modal.create({ + nzTitle: "任务调整", + nzContent: PlanAdjustmentComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 900, + nzFooter: null, + nzComponentParams: { + data: JSON.parse(JSON.stringify(item)), + time: selectedTime, + level: '非大队' + } + }); + const instance = modal.getContentComponent(); + modal.afterClose.subscribe(result => { + this.getTaskListPass(this.stationData[0]) + }); + } + allPass(item) { + console.log(item) + this.modal.confirm({ + nzTitle: `确定要全部接受该模块下所有任务吗?`, + nzOkText: '确定', + nzOkType: 'default', + nzOnOk: () => { + let ids = [] + item.data.forEach(element => { + ids.push(element.id) + }); + this.http.post(`/api/PlanTasks/ApprovalMany`, null, { + params: { + ids: ids, + approvalStatus: '通过' + } + }).subscribe({ + next: (data) => { + this.message.create('success', '成功'); + item.data.forEach(element => { + element.approvalStatus = '通过' + }); + this.getTaskListPass(this.stationData[0]) + }, + error: (err) => { + this.message.create('warning', '失败'); + item.isLoading = false + } + }) + }, + nzCancelText: '取消' + }); } } diff --git a/src/app/home/task/station-weekly-plan/task-details/task-details.component.html b/src/app/home/task/station-weekly-plan/task-details/task-details.component.html index 53f4d8d..2113b00 100644 --- a/src/app/home/task/station-weekly-plan/task-details/task-details.component.html +++ b/src/app/home/task/station-weekly-plan/task-details/task-details.component.html @@ -1,13 +1,16 @@
    -
    +
    - 想吃啥吃啥有限公司 + {{item.company.companyName}}
    - 已派发 + 接受 + 拒绝 + 待处理 + 已通过 + 已驳回
    -
    \ No newline at end of file diff --git a/src/app/home/task/station-weekly-plan/task-details/task-details.component.scss b/src/app/home/task/station-weekly-plan/task-details/task-details.component.scss index 864b408..8b9f9fb 100644 --- a/src/app/home/task/station-weekly-plan/task-details/task-details.component.scss +++ b/src/app/home/task/station-weekly-plan/task-details/task-details.component.scss @@ -6,10 +6,15 @@ .item{ display: flex; border-bottom: 1px dotted #C7CAD0; - height: 60px; - line-height: 60px; + height: 50px; + line-height: 50px; .text{ flex: 1; } + .state{ + span{ + margin-left: 8px; + } + } } } \ No newline at end of file diff --git a/src/app/home/task/station-weekly-plan/task-details/task-details.component.spec.ts b/src/app/home/task/station-weekly-plan/task-details/task-details.component.spec.ts deleted file mode 100644 index 7ed1d84..0000000 --- a/src/app/home/task/station-weekly-plan/task-details/task-details.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { TaskDetailsComponent } from './task-details.component'; - -describe('TaskDetailsComponent', () => { - let component: TaskDetailsComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ TaskDetailsComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(TaskDetailsComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/home/task/station-weekly-plan/task-details/task-details.component.ts b/src/app/home/task/station-weekly-plan/task-details/task-details.component.ts index 5a3aedb..744037c 100644 --- a/src/app/home/task/station-weekly-plan/task-details/task-details.component.ts +++ b/src/app/home/task/station-weekly-plan/task-details/task-details.component.ts @@ -1,4 +1,7 @@ -import { Component, OnInit } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Component, Input, OnInit } from '@angular/core'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; @Component({ selector: 'app-task-details', @@ -6,10 +9,74 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./task-details.component.scss'] }) export class TaskDetailsComponent implements OnInit { - - constructor() { } + @Input() data?: any; + @Input() parent?: any; + constructor(private http: HttpClient, private modal: NzModalService, private message: NzMessageService) { } ngOnInit(): void { } + //接受任务 + accept(i) { + console.log(this.parent) + this.modal.confirm({ + nzTitle: `确定要接受该任务吗?`, + nzOkText: '确定', + nzOkType: 'default', + nzOnOk: () => { + this.http.post(`/api/PlanTasks/Approval/${i.id}`, null, { + params: { + approvalStatus: '通过' + } + }).subscribe({ + next: (data) => { + this.message.create('success', '已接受'); + i.approvalStatus = '通过' + this.parent.stationData.forEach(element => { + if (element.id == i.company.organizationId) { + if (element.isExpand) { + this.parent.getTaskListOfStation(element) + } + } + }); + }, + error: (err) => { + this.message.create('warning', '接受失败'); + } + }) + }, + nzCancelText: '取消' + }); + } + //拒绝任务 + reject(i) { + this.modal.confirm({ + nzTitle: `确定要拒绝该任务吗?`, + nzOkText: '确定', + nzOkType: 'default', + nzOnOk: () => { + this.http.post(`/api/PlanTasks/Approval/${i.id}`, null, { + params: { + approvalStatus: '驳回' + } + }).subscribe({ + next: (data) => { + this.message.create('success', '已拒绝'); + i.approvalStatus = '驳回' + this.parent.stationData.forEach(element => { + if (element.id == i.company.organizationId) { + if (element.isExpand) { + this.parent.getTaskListOfStation(element) + } + } + }); + }, + error: (err) => { + this.message.create('warning', '拒绝失败'); + } + }) + }, + nzCancelText: '取消' + }); + } } diff --git a/src/app/home/task/task.component.ts b/src/app/home/task/task.component.ts index 3231841..f3be1dc 100644 --- a/src/app/home/task/task.component.ts +++ b/src/app/home/task/task.component.ts @@ -7,33 +7,33 @@ import { Router } from '@angular/router'; styleUrls: ['./task.component.scss'] }) export class TaskComponent implements OnInit { - level="" - user=false + level = "" + user = false constructor(private router: Router) { } ngOnInit(): void { console.log(JSON.parse(sessionStorage.getItem('userData'))); - - this.level=JSON.parse(sessionStorage.getItem('userData')).organizationLevel - let user=JSON.parse(sessionStorage.getItem('userData')).roles - + + this.level = JSON.parse(sessionStorage.getItem('userData')).organizationLevel + let user = JSON.parse(sessionStorage.getItem('userData')).roles + for (let index = 0; index < user.length; index++) { const element = user[index].name; - if(element.indexOf('检查') != -1){ - this.user=true + if (element.indexOf('检查') != -1) { + this.user = true } } - if(this.router.url=="/task"){ - if(this.level=="brigade"){ + if (this.router.url == "/task") { + if (this.level == "brigade") { this.router.navigate(['/task/indicators']) - }else if(this.level=="battalion" && !this.user){ + } else if (this.level == "battalion" && !this.user) { this.router.navigate(['/task/monthlytaskoverview']) - }else if(this.level=="squadron" || this.user){ + } else if (this.level == "squadron" || this.user) { this.router.navigate(['/task/taskexecution']) } } - - - + + + } } diff --git a/src/app/home/task/zhi-indicators/edit-or/edit-or.component.html b/src/app/home/task/zhi-indicators/edit-or/edit-or.component.html new file mode 100644 index 0000000..f86ce3d --- /dev/null +++ b/src/app/home/task/zhi-indicators/edit-or/edit-or.component.html @@ -0,0 +1,22 @@ +
    +
    + + 协助机构 + + + + + + + + + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/home/task/zhi-indicators/edit-or/edit-or.component.scss b/src/app/home/task/zhi-indicators/edit-or/edit-or.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/home/task/zhi-indicators/edit-or/edit-or.component.ts b/src/app/home/task/zhi-indicators/edit-or/edit-or.component.ts new file mode 100644 index 0000000..760ec97 --- /dev/null +++ b/src/app/home/task/zhi-indicators/edit-or/edit-or.component.ts @@ -0,0 +1,41 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { HttpClient } from '@angular/common/http'; +import { TreeService } from 'src/app/service/tree.service'; +import { Observable, of } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; + +@Component({ + selector: 'app-edit-or', + templateUrl: './edit-or.component.html', + styleUrls: ['./edit-or.component.scss'] +}) +export class EditOrComponent implements OnInit { + + @Input() selectedData?: any; + @Input() organizationList?: any; + @Input() users?: any; + + validateForm!: FormGroup; + constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { } + + + newTree = [] + ngOnInit(): void { + this.validateForm = this.fb.group({ + organization: [this.selectedData] + }); + + console.log(111, this.users) + console.log(222, this.organizationList) + let arr = [...this.users, ...this.organizationList] + console.log(333, arr) + this.newTree = this.toTree.toTree(arr) + } + + destroyModal(): void { + this.modal.destroy({ data: 'this the result data' }); + } + +} diff --git a/src/app/home/task/zhi-indicators/zhi-indicators.component.html b/src/app/home/task/zhi-indicators/zhi-indicators.component.html index ad5073c..2090998 100644 --- a/src/app/home/task/zhi-indicators/zhi-indicators.component.html +++ b/src/app/home/task/zhi-indicators/zhi-indicators.component.html @@ -1,18 +1,318 @@
    - - - + + +
    + [ngClass]="{'selectedMonth': item.id == selectedMonth}"> {{item.name}}
    - + + +
    +
    + +
    +
    +
    +
    + + 投诉举报 +
    + + +
    +
    + 单位名称 + | + 组织机构 +
    +
    +
    +
    + + + + + + + + +
    +
    +
    + + +
    +
    +
    +
    +
    + + + + + + + +
    +
    +
    + + + +
    + + + {{ node.title }} + +
    +
    + + + + + + + + +
    +
    +
    + + +
    +
    +
    + + 已分配: {{complaint.allocated}}/{{complaint.data.length}} 家单位 + +
    +
    + + + {{complaint.isExpand ? '收起' :'展开'}} + + +
    +
    +
    + + + + 单位名称 + 配合机构 + 说明 + 操作 + + + + + {{item.company.companyName}} + + + {{item.organization.name}} + + /{{i.name}} + + + 修改机构 + + + + + + + 派发 + + + 已派发 + + 删除 + + + + +
    +
    + + +
    +
    + +
    +
    +
    +
    + + 行政许可 +
    + + +
    +
    + 单位名称 + | + 组织机构 +
    +
    +
    +
    + + + + + + + + +
    +
    +
    + + +
    +
    +
    +
    +
    + + + + + + + +
    +
    +
    + + + +
    + + + {{ node.title }} + +
    +
    + + + + + + + + +
    +
    +
    + + +
    +
    +
    + + 已分配: {{permission.allocated}}/{{permission.data.length}} 家单位 + +
    +
    + + + {{permission.isExpand ? '收起' :'展开'}} + + +
    +
    +
    + + + + 单位名称 + 配合机构 + 说明 + 操作 + + + + + {{item.company.companyName}} + + + {{item.organization.name}} + + /{{i.name}} + + + 修改机构 + + + + + + + 派发 + + + 已派发 + + 删除 + + + + +
    +
    + +
    +
    + +
    @@ -20,9 +320,9 @@ 双随机
    - +
    -

    更多

    +
    @@ -68,12 +368,10 @@
    + nzBlockNode [nzExpandedIcon]="multiExpandedIconTpl">
    -
    - - + +
    - 已分配: 14/15 家单位 + 已分配: {{doubleRandom.allocated}}/{{doubleRandom.allPlanTasks}} 家单位
    - + {{doubleRandom.isExpand ? '收起' :'展开'}} @@ -117,25 +417,79 @@ 责任机构 - 任务额 + 任务额 单位名称 监督员 说明 + 操作 - 访客 - 2021-11-19 - - 22 + {{item.organizatin.name}} + {{item.targetCount}} + + +
    {{i.company.companyName}} +
    +
    + + / + - - 22 + +
    + +
    + + + + + {{o.name}} + + + + + + + {{o.name}} + + +
    +
    + 更改 +
    +
    + +
    + 检查员 +
    +
    +
    - - + +
    + +
    + + +
    + + 派发 + + + 已派发 + + 删除 +
    @@ -143,9 +497,11 @@
    -
    +
    + +
    @@ -153,9 +509,9 @@ 熟悉演练
    - +
    -
    + @@ -179,6 +535,10 @@
    + +
    @@ -201,9 +561,8 @@
    - - {{ node.title }} @@ -211,7 +570,7 @@
    - + @@ -222,17 +581,19 @@
    - - + +
    - 已分配: 14/15 家单位 + 已分配: {{rehearsal.allocated}}/{{rehearsal.allPlanTasks}} 家单位
    - + {{rehearsal.isExpand ? '收起' :'展开'}} @@ -243,25 +604,48 @@ - 责任机构 - 任务额 - 单位名称 - 监督员 + 责任机构 + 任务额 + 单位名称 说明 + 操作 - 访客 - 2021-11-19 + {{item.organizatin.name}} - 22 + + - - 22 + + +
    {{i.company.companyName}} +
    +
    + + / + - - + +
    + +
    + + + +
    + + 派发 + + + 已派发 + + 删除 +
    @@ -269,30 +653,6 @@
    - - - -
    -
    -
    -
    - - 重大活动 -
    - - - 已分配: 0/0 家单位 - -
    -
    - -
    -
    -
    @@ -300,10 +660,10 @@ 消防宣传
    - +
    @@ -13,7 +16,7 @@ - + @@ -21,7 +24,7 @@ - + @@ -46,8 +49,4 @@

    防消一体化综合治理平台 v1.1.0

    - -
    -
    -
    \ No newline at end of file diff --git a/src/app/pages/login/login.component.scss b/src/app/pages/login/login.component.scss index 5d66571..03495bd 100644 --- a/src/app/pages/login/login.component.scss +++ b/src/app/pages/login/login.component.scss @@ -3,30 +3,31 @@ height: 100%; background: url('../../../assets/images/bgImg.png'); background-size: 100% 100%; - + display: flex; justify-content: center; align-items: center; + overflow: auto; } -.left{ + +.left { color: #feffff; padding: 50px; - margin-right: 200px; height: 504px; - p{ + margin-left: -58px; + p { color: #feffff; - font-size: 24px; + font-size: 26px; text-align: left; font-family: YouYuan; + box-sizing: border-box; + margin-top: 20px; } - .a2{ - font-size: 44px; - } - .a3{ - margin-top: -30px; - font-size: 14px; - color: rgb(254,255,255,.4); + img { + width: 850px; + height: auto; + margin-left: -76px; } } @@ -39,81 +40,61 @@ box-sizing: border-box; padding: 40px 45px 42px 45px; color: #3b3b3b; -} - -.cardheader { - width: 200px; - margin: 0 auto 10px auto; - text-align: center; - font-size: 22px; - color: #3b3b3b -} -.cardheader:nth-child(2) { - margin-bottom: 40px; -} -label { - color: #3b3b3b; -} - -.hint { - display: flex; - justify-content: space-between; - margin-bottom: 6px; - align-items: center; - .forget { - cursor: pointer; - color: #2399FF; + .cardheader { + width: 200px; + margin: 0 auto 10px auto; + text-align: center; + font-size: 22px; + color: #3b3b3b } -} -.autologin { - margin-bottom: 40px; -} + .cardheader:nth-child(2) { + margin-bottom: 40px; + } -button { - margin: 30px 0; - width: 100%; - height: 42px; - font-size: 16px; - // background: #2D4CC1; - border-radius: 4px; -} + label { + color: #3b3b3b; + } -p { - text-align: center; -} + .hint { + display: flex; + justify-content: space-between; + margin-bottom: 6px; + align-items: center; -.role { - color: #2399FF; - margin-top: 38px; - font-size: 15px; -} + .forget { + cursor: pointer; + color: #2399FF; + } + } -.company { - color: #666262; - margin-top: 10px; - font-size: 14px; -} + .autologin { + margin-bottom: 40px; + } -.name { - position: absolute; - left:40px; - top:40px; + button { + margin: 30px 0; + width: 100%; + height: 42px; + font-size: 16px; + // background: #2D4CC1; + border-radius: 4px; + } - img { - // margin-bottom: 32px; - width: 254px; - height: 56px; + p { + text-align: center; } - h1 { - font-size: 63px; - color: #3b3b3b; - font-weight: 600; + .role { + color: #2399FF; + margin-top: 38px; + font-size: 15px; + } - text-shadow: 0px 2px 8px #2399FF; - letter-spacing: 5px; - margin-bottom: 0px; + .company { + color: #666262; + margin-top: 10px; + font-size: 14px; } } diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts index f7a121b..857684c 100644 --- a/src/app/pages/login/login.component.ts +++ b/src/app/pages/login/login.component.ts @@ -105,7 +105,7 @@ export class LoginComponent implements OnInit { this.isLoading = false; this.rememberInfo() this.autoLogin() - this.router.navigate(['/system']) + this.router.navigate(['/task']) this.message.create('success', `登录成功`); sessionStorage.setItem("userData", JSON.stringify(data)); await this.getLevel() diff --git a/src/assets/images/logo/loginlogo.png b/src/assets/images/logo/loginlogo.png new file mode 100644 index 0000000..049d6be Binary files /dev/null and b/src/assets/images/logo/loginlogo.png differ diff --git a/src/styles.scss b/src/styles.scss index 007e5bc..e67a4f8 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -130,13 +130,13 @@ app-root { .forbid { - color: gray; - pointer-events: none + color: gray !important; + pointer-events: none !important; } .forbidbtn { background: gray !important; - pointer-events: none + pointer-events: none !important; } .box { @@ -222,6 +222,8 @@ app-root { align-items: center; justify-content: center; z-index: 999; + left: 0; + top: 0; } #setPosition {