Files
dvcp_v2_wechat_app/src/mods/AppServiceOnlineNew/list.vue

126 lines
2.6 KiB
Vue
Raw Normal View History

2022-02-17 11:13:43 +08:00
<template>
<div class="service">
<div class="service-list">
2022-03-07 16:12:34 +08:00
<div class="service-item" hover-class="bg-hover" @click="toDetail('./notice?id=' + item.id)" v-for="(item, index) in list" :key="index">
2022-02-17 11:13:43 +08:00
<div class="service-item__wrapper">
<h2>{{ item.processName }}</h2>
<i class="iconfont">&#xe6ae;</i>
</div>
</div>
</div>
2022-02-28 09:11:04 +08:00
<!-- <u-loadmore :status="loadingStatus" :margin-top="30" :margin-bottom="30" color="#999" font-size="26" /> -->
2022-02-17 11:13:43 +08:00
</div>
</template>
<script>
export default {
2022-03-07 16:20:34 +08:00
name: 'list',
2022-02-17 11:13:43 +08:00
data() {
return {
id: '',
title: '',
subTitle: '',
current: 0,
list: [],
2022-02-28 09:11:04 +08:00
// loadingStatus: 'loadmore',
2022-02-17 11:13:43 +08:00
}
},
onLoad(query) {
this.id = query.id
this.getList()
uni.setNavigationBarTitle({
title: query.title,
})
},
methods: {
getList() {
2022-02-28 09:11:04 +08:00
// this.loadingStatus = 'loading'
2022-02-17 11:13:43 +08:00
this.$instance
.post(`/app/approval-process-def/list-xcx?processType=0`, null, {
params: {
size: 10000,
classificationId: this.id,
},
withoutToken: true,
})
.then((res) => {
if (res.code === 0) {
2022-02-28 09:11:04 +08:00
// if (!res.data.records.length) {
// this.loadingStatus = 'nomore'
// return false
// }
2022-02-17 11:13:43 +08:00
const data = res.data.records.map((item) => {
return item
})
if (this.current === 0) this.list = []
this.list.push(...data)
this.current = this.current + 1
2022-02-28 09:11:04 +08:00
// this.loadingStatus = 'loadmore'
2022-02-17 11:13:43 +08:00
2022-02-28 09:11:04 +08:00
// if (this.list.length < 10) {
// this.loadingStatus = 'nomore'
// }
2022-02-17 11:13:43 +08:00
}
})
},
toDetail(url) {
this.$linkTo(url)
},
},
onReachBottom() {
this.getList()
},
}
</script>
<style scoped lang="scss">
.service {
padding-bottom: 40px;
}
.service-list {
background-color: #fff;
.service-item {
height: 116px;
padding: 0 32px;
&:last-child {
.service-item__wrapper {
border-bottom: none;
}
}
.service-item__wrapper {
display: flex;
align-items: center;
justify-content: space-between;
height: 116px;
border-bottom: 1px solid #d8dde6;
h2 {
color: #333333;
font-size: 32px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
i {
position: relative;
right: -4px;
font-size: 36px;
color: #c9c9cd;
}
}
}
}
</style>