jf
This commit is contained in:
@@ -7,28 +7,27 @@
|
||||
|
||||
<!-- 全部 -->
|
||||
<div v-if="tabIndex == 0">
|
||||
<div class="search-box">
|
||||
<div class="integral-types" @click="showType = true">话题类型<u-icon name="arrow-down"></u-icon></div>
|
||||
<u-search placeholder="请输入关键字" v-model="keyword" :show-action="false"></u-search>
|
||||
<div class="search-box" v-if="tabIndex==0">
|
||||
<div class="integral-types" @click="showType = true">{{ topicType? topicType:'话题类型' }}<u-icon name="arrow-down"></u-icon></div>
|
||||
<u-search placeholder="请输入关键字" v-model="content" :show-action="false" @search="getList()" @clear="getList()"></u-search>
|
||||
</div>
|
||||
|
||||
<div class="card-list">
|
||||
<div class="card-item" @click="toDetail">
|
||||
<div class="card-title">阳光美丽,空气格外清新</div>
|
||||
<div class="card-list" v-if="villagerList.length">
|
||||
<div class="card-item" v-for="(item,index) in villagerList" :key="index" @click="toDetail(item)">
|
||||
<div class="card-title">{{ item.content }}</div>
|
||||
<div class="card-name">
|
||||
<div class="name">发布信息</div>
|
||||
<div class="name">美丽庭院</div>
|
||||
<div class="time">2021-12-06</div>
|
||||
<div class="name">{{$dict.getLabel('villagerCircleTopic',item.topic)}}</div>
|
||||
<div class="time">{{ item.createTime }}</div>
|
||||
</div>
|
||||
<div class="card-type">
|
||||
<div class="type">审核通过</div>
|
||||
<div class="type">{{$dict.getLabel('auditStatus',item.auditType)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty description="暂无数据" class="emptyWrap"></AiEmpty>
|
||||
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
|
||||
|
||||
<!-- $dict.getDict('yesOrNo') -->
|
||||
<u-select v-model="showType" :list="typeList" label-name="dictName" value-name="dictValue"
|
||||
<u-select v-model="showType" :list="$dict.getDict('villagerCircleTopic')" label-name="dictName" value-name="dictValue"
|
||||
@confirm="confirmTypeSelect"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,34 +40,56 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
tabs: ['全部', '待处理', '已处理'],
|
||||
tabIndex: 0,
|
||||
tabIndex: '',
|
||||
showType: false,
|
||||
keyword: '',
|
||||
content: '',
|
||||
typeList: [],
|
||||
|
||||
villagerList: [],
|
||||
current: 1,
|
||||
topic: '',
|
||||
topicType: '',
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.$dict.load('villagerCircleTopic','auditStatus').then(()=>{
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
tabClick(index) {
|
||||
this.tabIndex = index
|
||||
},
|
||||
|
||||
confirmTypeSelect(e) {
|
||||
console.log(e);
|
||||
getList() {
|
||||
this.$http.post('app/appvillagercircleinfo/list',null,{
|
||||
params: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
status: this.tabIndex==0? '':this.tabIndex==1?'0': this.tabIndex==2?'1|2':'',
|
||||
topic: this.topic,
|
||||
content: this.content
|
||||
}
|
||||
}).then(res=>{
|
||||
if(res?.data) {
|
||||
this.villagerList = this.current >1 ? [...this.villagerList,...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toDetail() {
|
||||
uni.navigateTo({url: './detail'})
|
||||
confirmTypeSelect(e) {
|
||||
this.topic = e[0].value,
|
||||
this.topicType = e[0].label
|
||||
this.current = 1,
|
||||
this.villagerList = []
|
||||
this.getList()
|
||||
},
|
||||
|
||||
toDetail(item) {
|
||||
uni.navigateTo({url: `./detail?id=${item.id}`})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = '村民圈'
|
||||
},
|
||||
onLoad() {
|
||||
// this.$dict.load('yesOrNo')
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -153,7 +174,7 @@ export default {
|
||||
color: #999999;
|
||||
|
||||
.name {
|
||||
padding: 0 30px;
|
||||
padding: 0 15px;
|
||||
background: #EEEEEE;
|
||||
border-radius: 24px;
|
||||
margin-right: 20px;
|
||||
|
||||
Reference in New Issue
Block a user