增加日报功能
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<view>
|
||||
<z-paging ref="paging" v-model="datalist" @query="queryList" :empty-view-text="$t('Nodata')">
|
||||
<template #top>
|
||||
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000"
|
||||
backgroundColor="#fff" :statusBar="true" :title="$t('mine.workreport')"></uni-nav-bar>
|
||||
</template>
|
||||
<view class="contents" >
|
||||
<view class="colls" v-for="(item, index) in datalist" :key="index" @click="godetilfn(item)">
|
||||
<view class="cont">
|
||||
<view class=""><text class="name">{{item.user.name}}的工作日报</text></view>
|
||||
<view class="time">{{item.updated_at}}</view>
|
||||
<view class="dynamic-ellipsis">今日工作内容:<text>{{item.text}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request,showToast } from '@/api/apiT.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
datalist:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
leftClick(){
|
||||
uni.navigateBack({})
|
||||
},
|
||||
//客户列表数据
|
||||
queryList(pageNo, pageSize) {
|
||||
var that = this;
|
||||
request({
|
||||
url:'daily/list',
|
||||
method:'get',
|
||||
data: {
|
||||
page:pageNo,
|
||||
per_page:10,
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data)
|
||||
if(res.data.code ==0){
|
||||
var datas = res.data.data.data;
|
||||
this.$refs.paging.complete(datas);
|
||||
}else{
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
godetilfn(item){
|
||||
var that=this
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine/workreportdetil?id='+item.id
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.contents{
|
||||
background-color: #FFFFFF;
|
||||
padding: 15px;
|
||||
.colls{
|
||||
|
||||
background: #F6F6F6;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.top{
|
||||
padding: 10px 15px 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.name{
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.cont{
|
||||
padding: 15px 12px;
|
||||
font-size: 28rpx;
|
||||
.time{
|
||||
color: #999999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
.dynamic-ellipsis {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user