|
@@ -62,7 +62,8 @@ export default {
|
|
|
now: '',
|
|
|
chillerOrg: {},
|
|
|
chillerHourList: [],
|
|
|
- idArr: []
|
|
|
+ idArr: [],
|
|
|
+ clearId:null,
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -75,7 +76,6 @@ export default {
|
|
|
lookSnapshot() {
|
|
|
this.showTodayStrategy = true
|
|
|
this.getData()
|
|
|
- // console.log(this.$store.state);
|
|
|
},
|
|
|
formatTime() {
|
|
|
let year = new Date().getFullYear()
|
|
@@ -83,13 +83,6 @@ export default {
|
|
|
let date = new Date().getDate() >= 10 ? new Date().getDate() : '0' + new Date().getDate()
|
|
|
return (this.today = year + '' + month + '' + date)
|
|
|
},
|
|
|
- getPer5Time() {
|
|
|
- let now = new Date().getTime()
|
|
|
- let datetime = now - 5 * 60 * 1000
|
|
|
- let hours = new Date(datetime).getHours() < 10 ? '0' + new Date(datetime).getHours() : new Date(datetime).getHours()
|
|
|
- let minute = new Date(datetime).getMinutes() < 10 ? '0' + new Date(datetime).getMinutes() : new Date(datetime).getMinutes()
|
|
|
- return (this.now = hours + '' + minute)
|
|
|
- },
|
|
|
getChiller() {
|
|
|
let params = {
|
|
|
getParams: {}
|
|
@@ -119,8 +112,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- console.log(this.$store.state.userInfo.userId)
|
|
|
- // return
|
|
|
getCommand(params).then(res => {
|
|
|
this.tableData = res.content ? res.content : []
|
|
|
if (this.tableData.length > 0) {
|
|
@@ -128,19 +119,19 @@ export default {
|
|
|
this.idArr.push(el.appealId)
|
|
|
})
|
|
|
}
|
|
|
- console.log(this.tableData)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.formatTime()
|
|
|
- this.getPer5Time()
|
|
|
- // let vm = this
|
|
|
- // setInterval(function(){
|
|
|
- // vm.getData()
|
|
|
- // },1500)
|
|
|
- // this.getQuickData();
|
|
|
+ let vm = this
|
|
|
+ this.clearId = setInterval(function(){
|
|
|
+ vm.getChiller()
|
|
|
+ },10000*60)
|
|
|
this.getChiller()
|
|
|
+ },
|
|
|
+ destroyed(){
|
|
|
+ window.clearInterval(thius.clearId)
|
|
|
}
|
|
|
}
|
|
|
</script>
|