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