From 6a1473a6a9dd89f3096bdea36a2fbd505cc35b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?home=E5=AD=99?= <1162067978@qq.com> Date: Tue, 9 Sep 2025 09:20:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/manage/deviceSet.vue | 9 +++++++++ src/views/manage/deviceStatusSet.vue | 9 +++++++++ src/views/manage/mobileControl.vue | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/src/views/manage/deviceSet.vue b/src/views/manage/deviceSet.vue index 2358f451..eb2c2bc1 100644 --- a/src/views/manage/deviceSet.vue +++ b/src/views/manage/deviceSet.vue @@ -135,6 +135,7 @@ export default { this.topList.push(el) } }) + this.topList.sort(this.compare('equipmentStatu')) setTimeout(() => { if(this.topList.length) this.getData(this.topList[0]) @@ -142,6 +143,14 @@ export default { } }) }, + //排序 + compare(property) { + return function (a, b) { + let value1 = a[property]; + let value2 = b[property]; + return value1 - value2; + }; + }, getData(item) { // var data={deviceId:item.deviceId} this.api.getcontrol_cpermission(item.deviceId).then(res => { diff --git a/src/views/manage/deviceStatusSet.vue b/src/views/manage/deviceStatusSet.vue index 3080b063..14c4b76c 100644 --- a/src/views/manage/deviceStatusSet.vue +++ b/src/views/manage/deviceStatusSet.vue @@ -118,6 +118,7 @@ export default { this.topList.push(el) } }) + this.topList.sort(this.compare('equipmentStatu')) setTimeout(() => { if(this.topList.length) this.getData(this.topList[0]) @@ -125,6 +126,14 @@ export default { } }) }, + //排序 + compare(property) { + return function (a, b) { + let value1 = a[property]; + let value2 = b[property]; + return value1 - value2; + }; + }, getData(item){ var data={deviceId:item.deviceId} this.api.selControlPermissions(data).then(res=>{ diff --git a/src/views/manage/mobileControl.vue b/src/views/manage/mobileControl.vue index 935478cd..75283853 100644 --- a/src/views/manage/mobileControl.vue +++ b/src/views/manage/mobileControl.vue @@ -110,6 +110,7 @@ export default { this.topList.push(el) } }) + this.topList.sort(this.compare('equipmentStatu')) setTimeout(() => { if(this.topList.length) this.getData(this.topList[0]) @@ -117,6 +118,14 @@ export default { } }) }, + //排序 + compare(property) { + return function (a, b) { + let value1 = a[property]; + let value2 = b[property]; + return value1 - value2; + }; + }, getData(item) { var data = { deviceId: item.deviceId } this.api.wxgetpermission(data).then(res => {