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