|
|
@ -14,7 +14,14 @@ |
|
|
|
<u-button type="primary" size="small" text="切换账号" @click="changeUser"></u-button> |
|
|
|
<u-button type="primary" size="small" text="切换账号" @click="changeUser"></u-button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
</u-popup> |
|
|
|
<view v-if="progressList.length!=0" style="margin-top:44px;"> |
|
|
|
<view style="margin-top:44px;background-color: #ffffff;position: fixed;width: 100%;z-index:99"> |
|
|
|
|
|
|
|
<u-tabs :list="list1" @click="tabClick" |
|
|
|
|
|
|
|
lineColor="#0076F6" |
|
|
|
|
|
|
|
:activeStyle="{ |
|
|
|
|
|
|
|
color: '#0076F6' |
|
|
|
|
|
|
|
}"></u-tabs> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-if="progressList.length!=0" style="margin-top:98px;"> |
|
|
|
<view class="taskItem" v-for="(item,index) in progressList" :key="index"> |
|
|
|
<view class="taskItem" v-for="(item,index) in progressList" :key="index"> |
|
|
|
<!-- <view class="title">工序号:{{index+1}}</view> --> |
|
|
|
<!-- <view class="title">工序号:{{index+1}}</view> --> |
|
|
|
|
|
|
|
|
|
|
@ -58,7 +65,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import {getList,logout} from "@/api/user.js" |
|
|
|
import {taskProcedureListHandle,logout} from "@/api/user.js" |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
@ -68,10 +75,35 @@ |
|
|
|
allList:[], |
|
|
|
allList:[], |
|
|
|
show:false, |
|
|
|
show:false, |
|
|
|
info:{}, |
|
|
|
info:{}, |
|
|
|
total:0 |
|
|
|
total:0, |
|
|
|
|
|
|
|
list1:[], |
|
|
|
|
|
|
|
allData:[] |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
methods:{ |
|
|
|
|
|
|
|
tabClick(val){ |
|
|
|
|
|
|
|
uni.pageScrollTo({ |
|
|
|
|
|
|
|
scrollTop: 0,//滚动到页面的目标位置 |
|
|
|
|
|
|
|
duration: 300 |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.progressList=[] |
|
|
|
|
|
|
|
this.pageNum=1; |
|
|
|
|
|
|
|
this.pageSize=5; |
|
|
|
|
|
|
|
console.log(val.name,this.allData) |
|
|
|
|
|
|
|
if(val){ |
|
|
|
|
|
|
|
let str = val.name; |
|
|
|
|
|
|
|
let arr = this.allData.filter(item=>{ |
|
|
|
|
|
|
|
if(item.name==val.name){ |
|
|
|
|
|
|
|
return item |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.allList =arr[0].list |
|
|
|
|
|
|
|
this.total = this.allList.length; |
|
|
|
|
|
|
|
let item = this.allList.slice(this.pageNum-1,this.pageSize) |
|
|
|
|
|
|
|
this.progressList = item |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
leftClick(){ |
|
|
|
leftClick(){ |
|
|
|
uni.reLaunch({ |
|
|
|
uni.reLaunch({ |
|
|
|
url:'/pages/taskList/taskList' |
|
|
|
url:'/pages/taskList/taskList' |
|
|
@ -81,12 +113,20 @@ |
|
|
|
this.show = false |
|
|
|
this.show = false |
|
|
|
}, |
|
|
|
}, |
|
|
|
getData(){ |
|
|
|
getData(){ |
|
|
|
getList({task_id:this.info.id}).then(res=>{ |
|
|
|
taskProcedureListHandle({page:this.pageNum}).then(res=>{ |
|
|
|
|
|
|
|
console.log(res,"ppoooo") |
|
|
|
this.allList = res.data.list |
|
|
|
let arr = res.data; |
|
|
|
this.total = res.data.total; |
|
|
|
this.allData = res.data; |
|
|
|
this.progressList = this.allList.slice(this.pageNum-1,this.pageSize) |
|
|
|
this.allList = res.data[0].list |
|
|
|
|
|
|
|
this.total = res.data[0].list.length; |
|
|
|
|
|
|
|
let item = res.data[0].list.slice(this.pageNum-1,this.pageSize) |
|
|
|
|
|
|
|
this.progressList = item |
|
|
|
|
|
|
|
arr.forEach(i=>{ |
|
|
|
|
|
|
|
this.list1.push({name:i.name}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
// this.progressList.push(...res.data.list) |
|
|
|
|
|
|
|
// this.total = res.data.total; |
|
|
|
|
|
|
|
// this.progressList = this.allList.slice(this.pageNum-1,this.pageSize) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
changeUser(){ |
|
|
|
changeUser(){ |
|
|
@ -122,6 +162,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 触底的事件 |
|
|
|
// 触底的事件 |
|
|
|
onReachBottom() { |
|
|
|
onReachBottom() { |
|
|
|
|
|
|
|
console.log("999",this.progressList,this.total) |
|
|
|
if(this.progressList.length<this.total){ |
|
|
|
if(this.progressList.length<this.total){ |
|
|
|
this.pageNum ++ |
|
|
|
this.pageNum ++ |
|
|
|
if(this.progressList.length<this.total){ |
|
|
|
if(this.progressList.length<this.total){ |
|
|
@ -216,7 +257,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.empty-list{ |
|
|
|
.empty-list{ |
|
|
|
padding-top:20%; |
|
|
|
padding-top: 40%; |
|
|
|
text-align: center; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|