<template>
|
<view class="container">
|
<z-paging ref="paging" v-model="dataList" @query="queryList" :refresher-enabled="false"
|
loading-more-no-more-text="没有更多了" :hide-empty-view="true">
|
<view class="list">
|
<view class="list-item bgc-ff mb-20" v-for="item in dataList" :key="item.id" @click="pushPage(item.id)">
|
<view class="item-title flex a-i-c j-c-s-b mb-20">
|
<text class="f-32 fw">{{item.name}}</text>
|
</view>
|
<view class="item-row flex a-i-c j-c-s-b">
|
<text class="f-28">时间</text>
|
<text class="f-28 c-66">{{ item.createTime }}</text>
|
</view>
|
<view class="item-row flex a-i-c j-c-s-b">
|
<text class="f-28">地址</text>
|
<text class="address f-28 c-66">{{ item.address}}</text>
|
</view>
|
</view>
|
</view>
|
</z-paging>
|
<view v-if="!dataList.length">
|
<u-empty marginTop="50%" mode="list"></u-empty>
|
</view>
|
|
<!-- <u-loading-page :loading="loadingPage"></u-loading-page>
|
<u-loading-icon :show="loadingIcon"></u-loading-icon> -->
|
</view>
|
</template>
|
|
<script>
|
import {
|
getWorkLogList
|
} from "@/api/workLog/workLog.js"
|
export default {
|
data() {
|
return {
|
dataList: [],
|
page: {
|
current: 1,
|
size: 10
|
},
|
loadingPage: false,
|
loadingIcon: false,
|
query: {
|
createUser: uni.getStorageSync("userInfo").user_id,
|
type: "",
|
}
|
}
|
},
|
|
onLoad(option) {
|
|
// this.query.type = option.type
|
|
|
// this.getList()
|
},
|
// onReachBottom() {
|
// this.page.current += 1
|
// this.getList()
|
// },
|
methods: {
|
|
|
|
|
queryList(pageNo, pageSize) {
|
getWorkLogList({
|
current: pageNo,
|
size: pageSize,
|
}).then(res => {
|
this.$refs.paging.complete(res.data.records);
|
})
|
},
|
|
|
getList() {
|
|
this.page.current == 1 ? this.loadingPage = true : this.loadingIcon = true
|
|
console.log(this.userInfo)
|
let param = {}
|
|
getPage(Object.assign(param, this.query, this.page)).then(res => {
|
let data = res.data.records
|
this.dataList = this.dataList.concat(data)
|
this.page.current == 1 ? this.loadingPage = false : this.loadingIcon = false
|
})
|
},
|
|
pushPage(id) {
|
this.$u.func.globalNavigator(`/subPackage/task/workLogDetail?id=${id}`)
|
}
|
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
page {
|
width: 100%;
|
height: 100%;
|
background-color: #F5F5F5;
|
}
|
|
.container {
|
// position: relative;
|
width: 100%;
|
height: 100%;
|
// display: flex;
|
// flex-direction: column;
|
// background: #F9F9FA;
|
|
|
|
.item {
|
background-color: #ffffff;
|
padding: 40rpx 20rpx;
|
margin-top: 20rpx;
|
|
.line {
|
display: flex;
|
font-size: 28rpx;
|
padding: 6rpx;
|
|
.label {
|
color: #a4a4a4;
|
width: 25%;
|
}
|
|
.value {}
|
}
|
|
|
}
|
|
.list {
|
margin: 20rpx 30rpx 0;
|
}
|
|
.list-item {
|
padding: 0 30rpx 20rpx;
|
border-radius: 8rpx;
|
|
.item-title {
|
padding: 30rpx 0;
|
border-bottom: 1px solid #F5F5F5;
|
}
|
|
.item-row {
|
padding: 10rpx 0;
|
|
.address {
|
width: 75%;
|
text-align: right;
|
}
|
}
|
}
|
}
|
</style>
|