diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index dbfa8d2..c0e1554 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -59,8 +59,9 @@ 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'; @NgModule({ declarations: [ NavComponent, @@ -95,7 +96,8 @@ import { TaskDetailsComponent } from './task/station-weekly-plan/task-details/ta AllotPersonComponent, ChangePasswordComponent, PlanAdjustmentComponent, - TaskDetailsComponent + TaskDetailsComponent, + EditOrComponent ], imports: [ CommonModule, @@ -129,6 +131,6 @@ import { TaskDetailsComponent } from './task/station-weekly-plan/task-details/ta NzUploadModule, NzToolTipModule ], - entryComponents: [AddroleComponent, EditroleComponent, AdduserComponent, EdituserComponent, AddorComponent, EditorComponent, ApplyComponent, ApplyLookComponent, LookTaskComponent, AllotPersonComponent] + entryComponents: [AddroleComponent, EditroleComponent, AdduserComponent, EdituserComponent, AddorComponent, EditorComponent, ApplyComponent, ApplyLookComponent, LookTaskComponent, AllotPersonComponent, EditOrComponent] }) export class HomeModule { } 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..97074ec 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 @@ -77,14 +77,12 @@

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

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..b7f8c7e 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,7 @@ 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'; @Component({ selector: 'app-station-weekly-plan', templateUrl: './station-weekly-plan.component.html', @@ -13,7 +14,7 @@ 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 @@ -364,7 +365,22 @@ 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)); } } 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/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..9e226a8 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,292 @@
- - - + + +
+ [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 +294,9 @@ 双随机
- +
+ nzBlockNode (nzClick)="nzEvent($event)" (nzExpandChange)="nzEvent($event)" + [nzExpandedIcon]="multiExpandedIconTpl">
@@ -104,7 +378,7 @@
- + {{doubleRandom.isExpand ? '收起' :'展开'}} @@ -117,7 +391,7 @@ 责任机构 - 任务额 + 任务额 单位名称 监督员 说明 @@ -125,16 +399,26 @@ - 访客 - 2021-11-19 + 历下区大队 + 8 - 22 +
山东儒雅生活智慧城市服务有限公司(书苑广场)
+
山东儒雅生活智慧城市服务有限公司(书苑广场)
+
山东儒雅生活智慧城市服务有限公司(书苑广场)
+
山东儒雅生活智慧城市服务有限公司(书苑广场)
- 22 + 张三三 + 更改 - + + + @@ -143,9 +427,11 @@
-
+
+ +
@@ -153,9 +439,9 @@ 熟悉演练
- +
- + {{rehearsal.isExpand ? '收起' :'展开'}} @@ -243,25 +529,22 @@ - 责任机构 - 任务额 - 单位名称 - 监督员 + 责任机构 + 任务额 + 单位名称 说明 - 访客 - 2021-11-19 + 历下区大队 + - 22 - - - 22 + 山东儒雅生活智慧城市服务有限公司(书苑广场) - + @@ -269,30 +552,6 @@
- - - -
-
-
-
- - 重大活动 -
- - - 已分配: 0/0 家单位 - -
-
- -
-
-
@@ -300,10 +559,10 @@ 消防宣传
- +