管理页面排序更换 #280

Merged
xiaomeng merged 1 commits from pc-master into portal 2025-09-09 06:13:30 +00:00
3 changed files with 27 additions and 0 deletions
Showing only changes of commit 6a1473a6a9 - Show all commits

View File

@ -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 => {

View File

@ -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=>{

View File

@ -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 => {