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}}
-
+
+
+
+
+
+
+
+
+
+
+ 单位名称 |
+ 配合机构 |
+ 说明 |
+
+
+
+
+ {{item.company.companyName}} |
+
+
+ {{item.organization.name}}
+
+ /{{i.name}}
+
+
+ 修改机构
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 单位名称 |
+ 配合机构 |
+ 说明 |
+
+
+
+
+ {{item.company.companyName}} |
+
+
+ {{item.organization.name}}
+
+ /{{i.name}}
+
+
+ 修改机构
+ |
+
+
+ |
+
+
+
+
+
+
+
+