+
+
+
+
-
-
-
-
- 任务名称 |
- 单位名称 |
-
- 协助机构 |
- 时间 |
- 申请结果 |
- 检查结果 |
- 操作 |
-
-
-
-
-
- {{item.taskName}}
- |
-
- {{item.company.companyName}}
- |
-
-
- {{item.assitantOrganization.name}}
- |
-
- {{item.creationTime | date:"yyyy-MM-dd hh:mm:ss"}}
- |
-
-
-
- 审核驳回
-
-
- 审核通过
-
-
-
- 未审核
-
- |
-
- /
- |
-
- 查看
- |
-
-
-
+
-
-
\ No newline at end of file
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 09c8e58..73f58e0 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
@@ -1,13 +1,85 @@
.box {
width: 100%;
height: 100%;
-
color: #303133;
- box-sizing: border-box;
- padding: 20px;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ .informbox {
+ width: 100%;
+ height: 60px;
+ box-sizing: border-box;
+ padding: 10px 20px;
+ padding-bottom: 0px;
+
+ .inform {
+ width: 100%;
+ height: 100%;
+ background: #FFFFFF;
+ border-radius: 0px 0px 0px 0px;
+ opacity: 1;
+ display: flex;
+
+ .informleft {
+ height: 100%;
+ display: flex;
+ align-items: center;
+ margin-right: 20px;
+ img {
+ margin: 0 20px;
+ }
+ }
+
+ .informright {
+ flex: 1;
+ }
+ }
+ }
+ .timebox {
+ width: 100%;
+ height: 68px;
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ border-bottom: 1px dashed #C7CAD0;
+ padding: 0 20px;
+
+ nz-select {
+ margin-right: 16px;
+ border-radius: 4px 4px 4px 4px;
+ }
+
+ .monthbtn {
+ width: 80px;
+ height: 32px;
+ line-height: 32px;
+ background: #FFFFFF;
+ border-radius: 4px 4px 4px 4px;
+ opacity: 1;
+ border: 1px solid #E4E7EC;
+ color: #303133;
+ margin-right: 16px;
+ cursor: pointer;
+ }
+
+ .selectedMonth {
+
+ background: #2C4DC0;
+ color: #FFFFFF;
+ }
+ }
+
+ .contentbox {
+ flex: 1;
+ box-sizing: border-box;
+ padding: 20px;
+ position: relative;
+ overflow: hidden;
+ }
.fffbox {
+ position: relative;
width: 100%;
height: 100%;
background: #FFFFFF;
@@ -17,6 +89,7 @@
border: 1px solid #E4E7EC;
display: flex;
flex-direction: column;
+ overflow: hidden;
}
@@ -70,12 +143,68 @@
padding-top: 0px;
display: flex;
flex-direction: column;
-
+ overflow-y: auto;
.applybtn {
align-self: flex-start;
margin: 18px 0;
}
+ .tablebox {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+
+ .tableboxitem {
+ display: flex;
+ align-items: center;
+ box-sizing: border-box;
+ padding: 22px 20px;
+ border: 1px solid #C7CAD0;
+ justify-content: space-around;
+ padding-left: 80px;
+ margin-bottom: 10px;
+ div {
+ flex: 1;
+
+ span {
+ display: inline-block;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ height: 33px;
+ line-height: 33px;
+ text-align: left;
+
+ img {
+ width: 32px;
+ height: 32px;
+ }
+ }
+ }
+
+ .flexcol {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ margin-right: 3%;
+
+ span:nth-child(1) {
+ color: #303133;
+ // margin-bottom: 8px;
+ }
+
+ span:nth-child(2) {
+ color: #C7CAD0;
+ }
+ }
+
+ .unitnamebox {
+ flex: 3;
+ }
+
+ }
+ }
+
.operation {
a {
margin-right: 16px;
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 b766ea7..f185ca6 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
@@ -3,11 +3,12 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
import { NzModalService } from 'ng-zorro-antd/modal';
import { NzMessageService } from 'ng-zorro-antd/message';
-import { HttpClient } from '@angular/common/http';
+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';
+
@Component({
selector: 'app-station-task-apply',
templateUrl: './station-task-apply.component.html',
@@ -24,12 +25,36 @@ export class StationTaskApplyComponent implements OnInit {
or: ''
}
OrganizationId
- ngOnInit(): void {
- this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
- this.getAllOrganization()
+
+ isSupervisor: boolean //是否为检查员
+
+ 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 }
+ ]
+ selectedMonth
+ selectedYear = 2022
+ selectedTime
+ selectMonth(item) {
+ this.selectedMonth = item.id
+
+ this.getTaskList()
+ }
+ selectYear(e) {
+ this.selectedYear = e
+ console.log('年', e)
this.getTaskList()
}
-
cancel(item, type) {
@@ -38,14 +63,16 @@ export class StationTaskApplyComponent implements OnInit {
}
- nzLoading = false
+ isloading = false
totalCount
PageNumber = 1
PageSize = 10
- taskLIst = []
+ taskLIst = [1, 1, 1]
getTaskList() {
- this.nzLoading = true
+ this.isloading = true
+ let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
let params = {
+ Month: selectedTime,
OrganizationId: this.OrganizationId,
TaskName: this.searchForm.taskname,
CompanyName: this.searchForm.unitname,
@@ -56,12 +83,13 @@ export class StationTaskApplyComponent implements OnInit {
this.http.get('/api/PlanTasks', {
params: params
}).subscribe((data: any) => {
- this.nzLoading = false
+ this.isloading = false
console.log('任务申请列表', data);
this.totalCount = data.totalCount
this.taskLIst = [...data.items]
})
}
+
pageChange($event) {
this.PageNumber = $event
this.getTaskList()
@@ -85,26 +113,117 @@ export class StationTaskApplyComponent implements OnInit {
expandKeys
defaultOrId: string
//获取所有组织机构
+ organizationList: any
nodes: any = []
- getAllOrganization() {
+ async getAllOrganization() {
let params = {
PageNumber: 1,
PageSize: 9999
}
- this.http.get('/api/Organizations', {
- params: params
- }).subscribe((data: any) => {
- data.items.forEach(element => {
- element.key = element.id
- element.title = element.name
- });
- this.nodes = [...this.toTree.toTree(data.items)]
+ var p = 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.disableCheckbox = true
+ element.selectable = false
+ });
+
+ this.organizationList = JSON.parse(JSON.stringify(data.items)).filter(item => {
+ return item.level != 'squadron'
+ })
+ resolve(data)
+ })
+ })
+ return p
+ }
+
+ //获得所有检查员
+ supervisorList = []
+ mainsupervisorList = []
+ assitantsupervisorList = []
+ async getSupervisor() {
+ var p = new Promise((resolve, reject) => {
+ this.http.get('/api/Users/Inspectors').subscribe((data: any) => {
+ console.log('检查员列表', data)
+ data.forEach(element => {
+ element.key = element.id
+ element.title = element.name
+ element.parentId = element.organizationId
+ });
+ this.supervisorList = data
+ resolve(data)
+ })
+ })
+ return p
+ }
+ ngOnInit(): void {
+ this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
+ let roles = JSON.parse(sessionStorage.getItem('userData')).roles
+ let isSupervisor = roles.find(item => {
+ return item.name.indexOf('检查') != -1
})
+ isSupervisor ? this.isSupervisor = true : this.isSupervisor = false
+ this.selectedMonth = new Date().getMonth() + 1
+ this.getTaskList()
+ Promise.all([this.getAllOrganization(), this.getSupervisor()])
+ .then((results) => {
+ if (this.isSupervisor) {
+
+ } else {
+ let arr = [...this.supervisorList, ...this.organizationList]
+ this.nodes = this.toTree.toTree(JSON.parse(JSON.stringify(arr)))
+ }
+ });
+
+ this.rollStart()
+ }
+
+ messageList = [1, 1, 1, 1, 1]
+ timer
+ rollStart() {
+ var ROLL_SPEED = 100
+ var noticeList1 = document.getElementById('notice-list');
+ var noticeList2 = document.getElementById('notice-list-2');
+ var listWrapper = document.getElementById('list-wrapper');
+ noticeList2.innerHTML = noticeList1.innerHTML;
+ this.timer = setInterval(rollStart, ROLL_SPEED);
+
+ function rollStart() {
+ if (Math.abs(_subStr(listWrapper.style.top)) >= noticeList1.clientHeight) {
+ listWrapper.style.top = '0px'
+ } else {
+ var top = listWrapper.style.top
+ listWrapper.style.top = _subStr(top) - 1 + 'px'
+ }
+ }
+ // 截取px前数值
+ function _subStr(str) {
+ var index = str.indexOf('px');
+ if (index > -1) {
+ return parseFloat(str.substr(0, index + 1))
+ }
+ }
+ }
+ mouseEnter() {
+ // console.log('进入了')
+ window.clearInterval(this.timer);
+ }
+ mouseleave() {
+
+ this.rollStart()
+
}
apply() {
if (this.nodes.length == 0) {
- this.message.create('warning', '组织机构初始化中,请稍后重试');
+ this.message.create('warning', '组织机构为空,请稍后重试');
+ return
+ }
+ if (this.supervisorList.length == 0) {
+ this.message.create('warning', '检查员名单为空,请稍后重试');
return
}
const modal = this.modal.create({
@@ -114,15 +233,18 @@ export class StationTaskApplyComponent implements OnInit {
nzWidth: 660,
nzMaskClosable: false,
nzComponentParams: {
- title: "熟悉演练",
+ title: this.isSupervisor ? ["联络指导", "双随机"] : ["熟悉演练"],
nodes: this.nodes,
+ supervisorList: JSON.parse(JSON.stringify(this.supervisorList)),
+ organizationList: JSON.parse(JSON.stringify(this.organizationList))
},
nzOnOk: async () => {
+ console.log(instance.validateForm.value)
if (instance.validateForm.valid) {
await new Promise((resolve, reject) => {
let body = {
+ taskName: instance.validateForm.value.taskname,
organizationId: this.OrganizationId,
- taskName: "联络指导",
companyId: instance.validateForm.value.unitname,
assitantOrganizationId: instance.validateForm.value.organization,
}
@@ -150,6 +272,8 @@ export class StationTaskApplyComponent implements OnInit {
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
}
+
+
look(item) {
const modal = this.modal.create({
nzTitle: '详情',
diff --git a/src/app/home/task/task.component.html b/src/app/home/task/task.component.html
index 0d52a2d..bcbcb1c 100644
--- a/src/app/home/task/task.component.html
+++ b/src/app/home/task/task.component.html
@@ -5,10 +5,10 @@
任务指标
-
+
-
diff --git a/src/assets/images/icon/inform.png b/src/assets/images/icon/inform.png
new file mode 100644
index 0000000..8321ebb
Binary files /dev/null and b/src/assets/images/icon/inform.png differ
diff --git a/src/styles.scss b/src/styles.scss
index eb6a22f..00b0177 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -281,3 +281,44 @@ app-root {
background: #666;
}
}
+
+#container {
+ flex: 1;
+ position: relative;
+ height: 46px;
+ overflow: hidden;
+ text-align: left;
+
+}
+
+#list-wrapper {
+ position: relative;
+}
+
+ul {
+ list-style: none;
+}
+
+.info {
+ flex: 1;
+ display: flex;
+ height: 50px;
+ line-height: 50px;
+ color: #000;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .infoitem {
+ flex: 1;
+ display: flex;
+ align-items: center;
+
+ img {
+ width: 40px;
+ }
+
+ }
+
+
+}