设备监控

This commit is contained in:
2023-03-09 15:34:16 +08:00
parent 44cbfafaf2
commit 2b73f03c66
13 changed files with 429 additions and 141 deletions

View File

@@ -79,10 +79,10 @@ li {
}
html, body {
width: 100%;
max-width: 1920px;
min-width: 1550px;
height: 1040px;
/* width: 100%; */
width: 1920px;
/* min-width: 1550px; */
height: 1060px;
/* width: 1920px;
height: 1040px; */
}

View File

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB

View File

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 133 KiB

View File

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 133 KiB

View File

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 214 KiB

View File

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

View File

Before

Width:  |  Height:  |  Size: 199 KiB

After

Width:  |  Height:  |  Size: 199 KiB

View File

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 211 KiB

View File

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 153 KiB

View File

@@ -8,34 +8,354 @@ export const findDeviceById = (id) => post('api/cockpit/findDeviceById', {
})
// export const deviceMonitor = () => {
// let res = {
// result: [
// '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'
// 'device_code': 'HLJ01',
// 'device_name': '混料机1',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'point_id': '1518105008862793728',
// 'point_code': 'YZJ02XL01',
// 'point_name': '压制机2下料位1',
// 'point_status': '3',
// 'material_id': 1556534702800769024,
// 'device_code': 'HLJ02',
// 'device_name': '混料机2',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'device_code': 'HLJ03',
// 'device_name': '混料机3',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'device_code': 'HLJ04',
// 'device_name': '混料机4',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'device_code': 'HLJ05',
// 'device_name': '混料机5',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'device_code': 'HLJ06',
// 'device_name': '混料机6',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'device_code': 'HLJ07',
// 'device_name': '混料机7',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'device_code': 'HLJ08',
// 'device_name': '混料机8',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'device_code': 'HLJ09',
// 'device_name': '混料机9',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'device_code': 'HLJ10',
// 'device_name': '混料机10',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'device_code': 'HLJ11',
// 'device_name': '混料机11',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'device_code': 'HLJ12',
// 'device_name': '混料机12',
// 'device_model': '1',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ'
// },
// {
// 'device_code': 'MDJXS01',
// 'device_name': '码垛机械手1',
// 'device_model': '10',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'MDJXS'
// },
// {
// 'device_code': 'MDJXS02',
// 'device_name': '码垛机械手2',
// 'device_model': '10',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'MDJXS'
// },
// {
// 'device_code': 'MDJXS09',
// 'device_name': '码垛机械手9',
// 'device_model': '10',
// 'device_status': '1',
// 'material_name': '木质花纹2cm',
// 'ivt_weight': 29.500000,
// 'work_time': '50',
// 'ivt_qty': 600.000000,
// 'work_time': '3.5',
// 'real_qty': 0,
// 'device_url': 'MDJXS'
// },
// {
// 'device_code': 'RGV',
// 'device_name': 'RGV',
// 'device_model': '11',
// 'device_status': '1',
// 'device_status_name': '空车位无车,满车位有车',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'RGV'
// },
// {
// 'device_code': 'HLJ13',
// 'device_name': '混料机13',
// 'device_model': '2',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ_S'
// },
// {
// 'device_code': 'HLJ14',
// 'device_name': '混料机14',
// 'device_model': '2',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ_S'
// },
// {
// 'device_code': 'HLJ15',
// 'device_name': '混料机15',
// 'device_model': '2',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ_S'
// },
// {
// 'device_code': 'HLJ16',
// 'device_name': '混料机16',
// 'device_model': '2',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'HLJ_S'
// },
// {
// 'device_code': 'YZJ01',
// 'device_name': '压制机1',
// 'device_model': '3',
// 'device_status': '1',
// 'material_name': '木质花纹2cm',
// 'work_time': '3.5',
// 'real_qty': 0,
// 'device_url': 'YZJ'
// },
// {
// 'device_code': 'YZJ02',
// 'device_name': '压制机2',
// 'device_model': '3',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'YZJ'
// },
// {
// 'device_code': 'YZJ03',
// 'device_name': '压制机3',
// 'device_model': '3',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'YZJ'
// },
// {
// 'device_code': 'YZJ04',
// 'device_name': '压制机4',
// 'device_model': '3',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'YZJ'
// },
// {
// 'device_code': 'YZJ05',
// 'device_name': '压制机5',
// 'device_model': '3',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'YZJ'
// },
// {
// 'device_code': 'YZJ06',
// 'device_name': '压制机6',
// 'device_model': '3',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'YZJ'
// },
// {
// 'device_code': 'YZJ07',
// 'device_name': '压制机7',
// 'device_model': '3',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'YZJ'
// },
// {
// 'device_code': 'YZJ08',
// 'device_name': '压制机8',
// 'device_model': '3',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'YZJ'
// },
// {
// 'device_code': 'YZJ09',
// 'device_name': '压制机9',
// 'device_model': '4',
// 'device_status': '1',
// 'material_name': '木质花纹2cm',
// 'work_time': '3.5',
// 'real_qty': 0,
// 'device_url': 'YZJ_S'
// },
// {
// 'device_code': 'YZJ10',
// 'device_name': '压制机10',
// 'device_model': '4',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'YZJ_S'
// },
// {
// 'device_code': 'FJCDJXS',
// 'device_name': '分拣拆垛机械手',
// 'device_model': '5',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'FJJXS'
// },
// {
// 'device_code': 'FJMDJXS',
// 'device_name': '分拣码垛机械手',
// 'device_model': '5',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'FJJXS'
// },
// {
// 'device_code': 'BZX',
// 'device_name': '包装线',
// 'device_model': '6',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'BZX'
// },
// {
// 'device_code': 'CPX01',
// 'device_name': '拆盘线01',
// 'device_model': '6',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'CPX'
// },
// {
// 'device_code': 'CPX02',
// 'device_name': '拆盘线02',
// 'device_model': '6',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'CPX'
// },
// {
// 'device_code': 'KILN',
// 'device_name': '窑设备',
// 'device_model': '7',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'vehicle_qty': 15,
// 'vehicle_max_qty': 20,
// 'device_url': 'yzj'
// 'device_url': 'YAO'
// },
// {
// 'device_code': 'DPJ',
// 'device_name': '叠盘机',
// 'device_model': '8',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'DPJ'
// },
// {
// 'device_code': 'CPJ',
// 'device_name': '拆盘机',
// 'device_model': '9',
// 'device_status': '1',
// 'material_name': '',
// 'work_time': '3.5',
// 'device_url': 'CPJ'
// }
// ]
// }

View File

@@ -1,34 +1,12 @@
// (function (doc, win) {
// var docEl = doc.documentElement
// var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
// var recalc = function () {
// var clientWidth = docEl.clientWidth
// if (!clientWidth) return
// docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px'
// document.body.style.display = 'block'
// }
// if (!doc.addEventListener) return win.addEventListener(resizeEvt, recalc, false)
// doc.addEventListener('DOMContentLoaded', recalc, false)
// })(document, window)
(function () {
var _self = this
_self.width = 1920
_self.fontSize = 100
_self.widthProportion = function () {
var p = ((document.body && document.body.clientWidth) || document.getElementsByTagName('html')[0].offsetWidth) / _self.width
return p
(function (doc, win) {
var docEl = doc.documentElement
var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
var recalc = function () {
var clientWidth = docEl.clientWidth
if (!clientWidth) return
docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px'
document.body.style.display = 'block'
}
_self.changePage = function () {
document.getElementsByTagName('html')[0].setAttribute('style', 'font-size:' + _self.widthProportion() * _self.fontSize + 'px')
}
_self.changePage()
window.addEventListener('resize', function () {
let clientWidth = ((document.body && document.body.clientWidth) || document.getElementsByTagName('html')[0].offsetWidth)
if (clientWidth >= 1550) {
_self.changePage()
} else {
document.getElementsByTagName('html')[0].setAttribute('style', 'font-size:' + 1550 / _self.width * _self.fontSize + 'px')
}
}, false)
})()
if (!doc.addEventListener) return win.addEventListener(resizeEvt, recalc, false)
doc.addEventListener('DOMContentLoaded', recalc, false)
})(document, window)