no message

This commit is contained in:
2023-03-06 16:18:34 +08:00
parent c02f416193
commit e2d9180243
7 changed files with 55 additions and 52 deletions

View File

@@ -1,46 +1,46 @@
import {post} from './http.js'
// 设备监控
// export const deviceMonitor = () => post('api/cockpit/deviceMonitor', {
// })
export const deviceMonitor = () => post('api/cockpit/deviceMonitor', {
})
export const findDeviceById = (id) => post('api/cockpit/findDeviceById', {
id: id
})
export const deviceMonitor = () => {
let res = {
result: [
{
'point_id': '1',
'point_code': 'HLJDJW01',
'point_name': '混料机1对接位',
'point_status': '3',
'material_id': 1556534702800769024,
'material_name': '木质花纹2cm',
'ivt_weight': 29.500000,
'work_time': '50',
'ivt_qty': 600.000000,
'vehicle_qty': 15,
'vehicle_max_qty': '',
'device_url': 'hlj'
},
{
'point_id': '1518105008862793728',
'point_code': 'YZJ02XL01',
'point_name': '压制机2下料位1',
'point_status': '3',
'material_id': 1556534702800769024,
'material_name': '木质花纹2cm',
'ivt_weight': 29.500000,
'work_time': '50',
'ivt_qty': 600.000000,
'vehicle_qty': 15,
'vehicle_max_qty': 20,
'device_url': 'yzj'
}
]
}
return res
}
// export const deviceMonitor = () => {
// let res = {
// result: [
// {
// 'point_id': '1',
// 'point_code': 'HLJDJW01',
// 'point_name': '混料机1对接位',
// 'point_status': '3',
// 'material_id': 1556534702800769024,
// 'material_name': '木质花纹2cm',
// 'ivt_weight': 29.500000,
// 'work_time': '50',
// 'ivt_qty': 600.000000,
// 'vehicle_qty': 15,
// 'vehicle_max_qty': '',
// 'device_url': 'hlj'
// },
// {
// 'point_id': '1518105008862793728',
// 'point_code': 'YZJ02XL01',
// 'point_name': '压制机2下料位1',
// 'point_status': '3',
// 'material_id': 1556534702800769024,
// 'material_name': '木质花纹2cm',
// 'ivt_weight': 29.500000,
// 'work_time': '50',
// 'ivt_qty': 600.000000,
// 'vehicle_qty': 15,
// 'vehicle_max_qty': 20,
// 'device_url': 'yzj'
// }
// ]
// }
// return res
// }
// 车间情况
export const workshopCondition = () => post('api/cockpit/workshopCondition', {})

View File

@@ -115,4 +115,5 @@ export default {
line-height .5rem
color #e74f1a
background-color #2778f3
border none
</style>

View File

@@ -371,7 +371,7 @@ export default {
},
async initData () {
let res = await deviceMonitor()
this.deviceDatas = res.result
this.deviceDatas = [...res.result]
this.addPosition()
},
async _findDeviceById (id) {
@@ -443,13 +443,15 @@ export default {
.content
width 100%
padding 10px 1rem 0
height calc(100% - 134px)
overflow-y auto
.item_tr
width 100%
.item_block
position relative
_wh(180px,209px)
_wh(180px,219px)
padding 8px 4px
margin-bottom 21px
margin-bottom 11px
margin-right calc((100% - 180px * 9) / 8)
background center center / 100% 100% url(../assets/images/bg_item.png) no-repeat
&:nth-child(9n)
@@ -643,8 +645,8 @@ export default {
width 100%
padding 10px 14px 0
.item_block
_wh(160px,209px)
margin-bottom 30px
_wh(160px,219px)
margin-bottom 20px
margin-right calc((100% - 160px * 9) / 8)
.item_img
_wh(100%,80px)

View File

@@ -529,8 +529,8 @@ export default {
}
},
mounted () {
this.initData1()
this.initData2()
// this.initData1()
this._workshopCondition()
this.refresh()
},
beforeDestroy () {
@@ -539,15 +539,15 @@ export default {
methods: {
refresh () {
this.timer = setInterval(() => {
this.initData1()
this.initData2()
// this.initData1()
this._workshopCondition()
}, this.interTime)
},
async _workshopCondition () {
let res = await workshopCondition()
this.dayRows = [...res.runningStatus]
this.weekRows = [...res.faultyStatus]
this.deviceRows = [...res.faultyInfo]
this.dayRows = [...res.result.runningStatus]
this.weekRows = [...res.result.faultyStatus]
this.deviceRows = [...res.result.faultyInfo]
if (this.dayRows.length > 0) {
this.setEchart1()
}

View File

@@ -1,6 +1,6 @@
<template>
<section>
<t-header index='4'></t-header>
<t-header index='1'></t-header>
<section>
<div class="con1">
<div class="c-title c-left">

View File

@@ -1,6 +1,6 @@
<template>
<section>
<t-header index='2'></t-header>
<t-header index='1'></t-header>
<section>
<div class="con1">
<div class="c-title c-left">

View File

@@ -1,6 +1,6 @@
<template>
<section>
<t-header index='1'></t-header>
<t-header index='2'></t-header>
<div class="content clearfix">
<div class="con1">
<div class="yard-wrap">