This commit is contained in:
花有清香月有阴
2022-02-11 17:25:55 +08:00
parent e93aec9f7d
commit f20839083e
2 changed files with 175 additions and 11 deletions

View File

@@ -41,7 +41,13 @@
</div>
</template>
</AiCard>
<div class="addbtn" @click="addEvent">新增事件</div>
<div class="addbtn">
<div class="myreport" @click="linkTo('./myReply')">我的上报</div>
<div class="add" @click="addEvent">新增事件</div>
</div>
<AiEmpty v-if="!datas.length"></AiEmpty>
</template>
@@ -140,7 +146,6 @@ export default {
searchType: this.currentTabs == 1 ? '1' : '0',
eventStatus: this.eventStatus,
girdId: this.girdId,
openId: this.eventStatus == 4 ? this.user.openId : '',
},
})
.then((res) => {
@@ -407,9 +412,21 @@ uni-page-body {
height: 120px;
line-height: 120px;
text-align: center;
background-color: #3975c6;
font-size: 32px;
color: #ffffff;
display: flex;
align-items: center;
box-shadow: inset 0px 1px 0px 0px #dddddd;
z-index: 999;
.myreport {
background-color: #ffffff;
width: 40%;
color: #333;
}
.add {
background-color: #3975c6;
width: 60%;
color: #ffffff;
}
}
.pad-b120 {

View File

@@ -1,25 +1,172 @@
<template>
<div class="myReply">1</div>
<div class="myReply">
<template>
<AiCard v-for="(item, i) in datas" :key="i" @click.native="goDetail(item, 1)">
<template #custom>
<div class="card-top">
<div class="titles">{{ item.content }}</div>
<div class="types">
<span class="label label1">事件类型</span>
<span class="types-right">{{ item.groupName }}</span>
</div>
<div class="gards gird">
<div class="label">所属网格</div>
<div class="gards-right">{{ item.girdName }}</div>
</div>
</div>
<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>
{{ $dict.getLabel('clapEventStatus', item.eventStatus) }}
</span>
</div>
</template>
</AiCard>
<AiEmpty v-if="!datas.length"></AiEmpty>
</template>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'myReply',
components: {},
props: {},
data() {
return {}
return {
datas: [],
current: 1,
}
},
computed: {
...mapState(['user']),
},
computed: {},
watch: {},
onLoad() {},
onShow() {},
methods: {},
onLoad() {
this.getList()
},
onShow() {
document.title = '我的上报'
},
methods: {
getList() {
this.$http
.post(`/app/appclapeventinfo/listByGirdMember`, null, {
params: {
size: 10,
current: this.current,
openId: this.user.openId,
},
})
.then((res) => {
if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.pages = res.data.pages
this.$forceUpdate()
}
})
},
goDetail(item) {
uni.navigateTo({ url: `./detail?id=${item.id}` })
},
},
}
</script>
<style scoped lang="scss">
.myReply {
.uni-page-body {
height: 100%;
}
.myReply {
height: 100%;
::v-deep .AiTopFixed .content {
padding: 0;
}
::v-deep .AiCard {
background: none;
padding: 24px 30px 0;
.start {
background: #fff;
border-radius: 16px;
.card-top {
padding: 32px;
.titles {
margin-bottom: 34px;
font-size: 32px;
font-weight: 500;
color: #333333;
line-height: 1.4;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.types,
.gards {
margin-top: 8px;
font-size: 26px;
.types-right,
.gards-right {
margin-left: 32px;
color: #333333;
}
.label1 {
margin-right: 12px;
}
}
}
.status {
padding: 32px;
border-top: 1px solid #dddddd;
.icon {
display: inline-block;
width: 8px;
height: 8px;
vertical-align: middle;
margin-right: 8px;
}
}
.status0 {
color: #ff883c;
.icon {
background: #ff883c;
}
}
.status1 {
color: #1aaaff;
.icon {
background: #1aaaff;
}
}
.status2 {
color: #42d784;
.icon {
background: #42d784;
}
}
.status3 {
color: #ff4466;
.icon {
background: #ff4466;
}
}
}
}
}
</style>