修改时间

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

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

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

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

@ -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)

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

Loading…
Cancel
Save