Browse Source

Merge branch 'dev'

feat-230721
刘嘉炜 3 years ago
parent
commit
74e3fad077
  1. 44
      src/pages/site/manage/manage.vue
  2. 3
      src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
  3. 7
      src/subpackage/device/pages/switch_manage/switch_manage.vue

44
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<venueList.length; i++){
// let _link_venue_ids = _curGroupInfo[linkageIDArrKey] || [];
// if(_link_venue_ids.includes(venueList[i][linkageIDKey])){
// _curGroupInfo.items.forEach(ele=>{
// //
// 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({ checkLinkageVenue({
group = 0, // group = 0, //
venueList = [], // venueList = [], //
selectedKey = 'selectedKey', // key selectedKey = 'selectedKey', // key
linkageKey = 'linkageKey', // key linkageKey = 'linkageKey', // key
linkageIDArrKey = 'link_venue_ids',
linkageIDKey = 'venue_id',
linkageIDArrKey = 'link_venue_ids', //
linkageIDKey = 'venue_id', // id
curTag curTag
}){ }){
let _curGroupInfo = {...venueList[group]}; let _curGroupInfo = {...venueList[group]};
for(let i=0; i<venueList.length; i++){ for(let i=0; i<venueList.length; i++){
let _link_venue_ids = _curGroupInfo[linkageIDArrKey] || []; let _link_venue_ids = _curGroupInfo[linkageIDArrKey] || [];
// id
_link_venue_ids = _link_venue_ids.filter(ele=>_curGroupInfo[linkageIDKey] !=ele);
if(_link_venue_ids.includes(venueList[i][linkageIDKey])){ if(_link_venue_ids.includes(venueList[i][linkageIDKey])){
_curGroupInfo.items.forEach(ele=>{ _curGroupInfo.items.forEach(ele=>{
// //
@ -419,7 +452,10 @@ export default {
} }
// //
if(venueList[i].link_venue_ids && venueList[i].link_venue_ids.length > 1){ 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 ]; // ex: [ true, false ];
let _link_venueLs_selectedLs = _link_venueLs.map(el=> el['items'][ele._defineIndex] && el['items'][ele._defineIndex][selectedKey]); 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); // venueList[i].items[ele._defineIndex][linkageKey] = _link_venueLs_selectedLs.includes(true); //

3
src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue

@ -119,7 +119,8 @@
</view> </view>
</view> </view>
<view class="rs-btn" @click="refunndBtn" v-if="orderInfo.pay_status == 1 || orderInfo.pay_status == 2">退款</view>
<!-- 2022/01/04 PM: 禁用退款功能 -->
<!-- <view class="rs-btn" @click="refunndBtn" v-if="orderInfo.pay_status == 1 || orderInfo.pay_status == 2">退款</view> -->
</view> </view>
</template> </template>

7
src/subpackage/device/pages/switch_manage/switch_manage.vue

@ -199,6 +199,7 @@ export default {
if(switchInfo.hardware_type === 'AccessControl'&&status == 1){ if(switchInfo.hardware_type === 'AccessControl'&&status == 1){
//->& 20201224 5
this.operateReq({data: this.getOperateReqData({ switchInfo, status: 0 }), isTip: false, isLoad: false}); this.operateReq({data: this.getOperateReqData({ switchInfo, status: 0 }), isTip: false, isLoad: false});
} }
@ -272,7 +273,7 @@ export default {
} }
let _data = this.getSwitchStatusQuery(switchInfo); let _data = this.getSwitchStatusQuery(switchInfo);
_data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo);
_data = DEVICE_FUN.AC_filterCloudACData(_data,switchInfo);
this.getStatusReq({ this.getStatusReq({
data: _data, data: _data,
@ -292,10 +293,10 @@ export default {
util.hideLoad(); util.hideLoad();
let _data = res.data || {}; let _data = res.data || {};
console.log(this.changeLowerCase(_data.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; _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; _deviceList[index]['defineStatusCode'] = 1;
}else{ }else{
util.showNone(_data.message || '操作失败!'); util.showNone(_data.message || '操作失败!');

Loading…
Cancel
Save