管理页面排序更换 #280
@ -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 => {
 | 
			
		||||
 | 
			
		||||
@ -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=>{
 | 
			
		||||
 | 
			
		||||
@ -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 => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user