main
liudan 1 year ago
parent 43279616cd
commit f34b9fd152
  1. 4
      api/user.js
  2. 61
      pages/allprocess/allprocess.vue
  3. 4
      pages/taskList/taskList.vue

@ -42,7 +42,9 @@ export function confirmProcedureHandle(params){
export function procedureCheckHandle(params){
return http.post('/procedureCheck', params)
}
export function taskProcedureListHandle(params){
return http.post('/taskProcedureList', params)
}
//更改配置项,阻止loading提示
// export function getUserInfo(params){
// return http.post('api/login', {custom:{ShowLoading:false}})

@ -14,7 +14,14 @@
<u-button type="primary" size="small" text="切换账号" @click="changeUser"></u-button>
</view>
</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="title">工序号{{index+1}}</view> -->
@ -58,7 +65,7 @@
<script>
import {getList,logout} from "@/api/user.js"
import {taskProcedureListHandle,logout} from "@/api/user.js"
export default {
data() {
return {
@ -68,10 +75,35 @@
allList:[],
show:false,
info:{},
total:0
total:0,
list1:[],
allData:[]
};
},
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(){
uni.reLaunch({
url:'/pages/taskList/taskList'
@ -81,12 +113,20 @@
this.show = false
},
getData(){
getList({task_id:this.info.id}).then(res=>{
this.allList = res.data.list
this.total = res.data.total;
this.progressList = this.allList.slice(this.pageNum-1,this.pageSize)
taskProcedureListHandle({page:this.pageNum}).then(res=>{
console.log(res,"ppoooo")
let arr = res.data;
this.allData = res.data;
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(){
@ -122,6 +162,7 @@
},
//
onReachBottom() {
console.log("999",this.progressList,this.total)
if(this.progressList.length<this.total){
this.pageNum ++
if(this.progressList.length<this.total){
@ -216,7 +257,7 @@
}
}
.empty-list{
padding-top:20%;
padding-top: 40%;
text-align: center;
}
}

@ -14,14 +14,14 @@
<u-button type="primary" size="small" text="切换账号" @click="changeUser"></u-button>
</view>
</u-popup>
<view style="margin-top:44px;background-color: #ffffff;">
<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="taskListFinish.length!=0" style="margin-top:20rpx;">
<view v-if="taskListFinish.length!=0" style="margin-top:98px;">
<!-- v-for="(item,index) in taskList" :key="index" -->
<view class="taskItem">
<!-- <view class="title">机器编号{{item.name}}</view> -->

Loading…
Cancel
Save