同一表格根据不同排序条件查询

1.template


      			
				 	
			        

					
						
					
					
							
						

2.method

handleSortChange(val){
	      			      		console.log(val)
	      		if(val.column==null){
	      			this.Sort('','',this.pageNo)
	      			return
	      		}
	      		if(val.column.label=='产品价格(元/g)'&&val.order=='descending'){
	      			this.Sort('PRICE',"desc",this.pageNo)
	      			this.productType='PRICE';
	      			this.sortOrder="desc";
	      		}
	      		if(val.column.label=='产品价格(元/g)'&&val.order=='ascending'){
	      			this.Sort('PRICE',"asc",this.pageNo)
	      			this.productType='PRICE';
	      			this.sortOrder="asc";
	      		}
	      		if(val.column.label=='产品规格(g)'&&val.order=='descending'){
	      	
	      			this.Sort('WEIGHT',"desc",this.pageNo)
	      			this.productType='WEIGHT';
	      			this.sortOrder="desc";
	      		}
	      		if(val.column.label=='产品规格(g)'&&val.order=="ascending"){
	      			this.Sort('WEIGHT',"asc",this.pageNo)
	      			this.productType='WEIGHT';
	      			this.sortOrder="asc";
	      		}
	      		console.log(val,'val>>>>>>>>>>>>>>')
	      	},

Sort(x,y,pageNO,pageSize){
	      		console.log(x,y,pageNO,pageSize)
	      		this.keepX=x
				  this.keepY=y
				  console.log(this.material)
				let parames = {
					"functionName": "preciousmetalbiz.service.PrdMetalService",
				    "methodName": "selectPmList",
				    "pageNo":pageNO,
				    "pageSize":10,
					
					"data": { // 查询条件
						prdCode: this.prdCode,						// 产品代码
						prdName: this.prdName,						// 产品名称
						weightStart: this.weightStart,		// 规格(开始)
						weightEnd: this.weightEnd,			// 规格(结束)
						priceStart: this.priceStart,	// 产品销售价格(开始)
						priceEnd: this.priceEnd,		// 产品销售价格(结束)
						material: this.material,				// 材质	
						companyName: this.companyName, 	
						branchCode:JSON.parse(sessionStorage.getItem('sessionData')).orgnCode,
	   					roleId:JSON.parse(sessionStorage.getItem('sessionData')).roleId,
						"order":x,
	        			"sort":y	
					}
				};
				this.http(JSON.stringify(parames))
				.then((res)=>{
					  if(res.data.errorCode!=undefined){
					this.$alert(res.data.errorMsg,'提示', {
					confirmButtonText: '确定',
					})
			    	}
						var list = res.data.basicInfoList;
						this.tableData = list;
						this.total = res.sumCount;
						
						setTimeout(()=>{
//                  this.setSelectRow();
					
                    }, 50)
				}).catch(error => {
					console.log(error);
				})
			},