修改时间

yangwl
夜笙歌 3 weeks ago
parent 5432d0f523
commit c9b1b7af26

@ -5,7 +5,10 @@ export function getHourProductionList(query) {
return request({
url: '/mes/reportWork/getHourProductionList',
method: 'get',
params: query
params: query,
header:{
PoolName:'ds_999'
}
});
}
@ -14,6 +17,9 @@ export function getAgvData(query) {
return request({
url: 'http://192.168.202.25:9001/api/scada/agvdata',
method: 'get',
params: query
params: query,
header:{
PoolName:'ds_999'
}
});
}

@ -16,7 +16,10 @@ export function getHourProductionList(query) {
return request({
url: '/mes/reportWork/getHourProductionList',
method: 'get',
params: query
params: query,
header:{
PoolName:'ds_999'
}
});
}
@ -24,7 +27,10 @@ export function EnergyExpend(query) {
return request({
url: '/mes/h5/EnergyExpend',
method: 'get',
params: query
params: query,
header:{
PoolName:'ds_1000'
}
});
}
@ -32,7 +38,10 @@ export function agvdata(query) {
return request({
url: 'http://192.168.202.25:9001/api/scada/agvdata',
method: 'get',
params: query
params: query,
header:{
PoolName:'ds_999'
}
});
}
@ -40,7 +49,10 @@ export function PlanAchievementRate(query) {
return request({
url: '/mes/reportWork/PlanAchievementRate',
method: 'get',
params: query
params: query,
header:{
PoolName:'ds_999'
}
});
}
@ -48,7 +60,10 @@ export function getHfChartDatas(query) {
return request({
url: '/quality/qcProCheck/getHfChartDatas',
method: 'get',
params: query
params: query,
header:{
PoolName:'ds_999'
}
});
}
@ -56,6 +71,9 @@ export function getHourProductionLists(query) {
return request({
url: '/mes/reportWork/getHourProductionLists',
method: 'get',
params: query
params: query,
header:{
PoolName:'ds_999'
}
});
}

@ -24,8 +24,8 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(config => {
if(localStorage.getItem('USER_POOL_NAME_CURRENT')){
config.headers['poolName'] = localStorage.getItem('USER_POOL_NAME_CURRENT');
console.log(localStorage.getItem('USER_POOL_NAME_CURRENT'))
config.headers['poolName'] = config.header?.PoolName || localStorage.getItem('USER_POOL_NAME_CURRENT');
console.log(config.headers['poolName'])
}
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false

@ -110,6 +110,7 @@
import * as TWEEN from '@tweenjs/tween.js'
import {getAgvData, getHourProductionList} from "../../api/board/cs2";
import {parseTime} from "../../utils/openPlatform";
export default {
data() {
@ -341,7 +342,29 @@ export default {
})
},
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 equipmentArr = []
for (let i = 0; i < 18; i++) {
@ -360,6 +383,7 @@ export default {
this.getAgvLocation()
let time = 2 * 1000
setInterval(() => {
this.getData()
this.updateAGVLocation(time)
}, time)

@ -97,6 +97,7 @@ import {
getHourProductionList, getHourProductionLists,
PlanAchievementRate
} from "../../api/board/cs3";
import {parseTime} from "../../utils/openPlatform";
export default {
components: {
@ -150,9 +151,28 @@ export default {
this.proData = e.data
this.percent = e.msg
})
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`
}
getHfChartDatas({
createTimeStart: '2024-11-02 00:00:00',
createTimeEnd: '2024-11-04 00:00:00',
createTimeStart: createTimeStart,
createTimeEnd: createTimeEnd,
chartType: 'cp'
}).then(e => {
let option = {

Loading…
Cancel
Save