Browse Source

[修改]根据要求修改

非煤矿山灾害智能感知和预警系统
邵佳豪 3 years ago
parent
commit
212536fc7a
  1. 2
      src/app/home/nav/nav.component.html
  2. 14
      src/app/home/nav/nav.component.ts
  3. 88
      src/app/home/task/station-task-apply/apply/apply.component.html
  4. 78
      src/app/home/task/station-task-apply/apply/apply.component.scss
  5. 180
      src/app/home/task/station-task-apply/apply/apply.component.ts
  6. 36
      src/app/home/task/station-task-apply/station-task-apply.component.html
  7. 32
      src/app/home/task/station-task-apply/station-task-apply.component.ts
  8. 2
      src/app/home/task/station-task-execution/station-task-execution.component.html
  9. 20
      src/app/home/task/task.component.ts
  10. 10
      src/app/home/task/zhi-indicators/zhi-indicators.component.html
  11. 34
      src/app/home/task/zhi-indicators/zhi-indicators.component.ts
  12. 15
      src/app/pages/login/login.component.html
  13. 81
      src/app/pages/login/login.component.scss
  14. 2
      src/app/pages/login/login.component.ts
  15. BIN
      src/assets/images/logo/loginlogo.png

2
src/app/home/nav/nav.component.html

@ -14,7 +14,7 @@
<li [routerLink]="['/statistic']" routerLinkActive="router-link-active"> <li [routerLink]="['/statistic']" routerLinkActive="router-link-active">
<div>统计分析</div> <div>统计分析</div>
</li> </li>
<li [routerLink]="['/system']" routerLinkActive="router-link-active"> <li *ngIf="isSuperAdmin" [routerLink]="['/system']" routerLinkActive="router-link-active">
<div>系统管理</div> <div>系统管理</div>
</li> </li>
</ul> </ul>

14
src/app/home/nav/nav.component.ts

@ -12,12 +12,20 @@ import { NzMessageService } from 'ng-zorro-antd/message';
}) })
export class NavComponent implements OnInit { export class NavComponent implements OnInit {
constructor( private modal: NzModalService,private http: HttpClient,private message: NzMessageService,private viewContainerRef: ViewContainerRef,private router: Router, public token: CacheTokenService) { } constructor(private modal: NzModalService, private http: HttpClient, private message: NzMessageService, private viewContainerRef: ViewContainerRef, private router: Router, public token: CacheTokenService) { }
user:"" user = null
isSuperAdmin
ngOnInit(): void { ngOnInit(): void {
//调用服务中的function刷新token //调用服务中的function刷新token
this.token.startUp() this.token.startUp()
this.user=JSON.parse(sessionStorage.getItem('userData')).name this.user = JSON.parse(sessionStorage.getItem('userData')).name
let roles = JSON.parse(sessionStorage.getItem('userData')).roles
let isTrue = roles.find(item => {
return item.name == '超级管理员'
})
isTrue ? this.isSuperAdmin = true : this.isSuperAdmin = false
} }
signOut() { signOut() {
this.router.navigate(['/login']) this.router.navigate(['/login'])

88
src/app/home/task/station-task-apply/apply/apply.component.html

@ -1,4 +1,4 @@
<div class="box applymodel"> <div class="applymodel" cdkScrollable>
<form nz-form [formGroup]="validateForm"> <form nz-form [formGroup]="validateForm">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="账号">任务名称</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="账号">任务名称</nz-form-label>
@ -10,7 +10,7 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="单位名称">单位名称</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="单位名称">单位名称</nz-form-label>
<nz-form-control> <!-- <nz-form-control>
<nz-select formControlName="unitname" (nzScrollToBottom)="loadMore()" nzPlaceHolder="请选择单位" nzAllowClear <nz-select formControlName="unitname" (nzScrollToBottom)="loadMore()" nzPlaceHolder="请选择单位" nzAllowClear
[nzDropdownRender]="renderTemplate" nzShowSearch nzServerSearch (nzOnSearch)="search($event)"> [nzDropdownRender]="renderTemplate" nzShowSearch nzServerSearch (nzOnSearch)="search($event)">
<nz-option *ngFor="let o of optionList" [nzValue]="o.id" [nzLabel]="o.companyName"></nz-option> <nz-option *ngFor="let o of optionList" [nzValue]="o.id" [nzLabel]="o.companyName"></nz-option>
@ -18,8 +18,92 @@
<ng-template #renderTemplate> <ng-template #renderTemplate>
<nz-spin *ngIf="isLoading"></nz-spin> <nz-spin *ngIf="isLoading"></nz-spin>
</ng-template> </ng-template>
</nz-form-control> -->
<div class="selectUnit" (click)="isPopover(unitPopover)">
<ng-container *ngIf="selectedUnitData.name; else elseTemplate">
{{selectedUnitData.name}}
</ng-container>
<ng-template #elseTemplate>
<span class="gray">请点击选择单位</span>
</ng-template>
<div class="selectUnitPopover" *ngIf="unitPopover.isPopover" (click)="$event.stopPropagation()">
<div class="popoverTitle">
<span (click)="popoverMenuSelect(unitPopover,1)"
[ngClass]="{'selectedspan': unitPopover.selectedMenu == 1}">单位名称</span>
<span style="margin: 0 10px;">|</span>
<span (click)="popoverMenuSelect(unitPopover,2)"
[ngClass]="{'selectedspan': unitPopover.selectedMenu == 2}">组织机构</span>
</div>
<div class="popoverContent" *ngIf="unitPopover.selectedMenu == 1">
<div>
<form nz-form (ngSubmit)="submitForm(unitPopover)">
<nz-form-item>
<nz-form-control>
<nz-input-group nzPrefixIcon="search">
<input type="text" [(ngModel)]="unitPopover.search1" nz-input
placeholder="请输入单位名称" [ngModelOptions]="{standalone: true}" />
</nz-input-group>
</nz-form-control>
<button style="display: none;" type="submit"></button>
</nz-form-item>
</form>
</div>
<div class="popoverContentitem">
<nz-checkbox-group [(ngModel)]="unitPopover.unitList" (ngModelChange)="log(unitPopover)"
[ngModelOptions]="{standalone: true}">
</nz-checkbox-group>
</div>
</div>
<div class="popoverContent" *ngIf="unitPopover.selectedMenu == 2">
<div>
<form nz-form>
<nz-form-item>
<nz-form-control>
<nz-input-group nzPrefixIcon="search">
<input type="text" [(ngModel)]="unitPopover.search2" nz-input
placeholder="请输入单位名称" [ngModelOptions]="{standalone: true}" />
</nz-input-group>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</form>
</div>
<div class="popoverContentitem">
<nz-tree [nzHideUnMatched]='true' [nzSearchValue]="unitPopover.search2" #nzTreeComponent
[nzData]="unitPopover.nodes" [nzTreeTemplate]="nzTreeTemplate" nzBlockNode
[nzExpandedIcon]="multiExpandedIconTpl2">
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="nodebox">
<span class="name">
<label *ngIf="node.origin.companyName" [(ngModel)]="node.origin.isChecked"
nz-checkbox (ngModelChange)="orcheckbox(unitPopover,$event,node)"
[ngModelOptions]="{standalone: true}"></label>
{{ node.title }}
</span>
</div>
</ng-template>
<ng-template #multiExpandedIconTpl2 let-node let-origin="origin">
<ng-container *ngIf="node.origin.companyName; else elseTemplate">
</ng-container>
<ng-template #elseTemplate>
<i nz-icon [nzType]="node.isExpanded ? 'caret-down' : 'caret-right'"
class="ant-tree-switcher-line-icon"></i>
</ng-template>
</ng-template>
</div>
</div>
<div class="popoverBtn">
<button nz-button nzType="primary" [nzLoading]="unitPopover.isLoading"
(click)="selectedUnit(unitPopover,$event)">确定</button>
<button nz-button nzType="default" [nzLoading]="unitPopover.isLoading"
(click)="isPopover(unitPopover,$event)">取消</button>
</div>
</div>
</div>
</nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="协助机构">协助机构</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="协助机构">协助机构</nz-form-label>
<nz-form-control> <nz-form-control>

78
src/app/home/task/station-task-apply/apply/apply.component.scss

@ -0,0 +1,78 @@
.selectUnit {
width: 85%;
position: relative;
background-color: #fff;
border: 1px solid #d9d9d9;
border-radius: 2px;
transition: all 0.3s;
height: 32px;
line-height: 30px;
cursor: pointer;
box-sizing: border-box;
padding-left: 10px;
.gray {
color: #C7C8C7;
}
.selectUnitPopover {
position: absolute;
left: -1px;
top: 35px;
width: 520px;
height: 438px;
z-index: 9999;
background-color: #fff;
border: 1px solid #d9d9d9;
box-sizing: border-box;
padding: 10px;
nz-form-item {
margin: 12px 0;
}
display: flex;
flex-direction: column;
.popoverTitle {
display: flex;
align-items: center;
span {
color: #C7CAD0;
cursor: pointer;
}
.selectedspan {
color: #2C4DC0;
}
}
.popoverContent {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
.popoverContentitem {
flex: 1;
overflow-y: auto;
display: flex;
flex-direction: column;
p {
text-align: center;
}
}
}
.popoverBtn {
display: flex;
justify-content: flex-end;
margin-top: 16px;
button {
margin-left: 18px;
}
}
}
}

180
src/app/home/task/station-task-apply/apply/apply.component.ts

@ -5,6 +5,7 @@ import { HttpClient } from '@angular/common/http';
import { TreeService } from 'src/app/service/tree.service'; import { TreeService } from 'src/app/service/tree.service';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { catchError, map } from 'rxjs/operators'; import { catchError, map } from 'rxjs/operators';
import { NzMessageService } from 'ng-zorro-antd/message';
@Component({ @Component({
selector: 'app-apply', selector: 'app-apply',
templateUrl: './apply.component.html', templateUrl: './apply.component.html',
@ -18,72 +19,169 @@ export class ApplyComponent implements OnInit {
@Input() users?: any; @Input() users?: any;
validateForm!: FormGroup; validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { } constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private toTree: TreeService, private message: NzMessageService) { }
newTree newTree
ngOnInit(): void { ngOnInit(): void {
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
taskname: [null, [Validators.required]], taskname: [null, [Validators.required]],
unitname: [null, [Validators.required]],
organization: [null, [Validators.required]] organization: [null, [Validators.required]]
}); });
// let arr = [...this.supervisorList, ...this.organizationList]
// this.newTree = this.toTree.toTree(arr)
this.newTree = this.nodes this.newTree = this.nodes
}
destroyModal(): void {
this.modal.destroy({ data: 'this the result data' }); Promise.all([this.getCompanies(), this.getAllOrganization()])
.then((results) => {
let arr = [...JSON.parse(JSON.stringify(this.allOrList)), ...JSON.parse(JSON.stringify(this.unitList))]
console.log(789456, this.allOrList)
console.log(789456, this.unitList)
let nodes = [...this.toTree.toTree(arr)]
this.unitPopover.nodes = JSON.parse(JSON.stringify(nodes))
});
} }
optionList = [];
selectedUser = null;
isLoading = false; isLoading = false;
PageNumber = 0
PageSize = 50
totalCount
loadMore(): Promise<void> {
if (this.optionList.length >= this.totalCount) {
return
}
this.PageNumber += 1
this.isLoading = true;
this.getCompanies()
}
search(value: string) { allOrList: any
this.optionList = []
this.PageNumber = 1
this.isLoading = true;
this.getCompanies(value)
}
async getCompanies(CompanyName?: string) { async getAllOrganization() {
let params = { let params = {
CompanyName: CompanyName, ContainsChildren: true,
pageSize: 9999
}
return new Promise<void>((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.selectable = false
element.disableCheckbox = true
});
this.allOrList = JSON.parse(JSON.stringify(data.items))
this.allOrList.length == 1 ? this.allOrList[0].parentId = null : null
resolve(data)
})
})
}
unitList
async getCompanies(incomingData?: any) {
let params = {
CompanyName: incomingData ? incomingData.search1 : '',
OrganizationId: JSON.parse(sessionStorage.getItem('userData')).organizationId, OrganizationId: JSON.parse(sessionStorage.getItem('userData')).organizationId,
PageNumber: this.PageNumber, PageNumber: 1,
PageSize: this.PageSize PageSize: 9999
} }
await new Promise<void>((resolve, reject) => { return new Promise<void>((resolve, reject) => {
this.http.get('/api/Companies', { this.http.get('/api/Companies', {
params: params params: params
}).subscribe((data: any) => { }).subscribe((data: any) => {
this.totalCount = data.totalCount data.items.forEach(element => {
this.isLoading = false; element.label = element.companyName
this.optionList = [...this.optionList, ...data.items]; element.value = element.id
let map = new Map(); element.parentId = element.organizationId
for (let item of this.optionList) { element.key = element.id
if (!map.has(item.id)) { element.title = element.companyName
map.set(item.id, item); element.level = 4
}; });
}; this.unitList = data.items
this.optionList = [...map.values()];
this.unitPopover.unitList = JSON.parse(JSON.stringify(this.unitList))
resolve(data) resolve(data)
}) })
}) })
} }
selectedUnitData = {
name: '',
id: ''
}
selectedUnit(data, e?: any) {
e ? e.stopPropagation() : null
let arr = [...data.search1Value, ...data.search2Value]
let arrSet = [...new Set(arr)]
if (arrSet.length > 1) {
this.message.create('warning', '只能选择一个单位');
return
} else {
this.unitList.forEach(element => {
if (element.id == arrSet[0]) {
this.selectedUnitData.name = element.companyName
this.selectedUnitData.id = element.id
}
});
console.log(this.selectedUnitData)
console.log(this.unitPopover)
this.unitPopover.isPopover = false
}
}
//
unitPopover = {
allocated: 0,
isExpand: true,//卡片展开
isPopover: false,//选择单位气泡卡片
isLoading: false,
search1: '',//选择单位气泡卡片---单位选择列表
search1Value: [],
search2: '',//选择单位气泡卡片---组织选择列表
search2Value: [],
searchAll: [],
selectedMenu: 1,//选择单位气泡卡片
data: [
],//表格数据
nodes: [],
unitList: []
}
isPopover(data, e?: any) {
e ? e.stopPropagation() : null
console.log(data)
data.isPopover = !data.isPopover
// data.unitList.forEach(element => {
// element.checked = false
// });
}
// 弹出 tab
popoverMenuSelect(data, type) {
data.selectedMenu = type
}
//搜索框提交
submitForm(data): void {
console.log(data)
data.unitList = []
this.getCompanies(data)
}
log(data) {
let arr = []
data.unitList.forEach(item => {
item.checked ? arr.push(item.id) : null
});
data.search1Value = arr
}
orcheckbox(data, $event, node) {
if ($event) {
data.search2Value.push(node.origin.id)
} else {
for (let index = 0; index < data.search2Value.length; index++) {
const element = data.search2Value[index];
if (element == node.origin.id) {
data.search2Value.splice(index, 1)
index--
}
}
}
console.log(data.search2Value)
}
} }

36
src/app/home/task/station-task-apply/station-task-apply.component.html

@ -118,19 +118,19 @@
<div class="flexcol flexcolassistant"> <div class="flexcol flexcolassistant">
<span class="assistant" nz-tooltip [nzTooltipTitle]="titleTemplate"> <span class="assistant" nz-tooltip [nzTooltipTitle]="titleTemplate">
<span *ngFor="let i of item.supervisors"> <span *ngFor="let i of item.supervisors">
<img *ngIf="i.posts && i.posts[0] == '主查人员'" src="../../../../assets/images/icon/main.png" <img *ngIf="i.posts && i.posts[0] == '主查人员'"
alt=""> src="../../../../assets/images/icon/main.png" alt="">
<img *ngIf="i.posts && i.posts[0] == '协查人员'" src="../../../../assets/images/icon/assist.png" <img *ngIf="i.posts && i.posts[0] == '协查人员'"
alt=""> src="../../../../assets/images/icon/assist.png" alt="">
{{i.name}} {{i.name}}
</span> </span>
</span> </span>
<ng-template #titleTemplate let-thing> <ng-template #titleTemplate let-thing>
<span style="margin-right: 6px;" *ngFor="let i of item.supervisors"> <span style="margin-right: 6px;" *ngFor="let i of item.supervisors">
<img *ngIf="i.posts && i.posts[0] == '主查人员'" src="../../../../assets/images/icon/main.png" <img *ngIf="i.posts && i.posts[0] == '主查人员'"
alt=""> src="../../../../assets/images/icon/main.png" alt="">
<img *ngIf="i.posts && i.posts[0] == '协查人员'" src="../../../../assets/images/icon/assist.png" <img *ngIf="i.posts && i.posts[0] == '协查人员'"
alt=""> src="../../../../assets/images/icon/assist.png" alt="">
{{i.name}} {{i.name}}
</span> </span>
</ng-template> </ng-template>
@ -148,19 +148,25 @@
</div> </div>
<div class="flexcol"> <div class="flexcol">
<span> <span>
<img *ngIf="item.approvalStatus == '通过'" src="../../../../assets/images/icon/agree.png" <ng-container
alt=""> *ngIf="item.approvalStatus == '通过'|| item.approvalStatus == '驳回' ; else elseTemplate">
<img *ngIf="item.approvalStatus == '驳回'" src="../../../../assets/images/icon/reject.png" <img *ngIf="item.approvalStatus == '通过'"
alt=""> src="../../../../assets/images/icon/agree.png" alt="">
<span *ngIf="item.approvalStatus == '待处理'">待处理</span> <img *ngIf="item.approvalStatus == '驳回'"
src="../../../../assets/images/icon/reject.png" alt="">
</ng-container>
<ng-template #elseTemplate>
<span>{{item.approvalStatus}}</span>
</ng-template>
</span> </span>
<span> <span>
结果 结果
</span> </span>
</div> </div>
<div class="flexcol"> <div class="flexcol">
<span class="blue" (click)="look(item)"> <span>
查看 <span class="blue" style="margin-right: 6px;" (click)="look(item)">查看</span>
<span class="red" (click)="deleteTask(item, taskLIst)">删除</span>
</span> </span>
<span> <span>
操作 操作

32
src/app/home/task/station-task-apply/station-task-apply.component.ts

@ -278,7 +278,7 @@ export class StationTaskApplyComponent implements OnInit {
}, },
nzOnOk: async () => { nzOnOk: async () => {
console.log(instance.validateForm.value) console.log(instance.validateForm.value)
if (instance.validateForm.valid) { if (instance.validateForm.valid && instance.selectedUnitData.id) {
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
let selectedMonth = this.selectedMonth < 10 ? "0" + this.selectedMonth : this.selectedMonth; let selectedMonth = this.selectedMonth < 10 ? "0" + this.selectedMonth : this.selectedMonth;
let selectedTime = this.selectedYear + '-' + selectedMonth + '-' + '01' let selectedTime = this.selectedYear + '-' + selectedMonth + '-' + '01'
@ -286,7 +286,7 @@ export class StationTaskApplyComponent implements OnInit {
month: selectedTime, month: selectedTime,
taskName: instance.validateForm.value.taskname, taskName: instance.validateForm.value.taskname,
taskType: instance.validateForm.value.taskname, taskType: instance.validateForm.value.taskname,
companyId: instance.validateForm.value.unitname, companyId: instance.selectedUnitData.id,
organizationId: this.OrganizationId, organizationId: this.OrganizationId,
supervisorIds: instance.validateForm.value.organization, supervisorIds: instance.validateForm.value.organization,
creationType: '申领任务', creationType: '申领任务',
@ -334,7 +334,35 @@ export class StationTaskApplyComponent implements OnInit {
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
} }
//删除任务
deleteTask(item, incomingData) {
console.log(item)
console.log(incomingData)
this.modal.confirm({
nzTitle: `确定要删除该任务吗?`,
nzOkText: '确定',
nzOkType: 'primary',
nzOnOk: () => {
this.http.delete(`/api/PlanTasks/${item.id}`).subscribe(data => {
for (let index = 0; index < incomingData.length; index++) {
const element = incomingData[index];
if (element.id == item.id) {
incomingData.splice(index, 1)
index--
}
}
this.message.create('success', '删除成功!');
})
},
nzCancelText: '取消',
nzOnCancel: () => {
}
});
}
} }
export enum ApprovalStatus { export enum ApprovalStatus {

2
src/app/home/task/station-task-execution/station-task-execution.component.html

@ -150,7 +150,7 @@
</div> </div>
<div class="flexcol"> <div class="flexcol">
<span> <span>
待检查 {{item.inspectionResult}}
</span> </span>
<span> <span>
检查结果 检查结果

20
src/app/home/task/task.component.ts

@ -7,28 +7,28 @@ import { Router } from '@angular/router';
styleUrls: ['./task.component.scss'] styleUrls: ['./task.component.scss']
}) })
export class TaskComponent implements OnInit { export class TaskComponent implements OnInit {
level="" level = ""
user=false user = false
constructor(private router: Router) { } constructor(private router: Router) { }
ngOnInit(): void { ngOnInit(): void {
console.log(JSON.parse(sessionStorage.getItem('userData'))); console.log(JSON.parse(sessionStorage.getItem('userData')));
this.level=JSON.parse(sessionStorage.getItem('userData')).organizationLevel this.level = JSON.parse(sessionStorage.getItem('userData')).organizationLevel
let user=JSON.parse(sessionStorage.getItem('userData')).roles let user = JSON.parse(sessionStorage.getItem('userData')).roles
for (let index = 0; index < user.length; index++) { for (let index = 0; index < user.length; index++) {
const element = user[index].name; const element = user[index].name;
if(element.indexOf('检查') != -1){ if (element.indexOf('检查') != -1) {
this.user=true this.user = true
} }
} }
if(this.router.url=="/task"){ if (this.router.url == "/task") {
if(this.level=="brigade"){ if (this.level == "brigade") {
this.router.navigate(['/task/indicators']) this.router.navigate(['/task/indicators'])
}else if(this.level=="battalion" && !this.user){ } else if (this.level == "battalion" && !this.user) {
this.router.navigate(['/task/monthlytaskoverview']) this.router.navigate(['/task/monthlytaskoverview'])
}else if(this.level=="squadron" || this.user){ } else if (this.level == "squadron" || this.user) {
this.router.navigate(['/task/taskexecution']) this.router.navigate(['/task/taskexecution'])
} }
} }

10
src/app/home/task/zhi-indicators/zhi-indicators.component.html

@ -144,13 +144,15 @@
placeholder="一段简短的说明文字..." placeholder="一段简短的说明文字..."
(ngModelChange)="taskDescChange(complaint,item)"></textarea> (ngModelChange)="taskDescChange(complaint,item)"></textarea>
</td> </td>
<td> <td style="display: flex;justify-content: space-between;align-items: center;">
<ng-container *ngIf="item.approvalStatus == '未派发'; else elseTemplate"> <ng-container *ngIf="item.approvalStatus == '未派发'; else elseTemplate">
<span class="blue" (click)="distribute(item,'投诉举报')">派发</span> <span class="blue" (click)="distribute(item,'投诉举报')">派发</span>
</ng-container> </ng-container>
<ng-template #elseTemplate> <ng-template #elseTemplate>
<span class="green">已派发</span> <span class="green">已派发</span>
</ng-template> </ng-template>
<span style="margin-left: 6px;" class="red"
(click)="deleteTask(item,complaint)">删除</span>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -290,13 +292,15 @@
placeholder="一段简短的说明文字..." placeholder="一段简短的说明文字..."
(ngModelChange)="taskDescChange(permission,item)"></textarea> (ngModelChange)="taskDescChange(permission,item)"></textarea>
</td> </td>
<td> <td style="display: flex;justify-content: space-between;align-items: center;">
<ng-container *ngIf="item.approvalStatus == '未派发'; else elseTemplate"> <ng-container *ngIf="item.approvalStatus == '未派发'; else elseTemplate">
<span class="blue" (click)="distribute(item,'行政许可')">派发</span> <span class="blue" (click)="distribute(item,'行政许可')">派发</span>
</ng-container> </ng-container>
<ng-template #elseTemplate> <ng-template #elseTemplate>
<span class="green">已派发</span> <span class="green">已派发</span>
</ng-template> </ng-template>
<span style="margin-left: 6px;" class="red"
(click)="deleteTask(item,permission)">删除</span>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -484,6 +488,7 @@
<ng-template #elseTemplate> <ng-template #elseTemplate>
<span class="green">已派发</span> <span class="green">已派发</span>
</ng-template> </ng-template>
<span style="margin-left: 6px;" class="red" (click)="deleteTask(i,item)">删除</span>
</div> </div>
</td> </td>
</tr> </tr>
@ -639,6 +644,7 @@
<ng-template #elseTemplate> <ng-template #elseTemplate>
<span class="green">已派发</span> <span class="green">已派发</span>
</ng-template> </ng-template>
<span style="margin-left: 6px;" class="red" (click)="deleteTask(i,item)">删除</span>
</div> </div>
</td> </td>
</tr> </tr>

34
src/app/home/task/zhi-indicators/zhi-indicators.component.ts

@ -237,7 +237,7 @@ export class ZhiIndicatorsComponent implements OnInit {
PageNumber: 1, PageNumber: 1,
PageSize: 99999 PageSize: 99999
} }
let p = new Promise<void>((resolve, reject) => { return new Promise<void>((resolve, reject) => {
this.http.get('/api/Companies', { this.http.get('/api/Companies', {
params: params params: params
}).subscribe((data: any) => { }).subscribe((data: any) => {
@ -279,7 +279,6 @@ export class ZhiIndicatorsComponent implements OnInit {
resolve(data) resolve(data)
}) })
}) })
return p
} }
@ -548,9 +547,6 @@ export class ZhiIndicatorsComponent implements OnInit {
} }
async getTaskList(TaskType, carddata?: any) { async getTaskList(TaskType, carddata?: any) {
TaskType == '投诉举报' ? this.complaint.isLoading = true : this.permission.isLoading = true TaskType == '投诉举报' ? this.complaint.isLoading = true : this.permission.isLoading = true
// carddata ? carddata.isLoading = true : null // carddata ? carddata.isLoading = true : null
@ -740,4 +736,32 @@ export class ZhiIndicatorsComponent implements OnInit {
nzCancelText: '取消' nzCancelText: '取消'
}); });
} }
//删除任务
deleteTask(item, incomingData) {
console.log(item)
console.log(incomingData)
this.modal.confirm({
nzTitle: `确定要删除该任务吗?`,
nzOkText: '确定',
nzOkType: 'primary',
nzOnOk: () => {
this.http.delete(`/api/PlanTasks/${item.id}`).subscribe(data => {
let originaldata
if (item.taskType == '投诉举报' || item.taskType == '行政许可') {
this.getTaskList(item.taskType)
}
if (item.taskType == '双随机' || item.taskType == '熟悉演练') {
this.getTaskTarget(item.taskType)
}
this.message.create('success', '删除成功!');
})
},
nzCancelText: '取消',
nzOnCancel: () => {
}
});
}
} }

15
src/app/pages/login/login.component.html

@ -1,9 +1,12 @@
<div class="login" id="login"> <div class="login" id="login">
<div class="left"> <div class="left">
<p class="a1">Hi,欢迎登陆</p> <p class="a1">Hi,欢迎登陆</p>
<p class="a2">防消一体化综合治理平台</p> <div>
<p class="a3">INTEGRATED CONTROL PL ATFORM FOR PREVENTION AND EL IMINATION</p> <img src="../../../assets/images/logo/loginlogo.png" alt="">
</div> </div>
</div>
<div class="card"> <div class="card">
<h1 class="cardheader">登录</h1> <h1 class="cardheader">登录</h1>
<!-- <h1 class="cardheader">济南管理系统</h1> --> <!-- <h1 class="cardheader">济南管理系统</h1> -->
@ -13,7 +16,7 @@
<nz-form-item style="margin-bottom: 12px;"> <nz-form-item style="margin-bottom: 12px;">
<nz-form-control nzErrorTip="请输入账号!"> <nz-form-control nzErrorTip="请输入账号!">
<nz-input-group nzPrefixIcon="user"> <nz-input-group nzPrefixIcon="user">
<input required nz-input type="text" formControlName="userName" placeholder="请输入账号"/> <input required nz-input type="text" formControlName="userName" placeholder="请输入账号" />
</nz-input-group> </nz-input-group>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
@ -21,7 +24,7 @@
<nz-form-item> <nz-form-item>
<nz-form-control nzErrorTip="请输入密码!"> <nz-form-control nzErrorTip="请输入密码!">
<nz-input-group nzPrefixIcon="lock"> <nz-input-group nzPrefixIcon="lock">
<input required nz-input type="password" formControlName="password" placeholder="请输入密码"/> <input required nz-input type="password" formControlName="password" placeholder="请输入密码" />
</nz-input-group> </nz-input-group>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
@ -46,8 +49,4 @@
<p class="company">防消一体化综合治理平台 v1.1.0</p> <p class="company">防消一体化综合治理平台 v1.1.0</p>
</div> </div>
<div class="name">
</div>
</div> </div>

81
src/app/pages/login/login.component.scss

@ -7,26 +7,27 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
overflow: auto;
} }
.left{
.left {
color: #feffff; color: #feffff;
padding: 50px; padding: 50px;
margin-right: 200px;
height: 504px; height: 504px;
p{ margin-left: -58px;
p {
color: #feffff; color: #feffff;
font-size: 24px; font-size: 26px;
text-align: left; text-align: left;
font-family: YouYuan; font-family: YouYuan;
box-sizing: border-box;
margin-top: 20px;
} }
.a2{
font-size: 44px;
}
.a3{
margin-top: -30px;
font-size: 14px;
color: rgb(254,255,255,.4);
img {
width: 850px;
height: auto;
margin-left: -76px;
} }
} }
@ -39,81 +40,61 @@
box-sizing: border-box; box-sizing: border-box;
padding: 40px 45px 42px 45px; padding: 40px 45px 42px 45px;
color: #3b3b3b; color: #3b3b3b;
}
.cardheader { .cardheader {
width: 200px; width: 200px;
margin: 0 auto 10px auto; margin: 0 auto 10px auto;
text-align: center; text-align: center;
font-size: 22px; font-size: 22px;
color: #3b3b3b color: #3b3b3b
} }
.cardheader:nth-child(2) {
.cardheader:nth-child(2) {
margin-bottom: 40px; margin-bottom: 40px;
} }
label { label {
color: #3b3b3b; color: #3b3b3b;
} }
.hint { .hint {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 6px; margin-bottom: 6px;
align-items: center; align-items: center;
.forget { .forget {
cursor: pointer; cursor: pointer;
color: #2399FF; color: #2399FF;
} }
} }
.autologin { .autologin {
margin-bottom: 40px; margin-bottom: 40px;
} }
button { button {
margin: 30px 0; margin: 30px 0;
width: 100%; width: 100%;
height: 42px; height: 42px;
font-size: 16px; font-size: 16px;
// background: #2D4CC1; // background: #2D4CC1;
border-radius: 4px; border-radius: 4px;
} }
p { p {
text-align: center; text-align: center;
} }
.role { .role {
color: #2399FF; color: #2399FF;
margin-top: 38px; margin-top: 38px;
font-size: 15px; font-size: 15px;
} }
.company { .company {
color: #666262; color: #666262;
margin-top: 10px; margin-top: 10px;
font-size: 14px; font-size: 14px;
}
.name {
position: absolute;
left:40px;
top:40px;
img {
// margin-bottom: 32px;
width: 254px;
height: 56px;
}
h1 {
font-size: 63px;
color: #3b3b3b;
font-weight: 600;
text-shadow: 0px 2px 8px #2399FF;
letter-spacing: 5px;
margin-bottom: 0px;
} }
} }

2
src/app/pages/login/login.component.ts

@ -105,7 +105,7 @@ export class LoginComponent implements OnInit {
this.isLoading = false; this.isLoading = false;
this.rememberInfo() this.rememberInfo()
this.autoLogin() this.autoLogin()
this.router.navigate(['/system']) this.router.navigate(['/task'])
this.message.create('success', `登录成功`); this.message.create('success', `登录成功`);
sessionStorage.setItem("userData", JSON.stringify(data)); sessionStorage.setItem("userData", JSON.stringify(data));
await this.getLevel() await this.getLevel()

BIN
src/assets/images/logo/loginlogo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Loading…
Cancel
Save