|
|
@ -110,6 +110,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
import * as TWEEN from '@tweenjs/tween.js'
|
|
|
|
import * as TWEEN from '@tweenjs/tween.js'
|
|
|
|
import {getAgvData, getHourProductionList} from "../../api/board/cs2";
|
|
|
|
import {getAgvData, getHourProductionList} from "../../api/board/cs2";
|
|
|
|
|
|
|
|
import {parseTime} from "../../utils/openPlatform";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
@ -341,7 +342,29 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getData() {
|
|
|
|
getData() {
|
|
|
|
getHourProductionList().then(e => {
|
|
|
|
|
|
|
|
|
|
|
|
let time = parseTime(new Date(), '{h}-{i}').split('-')
|
|
|
|
|
|
|
|
let i = parseFloat(time[0]) || 0
|
|
|
|
|
|
|
|
let s = parseFloat(time [1]) || 0
|
|
|
|
|
|
|
|
let createTimeStart = `${parseTime(new Date(), '{y}-{m}-{d}')} 07:30:00`
|
|
|
|
|
|
|
|
let createTimeEnd = `${parseTime(new Date(), '{y}-{m}-{d}')} 19:30:00`
|
|
|
|
|
|
|
|
if (parseFloat(`${i}.${s}`) > 7.3 && parseFloat(`${i}.${s}`) < 19.3) {
|
|
|
|
|
|
|
|
createTimeStart = `${parseTime(new Date(), '{y}-{m}-{d}')} 07:30:00`
|
|
|
|
|
|
|
|
createTimeEnd = `${parseTime(new Date(), '{y}-{m}-{d}')} 19:30:00`
|
|
|
|
|
|
|
|
} else if (parseFloat(`${i}.${s}`) < 7.3) {
|
|
|
|
|
|
|
|
createTimeStart = `${parseTime(new Date(), '{y}-{m}-')}${parseFloat(parseTime(new Date(), '${d}')) - 1} 19:30:00`
|
|
|
|
|
|
|
|
createTimeEnd = `${parseTime(new Date(), '{y}-{m}-{d}')} 07:30:00`
|
|
|
|
|
|
|
|
} else if (parseFloat(`${i}.${s}`) > 19.3) {
|
|
|
|
|
|
|
|
createTimeStart = `${parseTime(new Date(), '{y}-{m}-{d}')} 19:30:00`
|
|
|
|
|
|
|
|
createTimeEnd = `${parseTime(new Date(), '{y}-{m}-')}${parseFloat(parseTime(new Date(), '${d}')) + 1} 07:30:00`
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
createTimeStart = `${parseTime(new Date(), '{y}-{m}-{d}')} 07:30:00`
|
|
|
|
|
|
|
|
createTimeEnd = `${parseTime(new Date(), '{y}-{m}-{d}')} 19:30:00`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
getHourProductionList({
|
|
|
|
|
|
|
|
productDateStart:createTimeStart,
|
|
|
|
|
|
|
|
productDateEnd:createTimeEnd
|
|
|
|
|
|
|
|
}).then(e => {
|
|
|
|
let hfArr = []
|
|
|
|
let hfArr = []
|
|
|
|
let equipmentArr = []
|
|
|
|
let equipmentArr = []
|
|
|
|
for (let i = 0; i < 18; i++) {
|
|
|
|
for (let i = 0; i < 18; i++) {
|
|
|
@ -360,6 +383,7 @@ export default {
|
|
|
|
this.getAgvLocation()
|
|
|
|
this.getAgvLocation()
|
|
|
|
let time = 2 * 1000
|
|
|
|
let time = 2 * 1000
|
|
|
|
setInterval(() => {
|
|
|
|
setInterval(() => {
|
|
|
|
|
|
|
|
this.getData()
|
|
|
|
this.updateAGVLocation(time)
|
|
|
|
this.updateAGVLocation(time)
|
|
|
|
}, time)
|
|
|
|
}, time)
|
|
|
|
|
|
|
|
|
|
|
|