@ -10,6 +10,8 @@ import { debounceTime } from 'rxjs/operators';
import { Router } from '@angular/router' ;
import { Router } from '@angular/router' ;
import { OilUnloadingProcessComponent } from '../oil-unloading-process/oil-unloading-process.component' ;
import { OilUnloadingProcessComponent } from '../oil-unloading-process/oil-unloading-process.component' ;
import { TreeService } from 'src/app/service/tree.service' ;
import { TreeService } from 'src/app/service/tree.service' ;
import { DisposeequipmentComponent } from './disposeequipment/disposeequipment.component' ;
import { NzMessageService } from 'ng-zorro-antd/message' ;
@Component ( {
@Component ( {
selector : 'app-warning-statistics-list' ,
selector : 'app-warning-statistics-list' ,
@ -19,47 +21,10 @@ import { TreeService } from 'src/app/service/tree.service';
export class WarningStatisticsListComponent implements OnInit {
export class WarningStatisticsListComponent implements OnInit {
validateForm ! : FormGroup ;
validateForm ! : FormGroup ;
constructor ( private toTree : TreeService , private http : HttpClient , private fb : FormBuilder , private router : Router , private modal : NzModalService , private viewContainerRef : ViewContainerRef , private element : ElementRef ) { }
constructor ( private toTree : TreeService , private message : NzMessageService , private http : HttpClient , private fb : FormBuilder , private router : Router , private modal : NzModalService , private viewContainerRef : ViewContainerRef , private element : ElementRef ) { }
myChart : any //左侧饼图
myChart : any //左侧饼图
mybarChart : any //柱状图
mybarChart : any //柱状图
getThirtyDays() {
//获取当前日期
let myDate = new Date ( ) ;
var nowY = myDate . getFullYear ( ) ;
var nowM = myDate . getMonth ( ) + 1 ;
var nowD = myDate . getDate ( ) ;
var enddateStr = nowY + "-" + ( nowM < 10 ? "0" + nowM : nowM ) + "-" + ( nowD < 10 ? "0" + nowD : nowD ) ; //当前日期
var enddate = new Date ( enddateStr ) ;
//获取三十天前日期
var lw = new Date ( new Date ( ) . getTime ( ) - 1000 * 60 * 60 * 24 * 30 ) ; //最后一个数字30可改,30天的意思
var lastY = lw . getFullYear ( ) ;
var lastM = lw . getMonth ( ) + 1 ;
var lastD = lw . getDate ( ) ;
var startdateStr = lastY + "-" + ( lastM < 10 ? "0" + lastM : lastM ) + "-" + ( lastD < 10 ? "0" + lastD : lastD ) ; //三十天之前日期
var startDate = new Date ( startdateStr ) ;
const dateList = [ ]
while ( true ) {
startDate . setDate ( startDate . getDate ( ) + 1 )
if ( startDate . getTime ( ) <= enddate . getTime ( ) ) {
if ( startDate . getDate ( ) < 10 ) {
// startDate.getFullYear() 获取年,此处没加上年份
dateList . push ( ( startDate . getMonth ( ) + 1 ) + '.0' + startDate . getDate ( ) )
} else {
dateList . push ( ( startDate . getMonth ( ) + 1 ) + '.' + startDate . getDate ( ) )
}
} else {
break
}
}
return dateList ;
}
isEcharts : boolean = true
isEcharts : boolean = true
isEchartsShow() {
isEchartsShow() {
this . isEcharts = ! this . isEcharts
this . isEcharts = ! this . isEcharts
@ -74,18 +39,19 @@ export class WarningStatisticsListComponent implements OnInit {
let nowY = myDate . getFullYear ( ) ;
let nowY = myDate . getFullYear ( ) ;
let nowM = myDate . getMonth ( ) + 1 ;
let nowM = myDate . getMonth ( ) + 1 ;
let nowD = myDate . getDate ( ) ;
let nowD = myDate . getDate ( ) ;
this . enddate = nowY + "-" + ( nowM < 10 ? "0" + nowM : nowM ) + "-" + ( nowD < 10 ? "0" + nowD : nowD ) ; //当前日期
this . enddate = JSON . parse ( JSON . stringify ( nowY + "-" + ( nowM < 10 ? "0" + nowM : nowM ) + "-" + ( nowD < 10 ? "0" + nowD : nowD ) ) ) ; //当前日期
//获取三十天前日期
//获取三十天前日期
let lw = new Date ( myDate - 1000 * 60 * 60 * 24 * 30 ) ; //最后一个数字30可改,30天的意思
let lw = new Date ( myDate - 1000 * 60 * 60 * 24 * 30 ) ; //最后一个数字30可改,30天的意思
let lastY = lw . getFullYear ( ) ;
let lastY = lw . getFullYear ( ) ;
let lastM = lw . getMonth ( ) + 1 ;
let lastM = lw . getMonth ( ) + 1 ;
let lastD = lw . getDate ( ) ;
let lastD = lw . getDate ( ) ;
this . startdate = lastY + "-" + ( lastM < 10 ? "0" + lastM : lastM ) + "-" + ( lastD < 10 ? "0" + lastD : lastD ) ; //三十天之前日期
this . startdate = JSON . parse ( JSON . stringify ( lastY + "-" + ( lastM < 10 ? "0" + lastM : lastM ) + "-" + ( lastD < 10 ? "0" + lastD : lastD ) ) ) ; //三十天之前日期
this . validateForm = this . fb . group ( {
this . validateForm = this . fb . group ( {
// state: [null],
state : [ '0' ] ,
organization : [ null ] ,
organization : [ null ] ,
datePicker : [ [ this . startdate , this . enddate ] ]
datePicker : [ [ this . startdate , this . enddate ] ]
} ) ;
} ) ;
// 饼图
// 饼图
this . myChart = echarts . init ( document . getElementById ( 'piechart' ) ) ;
this . myChart = echarts . init ( document . getElementById ( 'piechart' ) ) ;
//柱状折线图
//柱状折线图
@ -99,6 +65,7 @@ export class WarningStatisticsListComponent implements OnInit {
this . isOrShow = true
this . isOrShow = true
}
}
}
}
//刷新饼图图表数据
//刷新饼图图表数据
num
num
echartsData : any
echartsData : any
@ -199,7 +166,7 @@ export class WarningStatisticsListComponent implements OnInit {
} ,
} ,
series : [
series : [
{
{
name : '证照 预警事件' ,
name : '预警事件' ,
data : [ ] ,
data : [ ] ,
type : 'bar' ,
type : 'bar' ,
itemStyle : {
itemStyle : {
@ -220,7 +187,7 @@ export class WarningStatisticsListComponent implements OnInit {
barWidth : '25%'
barWidth : '25%'
} ,
} ,
{
{
name : '证照 预警事件' ,
name : '预警事件' ,
data : [ ] ,
data : [ ] ,
type : 'line' ,
type : 'line' ,
symbol : 'circle' ,
symbol : 'circle' ,
@ -240,7 +207,7 @@ export class WarningStatisticsListComponent implements OnInit {
}
}
] ,
] ,
legend : {
legend : {
data : [ '证照 预警事件' ] ,
data : [ '预警事件' ] ,
textStyle : {
textStyle : {
color : '#fff'
color : '#fff'
} ,
} ,
@ -436,103 +403,70 @@ export class WarningStatisticsListComponent implements OnInit {
}
}
} ;
} ;
isgoback : boolean = false
isgoback : boolean = false
//获取统计信息
chartsSpin : boolean = false
getAggregations() {
this . chartsSpin = true
let organizationUnitId
if ( this . router . url . indexOf ( 'petrolStation' ) != - 1 ) {
organizationUnitId = JSON . parse ( sessionStorage . getItem ( 'userdataOfgasstation' ) ) . organization . id
} else {
organizationUnitId = JSON . parse ( sessionStorage . getItem ( 'userdata' ) ) . organization . id
}
let params : any = {
OrganizationUnitId : organizationUnitId ,
IsContainsChildren : 'true'
}
this . http . get ( '/api/services/app/ViolateRecord/LicenseSummary' , { params : params } ) . subscribe ( ( data : any ) = > {
this . chartsSpin = false
this . echartsData = data . result
this . refreshEchartsData1 ( this . echartsData )
} )
}
refreshEchartsData1 ( data ) {
refreshEchartsData1 ( data ) {
this . num = data . totalCount
console . log ( 'echarts信息' , data )
//饼图
//饼图
this . oilchartpieOptionPieData1 = [
let totalCount = 0
{ name : '消防器材预警' , value : data.notCorrectCount } ,
data . violationList . forEach ( element = > {
{ name : '证照预警' , value : data.correctCount } ,
element . name = element . eventSystemName
]
element . value = element . count
totalCount += element . count
} ) ;
this . num = totalCount
this . oilchartpieOptionPieData1 = data . violationList
this . oilchartpieOption . series [ 0 ] . data = this . oilchartpieOptionPieData1
this . oilchartpieOption . series [ 0 ] . data = this . oilchartpieOptionPieData1
this . myChart . setOption ( this . oilchartpieOption ) ;
this . myChart . setOption ( this . oilchartpieOption ) ;
this . myChart . off ( 'legendselectchanged' )
this . myChart . off ( 'legendselectchanged' )
this . myChart . off ( 'click' )
this . myChart . off ( 'click' )
this . myChart . on ( 'legendselectchanged' , ( params ) = > {
this . myChart . setOption ( {
legend : { selected : { [ params . name ] : true } }
} )
if ( params . name == '预警事件' ) {
this . isgoback = true
this . refreshEchartsData2 ( this . echartsData )
this . validateForm . patchValue ( {
state : '0'
} ) ;
this . list = [ ]
this . SkipCount = '0'
this . getViolateRecordList ( )
}
} ) ;
this . myChart . on ( 'click' , ( params ) = > {
this . myChart . on ( 'click' , ( params ) = > {
if ( params . name == '预警事件' ) {
if ( params . name == '证照预警' ) {
this . isgoback = true
console . log ( '点击myChart' )
this . refreshEchartsData2 ( this . echartsData )
// this.validateForm.patchValue({
this . validateForm . patchValue ( {
// state: '0'
state : '0'
// });
} ) ;
// this.list = []
this . list = [ ]
// this.SkipCount = '0'
this . SkipCount = '0'
// this.getViolateRecordList()
this . getViolateRecordList ( )
}
}
} ) ;
} ) ;
//柱状图
//柱状图
let monthArr = [ ]
let monthArr = [ ]
let valuedata = [ ]
let valuedata = [ ]
data . l ist. forEach ( element = > {
data . timeL ist. forEach ( element = > {
monthArr . push ( moment ( element . key ) . format ( 'MM.DD' ) )
monthArr . push ( moment ( element . key ) . format ( 'MM.DD' ) )
valuedata . push ( element . totalC ount)
valuedata . push ( element . c ount)
} ) ;
} ) ;
this . oilchartbarOption . xAxis . data = monthArr
this . oilchartbarOption . xAxis . data = monthArr
this . oilchartbarOption . series [ 0 ] . data = valuedata
this . oilchartbarOption . series [ 0 ] . data = valuedata
this . oilchartbarOption . series [ 1 ] . data = valuedata
this . oilchartbarOption . series [ 1 ] . data = valuedata
this . mybarChart . setOption ( this . oilchartbarOption ) ;
this . mybarChart . setOption ( this . oilchartbarOption ) ;
}
}
refreshEchartsData2 ( data ) {
this . num = Number ( data . proccessBeforeCount + data . proccessingCount + data . allProccessCount )
//饼图
this . oilchartpieOptionPieData2 = [
{ name : '事前准备' , value : data.proccessBeforeCount } ,
{ name : '事中操作' , value : data.proccessingCount } ,
{ name : '全程检测' , value : data.allProccessCount }
]
this . oilchartpieOption2 . series [ 0 ] . data = this . oilchartpieOptionPieData2
this . myChart . setOption ( this . oilchartpieOption2 ) ;
//柱状图
let monthArr = [ ]
let valuedataBefore = [ ]
let valuedataIng = [ ]
let valuedataAll = [ ]
data . list . forEach ( element = > {
monthArr . push ( moment ( element . key ) . format ( 'MM.DD' ) )
valuedataBefore . push ( element . proccessBeforeCount )
valuedataIng . push ( element . proccessingCount )
valuedataAll . push ( element . allProccessCount )
} ) ;
this . oilchartbarOption2 . xAxis . data = monthArr
this . oilchartbarOption2 . series [ 0 ] . name = '事前准备'
this . oilchartbarOption2 . series [ 0 ] . data = valuedataBefore
this . oilchartbarOption2 . series [ 1 ] . name = '事中操作'
this . oilchartbarOption2 . series [ 1 ] . data = valuedataIng
this . oilchartbarOption2 . series [ 2 ] . name = '全程监测'
this . oilchartbarOption2 . series [ 2 ] . data = valuedataAll
this . mybarChart . setOption ( this . oilchartbarOption2 ) ;
}
goback() {
this . isgoback = false
this . myChart . clear ( ) ;
this . mybarChart . clear ( ) ;
this . refreshEchartsData1 ( this . echartsData )
this . validateForm . patchValue ( {
state : null
} ) ;
this . list = [ ]
this . SkipCount = '0'
this . getViolateRecordList ( )
}
//预警类型接口
licenseId
equipmentId
defaultOrId : string
defaultOrId : string
//获取所有组织机构
//获取所有组织机构
nodes : any = [ ]
nodes : any = [ ]
@ -558,41 +492,37 @@ export class WarningStatisticsListComponent implements OnInit {
this . validateForm . patchValue ( {
this . validateForm . patchValue ( {
datePicker : [ this . startdate , this . enddate ]
datePicker : [ this . startdate , this . enddate ]
} ) ;
} ) ;
this . list = [ ]
this . http . get ( '/api/services/app/Violation/GetAllList' ) . subscribe ( ( data : any ) = > {
this . SkipCount = '0'
console . log ( '预警事件' , data . result )
this . getViolateRecordList ( )
data . result . forEach ( element = > {
} )
if ( element . eventSystemName == '证照预警' ) {
}
this . licenseId = element . id
//获取统计信息
}
chartsSpin : boolean = false
if ( element . eventSystemName == '灭火器维护' ) {
getAggregations() {
this . equipmentId = element . id
this . chartsSpin = true
}
let organizationUnitId
} ) ;
if ( this . router . url . indexOf ( 'petrolStation' ) != - 1 ) {
this . list = [ ]
organizationUnitId = JSON . parse ( sessionStorage . getItem ( 'userdataOfgasstation' ) ) . organization . id
this . SkipCount = '0'
} else {
this . getLicenseList ( )
organizationUnitId = JSON . parse ( sessionStorage . getItem ( 'userdata' ) ) . organization . id
} )
}
let params : any = {
OrganizationUnitId : organizationUnitId ,
IsContainsChildren : 'true'
}
this . http . get ( '/api/services/app/OilUnloadingProcess/GetAllCountByDays' , { params : params } ) . subscribe ( ( data : any ) = > {
console . log ( '统计信息' , data )
this . chartsSpin = false
this . echartsData = data . result
this . refreshEchartsData1 ( this . echartsData )
// this.refreshBarLineData(this.echartsData)
} )
} )
}
}
//获得卸油记录列表
//获得卸油记录列表
SkipCount : string = '0'
SkipCount : string = '0'
MaxResultCount : string = '50'
MaxResultCount : string = '50'
list : any = [ ]
list : any = [ ]
totalCount : string
totalCount : string
tableSpin : boolean = false
tableSpin : boolean = false
getViolateRecordList() {
//获得证照预警
getLicenseList() {
for ( const key in this . validateForm . controls ) {
this . validateForm . controls [ key ] . markAsPristine ( ) ;
this . validateForm . controls [ key ] . updateValueAndValidity ( ) ;
}
this . tableSpin = true
this . tableSpin = true
let organizationUnitId
let organizationUnitId
if ( this . router . url . indexOf ( 'petrolStation' ) != - 1 ) {
if ( this . router . url . indexOf ( 'petrolStation' ) != - 1 ) {
@ -600,29 +530,49 @@ export class WarningStatisticsListComponent implements OnInit {
} else {
} else {
organizationUnitId = this . validateForm . value . organization
organizationUnitId = this . validateForm . value . organization
}
}
let IsCorrect = null
let ViolationIds = [ ]
if ( this . validateForm . value . state ) {
if ( this . validateForm . value . state == '0' ) {
this . validateForm . value . state == '0' ? IsCorrect = 'false' : IsCorrect = 'true'
ViolationIds = [ this . licenseId ]
} else {
ViolationIds = [ this . equipmentId ]
}
}
console . log ( '查询日期' , this . validateForm . value . datePicker )
let params = {
let params = {
IsCorrect : IsCorrect ,
Violation Id s : Violation Id s,
StartTime : moment ( this . validateForm . value . datePicker [ 0 ] ) . format ( 'yyyy-MM-DD' ) ,
organizationUnitId : organizationUnitId ,
EndTime : moment ( this . validateForm . value . datePicker [ 1 ] ) . format ( 'yyyy-MM-DD' ) ,
ViolateTime : ( this . validateForm . value . datePicker [ 0 ] && this . validateForm . value . datePicker [ 1 ] ) ? [ moment ( this . validateForm . value . datePicker [ 0 ] ) . format ( 'yyyy-MM-DD HH:mm:ss' ) , moment ( this . validateForm . value . datePicker [ 1 ] ) . format ( 'yyyy-MM-DD HH:mm:ss ' ) ] : null ,
IsContainsChildren : 'true' ,
IsContainsChildren : 'true' ,
OrganizationUnitId : organizationUnitId ,
SkipCount : '0' ,
SkipCount : this.SkipCount ,
MaxResultCount : '9999'
MaxResultCount : this.MaxResultCount
}
}
this . http . get ( '/api/services/app/OilUnloadingProcess /GetAll' , {
this . http . get ( '/api/services/app/ViolateRecord /GetAll' , {
params : params
params : params
} ) . subscribe ( ( data : any ) = > {
} ) . subscribe ( ( data : any ) = > {
this . tableSpin = false
this . tableSpin = false
data . result . items . forEach ( element = > {
element . violatedItemSnapshotObj = JSON . parse ( element . violatedItemSnapshot )
} ) ;
this . list = this . list . concat ( data . result . items ) ;
this . list = this . list . concat ( data . result . items ) ;
this . list = [ . . . this . list ]
this . list = [ . . . this . list ]
this . totalCount = data . result . totalCount
this . totalCount = data . result . totalCount
console . log ( '获取卸油流程 列表' , data . result . items )
console . log ( '证照预警 列表' , data . result . items )
} )
} )
}
}
isLicenseTable = true
tableChange ( $event ) {
console . log ( '走了几遍' )
this . SkipCount = '0'
this . list = [ ]
if ( $event == 0 ) {
this . isLicenseTable = true
} else {
this . isLicenseTable = false
}
this . getLicenseList ( )
}
submitForm ( ) : void {
submitForm ( ) : void {
for ( const i in this . validateForm . controls ) {
for ( const i in this . validateForm . controls ) {
this . validateForm . controls [ i ] . markAsDirty ( ) ;
this . validateForm . controls [ i ] . markAsDirty ( ) ;
@ -631,24 +581,22 @@ export class WarningStatisticsListComponent implements OnInit {
this . list = [ ]
this . list = [ ]
this . SkipCount = '0'
this . SkipCount = '0'
this . getViolateRecordList ( )
this . getLicenseList ( )
}
}
resetForm ( e : MouseEvent ) : void {
resetForm ( e : MouseEvent ) : void {
e . preventDefault ( ) ;
e . preventDefault ( ) ;
this . validateForm . reset ( ) ;
for ( const key in this . validateForm . controls ) {
for ( const key in this . validateForm . controls ) {
this . validateForm . controls [ key ] . markAsPristine ( ) ;
this . validateForm . controls [ key ] . markAsPristine ( ) ;
this . validateForm . controls [ key ] . updateValueAndValidity ( ) ;
this . validateForm . controls [ key ] . updateValueAndValidity ( ) ;
}
}
console . log ( JSON . parse ( sessionStorage . getItem ( 'userdata' ) ) . organization . id )
console . log ( '赋值日期' , [ this . startdate , this . enddate ] )
// this.validateForm.value.organization = JSON.parse(sessionStorage.getItem('userdata')).organization.id
this . validateForm . patchValue ( {
this . validateForm . patchValue ( {
organization : JSON.parse ( sessionStorage . getItem ( 'userdata' ) ) . organization . id ,
datePicker : [ this . startdate , this . enddate ] ,
datePicker : [ this . startdate , this . enddate ]
state : '0' ,
organization : JSON.parse ( sessionStorage . getItem ( 'userdata' ) ) . organization . id
} ) ;
} ) ;
this . list = [ ]
this . SkipCount = '0'
this . getViolateRecordList ( )
}
}
ngAfterViewInit ( ) : void {
ngAfterViewInit ( ) : void {
fromEvent ( this . element . nativeElement . querySelector ( ` #tbody ` ) as HTMLCanvasElement , 'scroll' ) . pipe ( debounceTime ( 100 ) ) . subscribe ( ( event : any ) = > { //监听 DOM 滚动事件
fromEvent ( this . element . nativeElement . querySelector ( ` #tbody ` ) as HTMLCanvasElement , 'scroll' ) . pipe ( debounceTime ( 100 ) ) . subscribe ( ( event : any ) = > { //监听 DOM 滚动事件
@ -656,17 +604,19 @@ export class WarningStatisticsListComponent implements OnInit {
if ( this . totalCount > this . list . length ) {
if ( this . totalCount > this . list . length ) {
console . log ( '需要加载数据了' , event )
console . log ( '需要加载数据了' , event )
this . SkipCount = String ( Number ( this . SkipCount ) + 50 )
this . SkipCount = String ( Number ( this . SkipCount ) + 50 )
this . getViolateRecord List ( )
this . getLicense List ( )
}
}
}
}
} ) ;
} ) ;
}
}
look ( item ) {
look ( item ) {
console . log ( item )
const modal = this . modal . create ( {
const modal = this . modal . create ( {
nzContent : OilUnloadingProcessComponent ,
nzContent : GetOutOfLineDetailsComponent ,
nzWrapClassName : "vertical-center-modal" ,
nzViewContainerRef : this.viewContainerRef ,
nzViewContainerRef : this.viewContainerRef ,
nzWidth : 10 00 ,
nzWidth : ( document . documentElement . clientHeight < 650 || document . documentElement . clientWidth < 1400 ) ? 1000 : 12 00,
nzBodyStyle : {
nzBodyStyle : {
'border' : '1px solid #6d9cc7' ,
'border' : '1px solid #6d9cc7' ,
'border-radius' : '0px' ,
'border-radius' : '0px' ,
@ -679,19 +629,95 @@ export class WarningStatisticsListComponent implements OnInit {
} ,
} ,
nzFooter : null ,
nzFooter : null ,
nzOnOk : async ( ) = > {
nzOnOk : async ( ) = > {
console . log ( 99999 , instance . content )
}
}
} ) ;
} ) ;
const instance = modal . getContentComponent ( ) ;
const instance = modal . getContentComponent ( ) ;
}
}
//处置消防设施
dispose ( item ) {
const modal = this . modal . create ( {
nzContent : DisposeequipmentComponent ,
nzViewContainerRef : this.viewContainerRef ,
nzWidth : 380 ,
nzBodyStyle : {
'border' : '1px solid #91CCFF' ,
'border-radius' : '0px' ,
'padding' : '7px' ,
'box-shadow' : '0 0 8px 0 #fff' ,
'background-image' : 'linear-gradient(#003665, #000f25)'
} ,
nzComponentParams : {
data : item
} ,
nzFooter : null ,
nzClosable : false ,
nzOnOk : async ( ) = > {
if ( instance . isScrap ) {
let body = {
id : item.violatedItemSnapshotObj.id ,
name : instance.validateForm.value.name ,
specification : instance.validateForm.value.specification ,
productionDate : moment ( instance . validateForm . value . prodtime ) . format ( 'yyyy-MM-DD' ) ,
purchaseDate : moment ( instance . validateForm . value . buytime ) . format ( 'yyyy-MM-DD' ) ,
validityEndTime : moment ( instance . validateForm . value . validitytime ) . format ( 'yyyy-MM-DD' ) ,
isScrapped : true ,
organizationUnitId : item.violatedItemSnapshotObj.organizationUnitId
}
this . http . put ( '/api/services/app/FireEquipment/Update' , body ) . subscribe ( ( data : any ) = > {
let body = {
id : item.id ,
handleRecord : '报废成功!'
}
this . http . post ( '/api/services/app/ViolateRecord/HandleViolateRecord' , body ) . subscribe ( data = > {
this . message . create ( 'success' , '报废成功!' ) ;
item . handleTime = new Date ( )
return true
} )
} )
} else {
if ( instance . validateForm . valid ) {
await new Promise ( resolve = > {
let body = {
id : item.violatedItemSnapshotObj.id ,
name : instance.validateForm.value.name ,
specification : instance.validateForm.value.specification ,
productionDate : moment ( instance . validateForm . value . prodtime ) . format ( 'yyyy-MM-DD' ) ,
purchaseDate : moment ( instance . validateForm . value . buytime ) . format ( 'yyyy-MM-DD' ) ,
validityEndTime : moment ( instance . validateForm . value . validitytime ) . format ( 'yyyy-MM-DD' ) ,
organizationUnitId : item.violatedItemSnapshotObj.organizationUnitId
}
this . http . put ( '/api/services/app/FireEquipment/Update' , body ) . subscribe ( ( data : any ) = > {
// item.violatedItemSnapshotObj = data.result
let body = {
id : item.id ,
handleRecord : '维保成功!'
}
this . http . post ( '/api/services/app/ViolateRecord/HandleViolateRecord' , body ) . subscribe ( data = > {
resolve ( data )
this . message . create ( 'success' , '维保成功!' ) ;
item . handleTime = new Date ( )
return true
} )
} )
} )
} else {
this . message . create ( 'warning' , '请填写完整!' ) ;
return false
}
}
}
} ) ;
const instance = modal . getContentComponent ( ) ;
}
goOilList() {
goOilList() {
if ( this . router . url . indexOf ( 'petrolStation' ) != - 1 ) {
if ( this . router . url . indexOf ( 'petrolStation' ) != - 1 ) {
this . router . navigate ( [ '/records/petrolStation/oliunloadinglist' ] )
this . router . navigate ( [ '/records/petrolStation/oliunloadinglist' ] )
} else {
} else {
this . router . navigate ( [ '/records/oliunloadinglist' ] )
this . router . navigate ( [ '/records/oliunloadinglist' ] )
}
}
}
}
gorecordList() {
gorecordList() {
if ( this . router . url . indexOf ( 'petrolStation' ) != - 1 ) {
if ( this . router . url . indexOf ( 'petrolStation' ) != - 1 ) {