diff --git a/src/pages/site/manage/manage.vue b/src/pages/site/manage/manage.vue index 35738e8..a19af18 100644 --- a/src/pages/site/manage/manage.vue +++ b/src/pages/site/manage/manage.vue @@ -398,19 +398,52 @@ export default { }, // 检查&设置联动禁选场地 + // checkLinkageVenue({ + // group = 0, // 所点击场地列表 + // venueList = [], // 所有场地 + // selectedKey = 'selectedKey', // 选中key + // linkageKey = 'linkageKey', // 联动禁用key + // linkageIDArrKey = 'link_venue_ids', + // linkageIDKey = 'venue_id', + // curTag + // }){ + // let _curGroupInfo = {...venueList[group]}; + // for(let i=0; i{ + // // 单列联动 + // if(venueList[i].link_venue_ids && venueList[i].link_venue_ids.length == 1){ + // venueList[i].items[ele._defineIndex][linkageKey] = !!_curGroupInfo.items[ele._defineIndex][selectedKey]; + // } + // // 多列联动 + // if(venueList[i].link_venue_ids && venueList[i].link_venue_ids.length > 1){ + // let _link_venueLs = venueList.filter(item=> venueList[i].link_venue_ids.includes(item[linkageIDKey])); + // // 已联动列表选中情况 ex: [ true, false ]; + // let _link_venueLs_selectedLs = _link_venueLs.map(el=> el['items'][ele._defineIndex] && el['items'][ele._defineIndex][selectedKey]); + // venueList[i].items[ele._defineIndex][linkageKey] = _link_venueLs_selectedLs.includes(true); // 多场联动,只要有一个被选中就禁止 + // } + // }); + // } + // } + // return venueList || []; + // }, + // 场地》》》检查&设置联动禁选场地 checkLinkageVenue({ group = 0, // 所点击场地列表 venueList = [], // 所有场地 selectedKey = 'selectedKey', // 选中key linkageKey = 'linkageKey', // 联动禁用key - linkageIDArrKey = 'link_venue_ids', - linkageIDKey = 'venue_id', + linkageIDArrKey = 'link_venue_ids', // 后台提供联动列表 + linkageIDKey = 'venue_id', // 对应列表 id curTag }){ let _curGroupInfo = {...venueList[group]}; for(let i=0; i_curGroupInfo[linkageIDKey] !=ele); if(_link_venue_ids.includes(venueList[i][linkageIDKey])){ _curGroupInfo.items.forEach(ele=>{ // 单列联动 @@ -419,7 +452,10 @@ export default { } // 多列联动 if(venueList[i].link_venue_ids && venueList[i].link_venue_ids.length > 1){ - let _link_venueLs = venueList.filter(item=> venueList[i].link_venue_ids.includes(item[linkageIDKey])); + // 过滤自身联动id (后端bug) + let _linkVenueIds = venueList[i].link_venue_ids.filter(e=>e !=venueList[i][linkageIDKey]); + // 查找所有联动场地列表 + let _link_venueLs = venueList.filter(item=> _linkVenueIds.includes(item[linkageIDKey])); // 已联动列表选中情况 ex: [ true, false ]; let _link_venueLs_selectedLs = _link_venueLs.map(el=> el['items'][ele._defineIndex] && el['items'][ele._defineIndex][selectedKey]); venueList[i].items[ele._defineIndex][linkageKey] = _link_venueLs_selectedLs.includes(true); // 多场联动,只要有一个被选中就禁止 diff --git a/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue b/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue index 31e3e37..b5ba273 100644 --- a/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue +++ b/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue @@ -119,7 +119,8 @@ - 退款 + + diff --git a/src/subpackage/device/pages/switch_manage/switch_manage.vue b/src/subpackage/device/pages/switch_manage/switch_manage.vue index 4ee252e..3018526 100644 --- a/src/subpackage/device/pages/switch_manage/switch_manage.vue +++ b/src/subpackage/device/pages/switch_manage/switch_manage.vue @@ -199,6 +199,7 @@ export default { if(switchInfo.hardware_type === 'AccessControl'&&status == 1){ + //针对门禁没有关按钮发两条命令->开&关 20201224 后端: 直接发两条 关的那条这里填5 然后你那边不用管返回 this.operateReq({data: this.getOperateReqData({ switchInfo, status: 0 }), isTip: false, isLoad: false}); } @@ -272,7 +273,7 @@ export default { } let _data = this.getSwitchStatusQuery(switchInfo); - _data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo); + _data = DEVICE_FUN.AC_filterCloudACData(_data,switchInfo); this.getStatusReq({ data: _data, @@ -292,10 +293,10 @@ export default { util.hideLoad(); let _data = res.data || {}; console.log(this.changeLowerCase(_data.data)) - if(_data.code == 504 || this.changeLowerCase(_data.data).indexOf('timeout')!=-1){ + if(_data.code == 504 || this.changeLowerCase(_data.data).indexOf('timeout')!=-1){ // 不在线 _deviceList[index]['defineStatusCode'] = 0; - }else if(_data.code == 0&&this.changeLowerCase(_data.data).indexOf('timeout')==-1){ + }else if(_data.code == 0&&this.changeLowerCase(_data.data).indexOf('timeout')==-1){ // 在线 _deviceList[index]['defineStatusCode'] = 1; }else{ util.showNone(_data.message || '操作失败!');