diff --git a/src/assets/js/getData2.js b/src/assets/js/getData2.js index 9528a55..d1c4777 100644 --- a/src/assets/js/getData2.js +++ b/src/assets/js/getData2.js @@ -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', {}) diff --git a/src/components/dialog.vue b/src/components/dialog.vue index 4de722d..4b68f03 100644 --- a/src/components/dialog.vue +++ b/src/components/dialog.vue @@ -115,4 +115,5 @@ export default { line-height .5rem color #e74f1a background-color #2778f3 + border none diff --git a/src/pages/DeviceMonitor.vue b/src/pages/DeviceMonitor.vue index fa04ad5..5deb423 100644 --- a/src/pages/DeviceMonitor.vue +++ b/src/pages/DeviceMonitor.vue @@ -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) diff --git a/src/pages/HomePage.vue b/src/pages/HomePage.vue index 6837f68..35cd191 100644 --- a/src/pages/HomePage.vue +++ b/src/pages/HomePage.vue @@ -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() } diff --git a/src/pages/ProdCount.vue b/src/pages/ProdCount.vue index 907f364..038b9c8 100644 --- a/src/pages/ProdCount.vue +++ b/src/pages/ProdCount.vue @@ -1,6 +1,6 @@