Browse Source

Merge branch 'dev' into writeoff

organize
刘嘉炜 3 years ago
parent
commit
a59c804361
  1. 26
      src/subpackage/device/js/device_fun.js
  2. 1
      src/subpackage/device/pages/air_conditioner/detail/detail.vue
  3. 18
      src/subpackage/device/pages/audio_manage/audio_manage.vue
  4. 2
      src/subpackage/device/pages/order_details/order_details.vue
  5. 11
      src/subpackage/device/pages/switch_manage/switch_manage.vue

26
src/subpackage/device/js/device_fun.js

@ -0,0 +1,26 @@
/*
硬件处理函数
*/
var DEVICE_FUN = {
/*
@data:过滤数据
@switchInfo:操作的设备信息
使用: _data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo);
场景: 目前需求只要求照明(中控状态更新,灯操控) 其它需要再对接
注意: 涉及deviceApi.ouxuanac 接口的,理论上来说都需要做兼容去在逻辑中传入硬件信息判断是否是云中控
*/
AC_filterCloudACData(data,switchInfo){
console.log("云中控参数检测 AC_filterCloudACData",data,switchInfo);
//处理云中控专用参数
// 这里device是设备名 一旦出现云中控 设备id被 (OUXUANAC_CLOUD_+hardware_net_addr) 串起来的字符串覆盖
if(!!switchInfo&&switchInfo.hardware_connect_method=="YZK"){
data.device = "OUXUANAC_CLOUD_"+switchInfo.hardware_net_addr;
}
return data
},
}
export default DEVICE_FUN;

1
src/subpackage/device/pages/air_conditioner/detail/detail.vue

@ -226,6 +226,7 @@ export default {
console.warn('_qyObj', _qyObj);
_qyObj = this.setExt({ query: _qyObj, value: '', });
this.subpackInfo = _qyObj;
console.log(11111,_qyObj);
this.operateReq({ data: _qyObj, isTip: false });
},
methods: {

18
src/subpackage/device/pages/audio_manage/audio_manage.vue

@ -117,7 +117,8 @@
mapState
} from 'vuex';
import util from '../../../../utils/util';
import DEVICE_FUN from '../../js/device_fun.js';
export default {
components: {
@ -404,7 +405,10 @@
let _data = this.getOperateReqData({
switchInfo,
status
})
})
_data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo);
//->& 20201224 5
if (switchInfo.hardware_type === 'AccessControl' && status == 1) {
this.operateReq({
@ -460,7 +464,7 @@
}) {
let that = this
if (isLoad) util.showLoad();
console.log("123",data);
deviceServer.post({
url: deviceApi.ouxuanac,
data: data,
@ -514,6 +518,8 @@
// index,
// })
//TODO ,
// _data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo);
util.showLoad();
setTimeout(()=>util.hideLoad(),1000)
}, 300, 300),
@ -668,7 +674,8 @@
let _obj = {
'Gpio': 'get-rpio', //
'SerialPort485': 'zzio404d-gpio-status',
'Tcp': 'zzio404d-gpio-status-tcp',
'Tcp': 'zzio404d-gpio-status-tcp',
'YZK':'zzio404d-gpio-status'
};
return _obj[hardware_connect_method] || ''
@ -682,7 +689,8 @@
let _obj = {
'Gpio': 'set-rpio', //
'SerialPort485': 'zzio404d-gpio',
'Tcp': 'zzio404d-gpio-tcp',
'Tcp': 'zzio404d-gpio-tcp',
'YZK':'zzio404d-gpio'
};
return _obj[hardware_connect_method] || ''

2
src/subpackage/device/pages/order_details/order_details.vue

@ -20,7 +20,7 @@
<view class="rc-price">
<view class="rp-name"><text class="rn-txt">*</text>退款金额</view>
<view class="rp-frame">
<input class="rf-ipt" v-model="refundPrice" type="number" placeholder="请输入金额" />
<input class="rf-ipt" v-model="refundPrice" type="digit" placeholder="请输入金额" />
</view>
<view class="rp-tip">最多可退{{ (pageInfo.extension&&pageInfo.extension.refundable_amount) || 0 }}</view>
</view>

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

@ -65,6 +65,7 @@ import deviceApi from '../../js/device_api';
import { mapState } from 'vuex';
import util from '../../../../utils/util';
import DEVICE_FUN from '../../js/device_fun.js';
export default {
components: {
@ -174,6 +175,9 @@ export default {
console.log("icon tap status: ",status,switchInfo)
let _data = this.getOperateReqData({ switchInfo, status })
_data = DEVICE_FUN.AC_filterCloudACData(_data,switchInfo);
//->& 20201224 5
///
@ -267,8 +271,11 @@ export default {
})
}
let _data = this.getSwitchStatusQuery(switchInfo);
_data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo);
this.getStatusReq({
data: this.getSwitchStatusQuery(switchInfo),
data: _data,
index,
})
},300,300),
@ -407,6 +414,7 @@ export default {
'Gpio': 'get-rpio', //
'SerialPort485': 'zzio404d-gpio-status',
'Tcp': 'zzio404d-gpio-status-tcp',
'YZK':'zzio404d-gpio-status'
};
return _obj[hardware_connect_method] || ''
@ -419,6 +427,7 @@ export default {
'Gpio': 'set-rpio', //
'SerialPort485': 'zzio404d-gpio',
'Tcp': 'zzio404d-gpio-tcp',
'YZK':'zzio404d-gpio'
};
return _obj[hardware_connect_method] || ''

Loading…
Cancel
Save