Browse Source

[完善]完善ui界面

非煤矿山灾害智能感知和预警系统
邵佳豪 3 years ago
parent
commit
2c965de920
  1. 1
      src/app/home/statistic-analysis/home/home.component.scss
  2. 6
      src/app/home/task/station-task-apply/apply/apply.component.html
  3. 5
      src/app/home/task/station-task-apply/apply/apply.component.ts
  4. 2
      src/app/home/task/station-task-apply/station-task-apply.component.scss
  5. 2
      src/app/home/task/station-task-execution/station-task-execution.component.html
  6. 2
      src/app/home/task/station-task-execution/station-task-execution.component.scss
  7. 5
      src/app/home/task/station-task-execution/upload/upload.component.html
  8. 28
      src/app/home/task/station-task-execution/upload/upload.component.scss
  9. 16
      src/app/home/task/station-task-execution/upload/upload.component.ts

1
src/app/home/statistic-analysis/home/home.component.scss

@ -322,5 +322,4 @@
.bottombox {
flex: 0.9;
}

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

@ -143,13 +143,13 @@
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="检查人员">检查人员</nz-form-label>
<nz-form-control>
<img class="img1" src="../../../../../assets/images/icon/main.png" alt="">
<nz-select nzPlaceHolder="请选择主查" class="select" formControlName="main">
<nz-option *ngFor="let item of mainsupervisorList" [nzValue]="item.id" [nzLabel]="item.name">
<nz-select nzPlaceHolder="请选择主查" class="select" formControlName="main" [(ngModel)]="userId">
<nz-option *ngFor="let item of supervisorListAll" [nzValue]="item.id" [nzLabel]="item.name">
</nz-option>
</nz-select>
<img class="img2" src="../../../../../assets/images/icon/assist.png" alt="">
<nz-select nzPlaceHolder="请选择协查" class="select" formControlName="assist">
<nz-option *ngFor="let item of assitantsupervisorList" [nzValue]="item.id" [nzLabel]="item.name">
<nz-option *ngFor="let item of supervisorListAll" [nzValue]="item.id" [nzLabel]="item.name">
</nz-option>
</nz-select>
</nz-form-control>

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

@ -27,10 +27,15 @@ export class ApplyComponent implements OnInit {
taskType
newTree
OrganizationId
userId
supervisorListAll = []
ngOnInit(): void {
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
this.userId = JSON.parse(sessionStorage.getItem('userData')).id
console.log('mainsupervisorList', this.mainsupervisorList)
console.log('assitantsupervisorList', this.assitantsupervisorList)
this.supervisorListAll = [...this.mainsupervisorList, ...this.assitantsupervisorList]
this.validateForm = this.fb.group({
taskname: [null, [Validators.required]],
organization: [null, [Validators.required]],

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

@ -165,7 +165,7 @@
padding: 12px 20px;
border: 1px solid #C7CAD0;
justify-content: space-around;
padding-left: 80px;
padding-left: 50px;
margin-bottom: 10px;
div {

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

@ -90,7 +90,7 @@
</div>
<div class="flexcol">
<span>
<span class="ellipsi" [title]="item.lastModificationTime | date:'yyyy-MM-dd'">
{{item.lastModificationTime | date:"yyyy-MM-dd"}}
</span>
<span>

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

@ -164,7 +164,7 @@
padding: 12px 20px;
border: 1px solid #C7CAD0;
justify-content: space-around;
padding-left: 80px;
padding-left: 50px;
margin: 10px 0;
div {

5
src/app/home/task/station-task-execution/upload/upload.component.html

@ -20,7 +20,10 @@
</button>
<input type="file" name="" id="" (change)="filechange($event)" *ngIf="!isLoadingSave">
<ul>
<li *ngFor="let item of fileList" (click)="lookfile(item)">{{item | fileName}}</li>
<li *ngFor="let item of fileList;let key = index">
<span class="filename" (click)="lookfile(item)">{{item | fileName}}</span>
<span (click)="delete(fileList,key)">x</span>
</li>
</ul>
</div>

28
src/app/home/task/station-task-execution/upload/upload.component.scss

@ -24,14 +24,26 @@
ul {
margin-bottom: 0;
li{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
li:hover {
text-decoration: underline;
cursor: pointer;
li {
display: flex;
justify-content: space-between;
span{
cursor: pointer;
}
.filename {
flex: 1;
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.filename:hover {
text-decoration: underline;
cursor: pointer;
}
}
}
}

16
src/app/home/task/station-task-execution/upload/upload.component.ts

@ -1,7 +1,7 @@
import { HttpClient } from '@angular/common/http';
import { Component, Input, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service';
import Viewer from 'viewerjs';
@Component({
@ -12,7 +12,7 @@ import Viewer from 'viewerjs';
export class UploadComponent implements OnInit {
@Input() data?: any;
validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService) { }
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService, private modal2: NzModalService) { }
ngOnInit(): void {
console.log(this.data)
@ -124,4 +124,16 @@ export class UploadComponent implements OnInit {
node.click();
}, 0);
}
delete(fileList, key) {
this.modal2.confirm({
nzTitle: `确定要删除这个文件吗?`,
nzOkText: '确定',
nzOkType: 'primary',
nzOnOk: () => {
fileList.splice(key, 1)
},
nzCancelText: '取消'
});
}
}

Loading…
Cancel
Save