diff --git a/page_fenbao/statulist/taocanlist/addtaocan/index.vue b/page_fenbao/statulist/taocanlist/addtaocan/index.vue index f9bd8d1..b589998 100644 --- a/page_fenbao/statulist/taocanlist/addtaocan/index.vue +++ b/page_fenbao/statulist/taocanlist/addtaocan/index.vue @@ -827,6 +827,7 @@ this.checkes = res.data.enabledVoice this.power = res.data.lowPower this.powes = res.data.voiceMinutes + console.log(this.powes,res.data.voiceMinutes) this.deviceList.forEach(item => { this.tcidlist.push(item.deviceId) }) diff --git a/page_user/wifijoint/index.vue b/page_user/wifijoint/index.vue index c85353e..02d9ec3 100644 --- a/page_user/wifijoint/index.vue +++ b/page_user/wifijoint/index.vue @@ -159,7 +159,9 @@ btnkq(){ this.$u.put(`/app/device/admin/${this.id}/switch?open=true`).then((res) => { if (res.code == 200) { - this.getsn() + setTimeout(()=>{ + this.btnsx() + },1000) uni.showToast({ title: res.msg, icon: 'success', @@ -178,7 +180,9 @@ btngb(){ this.$u.put(`/app/device/admin/${this.id}/switch?open=false`).then((res) => { if (res.code == 200) { - this.getsn() + setTimeout(()=>{ + this.btnsx() + },1000) uni.showToast({ title: res.msg, icon: 'success', diff --git a/pages/index/index.vue b/pages/index/index.vue index 1cea8e3..3a0fdda 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -48,7 +48,9 @@ + </view> --> <view class="fd_set iconfont icon-liebiao" @click="showfz = true"></view> + <image style="width: 32rpx;height: 34rpx;margin-top: 10rpx;margin-left: 20rpx;" src="https://api.ccttiot.com/smartmeter/img/static/uiZneL59hHNJ2EsOE557" mode="" @click="pxshow = true"></image> </view> + <u-select v-model="pxshow" :list="pxlist" @confirm="pxconfirm"></u-select> </view> <u-mask :show="showfz" @click="showfz=false"></u-mask> @@ -200,6 +202,22 @@ export default { data() { return { + pxshow: false, + pxlist: [ + { + value: 'deviceName', + label: '按设备名称排序' + }, + { + value: 'activationTime', + label: '按绑定时间排序' + }, + { + value: 'onlineStatus', + label: '按在线状态排序' + } + ], + shuaxin: false, showshop: false, shoplist: [], @@ -278,7 +296,8 @@ timer: null, url: "", deviceNo: '', - btnmsk:false + btnmsk:false, + pxzt:'onlineStatus' } }, onLoad() { @@ -291,7 +310,7 @@ // this.curtitidx = 0 // this.wateringList = [] this.logins() - this.getgroup(); + this.getgroup() this.deviceId = uni.getStorageSync('deviceIds') this.name = uni.getStorageSync('name') let that = this @@ -345,6 +364,15 @@ } }, methods: { + // 选择排序 + pxconfirm(e){ + this.pxzt = e[0].value + this.gettanc() + this.pagenum = 1 + this.logins() + this.getgroup() + }, + funListenDeviceMsgEvent: function(options) { switch (options.type) { case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_MY_DATA: @@ -1013,7 +1041,7 @@ getlist() { this.shujuflag = false // if (this.storeId == null) { - this.$u.get(`/app/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => { + this.$u.get(`/app/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}&orderByColumn=${this.pxzt}&isAsc=asc`).then((res) => { if (res.code == 200) { this.xiaflag = true this.shuaxin = false @@ -1031,9 +1059,9 @@ this.pagenum++ this.wateringList = this.wateringList.concat(res.rows) this.shujuflag = false - console.log(this.wateringList); + // console.log(this.wateringList); this.groupLists.forEach(groupItem => { - groupItem.wateringList = [] + groupItem.wateringList }) this.wateringList.forEach(wateringItem => { this.groupLists[0].wateringList.push(wateringItem) @@ -1074,7 +1102,7 @@ }) }, changeGp(item, index) { - // console.log(item); + // console.log(item); this.pagenum = 1 this.showfz = false if (item == 1) {