数据
This commit is contained in:
@@ -105,8 +105,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { homepageDataLeft } from '@js/mork2.js'
|
||||
// import { homepageDataLeft } from '@js/getData2.js'
|
||||
// import { homepageDataLeft } from '@js/mork2.js'
|
||||
import { homepageDataLeft } from '@js/getData2.js'
|
||||
import symbol1 from '@img/symbol_1.png'
|
||||
import symbol2 from '@img/symbol_2.png'
|
||||
import symbol3 from '@img/symbol_3.png'
|
||||
|
||||
@@ -72,6 +72,9 @@ export default {
|
||||
this._homepageEquipment()
|
||||
this.refresh()
|
||||
},
|
||||
destroyed () {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
refresh () {
|
||||
this.timer = setInterval(() => {
|
||||
|
||||
@@ -112,6 +112,7 @@ export default {
|
||||
interTime: this.$store.getters.setTime,
|
||||
timer: null,
|
||||
chart7Timer: null,
|
||||
chart9Timer: null,
|
||||
capacityRate: [], // 设备产能利用
|
||||
stateStatistics: {}, // 设备运行统计
|
||||
deviceWorkOrder: [], // 设备工单生产
|
||||
@@ -138,7 +139,9 @@ export default {
|
||||
this.refresh()
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearInterval(this.timer)
|
||||
clearInterval(this.chart7Timer)
|
||||
clearInterval(this.chart9Timer)
|
||||
},
|
||||
methods: {
|
||||
refresh () {
|
||||
@@ -149,6 +152,7 @@ export default {
|
||||
async _homepageDataRight () {
|
||||
let res = await homepageDataRight()
|
||||
clearInterval(this.chart7Timer)
|
||||
clearInterval(this.chart9Timer)
|
||||
this.capacityRate = [...res.capacityRate]
|
||||
res.stateStatistics.fourState.map(el => {
|
||||
let rate = Number(el.status) * 100 / Number(res.stateStatistics.count)
|
||||
|
||||
Reference in New Issue
Block a user