diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts
index bd5b9a9..4006b56 100644
--- a/src/app/home/home.module.ts
+++ b/src/app/home/home.module.ts
@@ -57,6 +57,7 @@ import { NzSpinModule } from 'ng-zorro-antd/spin';
import { AllotPersonComponent } from './task/da-subordinate-audit/allot-person/allot-person.component';
import { ChangePasswordComponent } from './change-password/change-password.component';
import { NzUploadModule } from 'ng-zorro-antd/upload';
+import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
@NgModule({
declarations: [
NavComponent,
@@ -119,7 +120,8 @@ import { NzUploadModule } from 'ng-zorro-antd/upload';
NzRadioModule,
NzDatePickerModule,
NzSpinModule,
- NzUploadModule
+ NzUploadModule,
+ NzToolTipModule
],
entryComponents: [AddroleComponent, EditroleComponent, AdduserComponent, EdituserComponent, AddorComponent, EditorComponent, ApplyComponent, ApplyLookComponent, LookTaskComponent, AllotPersonComponent]
})
diff --git a/src/app/home/nav/nav.component.ts b/src/app/home/nav/nav.component.ts
index ccf936b..a812a6f 100644
--- a/src/app/home/nav/nav.component.ts
+++ b/src/app/home/nav/nav.component.ts
@@ -17,7 +17,7 @@ export class NavComponent implements OnInit {
ngOnInit(): void {
//调用服务中的function刷新token
this.token.startUp()
- this.user=JSON.parse(sessionStorage.getItem('userData')).organizationName
+ this.user=JSON.parse(sessionStorage.getItem('userData')).name
}
signOut() {
this.router.navigate(['/login'])
diff --git a/src/app/home/task/station-task-apply/apply-look/apply-look.component.html b/src/app/home/task/station-task-apply/apply-look/apply-look.component.html
index 690b770..25347e1 100644
--- a/src/app/home/task/station-task-apply/apply-look/apply-look.component.html
+++ b/src/app/home/task/station-task-apply/apply-look/apply-look.component.html
@@ -2,5 +2,13 @@
任务名称: {{data.taskName}}
单位名称: {{data.company.companyName}}
- 协助机构: {{data.assitantOrganization.name}}
+ 协助人员:
+
+
+
+ {{i.name}}
+
+
\ No newline at end of file
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 4b73be2..c3c5730 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
@@ -15,6 +15,8 @@ export class ApplyComponent implements OnInit {
@Input() nodes?: any;
@Input() supervisorList?: any;
@Input() organizationList?: any;
+ @Input() users?: any;
+
validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { }
@@ -26,8 +28,9 @@ export class ApplyComponent implements OnInit {
unitname: [null, [Validators.required]],
organization: [null, [Validators.required]]
});
- let arr = [...this.supervisorList, ...this.organizationList]
- this.newTree = this.toTree.toTree(arr)
+ // let arr = [...this.supervisorList, ...this.organizationList]
+ // this.newTree = this.toTree.toTree(arr)
+ this.newTree = this.nodes
}
destroyModal(): void {
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 0d25615..450c929 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
@@ -81,10 +81,11 @@
nzTheme="outline">申请
-
+
- 熟悉演练
+ {{item.taskName}}
任务名称
@@ -92,7 +93,7 @@
- 尬粒酒店管理有限公司济南泺文路分公司
+ {{item.company.companyName}}
单位名称
@@ -100,7 +101,7 @@
- 重点单位
+ {{item.company.useNature}}
级别
@@ -108,18 +109,33 @@
- 历下区A消防救援站
+ {{item.organization.name}}
主负责人
-
-
- 历下区B消防救援站
-
-
- 协助机构
+
+
+
+
+
+ {{i.name}}
+
+
+
+
+
+
+ {{i.name}}
+
+
+
+ 协助人员
@@ -132,14 +148,18 @@
-
+
查看
diff --git a/src/app/home/task/station-task-apply/station-task-apply.component.scss b/src/app/home/task/station-task-apply/station-task-apply.component.scss
index 73f58e0..0a5ecdc 100644
--- a/src/app/home/task/station-task-apply/station-task-apply.component.scss
+++ b/src/app/home/task/station-task-apply/station-task-apply.component.scss
@@ -5,6 +5,7 @@
display: flex;
flex-direction: column;
overflow: hidden;
+
.informbox {
width: 100%;
height: 60px;
@@ -25,6 +26,7 @@
display: flex;
align-items: center;
margin-right: 20px;
+
img {
margin: 0 20px;
}
@@ -144,6 +146,7 @@
display: flex;
flex-direction: column;
overflow-y: auto;
+
.applybtn {
align-self: flex-start;
margin: 18px 0;
@@ -163,6 +166,7 @@
justify-content: space-around;
padding-left: 80px;
margin-bottom: 10px;
+
div {
flex: 1;
@@ -196,6 +200,29 @@
span:nth-child(2) {
color: #C7CAD0;
}
+
+ }
+
+ .flexcolassistant {
+ flex: 2;
+ overflow: hidden;
+ .assistant {
+
+ display: flex;
+ width: 100%;
+ span {
+ color: #303133;
+ margin-right: 6px;
+ }
+ img {
+ width: 16px;
+ height: 16px;
+ vertical-align: text-bottom;
+ }
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
}
.unitnamebox {
@@ -203,6 +230,16 @@
}
}
+
+ .greenborder {
+
+ border: 1px solid #42B983;
+ }
+
+ .redborder {
+
+ border: 1px solid #FF9203;
+ }
}
.operation {
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 f185ca6..995d4f3 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
@@ -7,6 +7,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
import { TreeService } from 'src/app/service/tree.service';
import { ApplyComponent } from './apply/apply.component';
import { ApplyLookComponent } from './apply-look/apply-look.component';
+import { ThisReceiver } from '@angular/compiler';
@Component({
@@ -67,7 +68,7 @@ export class StationTaskApplyComponent implements OnInit {
totalCount
PageNumber = 1
PageSize = 10
- taskLIst = [1, 1, 1]
+ taskLIst = []
getTaskList() {
this.isloading = true
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
@@ -78,6 +79,7 @@ export class StationTaskApplyComponent implements OnInit {
CompanyName: this.searchForm.unitname,
AssitantOrganizationId: this.searchForm.or,
PageNumber: this.PageNumber,
+ CreatorId: this.userId,
PageSize: this.PageSize
}
this.http.get('/api/PlanTasks', {
@@ -114,6 +116,7 @@ export class StationTaskApplyComponent implements OnInit {
defaultOrId: string
//获取所有组织机构
organizationList: any
+ organizationListAll: any
nodes: any = []
async getAllOrganization() {
let params = {
@@ -130,7 +133,7 @@ export class StationTaskApplyComponent implements OnInit {
element.disableCheckbox = true
element.selectable = false
});
-
+ this.organizationListAll = JSON.parse(JSON.stringify(data.items))
this.organizationList = JSON.parse(JSON.stringify(data.items)).filter(item => {
return item.level != 'squadron'
})
@@ -159,8 +162,38 @@ export class StationTaskApplyComponent implements OnInit {
})
return p
}
+
+ //获得除了检查员的其他用户
+ users
+ async getUsers() {
+ var p = new Promise((resolve, reject) => {
+ let params = {
+ OrganizationId: this.OrganizationId,
+ OrganizationLevel: 'squadron',
+ ContainsChildren: true,
+ PageNumber: 1,
+ PageSize: 9999
+ }
+ this.http.get('/api/Users', {
+ params: params
+ }).subscribe((data: any) => {
+ console.log('用户列表', data.items)
+ data.items.forEach(element => {
+ element.key = element.id
+ element.title = element.name
+ element.parentId = element.organizationId
+ });
+ this.users = data.items
+ resolve(data)
+ })
+ })
+ return p
+ }
+
+ userId
ngOnInit(): void {
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
+ this.userId = JSON.parse(sessionStorage.getItem('userData')).id
let roles = JSON.parse(sessionStorage.getItem('userData')).roles
let isSupervisor = roles.find(item => {
return item.name.indexOf('检查') != -1
@@ -168,10 +201,11 @@ export class StationTaskApplyComponent implements OnInit {
isSupervisor ? this.isSupervisor = true : this.isSupervisor = false
this.selectedMonth = new Date().getMonth() + 1
this.getTaskList()
- Promise.all([this.getAllOrganization(), this.getSupervisor()])
+ Promise.all([this.getAllOrganization(), this.getSupervisor(), this.getUsers()])
.then((results) => {
if (this.isSupervisor) {
-
+ let arr = [...this.users, ...this.organizationListAll]
+ this.nodes = this.toTree.toTree(JSON.parse(JSON.stringify(arr)))
} else {
let arr = [...this.supervisorList, ...this.organizationList]
this.nodes = this.toTree.toTree(JSON.parse(JSON.stringify(arr)))
@@ -234,9 +268,10 @@ export class StationTaskApplyComponent implements OnInit {
nzMaskClosable: false,
nzComponentParams: {
title: this.isSupervisor ? ["联络指导", "双随机"] : ["熟悉演练"],
- nodes: this.nodes,
supervisorList: JSON.parse(JSON.stringify(this.supervisorList)),
- organizationList: JSON.parse(JSON.stringify(this.organizationList))
+ organizationList: JSON.parse(JSON.stringify(this.organizationList)),
+ users: JSON.parse(JSON.stringify(this.users)),
+ nodes: JSON.parse(JSON.stringify(this.nodes))
},
nzOnOk: async () => {
console.log(instance.validateForm.value)
@@ -244,9 +279,11 @@ export class StationTaskApplyComponent implements OnInit {
await new Promise((resolve, reject) => {
let body = {
taskName: instance.validateForm.value.taskname,
- organizationId: this.OrganizationId,
+ taskType: instance.validateForm.value.taskname,
companyId: instance.validateForm.value.unitname,
- assitantOrganizationId: instance.validateForm.value.organization,
+ organizationId: this.OrganizationId,
+ supervisorIds: instance.validateForm.value.organization,
+ approvalStatus: '待处理'
}
this.http.post('/api/PlanTasks', body).subscribe({
next: (data) => {
@@ -284,39 +321,29 @@ export class StationTaskApplyComponent implements OnInit {
nzComponentParams: {
data: item,
},
- nzFooter: null,
- nzOnOk: async () => {
- if (instance.validateForm.valid) {
- await new Promise(resolve => {
- let roleNames = [...instance.validateForm.value.role, ...instance.validateForm.value.role2]
- let body = {
- userName: instance.validateForm.value.account,
- name: instance.validateForm.value.name,
- organizationUnitId: Number(instance.validateForm.value.organization),
- roleNames: roleNames,
- phoneNumber: instance.validateForm.value.phonenum,
- isActive: true
- }
- // this.http.post(this.addUrl, body).subscribe(data => {
- // resolve(data)
- // this.message.create('success', '创建成功!');
- // this.SkipCount = 0
- // this.getAllUsers()
- // return true
- // }, err => {
- // resolve(err)
- // this.message.create('warning', err.error.error.message);
- // return false
- // })
- })
- } else {
- this.message.create('warning', '请填写完整!');
- return false
- }
- }
+ nzFooter: null
});
const instance = modal.getContentComponent();
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
}
+
+}
+
+export enum ApprovalStatus {
+ 未派发 = 0,
+ 待处理 = 1,
+ 通过 = 2,
+ 驳回 = 3,
+ 待检查 = 4,
+ 已检查 = 5,
}
+export enum TaskType {
+ 双随机,
+ 熟悉演练,
+ 投诉举报,
+ 行政许可,
+ 联络指导,
+ 消防宣传,
+ 火灾调查
+}
\ No newline at end of file
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 46471af..86ff1f1 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
@@ -1,60 +1,242 @@
-