修改时间

yangwl
夜笙歌 1 week 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: {
@ -126,9 +127,9 @@ export default {
},
mounted() {
this.getData()
setInterval(()=>{
setInterval(() => {
this.getData()
},5 * 1000)
}, 5 * 1000)
},
methods: {
getData() {
@ -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 = {
@ -191,15 +211,15 @@ export default {
stack: 'total',
label: {
show: true,
position:'insideRight',
formatter:"{c}车",
color:"#000"
position: 'insideRight',
formatter: "{c}车",
color: "#000"
},
emphasis: {
focus: 'series'
},
itemStyle: {
color:{
color: {
type: 'linear',
x: 0,
y: 0,
@ -221,7 +241,7 @@ export default {
stack: 'total',
label: {
show: true,
position:'right'
position: 'right'
},
emphasis: {
focus: 'series'
@ -257,7 +277,7 @@ export default {
}
},
xAxis: {
data: e.map(v=>v.pdate),
data: e.map(v => v.pdate),
axisLine: {
show: true, //X线
lineStyle: {
@ -319,7 +339,7 @@ export default {
// areaStyle: {
// color: "rgba(5,140,255, 0.2)",
// },
data: e.map(v=>parseFloat(v.quantity)),
data: e.map(v => parseFloat(v.quantity)),
},
]
};

Loading…
Cancel
Save