|
@ -1,40 +1,21 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="search-list"> |
|
|
<div class="search-list"> |
|
|
<span style="height: 28px; line-height: 28px; font-size: 20px; font-weight: bold; color: rgba(0, 0, 0, 0.85)">栏目:</span> |
|
|
<span style="height: 28px; line-height: 28px; font-size: 20px; font-weight: bold; color: rgba(0, 0, 0, 0.85)">栏目:</span> |
|
|
<!-- <a-select allow-clear style="width: 120px" @change="handleChange"> |
|
|
<a-checkbox-group @change="handleChange"> |
|
|
<a-select-option v-for="(item, index) in bannerList" :key="index" :value="index + 1"> {{ item }} </a-select-option> |
|
|
<a-checkbox v-for="(item, index) in bannerList" :key="index" :value="index + 1"> |
|
|
</a-select> --> |
|
|
{{ item }} |
|
|
<span |
|
|
</a-checkbox> |
|
|
class="ban-style" |
|
|
</a-checkbox-group> |
|
|
:class="bannerNum === index + 1 ? 'ban-act' : ''" |
|
|
|
|
|
@click="onClick(index)" |
|
|
|
|
|
v-for="(item, index) in bannerList" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
> |
|
|
|
|
|
{{ item }} |
|
|
|
|
|
</span> |
|
|
|
|
|
<br /> |
|
|
<br /> |
|
|
<span style="font-size: 20px; font-weight: bold; color: rgba(0, 0, 0, 0.85)">类型:</span> |
|
|
<span style="font-size: 20px; font-weight: bold; color: rgba(0, 0, 0, 0.85)">类型:</span> |
|
|
<span |
|
|
<a-radio-group @change="handleChange1"> |
|
|
class="ban-style" |
|
|
<a-radio v-for="(item, index) in typeList" :key="index" :value="index + 1">{{ item }}</a-radio> |
|
|
:class="typeNum === index + 1 ? 'ban-act' : ''" |
|
|
</a-radio-group> |
|
|
@click="onClick1(index)" |
|
|
|
|
|
v-for="(item, index) in typeList" |
|
|
|
|
|
:key="index + 10" |
|
|
|
|
|
> |
|
|
|
|
|
{{ item }} |
|
|
|
|
|
</span> |
|
|
|
|
|
<br /> |
|
|
<br /> |
|
|
<span style="font-size: 20px; font-weight: bold; color: rgba(0, 0, 0, 0.85)">时间:</span> |
|
|
<span style="font-size: 20px; font-weight: bold; color: rgba(0, 0, 0, 0.85)">时间:</span> |
|
|
<span |
|
|
<a-radio-group @change="handleChange2"> |
|
|
class="ban-style" |
|
|
<a-radio v-for="(item, index) in timeList" :key="index" :value="index + 1">{{ item }}</a-radio> |
|
|
:class="timeNum === index + 1 ? 'ban-act' : ''" |
|
|
</a-radio-group> |
|
|
@click="onClick2(index)" |
|
|
|
|
|
v-for="(item, index) in timeList" |
|
|
|
|
|
:key="item" |
|
|
|
|
|
> |
|
|
|
|
|
{{ item }} |
|
|
|
|
|
</span> |
|
|
|
|
|
<a-input placeholder="搜索标题..." class="search-ipt" allow-clear style="width: 30%" v-model="titleText" /> |
|
|
<a-input placeholder="搜索标题..." class="search-ipt" allow-clear style="width: 30%" v-model="titleText" /> |
|
|
<a-button class="search-btn" type="primary" @click="submit">搜索</a-button> |
|
|
<a-button class="search-btn" type="primary" @click="submit">搜索</a-button> |
|
|
</div> |
|
|
</div> |
|
@ -45,12 +26,12 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
typeList: ['视频', '音频', '文档', '全部'], |
|
|
typeList: ['视频', '音频', '文档', '全部'], |
|
|
typeNum: 0, |
|
|
typeNum: '', |
|
|
bannerList: ['栏目1', '栏目2', '栏目3', '全部'], |
|
|
bannerList: ['栏目1', '栏目2', '栏目3'], |
|
|
bannerNum: 0, |
|
|
bannerNum: [], |
|
|
titleText: '', |
|
|
titleText: '', |
|
|
timeList: ['近七天', '近一个月', '近一年', '全部'], |
|
|
timeList: ['近七天', '近一个月', '近一年', '全部'], |
|
|
timeNum: 0, |
|
|
timeNum: '', |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
@ -64,39 +45,18 @@ export default { |
|
|
this.$emit('getData', getParam); |
|
|
this.$emit('getData', getParam); |
|
|
}, |
|
|
}, |
|
|
handleChange(e) { |
|
|
handleChange(e) { |
|
|
if (e) { |
|
|
this.bannerNum = e; |
|
|
this.bannerNum = e; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.bannerNum = ''; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
handleChange1(e) { |
|
|
handleChange1(e) { |
|
|
if (e) { |
|
|
console.log(e.target.value); |
|
|
this.typeNum = e; |
|
|
if (e.target.value < 4) { |
|
|
|
|
|
this.typeNum = e.target.value; |
|
|
} else { |
|
|
} else { |
|
|
this.typeNum = ''; |
|
|
this.typeNum = ''; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onClick1(index) { |
|
|
handleChange2(e) { |
|
|
if (index + 1 === this.typeNum) { |
|
|
console.log(e.target.value); |
|
|
this.typeNum = 0; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.typeNum = index + 1; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
onClick(index) { |
|
|
|
|
|
if (index + 1 === this.bannerNum) { |
|
|
|
|
|
this.bannerNum = 0; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.bannerNum = index + 1; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
onClick2(index) { |
|
|
|
|
|
if (index + 1 === this.timeNum) { |
|
|
|
|
|
this.timeNum = 0; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.timeNum = index + 1; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|