queryOrder 常规

 

搜索刷新内容 

下拉切换时(一般用于最新,最热,时间)刷新内容
 

    <spe-con :childform='form1' ref="as0"></spe-con>
    <course-con :childform='form2' ref="as1"></course-con>
    
    form1: {
        pageSize: 10,
        namespace: 'nc.ztb',
        pageName: 'mhzxlist',
//      query: '{ "searchValue":"", "sfwc":[], "sfbx":[] }',
        query: '{ "searchValue":""}',
        order: JSON.stringify([{
          code: 'xxsj',
          sort: 'asc'
        }])
    },

    onSelect1(item) {
    	if(this.active==0){
    		this.show1 = false;
      	this.parms1.choose1 = item.name;
      	
        let query = this.form1.query;
	      if (dsf.type(query) == 'string') {
	        query = JSON.parse(query)
	      }
	      if (item.value == '') {
	        delete query.sfwc_value
	      } else {
	        query.sfwc_value = [item.value];
	      }
	      this.form1.query = JSON.stringify(query);
	      this.$refs['as' + this.active].reset()
    	}else if(this.active==1){
    		this.show1 = false;
      	this.parms2.choose1 = item.name;
      	
      	let query = this.form2.query;
	      if (dsf.type(query) == 'string') {
	        query = JSON.parse(query)
	      }
	      if (item.value == '') {
	        delete query.sfwc
	      } else {
	        query.sfwc = [item.value];
	      }
	      this.form2.query = JSON.stringify(query);
	      this.$refs['as' + this.active].reset()
      	
    	}
    },
    onscreen1(who) {
      let _this = this;
      if (_this[who] == 'desc') {
        _this[who] = 'asc';
      } else {
        _this[who] = 'desc';
      }
      this.istime1 = (this.istime1 == true ? false : true);
      this.queryOrder();
    },
    queryOrder() {
    	if(this.active==0){
    		this.form1.order = JSON.stringify([{
    		  code: 'xxsj',
    		  sort: this.xxsj1
    		}])
    	}else if(this.active==1){
    		this.form2.order = JSON.stringify([{
    		  code: 'xxsj',
    		  sort: this.xxsj2
    		}])
    	}
      this.$refs['as' + this.active].reset()
    }

子页面

reset() {
      console.log('课程列表');
      this.$refs.dsfDatagrid.query();
    },

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值