From 4a06aa359e4899c025f412027b5252ae0dd56931 Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Sun, 6 Oct 2024 18:03:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statulist/taocanlist/addtaocan/index.vue | 1 + page_user/wifijoint/index.vue | 8 +++- pages/index/index.vue | 40 ++++++++++++++++--- 3 files changed, 41 insertions(+), 8 deletions(-) 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 @@ + --> + + @@ -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) {