中化加油站项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

76 lines
2.2 KiB

import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Component, OnInit, Input } from '@angular/core';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { HttpClient } from '@angular/common/http';
import { TreeService } from 'src/app/service/tree.service';
import * as moment from 'moment';
@Component({
selector: 'app-down-image',
templateUrl: './down-image.component.html',
styleUrls: ['./down-image.component.scss']
})
export class DownImageComponent implements OnInit {
validateForm!: FormGroup;
constructor(private fb: FormBuilder, private http: HttpClient ,private toTree:TreeService) { }
isVisible=false
ngOnInit(): void {
this.validateForm = this.fb.group({
StartTime: [null],
EndTime:[null],
NodeName:[null],
GasStationId:[null]
});
this.getAllOrganization()
}
result
onClick(){
console.log(this.validateForm.value);
let params={
StartTime:moment(this.validateForm.value.StartTime).format('YYYY-MM-DD HH:mm:ss'),
EndTime:moment(this.validateForm.value.EndTime).format('YYYY-MM-DD HH:mm:ss'),
NodeName:this.validateForm.value.NodeName,
GasStationId:this.validateForm.value.GasStationId
}
this.http.get('/api/services/app/OilUnloadingProcess/GetOilUnloadingImages', { params: params }).subscribe((data:any)=>{
console.log(data);
this.result=data.result
setTimeout(() => {
this.isVisible=true
}, 500);
})
}
list=[
'车辆进场',
'设置卸油隔离区',
'卸油连接静电接地',
'卸油设置消防器材',
'连接卸油管',
'卸油中无人监卸',
'拆除卸油管',
'车辆离场',
]
nodes: any = []
async getAllOrganization() {
let OrganizationUnitId = JSON.parse(sessionStorage.getItem('userdata')).organization.id
let params = {
OrganizationUnitId: OrganizationUnitId,
MaxResultCount: 9999,
IsContainsChildren: "true"
}
await new Promise((resolve, reject) => {
this.http.get('/api/services/app/GasStation/GetAll', {
params: params
}).subscribe((data: any) => {
this.nodes=data.result.items
resolve(data)
})
})
}
}