diff --git a/src/components/site/order_modal/order_modal.vue b/src/components/site/order_modal/order_modal.vue
new file mode 100644
index 0000000..e2fb1b4
--- /dev/null
+++ b/src/components/site/order_modal/order_modal.vue
@@ -0,0 +1,423 @@
+
+
+ false">
+ {{ getTitle(queryInfo.venueInfo.type) }}
+
+
+ {{ orderInfo.stadium_name || '-' }}
+
+ {{ getStatusTxt(orderInfo.pay_status) }}
+
+
+ 订单编号:
+
+ {{ orderInfo.order_no || '' }}
+
+
+
+ 创建时间:
+
+ {{ orderInfo.created_at || ' ' }}
+
+
+
+ 验证码:
+
+ {{ orderInfo.verifyt_code || ' ' }}
+
+
+
+ 手机号码:
+
+ {{ orderInfo.mobile || ' ' }}
+
+
+
+
+
+ 是否联动开灯:
+
+ {{ orderInfo.light_up?'是':'否'}}
+
+
+
+ 收取金额:
+
+ {{ orderInfo.amount || '0' }}
+
+
+
+ 占用原因:
+
+ {{ orderInfo.reason || ' ' }}
+
+
+
+ 操作人:
+
+ {{ orderInfo.operator || ' ' }}
+
+
+
+
+
+
+
+
+ 预订信息
+
+
+ 预订项目:
+
+ {{ orderInfo.stadium_name || ' ' }}
+
+
+
+ 预订日期:
+
+ {{ orderInfo.date || ' ' }}
+
+
+
+ 预订场次:
+
+
+ {{ e.venue_name || '' }} {{ e.duration || '' }} (¥{{ e.price || '' }} )
+
+
+
+ 实付款 ¥{{ orderInfo.amount || '0' }}
+
+
+ 分享给朋友
+ 取消占用
+
+
+
+ 订单详情
+
+
+
+
+ 约课详情
+
+
+
+
+ 订单详情
+ 取消订场
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/js/api.js b/src/js/api.js
index af3f6eb..2e6037b 100644
--- a/src/js/api.js
+++ b/src/js/api.js
@@ -60,10 +60,23 @@ API['employee'] = {
API['venue'] = {
venueTypes: `${ORIGIN}/stadium/venue/types`, // 场馆类型
- venueList: `${ORIGIN}/stadium/book/list`, // 场地列表
- venueTakeUp: `${ORIGIN}/admin/assistant/venue/takeUp`, // 商家助手-占用场地提交
+ // venueList: `${ORIGIN}/stadium/book/list`, // 场地列表
+
+ venueTakeUp: `${ORIGIN}/admin/stadium/venue/takeUp`, // 商家助手-占用场地提交
takeUpList: `${ORIGIN}/admin/timeSelect/list/4`, // 商家助手-占用场地列表
setStatus: `${ORIGIN}/admin/timeSelect/setStatus`, // 商家助手-占用场地列表
+
+ // 20210726 新增
+ venueList: `${ORIGIN}/admin/stadium/venue/dashboard/list`, // 场地列表 20210726 看板新增修改
+ dashboardInfo: `${ORIGIN}/admin/stadium/venue/dashboard/detail`, // 看板详情
+ takeUpVerifyQr: `${ORIGIN}/admin/stadium/venue/takeUpVerifyQr`, // 商家助手 - 占用核销码
+ takeUpShareQr: `${ORIGIN}/admin/stadium/venue/takeUpShareQr`, // 商家助手 - 占用分享码
+ takeUpCancel: `${ORIGIN}/admin/stadium/venue/takeUpCancel`, // 商家助手-取消占用场地
+ orderRefund: `${ORIGIN}/admin/stadium/order/cancel`, // 商家助手 - 退款
+
+ // 20210806
+ FixedOccupyCancel: `${ORIGIN}/admin/VenueNumberFixedOccupy/cancel`, // 固定场取消订场
+
}
// 2.1 核销
diff --git a/src/pages.json b/src/pages.json
index 48ed0e8..116db35 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -1,5 +1,6 @@
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+
{
"path": "pages/index/index",
"style": {
@@ -11,6 +12,18 @@
}
},
{
+ "path": "pages/site/occupy_share/occupy_share",
+ "style": {
+ "navigationBarTitleText": "分享"
+ }
+ },
+ {
+ "path": "pages/site/occupy_success/occupy_success",
+ "style": {
+ "navigationBarTitleText": "占用场地"
+ }
+ },
+ {
"path": "pages/site/order_list/order_list",
"style": {
"navigationBarTitleText": "占用场地"
@@ -216,10 +229,73 @@
{
"path": "pages/index/index",
"style" : {
- "navigationBarTitleText": "欧轩智能商家助手"
+ "navigationBarTitleText": "欧轩智能商家助手",
+ "navigationStyle":"custom"
+ }
+ },
+ {
+ "path": "pages/index/router_manage",
+ "style" : {
+ "navigationBarTitleText": "路由管理"
}
},
{
+ "path": "pages/index/lot_manage",
+ "style" : {
+ "navigationBarTitleText": "物联卡管理"
+ }
+ },
+ {
+ "path": "pages/timing/timing_list",
+ "style" : {
+ "navigationBarTitleText": "定时列表"
+ }
+ },
+ {
+ "path": "pages/timing/timing_setting",
+ "style" : {
+ "navigationBarTitleText": "定时设置"
+ }
+ },
+ {
+ "path": "pages/monitor_manage/monitor_manage",
+ "style" : {
+ "navigationBarTitleText": "监控管理"
+ }
+ },
+ {
+ "path": "pages/monitor_manage/monitor_acount_list",
+ "style" : {
+ "navigationBarTitleText": "监控管理"
+ }
+ },
+ {
+ "path": "pages/monitor_manage/monitor_acount_add",
+ "style" : {
+ "navigationBarTitleText": "监控管理"
+ }
+ },
+
+ {
+ "path": "pages/index/sunblind_manage",
+ "style" : {
+ "navigationBarTitleText": "窗帘管理"
+ }
+ },
+ {
+ "path": "pages/index/airC_manage",
+ "style" : {
+ "navigationBarTitleText": "空调管理"
+ }
+ },
+ {
+ "path": "pages/index/lease_ball_box_manage",
+ "style" : {
+ "navigationBarTitleText": "租球机管理"
+ }
+ },
+
+ {
"path": "pages/switch_manage/switch_manage",
"style" : {
"navigationBarTitleText": "管理"
@@ -242,6 +318,12 @@
"style" : {
"navigationBarTitleText": "咖啡机管理"
}
+ },
+ {
+ "path": "pages/audio_manage/audio_manage",
+ "style" : {
+ "navigationBarTitleText": "音响管理"
+ }
},
{
"path": "pages/coffee_test/coffee_test",
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index b71754f..5589bbf 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -109,8 +109,9 @@
},
{
id: 5,
- name: '场地管理',
- path: '/pages/site/order_list/order_list',
+ name: '场地看板',
+ // path: '/pages/site/order_list/order_list', // 20210804 不要占用列表
+ path: '/pages/site/manage/manage',
serverKey: 1009 // 后端对应权限编号
},
{
diff --git a/src/pages/site/confirm/confirm.vue b/src/pages/site/confirm/confirm.vue
index 4578539..b869412 100644
--- a/src/pages/site/confirm/confirm.vue
+++ b/src/pages/site/confirm/confirm.vue
@@ -24,10 +24,18 @@
预定场次:
- {{e.parentObj.name || '-'}} {{e.time || '-'}} (¥{{e.price || '-'}})
+ {{e.parentObj.venue_name || '-'}} {{e.durations || '-'}} (¥{{e.price || '-'}})
+
+ 小计(共{{(occupyInfo.venueList&&occupyInfo.venueList.length) || 0}}场)
+ ¥{{ totalPrice || 0 }}
+
+
+
+ *是否联动开灯
+ 联动开灯开启后,会根据占用时间自动开灯
@@ -57,36 +65,50 @@ export default {
data(){
return {
ocPrice: '',
- ocReaon: ''
+ ocReaon: '',
+ light_up: false,
}
},
computed: {
...mapState([ 'occupyInfo' ]),
+ totalPrice(){
+ let { occupyInfo } = this;
+ let _list = occupyInfo.venueList || [];
+ if(!_list.length)return 0;
+ let _price = 0;
+ _list.forEach(e=>_price += +e.price);
+ console.warn(_price)
+ return _price.toFixed(2);
+ }
},
onLoad(){
console.log(this.occupyInfo)
},
methods: {
+ switchChange(e){
+ this.light_up = e.detail.value
+ },
confirmOccupy: util.debounce(function(){
let { storeInfo, dateInfo, venueList, typeInfo } = this.occupyInfo;
- let { ocPrice, ocReaon } = this;
- console.log(ocPrice, ocReaon);
+ let { ocPrice, ocReaon, light_up } = this;
servers.post({
url: API.venue.venueTakeUp,
data: {
+ brand_id: storeInfo.brand_id,
reason: ocReaon,
amount: +ocPrice,
group: storeInfo.id,
date: dateInfo.dateStr,
items: venueList.map(el=>{
return {
- venue_id: el.parentObj.id,
- venue_name: el.parentObj.name,
- duration: el.time,
+ venue_id: el.parentObj.venue_id,
+ venue_name: el.parentObj.venue_name,
+ duration: el.durations,
price: el.price
}
- })
+ }),
+ light_up,
},
isDefaultGet: false
})
@@ -94,19 +116,22 @@ export default {
if(res.data.code == 0){
util.showNone(res.data.message || '操作成功!');
- setTimeout(_=>{
- util.routeTo();
- util.previousPageFunction({ // 刷新占用列表
- fnName: 'refreshList',
- query: null
- })
- }, 1200)
+ let _res = res.data.data || {};
+ let _qrStr = `?brand_id=${_res.brand_id}&order_no=${_res.order_no}`
+ util.routeTo(`/pages/site/occupy_success/occupy_success${_qrStr}`, 'rT');
+ // setTimeout(_=>{
+ // util.routeTo();
+ // util.previousPageFunction({ // 刷新占用列表
+ // fnName: 'refreshList',
+ // query: null
+ // })
+ // }, 1200)
}else{
util.showNone(res.data.message || '操作失败!');
}
})
- }),
+ }, 300, true),
},
}
@@ -135,7 +160,6 @@ export default {
vertical-align: middle;
width: 34upx;
height: 34upx;
- background-color: skyblue;
}
}
.sa-detail{
@@ -182,10 +206,45 @@ export default {
}
}
}
+ .soi-total{
+ margin-top: 30upx;
+ text-align: right;
+ font-size: 28upx;
+ line-height: 52upx;
+ color: #333;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ >text{
+ color: #9a9a9d;
+ }
+ }
+ }
+ .sc-switch{
+ padding: 40upx 24upx 0;
+ >view{
+ &:first-child{
+ margin-bottom: 10upx;
+ @include centerFlex(space-between);
+ >view{
+ font-size: 32upx;
+ color: #333;
+ >text{
+ color: #EA5061;
+ }
+ }
+ }
+ &+view{
+ padding: 0 24upx;
+ font-size: 24upx;
+ line-height: 34upx;
+ color: #9A9A9D;
+ }
+ }
}
.sc-ipt{
margin: 0 auto;
- padding-top: 54upx;
+ padding-top: 40upx;
padding-bottom: 62upx;
width: 682upx;
.si-price{
diff --git a/src/pages/site/manage/manage.vue b/src/pages/site/manage/manage.vue
index c973341..b063911 100644
--- a/src/pages/site/manage/manage.vue
+++ b/src/pages/site/manage/manage.vue
@@ -16,7 +16,30 @@
{{curTypeInfo.rule_text || '-'}}
-
+
+
+
+ {{ dateList[0].ZhDateStr || '-' }}
+
+
+
+ 至
+
+
+ {{ dateList[dateList.length - 1].ZhDateStr || '-' }}
+
+
+
+
+
{{dateList[0].ZhDateStr || '-'}} — {{dateList[dateList.length-1].ZhDateStr || '-'}}
@@ -38,24 +61,18 @@
-
- {{e.duration || '-'}}
+
+ {{ e || '-' }}
+
- {{e.name || '-'}}
+ {{e.venue_name || '-'}}
- {{
- k.is_take_up?'已占用':
- !k.is_valid?'已售':`¥${k.price || 0}`
- }}
+ {{ getVenueStatusnInfo(k).zh_text || '-' }}
@@ -66,24 +83,28 @@
- 已选择场次4
+ 已选择场次{{ selectedVenueList.length || 0 }}
清空
- {{e.time || '-'}}
- {{e.parentObj.name || '-'}}
+ {{e.durations || '-'}}
+ {{e.parentObj.venue_name || '-'}}
-
-
- {{e}}
+
+
+ {{ e.n || '-'}}
-
+
¥{{totalPrice || '0.00'}}
{{selectedVenueList.length?'提交订单':'请选择场地'}}
@@ -93,15 +114,20 @@
{{occupyTip || '-'}}
+
+
+
\ No newline at end of file
diff --git a/src/pages/site/occupy_success/occupy_success.vue b/src/pages/site/occupy_success/occupy_success.vue
new file mode 100644
index 0000000..88a473c
--- /dev/null
+++ b/src/pages/site/occupy_success/occupy_success.vue
@@ -0,0 +1,118 @@
+
+
+ {{ qrInfo.stadium_name || '-' }}
+
+ 验证码:{{ qrInfo.verify_code || '-' }}
+
+ 分享给朋友
+
+
+ 返回
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/write_off/search_result/search_result.vue b/src/pages/write_off/search_result/search_result.vue
index b3391c6..627e57a 100644
--- a/src/pages/write_off/search_result/search_result.vue
+++ b/src/pages/write_off/search_result/search_result.vue
@@ -62,17 +62,19 @@ export default {
writeOffList: [], // 核销列表,
curDate: util.formatDate({}),
page: 1,
+ totalNum: 0,
}
},
- onReachBottom(){
- let { page, curDate, curStadium } = this;
- this.getList({
- brand_id: curStadium.brand_id || '',
- stadium_id: curStadium.id || '',
- date: curDate || '',
- page: ++page,
- });
- },
+ // 20210716测试:取消分页,返回当天
+ // onReachBottom(){
+ // let { page, curDate, curStadium } = this;
+ // this.getList({
+ // brand_id: curStadium.brand_id || '',
+ // stadium_id: curStadium.id || '',
+ // date: curDate || '',
+ // page: ++page,
+ // });
+ // },
onLoad(){
this.initPage();
},
@@ -121,7 +123,7 @@ export default {
})
util.routeTo(`/pages/write_off/operate/operate`, 'nT');
},
- getList({ brand_id, stadium_id = '', date = '', page = 1, page_size = 15 }){
+ getList({ brand_id, stadium_id = '', date = '', page = 1, page_size = '' }){
util.showLoad();
servers.get({
url: API.writeOff.listVerifyRecord,
@@ -130,6 +132,7 @@ export default {
})
.then(res=>{
util.hideLoad();
+ this.totalNum = res.total || 0;
let _list = res.list || [];
if(page == 1)return this.writeOffList = _list;
if(!_list.length)return util.showNone('没有更多!');
diff --git a/src/static/images/icon/share_arrow_cff.png b/src/static/images/icon/share_arrow_cff.png
new file mode 100644
index 0000000..a2b50ae
Binary files /dev/null and b/src/static/images/icon/share_arrow_cff.png differ
diff --git a/src/subpackage/device/components/store_name/store_name.vue b/src/subpackage/device/components/store_name/store_name.vue
index df1897e..4dfc364 100644
--- a/src/subpackage/device/components/store_name/store_name.vue
+++ b/src/subpackage/device/components/store_name/store_name.vue
@@ -1,9 +1,9 @@
-
+
- {{curStoreInfo.name || '-'}}
-
+ {{curStoreInfo.name || '-'}}
+
@@ -15,8 +15,21 @@ export default {
...mapState({
storeList: state => state.device.storeList,
curStoreInfo: state => state.device.curStoreInfo,
- })
+ }),
+ getThemeIcon(){
+ return ()=> {return (this.theme=='light')?'../../static/images/arrow_b2_light.png':'../../static/images/arrow_b2.png';}
+ },
+ getThemeColor(){
+ return ()=> {return (this.theme=='light')?'#FFFFFF':'#1a1a1a';}
+ },
+ getThemeBg(){
+ return ()=> {return (this.theme=='light')?'none':'none';} //
+ },
},
+ props: ["theme"],//定义主题字段,定制组件展示效果 "light":亮色
+ created() {
+ console.log("store_name theme: ", this.theme);
+ },
methods: {
storeChange(e){
let { storeList, curStoreInfo } = this;
@@ -31,14 +44,16 @@ export default {
diff --git a/src/subpackage/device/pages/index/airC_manage.vue b/src/subpackage/device/pages/index/airC_manage.vue
new file mode 100644
index 0000000..48d48ea
--- /dev/null
+++ b/src/subpackage/device/pages/index/airC_manage.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/src/subpackage/device/pages/index/index.vue b/src/subpackage/device/pages/index/index.vue
index c9aedc2..b020bf3 100644
--- a/src/subpackage/device/pages/index/index.vue
+++ b/src/subpackage/device/pages/index/index.vue
@@ -1,6 +1,23 @@
-
+
+
+ {{curStoreInfo.brand_name}}
+
+
+
+ 欧轩智能中控
+ 设备id: {{curStoreInfo.device_name||"-"}} 复制
+ 最后上线时间:{{deviceInfo.LastOfflineTimeStr||"-"}}
+
+ 状态:{{deviceInfo.Online==1?'在线':'离线'}}
+
+
+ 定时列表
+
+
+
+
@@ -20,43 +37,107 @@ import deviceApi from '../../js/device_api';
const rootPage = '/subpackage/device'
const tabArr = [
+
{id: 1, name: '照明', path: `/pages/switch_manage/switch_manage`},
{id: 2, name: '空调', path: `/pages/switch_manage/switch_manage`},
{id: 3, name: '风扇', path: `/pages/switch_manage/switch_manage`},
{id: 4, name: '门禁', path: `/pages/switch_manage/switch_manage`},
{id: 5, name: '门闸', path: `/pages/switch_manage/switch_manage`},
- {id: 6, name: '平板', path: `/pages/switch_manage/switch_manage`},
+ // {id: 6, name: '平板', path: `/pages/switch_manage/switch_manage`},
{id: 7, name: '售货柜', path: `/pages/device_manage/device_manage`},
{id: 8, name: '租售柜', path: `/pages/device_manage/device_manage`},
{id: 9, name: '储物柜', path: `/pages/device_manage/device_manage`},
{id: 10, name: '咖啡机', path: `/pages/device_manage/device_manage`},
{id: 11, name: '水阀', path: `/pages/switch_manage/switch_manage`},
- {id: 12, name: '互动设备', path: `/pages/switch_manage/switch_manage`},
- {id: 13, name: '监控', path: ``},
- {id: 14, name: '音响', path: ``},
- {id: 15, name: '机器人', path: ``},
+ // {id: 12, name: '互动设备', path: `/pages/switch_manage/switch_manage`},
+ // {id: 13, name: '监控', path: `/pages/switch_manage/switch_manage`},
+ {id: 14, name: '音响', path: `/pages/audio_manage/audio_manage`}, //audio_manage
+ // {id: 15, name: '机器人', path: ``},
+ // {id: 16, name: '租球机', path: ``},
+ // {id: 17, name: '窗帘', path: `/pages/switch_manage/switch_manage`},
+ {id: 18, name: '路由器', path: `/pages/switch_manage/switch_manage`},
+ {id: 19, name: '物联卡', path: `/pages/switch_manage/switch_manage`},
+
];
+import { mapState } from 'vuex'
export default {
components: {
'store-name': store_name
},
+ computed: {
+ ...mapState({
+ storeList: state => state.device.storeList,
+ curStoreInfo: state => state.device.curStoreInfo,
+ }),
+
+ getTop(){
+ return (lineHeight)=>{
+ // #ifdef MP-WEIXIN
+ let wxBtn = wx.getMenuButtonBoundingClientRect()
+ // #endif
+ let txt_line_height = lineHeight //该参数为自定义参数brand_name 的 lineHeight
+ let top = (wxBtn?wxBtn.top:30 ) + (wxBtn.height-txt_line_height )/2
+ return top
+ }
+ },
+ },
data(){
return {
tabArr,
- }
+ deviceInfo:""
+ }
},
async onLoad(){
try{
util.showLoad();
let _brandInfo = await this.$store.dispatch('getBrandInfo');
await this.$store.dispatch('getStoreList');
+ this.updateAC();
util.hideLoad();
}catch(err){
util.hideLoad();
}
},
+ onShow() {
+ this.updateAC()//更新中控信息
+ },
methods: {
+ copyDeviceID(){
+ let that = this
+ uni.setClipboardData({
+ data: that.curStoreInfo.device_name,
+ success: function () {
+ util.showNone(`复制成功!`);
+ console.log('复制成功',that.curStoreInfo.device_name);
+ }
+ });
+ },
+ updateAC(){
+ if(!this.curStoreInfo.device_name)return
+ util.showLoad();
+ // id:"00-de-47-e9-3a-fc"
+ deviceServer.get({
+ url: deviceApi.acUpdate,
+ data: {id:this.curStoreInfo.device_name},
+ failMsg: '加载失败!'
+ })
+ .then(res=>{
+ util.hideLoad()
+ this.deviceInfo = res
+ uni.setStorageSync("deviceInfo",res)
+ })
+ .catch(util.hideLoad)
+ },
+ goBack(){
+ uni.navigateBack({
+ delta:1
+ })
+ },
+ goTimingList(){
+ let timing_list = "/subpackage/device/pages/timing/timing_list"
+ util.routeTo(`${timing_list}`, 'nT');
+ },
getImgPath(id){
if(!id)return '';
return `/subpackage/device/static/images/devices/${id || 14}.png`
@@ -69,11 +150,16 @@ export default {
e.id == 3 || // 风扇
e.id == 4 || // 门禁
e.id == 5 || // 门闸
- // e.id == 6 || // 平板
+ e.id == 6 || // 平板
e.id == 8 || // 租售柜
e.id == 9 || // 储物柜
e.id == 10 || // 咖啡机
e.id == 11 || // 水阀
+ e.id == 13 || // 监控
+ e.id == 14 || // 音响
+ e.id == 17 || // 窗帘
+ e.id == 18 || // 路由
+ e.id == 19 || // 物联卡
e.id == 7 // 售货柜
)return util.routeTo(`${rootPage}${e.path}?sid=${e.id}`, 'nT');
util.showNone(`开发中!`);
@@ -84,8 +170,75 @@ export default {
diff --git a/src/subpackage/device/pages/index/lot_manage.vue b/src/subpackage/device/pages/index/lot_manage.vue
new file mode 100644
index 0000000..b61867e
--- /dev/null
+++ b/src/subpackage/device/pages/index/lot_manage.vue
@@ -0,0 +1,470 @@
+
+
+
+ 物联卡管理
+ 更新
+
+
+
+
+ 更新时间: {{update_time}}
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/subpackage/device/pages/index/router_manage.vue b/src/subpackage/device/pages/index/router_manage.vue
new file mode 100644
index 0000000..023a37a
--- /dev/null
+++ b/src/subpackage/device/pages/index/router_manage.vue
@@ -0,0 +1,427 @@
+
+
+
+ 路由器管理
+ 重启
+
+
+
+
+ 更新时间: {{update_time}}
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/subpackage/device/pages/index/sunblind_manage.vue b/src/subpackage/device/pages/index/sunblind_manage.vue
new file mode 100644
index 0000000..947d1c9
--- /dev/null
+++ b/src/subpackage/device/pages/index/sunblind_manage.vue
@@ -0,0 +1,404 @@
+
+
+
+ 1号窗帘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 目前状态{{sliderLevel}}%
+
+
+ 0%
+ 100%
+
+
+
+
+
+
+ 关闭
+
+
+
+ 暂停
+
+
+
+ 开启
+
+
+
+
+
+
+
+
+
+
diff --git a/src/subpackage/device/pages/monitor_manage/monitor_acount_add.vue b/src/subpackage/device/pages/monitor_manage/monitor_acount_add.vue
new file mode 100644
index 0000000..b9d764a
--- /dev/null
+++ b/src/subpackage/device/pages/monitor_manage/monitor_acount_add.vue
@@ -0,0 +1,292 @@
+
+
+
+ 管理监控平台账户
+
+
+
+
+
+
+
+
+ 上述信息,请前往萤石云开放平台注册并以下步骤获取。https://open.ys7.com/ 复制地址
+ 1、在控制台内-我的账户-应用信息里面创建应用获得appKey和Secret,并填入上方。
+ 2、在我的资源-设备列表内添加您的设备(如有可忽略)。
+
+
+
+
+
+
+
diff --git a/src/subpackage/device/pages/monitor_manage/monitor_acount_list.vue b/src/subpackage/device/pages/monitor_manage/monitor_acount_list.vue
new file mode 100644
index 0000000..573ba03
--- /dev/null
+++ b/src/subpackage/device/pages/monitor_manage/monitor_acount_list.vue
@@ -0,0 +1,245 @@
+
+
+
+ 管理监控平台账户
+
+
+
+
+
+
+
+ 店铺名称name
+
+
+ 编辑
+
+
+ 同步设备
+
+
+
+
+
+ 添加账户
+
+
+
+
+
+
diff --git a/src/subpackage/device/pages/monitor_manage/monitor_manage.vue b/src/subpackage/device/pages/monitor_manage/monitor_manage.vue
new file mode 100644
index 0000000..3e859b4
--- /dev/null
+++ b/src/subpackage/device/pages/monitor_manage/monitor_manage.vue
@@ -0,0 +1,178 @@
+
+
+
+ 监控管理
+ 管理监控平台账户
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/subpackage/device/pages/switch_manage/switch_manage.vue b/src/subpackage/device/pages/switch_manage/switch_manage.vue
index 283cc1d..3f691e4 100644
--- a/src/subpackage/device/pages/switch_manage/switch_manage.vue
+++ b/src/subpackage/device/pages/switch_manage/switch_manage.vue
@@ -2,15 +2,20 @@
{{pageInfo.name || '-'}}
+
-
-
-
+
+
+
+
{{e.hardware_name || '-'}}
-
+
+ sim状态: {{getLotStatus(e)}}
+
+
{{ e.defineStatusCode == 1 ? '设备在线' : e.defineStatusCode == 0?'设备离线' : '-' }}
@@ -18,15 +23,28 @@
-
-
+
+
+
+
{{pageInfo.openName || '-'}}
-
+
{{pageInfo.closeName || '-'}}
+
+
+ {{pageInfo.longOpenName || '-'}}
+
+
+
+ {{pageInfo.timingName || '-'}}
+
+
+ {{pageInfo.detailName || '-'}}
+
@@ -42,53 +60,80 @@ import deviceServer from '../../js/device_server';
import deviceApi from '../../js/device_api';
const showArr = {
's1': {
- id: 1, name: '照明管理', isOpen: true, isClose: true,
- openIcon: '/subpackage/device/static/images/open.png',
- closeIcon: '/subpackage/device/static/images/close.png',
- openName: '开', closeName: '关', hardware_type: 'Light'
+ id: 1, name: '照明管理', isOpen: true, isClose: true, isLongOpen:true, isTiming:true,
+ openIcon: '/subpackage/device/static/images/open.png',closeIcon: '/subpackage/device/static/images/close.png',
+ longOpenIcon: '/subpackage/device/static/images/longOpen.png',timingIcon: '/subpackage/device/static/images/timing.png',
+ openName: '开', closeName: '关', longOpenName: '长按', timingName: '定时', hardware_type: 'Light',iconNum:4
},
's2': {
id: 2, name: '空调管理', isOpen: true, isClose: true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
- openName: '开', closeName: '关', hardware_type: 'Air'
+ openName: '开', closeName: '关', hardware_type: 'Air',iconNum:2
},
's3': {
- id: 3, name: '风扇管理', isOpen: true, isClose: true,
+ id: 3, name: '风扇管理', isOpen: true, isClose: true, isLongOpen:true, isTiming:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
- openName: '开', closeName: '关', hardware_type: 'Fan'
+ longOpenIcon: '/subpackage/device/static/images/longOpen.png',timingIcon: '/subpackage/device/static/images/timing.png',
+ openName: '开', closeName: '关', hardware_type: 'Fan',longOpenName: '长按', timingName: '定时',iconNum:4,
},
's4': {
id: 4, name: '门禁管理', isOpen: true, isClose: false,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
- openName: '开', closeName: '关', hardware_type: 'AccessControl'
+ openName: '开', closeName: '关', hardware_type: 'AccessControl',iconNum:2
},
's5': {
id: 5, name: '门闸管理', isOpen: true, isClose: true,
openIcon: '/subpackage/device/static/images/in.png',
closeIcon: '/subpackage/device/static/images/out.png',
- openName: '进', closeName: '出', hardware_type: 'GateControl'
+ openName: '进', closeName: '出', hardware_type: 'GateControl',iconNum:2
},
- 's6': {
+ 's6': {//TODO 等待接口
id: 6, name: '平板管理', isOpen: false, isClose: false,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
- openName: '开', closeName: '关', hardware_type: ''
+ openName: '开', closeName: '关', hardware_type: 'Router4G',iconNum:2
},
's11': {
- id: 11, name: '水阀管理', isOpen: true, isClose: true,
+ id: 11, name: '水阀管理', isOpen: true, isClose: true,isLongOpen:true, isTiming:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
- openName: '开', closeName: '关', hardware_type: 'WaterValve'
+ longOpenIcon: '/subpackage/device/static/images/longOpen.png',timingIcon: '/subpackage/device/static/images/timing.png',
+ openName: '开', closeName: '关', hardware_type: 'WaterValve',longOpenName: '长按', timingName: '定时',iconNum:4,
},
's12': {
id: 12, name: '互动设备管理', isOpen: true, isClose: true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
- openName: '开', closeName: '关', hardware_type: ''
+ openName: '开', closeName: '关', hardware_type: '',iconNum:2
},
+ 's13': {//TODO 等待接口
+ id: 13, name: '监控管理', isOpen: false, isClose: false, isDetail:true,
+ openIcon: '/subpackage/device/static/images/open.png',
+ closeIcon: '/subpackage/device/static/images/close.png',
+ openName: '开', closeName: '关',detailName:"详情", hardware_type: 'IotSim',iconNum:2
+ },
+ 's17': {//TODO 等待接口
+ id: 17, name: '窗帘管理', isOpen: false, isClose: false, isDetail:true,
+ openIcon: '/subpackage/device/static/images/open.png',
+ closeIcon: '/subpackage/device/static/images/close.png',
+ openName: '开', closeName: '关',detailName:"详情", hardware_type: 'Router4G',iconNum:2
+ },
+ 's18': {
+ id: 18, name: '路由器管理', isOpen: false, isClose: false, isDetail:true,
+ openIcon: '/subpackage/device/static/images/open.png',
+ closeIcon: '/subpackage/device/static/images/close.png',
+ openName: '开', closeName: '关',detailName:"详情", hardware_type: 'Router4G',iconNum:2
+ },
+ 's19': {
+ id: 19, name: '物联卡管理', isOpen: false, isClose: false, isDetail:true,
+ openIcon: '/subpackage/device/static/images/open.png',
+ closeIcon: '/subpackage/device/static/images/close.png',
+ openName: '开', closeName: '关',detailName:"详情", hardware_type: 'IotSim',iconNum:2
+ },
+
}
import { mapState } from 'vuex';
@@ -101,7 +146,23 @@ export default {
computed: {
...mapState({
curStoreInfo: state => state.device.curStoreInfo,
- })
+ }),
+ getIconWidth(){//计算操作icon的宽度
+ return ()=>{
+ return 100/this.pageInfo.iconNum+'%'
+ }
+ },
+ getLotStatus(){//sim卡状态, 0 : 华为文档中没有
+ return (e)=>{
+ return ["未知","注册","重启","在线","离线"][e.extension['HWC'].device_status]
+ }
+ },
+ getViewWidth(){//计算按钮区域的宽度
+ return ()=>{
+ let widthViewArr = ["照明管理","水阀管理","风扇管理"]
+ return (widthViewArr.indexOf(this.pageInfo.name)>=0)?'710rpx':'';
+ }
+ }
},
watch: {
curStoreInfo(newVal, oldVal){
@@ -125,7 +186,7 @@ export default {
this.getDeviceList({
stadium_id: this.curStoreInfo.id,
- hardware_type: _pageInfo.hardware_type
+ hardware_type: this.pageInfo.hardware_type
})
},
methods: {
@@ -137,30 +198,61 @@ export default {
page = 1
}){
util.showLoad();
- deviceServer.get({
- url: deviceApi.hardwareList,
- data: {
+
+ let reqListData = {
'filter[hardware_type]': hardware_type,
'filter[stadium_id]': stadium_id,
'limit': limit,
'page': page,
- },
+ }
+ if(hardware_type=="WaterValve") reqListData.operating_status = 1; //0723 按测试要求 水阀这里加多一个状态
+ deviceServer.get({
+ url: deviceApi.hardwareList,
+ data: reqListData,
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad();
let _list = res.list || [];
+ if(hardware_type=="Router4G"){ //路由器在线状态设置
+ _list = _list.map((e,i)=>{
+ e['defineStatusCode'] = e.extension.online? 1 : 0;
+ return e
+ })
+ }
this.deviceList = _list;
console.log(res)
})
.catch(util.hideLoad)
},
-
- // 按钮操作, status 0 -> 关(左), 1 -> 开(右)
+ controlDevice(e){
+ util.routeTo(`/subpackage/device/pages/index/lot_manage?mac=${switchInfo.hardware_standard}`, 'nT');
+ },
+ // 按钮操作, status 0 -> 关(左), 1 -> 开(右) ,2 -> 长开 ,3 -> 定时, 4 ->详情(自定义)
operateBtn: util.debounce(function({ switchInfo, status }){
-
+ console.log("icon tap status: ",status,switchInfo)
+
let _data = this.getOperateReqData({ switchInfo, status })
//针对门禁没有关按钮发两条命令->开&关 20201224 后端: 直接发两条 关的那条这里填5 然后你那边不用管返回
+
+ //新增定时/长按拦截判断
+ if(status == 2) return util.showNone("该功能暂未开放")
+
+ if(status == 4){
+
+ // if(this.pageInfo.name=='监控管理')return util.routeTo(`/subpackage/device/pages/monitor_manage/monitor_manage?mac=${switchInfo.hardware_standard}`, 'nT');
+ if(this.pageInfo.name=='窗帘管理')return util.routeTo(`/subpackage/device/pages/index/sunblind_manage?mac=${switchInfo.hardware_standard}`, 'nT');
+ if(this.pageInfo.hardware_type=='Router4G')return util.routeTo(`/subpackage/device/pages/index/router_manage?mac=${switchInfo.hardware_standard}`, 'nT');
+ if(this.pageInfo.hardware_type=='IotSim')return util.routeTo(`/subpackage/device/pages/index/lot_manage?mac=${switchInfo.hardware_standard}`, 'nT');
+
+ }
+ if(status == 3) return (()=>{
+ switchInfo.switchData = _data;//将中控组合数据传递到下层
+ let timing_setting = `/subpackage/device/pages/timing/timing_setting?switchInfo=${encodeURIComponent(JSON.stringify(switchInfo))}`
+ util.routeTo(`${timing_setting}`, 'nT');
+ })()
+
+
if(switchInfo.hardware_type === 'AccessControl'&&status == 1){
this.operateReq({data: this.getOperateReqData({ switchInfo, status: 0 }), isTip: false, isLoad: false});
}
@@ -222,6 +314,14 @@ export default {
},
//
refreshStatusBtn: util.debounce(function({switchInfo, index}){
+
+ if(switchInfo.hardware_type == "Router4G"){
+ return this.getDeviceList({
+ stadium_id: this.curStoreInfo.id,
+ hardware_type: this.pageInfo.hardware_type
+ })
+ }
+
this.getStatusReq({
data: this.getSwitchStatusQuery(switchInfo),
index,
@@ -342,8 +442,9 @@ export default {
// 常规开关状态
// Low = "low", // 低电位,为开启
// High = "high", // 高电位, 为关闭
+ // status 0 -> 关(左), 1 -> 开(右) ,2 -> 长开 ,3 -> 定时, 4 ->详情(自定义)
getRelayStatus(status){
- return [ 'high', 'low' ][status] || ''
+ return [ 'high', 'low', '', 'high', ''][status] || ''
},
// 空调状态
@@ -439,6 +540,14 @@ export default {
color: #333;
@include textHide(1);
}
+ .sr-bot-router{
+ font-size: 20rpx;
+ color: #9C9C9F;
+ text{
+ margin-left: 15rpx;
+ color: black;
+ }
+ }
.sr-bot{
display: flex;
align-items: center;
@@ -483,6 +592,7 @@ export default {
display: flex;
justify-content: center;
border-top: 2upx solid #F2F2F7;
+
>view{
flex-shrink: 0;
flex-grow: 0;
@@ -500,6 +610,19 @@ export default {
color: #9a9a9d;
}
}
+ .btn-detail{
+ width:auto;
+ > view{
+ width: 204rpx;
+ height: 88rpx;
+ background: #009874;
+ border-radius: 10rpx;
+ text-align: center;
+ line-height: 88rpx;
+ color: white;
+ }
+
+ }
}
}
}
diff --git a/src/subpackage/device/pages/timing/timing_list.vue b/src/subpackage/device/pages/timing/timing_list.vue
new file mode 100644
index 0000000..f3a484d
--- /dev/null
+++ b/src/subpackage/device/pages/timing/timing_list.vue
@@ -0,0 +1,336 @@
+
+
+
+ 定时列表
+
+
+
+
+ {{item[0]}}
+
+
+ {{item[2]}}
+ {{item[2]}}
+
+
+
+
+
+
+
+
+
diff --git a/src/subpackage/device/pages/timing/timing_setting.vue b/src/subpackage/device/pages/timing/timing_setting.vue
new file mode 100644
index 0000000..9cd28ef
--- /dev/null
+++ b/src/subpackage/device/pages/timing/timing_setting.vue
@@ -0,0 +1,701 @@
+
+
+
+ {{switchInfo.hardware_name}}定时
+
+
+
+
+ 时间动作
+ 开
+
+
+
+ 关
+
+
+
+
+
+
+ 时间类型
+
+
+ {{singleArr[sIndex]}}
+
+
+
+
+
+ 星期{{weekArrCN[i]}}
+
+
+
+
+
+ 具体日期
+
+
+ 请点击选择
+
+
+
+
+
+ {{i+1}} 号
+
+
+
+
+
+ 具体时间段
+
+
+ {{startTime?startTime+'起':'请选择开始时间'}}
+
+ 至
+
+ {{endTime?endTime+"止":"请选择结束时间"}}
+
+
+
+
+
+ 时间点
+
+
+ {{time}}
+
+
+
+
+
+
+ 保存
+ 保存后发布后将会以最新的定时更新到欧轩智能中控,设备首页定时列表可查看最新发布
+
+
+
+
+ {})">
+ {})">
+
+
+
+
+ {{i+1}} 号
+
+
+
+
+
+ 确认
+
+
+
+
+
+
+
+
+
diff --git a/src/subpackage/device/static/images/arrow_b2_light.png b/src/subpackage/device/static/images/arrow_b2_light.png
new file mode 100644
index 0000000..f780cc4
Binary files /dev/null and b/src/subpackage/device/static/images/arrow_b2_light.png differ
diff --git a/src/subpackage/device/static/images/arrow_back.png b/src/subpackage/device/static/images/arrow_back.png
new file mode 100644
index 0000000..8649cfe
Binary files /dev/null and b/src/subpackage/device/static/images/arrow_back.png differ
diff --git a/src/subpackage/device/static/images/devices/16.png b/src/subpackage/device/static/images/devices/16.png
new file mode 100644
index 0000000..843cd0a
Binary files /dev/null and b/src/subpackage/device/static/images/devices/16.png differ
diff --git a/src/subpackage/device/static/images/devices/17.png b/src/subpackage/device/static/images/devices/17.png
new file mode 100644
index 0000000..173ca72
Binary files /dev/null and b/src/subpackage/device/static/images/devices/17.png differ
diff --git a/src/subpackage/device/static/images/devices/18.png b/src/subpackage/device/static/images/devices/18.png
new file mode 100644
index 0000000..f20ef53
Binary files /dev/null and b/src/subpackage/device/static/images/devices/18.png differ
diff --git a/src/subpackage/device/static/images/devices/19.png b/src/subpackage/device/static/images/devices/19.png
new file mode 100644
index 0000000..2434ab6
Binary files /dev/null and b/src/subpackage/device/static/images/devices/19.png differ
diff --git a/src/subpackage/device/static/images/i_txt.png b/src/subpackage/device/static/images/i_txt.png
new file mode 100644
index 0000000..4ce25a2
Binary files /dev/null and b/src/subpackage/device/static/images/i_txt.png differ
diff --git a/src/subpackage/device/static/images/i_voice_1.png b/src/subpackage/device/static/images/i_voice_1.png
new file mode 100644
index 0000000..70bed67
Binary files /dev/null and b/src/subpackage/device/static/images/i_voice_1.png differ
diff --git a/src/subpackage/device/static/images/i_voice_2.png b/src/subpackage/device/static/images/i_voice_2.png
new file mode 100644
index 0000000..fce66a6
Binary files /dev/null and b/src/subpackage/device/static/images/i_voice_2.png differ
diff --git a/src/subpackage/device/static/images/i_voice_3.png b/src/subpackage/device/static/images/i_voice_3.png
new file mode 100644
index 0000000..0b603ee
Binary files /dev/null and b/src/subpackage/device/static/images/i_voice_3.png differ
diff --git a/src/subpackage/device/static/images/i_voice_4.png b/src/subpackage/device/static/images/i_voice_4.png
new file mode 100644
index 0000000..fce66a6
Binary files /dev/null and b/src/subpackage/device/static/images/i_voice_4.png differ
diff --git a/src/subpackage/device/static/images/icon_clock.png b/src/subpackage/device/static/images/icon_clock.png
new file mode 100644
index 0000000..2b07e96
Binary files /dev/null and b/src/subpackage/device/static/images/icon_clock.png differ
diff --git a/src/subpackage/device/static/images/index_bg.png b/src/subpackage/device/static/images/index_bg.png
new file mode 100644
index 0000000..f342917
Binary files /dev/null and b/src/subpackage/device/static/images/index_bg.png differ
diff --git a/src/subpackage/device/static/images/longOpen.png b/src/subpackage/device/static/images/longOpen.png
new file mode 100644
index 0000000..7e292bb
Binary files /dev/null and b/src/subpackage/device/static/images/longOpen.png differ
diff --git a/src/subpackage/device/static/images/no-info.png b/src/subpackage/device/static/images/no-info.png
new file mode 100644
index 0000000..c6b8760
Binary files /dev/null and b/src/subpackage/device/static/images/no-info.png differ
diff --git a/src/subpackage/device/static/images/sunblind.png b/src/subpackage/device/static/images/sunblind.png
new file mode 100644
index 0000000..a262889
Binary files /dev/null and b/src/subpackage/device/static/images/sunblind.png differ
diff --git a/src/subpackage/device/static/images/sunblind_close.png b/src/subpackage/device/static/images/sunblind_close.png
new file mode 100644
index 0000000..d42ff6b
Binary files /dev/null and b/src/subpackage/device/static/images/sunblind_close.png differ
diff --git a/src/subpackage/device/static/images/sunblind_open.png b/src/subpackage/device/static/images/sunblind_open.png
new file mode 100644
index 0000000..bd3b110
Binary files /dev/null and b/src/subpackage/device/static/images/sunblind_open.png differ
diff --git a/src/subpackage/device/static/images/timing.png b/src/subpackage/device/static/images/timing.png
new file mode 100644
index 0000000..0cbdfeb
Binary files /dev/null and b/src/subpackage/device/static/images/timing.png differ
diff --git a/src/subpackage/device/static/images/windows.png b/src/subpackage/device/static/images/windows.png
new file mode 100644
index 0000000..b402a33
Binary files /dev/null and b/src/subpackage/device/static/images/windows.png differ