假数据
This commit is contained in:
@@ -283,7 +283,7 @@ export const homepageDataLeft = () => {
|
|||||||
*/
|
*/
|
||||||
export const homepageDataRight = () => {
|
export const homepageDataRight = () => {
|
||||||
let res = {
|
let res = {
|
||||||
'capacityRate': [{'device_name': '混料设备', 'numerical': '60'}, {'device_name': '压制设备', 'numerical': '60'}, {'device_name': '压制设备2', 'numerical': '60'}, {'device_name': '压制设备3', 'numerical': '60'}],
|
'capacityRate': [{'device_name': '混料设备', 'numerical': '60'}, {'device_name': '压制设备', 'numerical': '60'}, {'device_name': '干燥设备', 'numerical': '60'}, {'device_name': '包装设备', 'numerical': '60'}],
|
||||||
'stateStatistics': {
|
'stateStatistics': {
|
||||||
count: '20',
|
count: '20',
|
||||||
fourState: [{'status': '5', 'stateName': '正常运行'}, {'status': '5', 'stateName': '暂未生产'}, {'status': '5', 'stateName': '空闲设备'}, {'status': '5', 'stateName': '故障设备'}]
|
fourState: [{'status': '5', 'stateName': '正常运行'}, {'status': '5', 'stateName': '暂未生产'}, {'status': '5', 'stateName': '空闲设备'}, {'status': '5', 'stateName': '故障设备'}]
|
||||||
|
|||||||
@@ -153,6 +153,11 @@ export default {
|
|||||||
let res = await homepageDataRight()
|
let res = await homepageDataRight()
|
||||||
clearInterval(this.chart7Timer)
|
clearInterval(this.chart7Timer)
|
||||||
clearInterval(this.chart9Timer)
|
clearInterval(this.chart9Timer)
|
||||||
|
// 假数据start
|
||||||
|
res.capacityRate[2].numerical = 50
|
||||||
|
res.stateStatistics.count = '40'
|
||||||
|
res.stateStatistics.fourState = [{'status': '37', 'stateName': '正常运行'}, {'status': '2', 'stateName': '暂未生产'}, {'status': '1', 'stateName': '空闲设备'}, {'status': '0', 'stateName': '故障设备'}]
|
||||||
|
// 假数据end
|
||||||
this.capacityRate = [...res.capacityRate]
|
this.capacityRate = [...res.capacityRate]
|
||||||
res.stateStatistics.fourState.map(el => {
|
res.stateStatistics.fourState.map(el => {
|
||||||
let rate = Number(el.status) * 100 / Number(res.stateStatistics.count)
|
let rate = Number(el.status) * 100 / Number(res.stateStatistics.count)
|
||||||
|
|||||||
Reference in New Issue
Block a user