BUG 28274

This commit is contained in:
aixianling
2022-03-16 18:23:15 +08:00
parent 3feb255563
commit 0ab14fb757

View File

@@ -23,17 +23,19 @@
<i>{{ item.diffNum || 0 }}</i>
<span></span>
</div>
<div class="item-bottom__right" hover-class="text-hover" v-if="item.today === '0'" @click.stop="$linkTo('./AddReport?id=' + item.id)">
<div class="item-bottom__right" hover-class="text-hover" v-if="item.today === '0'"
@click.stop="$linkTo('./AddReport?id=' + item.id)">
<span style="color: #FF883C">今日未上报</span>
<u-icon name="arrow-right" color="#ddd"/>
</div>
<div class="item-bottom__right" hover-class="text-hover" v-else @click.stop="$linkTo('./RecordList?id=' + item.id)">
<div class="item-bottom__right" hover-class="text-hover" v-else
@click.stop="$linkTo('./RecordList?id=' + item.id)">
<span style="color: #999999">今日已上报</span>
<u-icon name="arrow-right" color="#ddd"/>
</div>
</div>
</div>
<AiEmpty v-if="!list.length && !isMore"/>
<AiEmpty v-if="list.length==0"/>
</div>
<div class="btn-wrapper">
<div class="btn" @click="toReport" hover-class="text-hover">添加上报人员</div>
@@ -42,184 +44,180 @@
</template>
<script>
import { mapState } from 'vuex'
export default {
name:"AppHealthReport",
appName:"健康上报",
data () {
return {
list: [],
pageShow: false,
current: 1,
total: 0,
isMore: false
}
},
import {mapState} from 'vuex'
computed: {
...mapState(['user'])
},
export default {
name: "AppHealthReport",
appName: "健康上报",
data() {
return {
list: [],
pageShow: false,
current: 1,
total: 0,
}
},
onLoad () {
this.$loading()
this.$dict.load(['villageActivityStatus']).then(() => {
computed: {
...mapState(['user'])
},
onLoad() {
this.$loading()
this.$dict.load(['villageActivityStatus']).then(() => {
this.getList()
})
uni.$on('update', () => {
this.current = 1
this.$nextTick(() => {
this.getList()
})
})
},
uni.$on('update', () => {
this.current = 1
this.isMore = false
this.$nextTick(() => {
this.getList()
})
})
methods: {
toReport() {
this.$linkTo('./AddUser')
},
methods: {
toReport () {
this.$linkTo('./AddUser')
},
getList() {
getList() {
if (this.isMore) return
this.$instance.post(`/app/appepidemicreportmember/list?openId=${this.user.openId}`, null, {
params: {
current: this.current,
size: 15
}
}).then(res => {
if (res.code == 0) {
this.total = res.data.total
if (this.current > 1) {
this.list = [...this.list, ...res.data.records]
} else {
this.list = res.data.records
}
uni.hideLoading()
this.pageShow = true
if (res.data.records.length < 15) {
this.isMore = true
return false
}
this.current = this.current + 1
this.$instance.post(`/app/appepidemicreportmember/list?openId=${this.user.openId}`, null, {
params: {
current: this.current,
size: 15
}
}).then(res => {
if (res.code == 0) {
this.total = res.data.total
if (this.current > 1) {
this.list = [...this.list, ...res.data.records]
} else {
uni.hideLoading()
this.list = res.data.records
}
}).catch(() => {
uni.hideLoading()
})
}
},
this.pageShow = true
if (res.data.records.length < 15) {
onReachBottom() {
this.getList()
return false
}
this.current = this.current + 1
} else {
uni.hideLoading()
}
}).catch(() => {
uni.hideLoading()
})
}
},
onReachBottom() {
this.getList()
}
}
</script>
<style lang="scss" socped>
.returnHomeRegister {
padding: 0 0 150px 0;
.returnHomeRegister {
padding: 0 0 150px 0;
.title {
.title {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 32px;
padding: 48px 32px 0 32px;
& > h2 {
font-size: 38px;
color: #333;
font-weight: 600;
}
.right {
display: flex;
align-items: center;
span {
color: #666666;
font-size: 28px;
}
i {
color: #4181FF;
font-style: normal;
font-size: 28px;
}
}
}
.item {
margin: 0 32px 24px;
border-radius: 16px;
background: #fff;
.item-top {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 32px;
padding: 48px 32px 0 32px;
height: 152px;
padding: 0 32px;
border-bottom: 1px solid #DDDDDD;
& > h2 {
font-size: 38px;
color: #333;
font-weight: 600;
.item-top__left {
h2 {
line-height: 44px;
margin-bottom: 8px;
color: #333;
font-size: 32px;
font-weight: 600;
}
p {
color: #999999;
font-size: 26px;
}
}
.right {
display: flex;
align-items: center;
& > span {
font-size: 26px;
color: #FF4466;
}
}
.item-bottom {
display: flex;
align-items: center;
justify-content: space-between;
height: 104px;
padding: 0 32px;
.item-bottom__right {
span {
color: #666666;
color: #999999;
font-size: 28px;
}
}
.item-bottom__left {
span {
color: #999999;
font-size: 28px;
}
i {
color: #4181FF;
font-style: normal;
font-size: 28px;
}
}
}
.item {
margin: 0 32px 24px;
border-radius: 16px;
background: #fff;
.item-top {
& > div {
display: flex;
align-items: center;
justify-content: space-between;
height: 152px;
padding: 0 32px;
border-bottom: 1px solid #DDDDDD;
.item-top__left {
h2 {
line-height: 44px;
margin-bottom: 8px;
color: #333;
font-size: 32px;
font-weight: 600;
}
p {
color: #999999;
font-size: 26px;
}
}
& > span {
font-size: 26px;
color: #FF4466;
}
}
.item-bottom {
display: flex;
align-items: center;
justify-content: space-between;
height: 104px;
padding: 0 32px;
.item-bottom__right {
span {
color: #999999;
font-size: 28px;
}
}
.item-bottom__left {
span {
color: #999999;
font-size: 28px;
}
i {
color: #4181FF;
font-size: 28px;
}
}
& > div {
display: flex;
align-items: center;
}
}
}
}
}
</style>