diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index c0e1554..08f291f 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -62,6 +62,8 @@ import { PlanAdjustmentComponent } from './task/da-oneself-plan/plan-adjustment/ 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, @@ -97,7 +99,8 @@ import { EditOrComponent } from './task/zhi-indicators/edit-or/edit-or.component ChangePasswordComponent, PlanAdjustmentComponent, TaskDetailsComponent, - EditOrComponent + EditOrComponent, + CreateTaskComponent ], imports: [ CommonModule, @@ -129,8 +132,9 @@ import { EditOrComponent } from './task/zhi-indicators/edit-or/edit-or.component NzSpinModule, NzCardModule, NzUploadModule, - NzToolTipModule + NzToolTipModule, + NzInputNumberModule ], - entryComponents: [AddroleComponent, EditroleComponent, AdduserComponent, EdituserComponent, AddorComponent, EditorComponent, ApplyComponent, ApplyLookComponent, LookTaskComponent, AllotPersonComponent, EditOrComponent] + entryComponents: [AddroleComponent, EditroleComponent, AdduserComponent, EdituserComponent, AddorComponent, EditorComponent, ApplyComponent, ApplyLookComponent, LookTaskComponent, AllotPersonComponent, EditOrComponent, CreateTaskComponent] }) export class HomeModule { } 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..6dd7709 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 @@ -39,24 +39,19 @@ export class DaMonthlyTaskOverviewComponent implements OnInit { { id: 12, name: '12月', isable: true } ] - + //下级任务申请打开关闭 istaskauditExpanded = true istaskauditexpand() { this.istaskauditExpanded = !this.istaskauditExpanded } + + //本级部署打开关闭 isdeployboxExpanded = true isdeployboxexpand() { this.isdeployboxExpanded = !this.isdeployboxExpanded } - - shuxiTaskData = { - isExpand: true - } - zhidaoTaskData = { - isExpand: true - } PageNumber = 1 PageSize = 9999 @@ -204,14 +199,6 @@ export class DaMonthlyTaskOverviewComponent implements OnInit { openDetails(data, type) { data.isDetails = type } - xxx = false - radioChange(e) { - - setTimeout(() => { - this.xxx = !this.xxx - }, 0); - - } 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..ce726a1 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,12 +1,12 @@
- - - + + +
+ [ngClass]="{'selectedMonth': item.id == selectedMonth}"> {{item.name}}
@@ -72,48 +72,51 @@
-
+
+
+ +
- {{item.name}} + {{element.name}} 单位总数: 7/8
完成进度 - +
- - - {{item.isExpand ? '收起' :'展开'}} - + + + {{element.isExpand ? '收起' :'展开'}} +
-
-
+
+
-
- - 重大活动 +
+ + {{item.name}}
已分配 - 1 + 0
已完成 - 1 + 0
-
+
- 尬粒酒店管理有限公司济南泺文路分公司 + {{i.company.companyName}} 单位名称 @@ -121,7 +124,7 @@
- 重点单位 + {{i.company.useNature}} 级别 @@ -129,100 +132,52 @@
- 历下区A消防救援站 + {{i.organization.name}} 责任机构
-
- - 历下区B消防救援站 - - - 协助机构 +
+ + + + + {{o.name}} + + + + + + + {{o.name}} + + + + 协助人员
- + 宣传 同步工作
-
- - - - - - 进度 - -
-
- - -
-
-
-
- - 尬粒酒店管理有限公司济南泺文路分公司 - - - 单位名称 - -
-
- - 重点单位 - - - 级别 - -
-
- - 历下区A消防救援站 - - - 责任机构 - -
-
- - 历下区B消防救援站 - - - 协助机构 - -
+
- + 未发现违法违规情况 - 同步工作 + 检查结果
-
- - - - - - 进度 - -
-
- - -
@@ -231,7 +186,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..9e70bad 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,40 @@ 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.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.getTaskList() + } + selectYear(e) { + this.selectedYear = e + console.log('年', e) + // this.getTaskList() } + 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() { @@ -42,7 +55,6 @@ export class DaOneselfPlanComponent implements OnInit { 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' }, @@ -61,26 +73,20 @@ export class DaOneselfPlanComponent implements OnInit { setTimeout(() => { this.xxx = !this.xxx }, 0); - - } - stationData = [ - { name: '历下区A消防救援站', isExpand: true }, - { name: '历下区B消防救援站', isExpand: false }, - { name: '历下区C消防救援站', isExpand: false } - ] - expandcarditem(item) { - item.isExpand = !item.isExpand + } + + nodes: any = [] BuildingTypes - adjustment(){ + adjustment() { const modal = this.modal.create({ nzTitle: "任务调整", nzContent: PlanAdjustmentComponent, nzViewContainerRef: this.viewContainerRef, nzWidth: 900, nzComponentParams: { - + }, nzOnOk: async () => { console.log(123); @@ -89,4 +95,83 @@ export class DaOneselfPlanComponent implements OnInit { const instance = modal.getContentComponent(); } + + + + + //获得辖区下所有救援站 + 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 + }) + } + expandcarditem(item) { + item.isExpand = !item.isExpand + console.log(item) + if (item.isExpand) { + this.getTaskListOfStation(item) + } + } + //获得消防站下的所有任务 + 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: [] }, + { 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: [] } + ] + 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) + }, + error: (err) => { + this.message.create('warning', '获取数据失败'); + item.isLoading = false + } + }) + } } 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-execution/station-task-execution.component.html b/src/app/home/task/station-task-execution/station-task-execution.component.html index 1e41d8e..c2e570c 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 @@
-
+
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..b164b6f 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,7 +64,7 @@ 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, @@ -76,14 +76,14 @@ export class StationTaskExecutionComponent implements OnInit { CreatorId: this.userId, PageSize: this.PageSize } - this.http.get('/api/PlanTasks', { - params: params - }).subscribe((data: any) => { - this.isloading = false - console.log('任务申请列表', data); - this.totalCount = data.totalCount - this.taskLIst = [...data.items] - }) + // this.http.get('/api/PlanTasks', { + // params: params + // }).subscribe((data: any) => { + // this.isloading = false + // console.log('任务申请列表', data); + // this.totalCount = data.totalCount + // this.taskLIst = [...data.items] + // }) } pageChange($event) { 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..dae8ace --- /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 97074ec..2195fff 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 @@ -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}}

-
@@ -78,7 +79,12 @@

{{item.name}} - + 新增 + 新增 + 返回 @@ -119,16 +125,17 @@

- + {{element.name}} - 单位总数: 7/8 -
+ 单位总数: {{element.awaitInspect}}/{{element.allUnitsNum}} +
完成进度 - +
+ {{element.isExpand ? '收起' :'展开'}} 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 b7f8c7e..4cf2ab6 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 @@ -7,6 +7,7 @@ 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'; @Component({ selector: 'app-station-weekly-plan', templateUrl: './station-weekly-plan.component.html', @@ -40,11 +41,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 @@ -98,7 +101,7 @@ export class StationWeeklyPlanComponent implements OnInit { } - stationData = [] + //获得辖区下所有救援站 totalCount: string @@ -124,28 +127,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 = [] }); @@ -177,6 +180,18 @@ export class StationWeeklyPlanComponent implements OnInit { 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) }) @@ -185,6 +200,65 @@ export class StationWeeklyPlanComponent implements OnInit { } + 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: [] }, + { 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: [] } + ] + 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.data.forEach(element => { + item.allUnitsNum += element.data.length + element.data.forEach(item => { + item.approvalStatus == '待检查' ? element.awaitInspect += 1 : null + item.approvalStatus == '已检查' ? element.inspected += 1 : null + }); + }); + item.percentage = Math.round(item.inspected / item.allUnitsNum) * 100 + resolve(data) + }) + }) + + + } + + + //接受任务 accept(i, item) { this.modal.confirm({ @@ -202,13 +276,8 @@ export class StationWeeklyPlanComponent implements OnInit { 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.passed += 1 + this.getTaskListPass(this.stationData[0]) }, error: (err) => { @@ -237,13 +306,8 @@ export class StationWeeklyPlanComponent implements OnInit { 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.passed -= 1 + this.getTaskListPass(this.stationData[0]) }, error: (err) => { this.message.create('warning', '拒绝失败'); @@ -254,9 +318,14 @@ export class StationWeeklyPlanComponent implements OnInit { 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 @@ -264,9 +333,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() @@ -313,10 +382,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) + // } } //获得消防站下的所有任务 @@ -383,4 +452,54 @@ export class StationWeeklyPlanComponent implements OnInit { 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 body = { + taskName: instance.validateForm.value.taskname, + taskType: instance.validateForm.value.taskname, + companyId: instance.validateForm.value.unitname, + // organizationId: this.OrganizationId, + // supervisorIds: instance.validateForm.value.organization, + approvalStatus: '通过' + } + this.http.post('/api/PlanTasks', body).subscribe({ + next: (data) => { + console.log(data) + // item.data.push(data) + 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)); + } } 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 9e226a8..2825964 100644 --- a/src/app/home/task/zhi-indicators/zhi-indicators.component.html +++ b/src/app/home/task/zhi-indicators/zhi-indicators.component.html @@ -322,8 +322,8 @@
-

更多

+
@@ -342,12 +342,10 @@
+ nzBlockNode [nzExpandedIcon]="multiExpandedIconTpl">
-
- - + +
- 已分配: 14/15 家单位 + 已分配: {{doubleRandom.allocated}}/{{doubleRandom.allPlanTasks}} 家单位
@@ -399,27 +399,58 @@ - 历下区大队 - 8 - -
山东儒雅生活智慧城市服务有限公司(书苑广场)
-
山东儒雅生活智慧城市服务有限公司(书苑广场)
-
山东儒雅生活智慧城市服务有限公司(书苑广场)
-
山东儒雅生活智慧城市服务有限公司(书苑广场)
+ {{item.organizatin.name}} + {{item.targetCount}} + + +
{{i.company.companyName}} +
+
+ + / + - - 张三三 - 更改 + +
+ +
+ + + + + {{o.name}} + + + + + + + {{o.name}} + + +
+
+ 更改 +
+
+ +
+ 检查员 +
+
+
- - - - - + +
+ +
+ @@ -452,7 +483,7 @@
-
+ @@ -465,6 +496,10 @@
+ +
@@ -487,9 +522,8 @@
- - {{ node.title }} @@ -497,7 +531,7 @@
- + @@ -508,13 +542,15 @@
- - + +
- 已分配: 14/15 家单位 + 已分配: {{rehearsal.allocated}}/{{rehearsal.allPlanTasks}} 家单位
@@ -537,14 +573,28 @@ - 历下区大队 - + {{item.organizatin.name}} - 山东儒雅生活智慧城市服务有限公司(书苑广场) + + - - + + +
{{i.company.companyName}} +
+
+ + / + + + +
+ +
+ diff --git a/src/app/home/task/zhi-indicators/zhi-indicators.component.scss b/src/app/home/task/zhi-indicators/zhi-indicators.component.scss index 471b7a1..832ac46 100644 --- a/src/app/home/task/zhi-indicators/zhi-indicators.component.scss +++ b/src/app/home/task/zhi-indicators/zhi-indicators.component.scss @@ -95,18 +95,49 @@ .editOr { overflow: hidden; - // display: flex; - // align-items: center; - // justify-content: space-between; .blue { - // display: inline-block; - // white-space: nowrap; - // overflow: hidden; - // text-overflow: ellipsis; float: right; } } + + .flextd { + + .itembox { + height: 32px; + line-height: 32px; + margin: 2px 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + position: relative; + display: flex; + justify-content: space-between; + + .ellipsis { + max-width: 200px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + } + + .select { + width: 80px; + height: 26px; + line-height: 26px; + background: #42B983; + border-radius: 4px 4px 4px 4px; + color: #fff; + opacity: 1; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + cursor: pointer; + text-align: center; + } + } } } } diff --git a/src/app/home/task/zhi-indicators/zhi-indicators.component.ts b/src/app/home/task/zhi-indicators/zhi-indicators.component.ts index 963481f..29f30ae 100644 --- a/src/app/home/task/zhi-indicators/zhi-indicators.component.ts +++ b/src/app/home/task/zhi-indicators/zhi-indicators.component.ts @@ -1,13 +1,14 @@ import { HttpClient } from '@angular/common/http'; -import { Component, OnInit, ViewChild, ViewContainerRef } from '@angular/core'; +import { Component, OnInit, ViewChild, ViewContainerRef, NgZone } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { TreeService } from 'src/app/service/tree.service'; import { fromEvent, Subject } from 'rxjs'; -import { debounceTime } from 'rxjs/operators'; // 引入debounceTime、Subject +import { debounceTime, elementAt } from 'rxjs/operators'; // 引入debounceTime、Subject import { NzFormatEmitEvent, NzTreeNodeOptions } from 'ng-zorro-antd/tree'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; import { EditOrComponent } from './edit-or/edit-or.component'; +import { AllotPersonComponent } from '../da-subordinate-audit/allot-person/allot-person.component'; @Component({ selector: 'app-zhi-indicators', templateUrl: './zhi-indicators.component.html', @@ -16,8 +17,9 @@ import { EditOrComponent } from './edit-or/edit-or.component'; export class ZhiIndicatorsComponent implements OnInit { validateForm!: FormGroup; - constructor(private fb: FormBuilder, private http: HttpClient, private toTree: TreeService, private message: NzMessageService, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { } + constructor(private ngZone: NgZone, private fb: FormBuilder, private http: HttpClient, private toTree: TreeService, private message: NzMessageService, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { } private valueChange = new Subject(); + private targetCount = new Subject(); saveItem() { @@ -41,16 +43,22 @@ export class ZhiIndicatorsComponent implements OnInit { selectedYear = 2022 selectedTime selectMonth(item) { + console.log('选择月份') this.selectedMonth = item.id this.initializeData() this.getTaskList('投诉举报') this.getTaskList('行政许可') + this.getTaskTarget('双随机') + this.getTaskTarget('熟悉演练') } selectYear(e) { + console.log('选择年份') this.selectedYear = e this.initializeData() this.getTaskList('投诉举报') this.getTaskList('行政许可') + this.getTaskTarget('双随机') + this.getTaskTarget('熟悉演练') } initializeData() { this.complaint.isExpand = true @@ -74,6 +82,26 @@ export class ZhiIndicatorsComponent implements OnInit { this.permission.selectedMenu = 1 this.permission.data = [] + this.doubleRandom.isExpand = true + this.doubleRandom.isPopover = false + this.doubleRandom.isLoading = false + this.doubleRandom.search1 = '' + this.doubleRandom.search1Value = [] + this.doubleRandom.search2 = '' + this.doubleRandom.search2Value = [] + this.doubleRandom.selectedMenu = 1 + this.doubleRandom.data = [] + + this.rehearsal.isExpand = true + this.rehearsal.isPopover = false + this.rehearsal.isLoading = false + this.rehearsal.search1 = '' + this.rehearsal.search1Value = [] + this.rehearsal.search2 = '' + this.rehearsal.search2Value = [] + this.rehearsal.selectedMenu = 1 + this.rehearsal.data = [] + } //投诉举报 complaint = { @@ -116,6 +144,7 @@ export class ZhiIndicatorsComponent implements OnInit { doubleRandom = { name: '双随机', allocated: 0, + allPlanTasks: 0, isExpand: true,//卡片展开 isPopover: false,//选择单位气泡卡片 isLoading: false, @@ -125,9 +154,7 @@ export class ZhiIndicatorsComponent implements OnInit { search2Value: [], searchAll: [], selectedMenu: 1,//选择单位气泡卡片 - data: [ - { explain: '' } - ],//表格数据 + data: [],//表格数据 nodes: [], unitList: [] } @@ -136,6 +163,7 @@ export class ZhiIndicatorsComponent implements OnInit { rehearsal = { name: '熟悉演练', allocated: 0, + allPlanTasks: 0, isExpand: true,//卡片展开 isPopover: false,//选择单位气泡卡片 isLoading: false, @@ -145,7 +173,7 @@ export class ZhiIndicatorsComponent implements OnInit { search2Value: [], searchAll: [], selectedMenu: 1,//选择单位气泡卡片 - data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],//表格数据 + data: [],//表格数据 nodes: [], unitList: [] } @@ -266,7 +294,6 @@ export class ZhiIndicatorsComponent implements OnInit { this.http.get('/api/Organizations', { params: params }).subscribe((data: any) => { - console.log(9999999) data.items.forEach(element => { element.key = element.id element.title = element.name @@ -363,7 +390,7 @@ export class ZhiIndicatorsComponent implements OnInit { ngOnInit(): void { this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId this.selectedMonth = new Date().getMonth() + 1 - //保存防抖 + //说明保存防抖 this.valueChange.pipe(debounceTime(1000)).subscribe((item: any) => { let body = { description: item.description, @@ -381,6 +408,27 @@ export class ZhiIndicatorsComponent implements OnInit { }) }) }); + + //任务额保存防抖 + this.targetCount.pipe(debounceTime(1000)).subscribe((item: any) => { + console.log(item) + let body = { + targetCount: item.targetCount, + } + return new Promise((resolve, reject) => { + this.http.patch(`/api/TaskTarget/${item.id}`, body).subscribe({ + next: async (data: any) => { + this.message.create('success', '修改任务额成功'); + resolve(data) + }, + error: (err) => { + this.message.create('warning', '修改任务额失败'); + reject(err) + } + }) + }) + }); + this.getUsers() Promise.all([this.getCompanies(), this.getAllOrganization()]) .then((results) => { @@ -395,8 +443,14 @@ export class ZhiIndicatorsComponent implements OnInit { this.getTaskList('投诉举报') this.getTaskList('行政许可') + + this.getTaskTarget('双随机') + this.getTaskTarget('熟悉演练') + //获得主协调查人员 + this.getSupervisor('main') + this.getSupervisor('assisted') } - //选择单位 确认按钮 + //投诉举报/行政许可 选择单位 确认按钮 selectedUnit(data, type) { let arr = [...data.search1Value, ...data.search2Value] let arrSet = [...new Set(arr)] @@ -420,9 +474,81 @@ export class ZhiIndicatorsComponent implements OnInit { }) } - async getTaskList(TaskType, carddata?: any) { + //双随机/熟悉演练 选择单位 确认按钮 + selectedUnit2(data, type) { + let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' + let arr = [...data.search1Value, ...data.search2Value] + let body = [...new Set(arr)] + data.isLoading = true + this.http.post(`/api/TaskTarget/${selectedTime}`, body, { + params: { + taskType: type + } + }).subscribe({ + next: (item) => { + data.isLoading = false + data.isPopover = false + this.message.create('success', '派发成功'); + type == '双随机' ? this.getTaskTarget('双随机', data) : null + type == '熟悉演练' ? this.getTaskTarget('熟悉演练', data) : null + }, + error: (err) => { + this.message.create('warning', '派发失败'); + } + }) + } + async getTaskTarget(TaskType, carddata?: any) { + TaskType == '双随机' ? this.doubleRandom.isLoading = true : this.rehearsal.isLoading = true + let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' + let params = { + taskType: TaskType + } + return await new Promise((resolve, reject) => { + this.http.get(`/api/TaskTarget/${selectedTime}`, { + params: params + }).subscribe((data: any) => { + this.ngZone.run(() => { + //这里写需要立即渲染的代码 + TaskType == '双随机' ? this.doubleRandom.isLoading = false : this.rehearsal.isLoading = false + console.log(TaskType + '任务指标列表', data); + TaskType == '双随机' ? this.doubleRandom.allocated = 0 : null + TaskType == '熟悉演练' ? this.rehearsal.allocated = 0 : null + TaskType == '双随机' ? this.doubleRandom.allPlanTasks = 0 : null + TaskType == '熟悉演练' ? this.rehearsal.allPlanTasks = 0 : null + + TaskType == '双随机' ? this.doubleRandom.data = data : null + TaskType == '熟悉演练' ? this.rehearsal.data = data : null + + data.forEach(element => { + if (element.planTasks) { + if (TaskType == '双随机') { + this.doubleRandom.allPlanTasks += element.planTasks.length + } + if (TaskType == '熟悉演练') { + this.rehearsal.allPlanTasks += element.planTasks.length + } + element.planTasks.forEach(item => { + if (item.supervisorIds.length != 0) { + TaskType == '双随机' ? this.doubleRandom.allocated += 1 : null + TaskType == '熟悉演练' ? this.rehearsal.allocated += 1 : null + } + }); + } + }); + }); - carddata ? carddata.isLoading = true : null + resolve(data) + }) + }) + } + + + + + + async getTaskList(TaskType, carddata?: any) { + TaskType == '投诉举报' ? this.complaint.isLoading = true : this.permission.isLoading = true + // carddata ? carddata.isLoading = true : null let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01' let params = { Month: selectedTime, @@ -431,39 +557,46 @@ export class ZhiIndicatorsComponent implements OnInit { PageNumber: 1, PageSize: 99999 } - var p = await new Promise((resolve, reject) => { + return await new Promise((resolve, reject) => { this.http.get('/api/PlanTasks', { params: params }).subscribe((data: any) => { - TaskType == '投诉举报' ? this.complaint.allocated = 0 : null - TaskType == '行政许可' ? this.permission.allocated = 0 : null - carddata ? carddata.isLoading = false : null - console.log(TaskType + '任务列表', data.items); - TaskType == '投诉举报' ? this.complaint.data = data.items : null - TaskType == '行政许可' ? this.permission.data = data.items : null - - data.items.forEach(item => { - if (item.supervisorIds.length != 0) { - TaskType == '投诉举报' ? this.complaint.allocated += 1 : null - TaskType == '行政许可' ? this.permission.allocated += 1 : null - } + this.ngZone.run(() => { + //这里写需要立即渲染的代码 + console.log(TaskType + '任务列表', data.items); + TaskType == '投诉举报' ? this.complaint.isLoading = false : this.permission.isLoading = false + + TaskType == '投诉举报' ? this.complaint.allocated = 0 : null + TaskType == '行政许可' ? this.permission.allocated = 0 : null + TaskType == '投诉举报' ? this.complaint.data = data.items : null + TaskType == '行政许可' ? this.permission.data = data.items : null + + data.items.forEach(item => { + if (item.supervisorIds.length != 0) { + TaskType == '投诉举报' ? this.complaint.allocated += 1 : null + TaskType == '行政许可' ? this.permission.allocated += 1 : null + } + }); }); + resolve(data) }) }) - return p } - // this.valueChange.next('xxxx'); //修改任务描述 - async taskDescChange(incomingData, item) { + taskDescChange(incomingData, item) { this.valueChange.next(item); } - + //修改任务额 + targetCountChange(incomingData, item, e) { + this.targetCount.next(item); + } ngOnDestroy(): void { - this.doubleRandom.isPopover = false + console.log('毁灭了') + // this.doubleRandom.isPopover = false } nzEvent(event: NzFormatEmitEvent): any { @@ -506,4 +639,67 @@ export class ZhiIndicatorsComponent implements OnInit { } + assitantsupervisorList + mainsupervisorList + getSupervisor(type) { + let params = { + inspectorType: type + } + this.http.get('/api/Users/Inspectors', { + params: params + }).subscribe((data: any) => { + console.log('检查员列表', data) + if (type == 'main') { + this.mainsupervisorList = data + } else { + this.assitantsupervisorList = data + } + }) + } + allot(item, type) { + console.log(item) + if (this.mainsupervisorList.length == 0 || this.assitantsupervisorList.length == 0) { + this.message.create('warning', '请从用户管理添加检查人员'); + return + } + const modal = this.modal.create({ + nzTitle: '分配监督检查员', + nzContent: AllotPersonComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 485, + nzMaskClosable: false, + nzComponentParams: { + mainsupervisorList: this.mainsupervisorList, + assitantsupervisorList: this.assitantsupervisorList + }, + nzOnOk: async () => { + if (instance.validateForm.valid) { + await new Promise((resolve, reject) => { + let body = { + supervisorIds: [...instance.validateForm.value.main, ...instance.validateForm.value.assitant] + } + this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({ + next: async (data) => { + this.message.create('success', '分配成功'); + this.getTaskTarget(type) + 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)); + } }