Merge pull request '管理页面排序更换' (#280) from pc-master into portal

Reviewed-on: #280
This commit is contained in:
xiaomeng 2025-09-09 06:13:29 +00:00
commit 38888f2c83
3 changed files with 27 additions and 0 deletions

View File

@ -135,6 +135,7 @@ export default {
this.topList.push(el) this.topList.push(el)
} }
}) })
this.topList.sort(this.compare('equipmentStatu'))
setTimeout(() => { setTimeout(() => {
if(this.topList.length) if(this.topList.length)
this.getData(this.topList[0]) 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) { getData(item) {
// var data={deviceId:item.deviceId} // var data={deviceId:item.deviceId}
this.api.getcontrol_cpermission(item.deviceId).then(res => { this.api.getcontrol_cpermission(item.deviceId).then(res => {

View File

@ -118,6 +118,7 @@ export default {
this.topList.push(el) this.topList.push(el)
} }
}) })
this.topList.sort(this.compare('equipmentStatu'))
setTimeout(() => { setTimeout(() => {
if(this.topList.length) if(this.topList.length)
this.getData(this.topList[0]) 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){ getData(item){
var data={deviceId:item.deviceId} var data={deviceId:item.deviceId}
this.api.selControlPermissions(data).then(res=>{ this.api.selControlPermissions(data).then(res=>{

View File

@ -110,6 +110,7 @@ export default {
this.topList.push(el) this.topList.push(el)
} }
}) })
this.topList.sort(this.compare('equipmentStatu'))
setTimeout(() => { setTimeout(() => {
if(this.topList.length) if(this.topList.length)
this.getData(this.topList[0]) 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) { getData(item) {
var data = { deviceId: item.deviceId } var data = { deviceId: item.deviceId }
this.api.wxgetpermission(data).then(res => { this.api.wxgetpermission(data).then(res => {