搜索刷新内容
下拉切换时(一般用于最新,最热,时间)刷新内容
<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();
},