From 71496f5c0f4d50e09b0780184145cef96455eb85 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Thu, 24 Dec 2020 18:02:29 +0800 Subject: [PATCH] coffee && rentbox --- src/subpackage/device/js/device_api.js | 10 +- .../device/pages/coffee_manage/coffee_manage.vue | 2 +- .../device/pages/coffee_test/coffee_test.vue | 122 +++++++++++++++++++-- .../device/pages/device_manage/device_manage.vue | 12 +- src/subpackage/device/pages/index/index.vue | 2 + .../device/pages/locker_manage/locker_manage.vue | 115 +++++++++++++++---- .../device/pages/switch_manage/switch_manage.vue | 88 ++++++++++----- 7 files changed, 281 insertions(+), 70 deletions(-) diff --git a/src/subpackage/device/js/device_api.js b/src/subpackage/device/js/device_api.js index b7a43da..7fc638a 100644 --- a/src/subpackage/device/js/device_api.js +++ b/src/subpackage/device/js/device_api.js @@ -10,9 +10,17 @@ export const DEVICE_API = { hardwareSave:`${ORIGIN}/admin/stadium/hardware/save`, // 设备开启/关闭 drinkList:`${ORIGIN}/admin/stadium/coffee/drink/list`, // 咖啡机口味列表 - drinkRestock:`${ORIGIN}/admin/stadium/coffee/drink/restock`, // 咖啡机口味列表 + drinkRestock:`${ORIGIN}/admin/stadium/coffee/drink/restock`, // 咖啡机口味补货 + + leaseList:`${ORIGIN}/admin/stadium/lease/cabinet/list`, // 租售柜列表 + lockerList:`${ORIGIN}/admin/stadium/locker/cabinet/list`, // 储物柜列表 + + + + + hardwareInfo:`${ORIGIN}/admin/stadium/hardware/get/`, // 设备信息 hardwareList:`${ORIGIN}/admin/stadium/hardware/list`, // 设备列表 ouxuanac:`${ORIGIN}/ouxuanac/sendPacket`, // 中控控制 // ouxuanac--> http://api.ouxuan.net/project/233/interface/api/10012 接口文档 diff --git a/src/subpackage/device/pages/coffee_manage/coffee_manage.vue b/src/subpackage/device/pages/coffee_manage/coffee_manage.vue index c10d7cb..f4838cf 100644 --- a/src/subpackage/device/pages/coffee_manage/coffee_manage.vue +++ b/src/subpackage/device/pages/coffee_manage/coffee_manage.vue @@ -53,7 +53,7 @@ export default { confirmSave: util.debounce(function(){ let { typeList, isFillAll } = this; util.showModal({ - title: '是否确认补分?', + title: '是否确认补粉?', content: isFillAll?'请确认全部补满':'', showCancel: true, success: res=>{ diff --git a/src/subpackage/device/pages/coffee_test/coffee_test.vue b/src/subpackage/device/pages/coffee_test/coffee_test.vue index 1e19f92..4739599 100644 --- a/src/subpackage/device/pages/coffee_test/coffee_test.vue +++ b/src/subpackage/device/pages/coffee_test/coffee_test.vue @@ -1,29 +1,131 @@ @@ -73,7 +175,6 @@ export default { border-radius: 50%; border: 2upx solid #ddd; &.active{ - border-width: 0; border-color: transparent; } } @@ -82,7 +183,6 @@ export default { display: block; width: 160upx; height: 160upx; - background-color: skyblue; } >view{ padding: 0 20upx; diff --git a/src/subpackage/device/pages/device_manage/device_manage.vue b/src/subpackage/device/pages/device_manage/device_manage.vue index 63abfba..2d63f68 100644 --- a/src/subpackage/device/pages/device_manage/device_manage.vue +++ b/src/subpackage/device/pages/device_manage/device_manage.vue @@ -67,6 +67,7 @@ const dmObj = { stockBtnName: '查看', deviceBtnOpenName: '开启售货', deviceBtnStopName: '停止售货', + deviceType: 'AssortedLease', // 接口获取设备类型 }, 'd9': { id: 9, @@ -78,6 +79,7 @@ const dmObj = { stockBtnName: '查看', deviceBtnOpenName: '开启租用', deviceBtnStopName: '停止租用', + deviceType: 'AssortedLocker', // 接口获取设备类型 }, 'd10': { id: 10, @@ -163,10 +165,11 @@ export default { let { pageInfo } = this; let _query = { id: e.id, - name: e.hardware_type_name + name: e.hardware_name, + page_id: pageInfo.id } if(pageInfo.id == 7)return util.routeTo(`/subpackage/device/pages/sell_box_manage/sell_box_manage?query=${util.jsonStr(_query)}`, 'nT'); - if(pageInfo.id == 8)return util.routeTo(`/subpackage/device/pages/locker_manage/locker_manage?type=8`, 'nT'); + if(pageInfo.id == 8)return util.routeTo(`/subpackage/device/pages/locker_manage/locker_manage?query=${util.jsonStr(_query)}`, 'nT'); // if(pageInfo.id == 9)return util.routeTo(`/subpackage/device/pages/locker_manage/locker_manage`, 'nT'); if(pageInfo.id == 10)return util.routeTo(`/subpackage/device/pages/coffee_manage/coffee_manage?query=${util.jsonStr(_query)}`, 'nT'); }, @@ -174,11 +177,12 @@ export default { let { pageInfo } = this; let _query = { id: e.id, - name: e.hardware_type_name + name: e.hardware_name, + page_id: pageInfo.id } if(pageInfo.id == 7)return util.routeTo(`/subpackage/device/pages/sell_box_test/sell_box_test?query=${util.jsonStr(_query)}`, 'nT'); // if(pageInfo.id == 8)return util.routeTo(`/subpackage/device/pages/locker_manage/locker_manage`, 'nT'); - if(pageInfo.id == 9)return util.routeTo(`/subpackage/device/pages/locker_manage/locker_manage?type=9`, 'nT'); + if(pageInfo.id == 9)return util.routeTo(`/subpackage/device/pages/locker_manage/locker_manage?query=${util.jsonStr(_query)}`, 'nT'); if(pageInfo.id == 10)return util.routeTo(`/subpackage/device/pages/coffee_test/coffee_test?query=${util.jsonStr(_query)}`, 'nT'); } } diff --git a/src/subpackage/device/pages/index/index.vue b/src/subpackage/device/pages/index/index.vue index 06309d4..fe0f24d 100644 --- a/src/subpackage/device/pages/index/index.vue +++ b/src/subpackage/device/pages/index/index.vue @@ -69,6 +69,8 @@ export default { e.id == 3 || // 风扇 e.id == 4 || // 门禁 e.id == 5 ||  // 门闸 + e.id == 8 ||  // 租售柜 + e.id == 9 ||  // 储物柜 e.id == 10 ||  // 咖啡机 e.id == 11 ||  // 水阀 e.id == 7   // 售货柜 diff --git a/src/subpackage/device/pages/locker_manage/locker_manage.vue b/src/subpackage/device/pages/locker_manage/locker_manage.vue index 81496ef..954bc26 100644 --- a/src/subpackage/device/pages/locker_manage/locker_manage.vue +++ b/src/subpackage/device/pages/locker_manage/locker_manage.vue @@ -1,31 +1,45 @@