123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- <template>
- <view class="content">
- <view class="header">
- <view>
- <text>2021-03-15至2021-06-02</text>
- <u-image @click="openScreen=true" class="filter-img" width="36rpx" height="36rpx" src="/static/filter.png"></u-image>
- </view>
- <text>总计:其它垃圾2000,厨余垃圾1000,建筑垃圾0。</text>
- </view>
- <scroll-view class="scroll-con" :scroll-top="scrollTop" scroll-y @scrolltolower="onreachBottom">
-
- <view class="cell-item" v-for="item in listdata">
- <view class="cell-item-title" >
- <view>
- <text>2020-02-23 15:12:30</text>
- </view>
- <view>
- <span>查看详情</span>
- <u-icon name="arrow-right" size="28"></u-icon>
- </view>
- </view>
- <view class="cell-item-cont">
- <view class="cont-item">
- <text>其它垃圾</text>
- <text>1000kg</text>
- </view>
- <view class="cont-item">
- <text>厨余垃圾</text>
- <text>1000kg</text>
- </view>
- <view class="cont-item">
- <text>建筑垃圾</text>
- <text>1000kg</text>
- </view>
- </view>
- </view>
- <view class="nodata" v-if="listdata.length==0 && status!='loading'">
- <u-empty :text="noDataText" mode="list"></u-empty>
- </view>
- <view class="loadmore">
- <u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
- </view>
- </scroll-view>
- <view class="footer">
- <u-icon name="edit-pen" size="30"></u-icon>
- <text>垃圾数据录入</text>
- </view>
-
- <search-modal v-if="openScreen" :visible="openScreen" :defaultParams="searchForm" @refresh="refresh" @close="openScreen=false"></search-modal>
- </view>
- </template>
- <script>
- import searchModal from './searchModal.vue'
- export default {
- components: { searchModal },
- data() {
- return {
- listdata: [{},{},{},{}],
- pageNo: 1,
- pageSize: 10,
- total: 0,
- noDataText: '暂无数据',
- status: 'loadmore',
- openScreen: false,
- searchForm: {
- beginDate: '',
- endDate: '',
- },
- scrollTop: 0,
- }
- },
- onLoad() {
-
- },
- onUnload() {
-
- },
- onShareAppMessage(res) {
- },
- onShareTimeline(res) {
- },
- onShow() {
- },
- methods: {
-
- refresh(params){
- this.searchForm = params
-
- this.total = 0
- this.searchHandle(1)
- },
-
- searchHandle (pageNo) {
-
- pageNo ? this.pageNo = pageNo : null
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- },
-
- onreachBottom() {
- console.log(111111)
- if(this.listdata.length < this.total){
- this.pageNo += 1
-
- }else{
- uni.showToast({ title: '已经到底了', icon: 'none' })
- this.status = "nomore"
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .content {
- width: 100%;
- height: 100vh;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- .header{
- background-color: #FFFFFF;
- display: flex;
- flex-direction: column;
- border-radius: 15upx;
- padding: 20upx;
- box-shadow: 0upx 3upx 6upx #eee;
- margin-bottom: 20upx;
- > text {
- line-height: 50upx;
- }
- :first-child {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .filter-img{
- padding: 10upx;
- }
- }
- .scroll-con{
- flex: 1;
- width: 100%;
- -webkit-box-flex:1;
- -webkit-flex:1;
- -ms-flex:1;
- overflow: auto;
- .cell-item{
- width: 100%;
- background-color: #fff;
- border-radius: 15upx;
- // padding: 20upx;
- box-shadow: 0upx 3upx 6upx #eee;
- .cell-item-title{
- padding: 20upx 20upx 10upx;
- width: 100%;
- display: flex;
- justify-content: space-between;
- border-bottom: 1px solid #e6e6e6;
- }
- .cell-item-cont{
- width: 100%;
- display: flex;
- justify-content: space-between;
- padding: 20upx;
- margin-bottom: 20upx;
- .cont-item{
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 33%;
- border-right: 1px solid #e6e6e6;
- :first-child {
- padding: 26upx;
- width: 100upx;
- height: 100upx;
- background-color: red;
- border-radius: 50%;
- font-size: 24upx;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #fff;
- }
- }
- :last-child {
- border: none;
- }
- }
- }
- }
- .footer{
- z-index: 9999;
- position: fixed;
- bottom: 80upx;
- width: 80%;
- height: 80upx;
- background-color: red;
- opacity: 0.8;
- border-radius: 40upx;
- color: #fff;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- </style>
|