This commit is contained in:
花有清香月有阴
2022-01-06 14:35:07 +08:00
parent 0e5fe85948
commit 2de7716506

View File

@@ -3,14 +3,19 @@
<AiTopFixed> <AiTopFixed>
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs> <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
<div class="select-top"> <div class="select-top">
<div class="tab-item"> <div class="tab-item" @click="toGirdList">
<span class="color-666">所属网格</span> <span class="color-666">所属网格</span>
<img src="./components/img/down-icon.png" alt=""> <img src="./components/img/down-icon.png" alt="" />
</div> </div>
<div class="tab-item">
<u-select v-model="show" :list="myGirdList" @confirm="confirm"></u-select>
<div class="tab-item" @click="showType = true">
<span class="color-666">办件状态</span> <span class="color-666">办件状态</span>
<img src="./components/img/down-icon.png" alt=""> <img src="./components/img/down-icon.png" alt="" />
</div> </div>
<u-select v-model="showType" :list="listType" value-name="dictValue" label-name="dictName" @confirm="confirm"></u-select>
</div> </div>
</AiTopFixed> </AiTopFixed>
@@ -18,22 +23,24 @@
<AiCard v-for="(item, i) in datas" :key="i" @click.native="goDetail(item, 1)"> <AiCard v-for="(item, i) in datas" :key="i" @click.native="goDetail(item, 1)">
<template #custom> <template #custom>
<div class="card-top"> <div class="card-top">
<div class="titles">世纪花园南区一号楼前面因没有排水渠道多世纪花园南区一号楼前面因没有排水渠道多世纪花园南区一号楼前面因没有排水渠道</div> <div class="titles">{{ item.groupName }}</div>
<div class="types"> <div class="types">
<span>事件类型</span> <span>事件类型</span>
<span class="types-right">矛盾纠纷</span> <span class="types-right">{{ item.groupName }}</span>
</div> </div>
<div class="gards"> <div class="gards">
<span>所属网格</span> <span>所属网格</span>
<span class="gards-right">04号网格</span> <span class="gards-right">{{ item.girdName }}</span>
</div> </div>
</div> </div>
<div class="status status0"> <div class="status" :class="item.eventStatus == 0 ? 'status0' : item.eventStatus == 1 ? 'status1' : item.eventStatus == 2 ? 'status2' : 'status3'" v-if="item.eventStatus">
<span class="icon"></span> <span class="icon"></span>
<span>待处理</span> <span>
{{ $dict.getLabel('clapEventStatus', item.eventStatus) }}
</span>
</div> </div>
</template> </template>
</AiCard> </AiCard>
@@ -72,6 +79,14 @@ export default {
current: 1, current: 1,
size: 10, size: 10,
pages: 0, pages: 0,
show: false,
myGirdList: [],
girdId: '',
showType: false,
listType: [],
eventStatus: '',
} }
}, },
computed: { computed: {
@@ -80,43 +95,91 @@ export default {
}, },
}, },
mounted() { mounted() {
console.log(12) this.$dict.load('clapEventStatus').then(() => {
this.getList()
this.listType = this.$dict.getDict('clapEventStatus')
})
this.current = 1 this.current = 1
this.getList() this.getList()
uni.$on('nextList', () => { uni.$on('nextList', () => {
this.current ++ this.current++
this.getList() this.getList()
}) })
}, },
methods: { methods: {
getList() { getList() {
this.$http this.$http
.post('/app/appvisitvondolence/list', null, { .post(`/app/appclapeventinfo/listByGirdMember`, null, {
params: { params: {
size: 10, size: 10,
current: this.current, current: this.current,
createUserId: this.currentTabs == 1 ? this.user.id : '', searchType: this.currentTabs == 1 ? '1' : '0',
eventStatus: this.eventStatus,
}, },
}) })
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records console.log(res.data)
this.pages = res.data.pages // this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
// this.pages = res.data.pages
} }
}) })
}, },
toGirdList() {
this.show = true
this.girdList()
},
girdList() {
this.$http
.post(`/app/appgirdmemberinfo/queryMyGirdList`, null, {
params: {
size: 9999,
},
})
.then((res) => {
if (res.code == 0) {
console.log(res.data)
this.myGirdList = res.data
}
})
},
confirm(e) {
if (this.show) {
if (e[0].value) {
console.log(e)
this.girdId = e[0].value
this.current = 1
this.getList()
}
}
if (this.showType) {
console.log(e)
this.eventStatus = e[0].value
this.current = 1
this.getList()
}
},
goDetail(item) { goDetail(item) {
uni.navigateTo({ url: `./Detail?id=${item.id}` }) uni.navigateTo({ url: `./Detail?id=${item.id}` })
}, },
change(index) { change(index) {
this.current = 1
this.datas = []
this.currentTabs = index this.currentTabs = index
this.getList() this.getList()
}, },
linkTo(url) { linkTo(url) {
uni.navigateTo({url}) uni.navigateTo({ url })
} },
}, },
onReachBottom() { onReachBottom() {
this.current = this.current + 1 this.current = this.current + 1
@@ -135,14 +198,14 @@ uni-page-body {
background: #fff; background: #fff;
display: flex; display: flex;
padding: 24px 0; padding: 24px 0;
.tab-item{ .tab-item {
flex: 1; flex: 1;
text-align: center; text-align: center;
line-height: 48px; line-height: 48px;
font-size: 26px; font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
color: #666; color: #666;
img{ img {
width: 32px; width: 32px;
height: 32px; height: 32px;
margin-left: 8px; margin-left: 8px;
@@ -153,7 +216,7 @@ uni-page-body {
border-right: 1px solid #eee; border-right: 1px solid #eee;
} }
} }
::v-deep .AiTopFixed .content{ ::v-deep .AiTopFixed .content {
padding: 0; padding: 0;
} }
::v-deep .AiCard { ::v-deep .AiCard {
@@ -233,7 +296,7 @@ uni-page-body {
// ::v-deep .AiCard:last-child { // ::v-deep .AiCard:last-child {
// padding-bottom: 24px; // padding-bottom: 24px;
// } // }
.pad-b120{ .pad-b120 {
background-color: #f3f6f9; background-color: #f3f6f9;
padding-bottom: 120px; padding-bottom: 120px;
} }