Commit 505b6dc1 by 莫晓莉

mxl

parent daf2c75b
...@@ -66,7 +66,8 @@ ...@@ -66,7 +66,8 @@
page: 1, page: 1,
size: 5, size: 5,
satisHisList: [], //反馈记录 satisHisList: [], //反馈记录
fileUrl: url.fileURL fileUrl: url.fileURL,
hasMore: true
} }
}, },
onShow() { onShow() {
...@@ -78,23 +79,40 @@ ...@@ -78,23 +79,40 @@
page: this.page, page: this.page,
size: this.size size: this.size
}).then(res => { }).then(res => {
if (res.code == 200) {
var satisHisList = res.data.data.rows;
this.satisHisList = satisHisList;
console.log('反馈历史', res);
// /images/project/202009/19/b39f0eec18d94e3f80f9be320e012cd2.jpeg=res.data.data.rows; console.log("获取反馈历史", res);
// uni.showToast({ if (res.code != 200) {
// icon: 'success', uni.showToast({
// title: '获取成功', title: '系统繁忙,加载失败!',
// success: () => { icon: 'none'
});
// } return;
// }) }
let _list = res.data.data.rows,
hasMore = (_list.length == this.size) ? true : false; // 数据是否加载完的标识
if (this.page > 1) {
_list = this.satisHisList.concat(_list);
} }
this.page++;
this.satisHisList = _list;
this.hasMore = hasMore;
}) })
} }
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
if (!this.hasMore) {
uni.showToast({
title: "没有更多数据啦~",
icon: "none"
});
return;
}
this.getSatisfactionEvaluation(this.page); // 获取文章列表
},
} }
</script> </script>
......
...@@ -4,29 +4,8 @@ ...@@ -4,29 +4,8 @@
<block v-for="(tab,index) in StatusList" :key="index"> <block v-for="(tab,index) in StatusList" :key="index">
<view :data-current="index" @click="ontabtap" class="tybe-tab" :class="statusIndex==index ? 'z-active' : ''">{{tab.name}}</view> <view :data-current="index" @click="ontabtap" class="tybe-tab" :class="statusIndex==index ? 'z-active' : ''">{{tab.name}}</view>
</block> </block>
<!-- <view class="tybe-tab">已审批</view>
<view class="tybe-tab">待审批</view> -->
</view> </view>
<block v-if="statusIndex==0"> <block v-if="statusIndex==0">
<!-- <view class="list-area">
<view class="m-his-list" style="">
<view class="his-item">申请人:张三</view>
<view class="his-item mt10">伤残等级:一级</view>
<view class="his-item mt10">伤残类别:意外</view>
<view class="his-item mt10">服务类型:特殊服务</view>
<view class="his-item mt10">申请时间:2020.10.1</view>
<view class="his-item-result mt10">审批结果:待审批</view>
</view>
<view class="m-his-list" style="">
<view class="his-item">申请人:张三</view>
<view class="his-item mt10">伤残等级:一级</view>
<view class="his-item mt10">伤残类别:意外</view>
<view class="his-item mt10">服务类型:特殊服务</view>
<view class="his-item mt10">申请时间:2020.10.1</view>
<view class="his-item-result mt10">审批结果:拒绝</view>
<view class="his-item-result mt10">拒绝理由:个叽里呱啦</view>
</view>
</view> -->
<view class="list-area"> <view class="list-area">
<view v-for="(item,index) in applyProjectList" :key="index" class="m-his-list" style=""> <view v-for="(item,index) in applyProjectList" :key="index" class="m-his-list" style="">
<view class="his-item">申请人:{{item.name}}</view> <view class="his-item">申请人:{{item.name}}</view>
...@@ -51,6 +30,7 @@ ...@@ -51,6 +30,7 @@
return { return {
page:1, page:1,
size:5, size:5,
hasMore:true,
statusIndex:0, statusIndex:0,
StatusList:[ StatusList:[
{ {
...@@ -124,43 +104,57 @@ ...@@ -124,43 +104,57 @@
if(this.statusIndex==index){ if(this.statusIndex==index){
return return
}else{
this.statusIndex=index;
} }
this.statusIndex=index;
this.getApplyProject();
if(this.statusIndex==0){
this.getApplyProject();
}else{
this.getApplyProject(this.statusIndex);
}
}, },
// 分页获取列表 // 分页获取列表
getApplyProject(status){ getApplyProject(){
getApplyProject({status:status,page:this.page,size:this.size}).then(res => { getApplyProject({page:this.page,size:this.size}).then(res => {
if (res.code != 200) {
uni.showToast({
title: '系统繁忙,加载失败!',
icon: 'none'
});
return;
}
if (res.code == 200) { if (res.code == 200) {
// uni.showToast({ let _list = res.data.data.rows,
// icon: 'success', hasMore = (_list.length == this.size) ? true : false; // 数据是否加载完的标识
// title: '获取成功', _list.forEach(item=>{
// success: () => { if(item.status==0){
item.applyResult='待审批'
// } }else if(item.status==1){
// }) item.applyResult='已通过';
// this.applyProjectList=res.data.data.rows; }else{
var list=res.data.data.rows; item.applyResult='已拒绝';
list.forEach(item=>{ }
if(item.status==0){ });
item.applyResult='待审批' if (this.page > 1) {
}else if(item.status==1){ _list = this.applyProjectList.concat(_list);
item.applyResult='已通过';
}else{
item.applyResult='已拒绝';
} }
}) this.page++;
this.applyProjectList = _list;
this.applyProjectList=list; this.hasMore = hasMore;
} }
}) })
} },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
if (!this.hasMore) {
uni.showToast({
title: "没有更多数据啦~",
icon: "none"
});
return;
}
this.getApplyProject(); //申请记录
},
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment