课程清除筛选

This commit is contained in:
lmj
2022-11-30 14:24:57 +08:00
parent c25923c532
commit 749c14add2
2 changed files with 40 additions and 4 deletions

View File

@@ -1,8 +1,9 @@
<template> <template>
<view> <view>
<view @click="showFilter()" style="line-height: 34upx;height: 35upx;padding-right: 40upx;font-size: 32upx;"> <view style="line-height: 34upx;height: 35upx;padding-right: 40upx;font-size: 32upx;">
<!-- <text style="color: #666;font-size: 30rpx;">筛选</text> --> <!-- <text style="color: #666;font-size: 30rpx;">筛选</text> -->
<image src="../../static/images/filter.png" style="width: 36upx;height: 36upx;vertical-align: middle;"></image> <image @click="showFilter()" src="../../static/images/filter.png" style="width: 36upx;height: 36upx;vertical-align: middle;"></image>
<text class="clearsift" @click="clearsf()">清除筛选</text>
</view> </view>
<!-- ${filterWidth} --> <!-- ${filterWidth} -->
<u-popup :show="filterShow" mode="center" @close="closeFilter" :safeAreaInsetTop="true" :closeable="false"> <u-popup :show="filterShow" mode="center" @close="closeFilter" :safeAreaInsetTop="true" :closeable="false">
@@ -193,6 +194,35 @@
} }
}, },
methods:{ methods:{
clearsf(){
if(this.type==1){//生成课程查询条件
let params={
pageIndex:1,
pageSize:20,
name:'',
keyword:'',
publish:true,
device:2,
type:'',
sysType1:'',
sysType2:'',
sysType3:'',
scenes:'',
orderField:'',
orderAsc:false,
cateName:''
}
this.$emit('submit',this.filterTags,params);
}
this.course.sysType1 = '';
this.course.sysType2 = '';
this.course.sysType3 = '';
this.course.orderType = -1;
this.course.courseType = -1;
this.course.scenes = [];
console.log('清除成功')
},
stopRoll(){}, stopRoll(){},
toNewLink(){ toNewLink(){
location.href='https://m.qingxuetang.com/x/?appId=qxtcorp306130'; location.href='https://m.qingxuetang.com/x/?appId=qxtcorp306130';
@@ -391,6 +421,11 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.clearsift{
font-size: 24upx;
color: #666;
margin-left: 5upx;
}
/deep/ .u-popup__content{ /deep/ .u-popup__content{
width: 100%; width: 100%;

View File

@@ -38,10 +38,11 @@
</view> </view>
</view> </view>
<view style="line-height: 40upx;height: 40upx; padding-top: 14upx;font-size: 16px; "> <view style="line-height: 40upx;height: 40upx; padding-top: 14upx;font-size: 16px; ">
<data-filter v-if="conType == 1" filterWidth="100%" :noOrder="false" :type="conType" @reset="resetFilters" @submit="submitFilters"></data-filter> <data-filter v-if="conType == 1" filterWidth="100%" :noOrder="false" :type="conType" @reset="resetFilters" @submit="submitFilters"></data-filter>
</view> </view>
</view> </view>
<view class="" v-show="conType == 0"> <view class="" v-show="conType == 0">
<recommend-index></recommend-index> <recommend-index></recommend-index>
</view> </view>