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){ export function procedureCheckHandle(params){
return http.post('/procedureCheck', params) return http.post('/procedureCheck', params)
} }
export function taskProcedureListHandle(params){
return http.post('/taskProcedureList', params)
}
//更改配置项,阻止loading提示 //更改配置项,阻止loading提示
// export function getUserInfo(params){ // export function getUserInfo(params){
// return http.post('api/login', {custom:{ShowLoading:false}}) // return http.post('api/login', {custom:{ShowLoading:false}})

@ -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;
} }
} }

@ -14,14 +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 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" <u-tabs :list="list1" @click="tabClick"
lineColor="#0076F6" lineColor="#0076F6"
:activeStyle="{ :activeStyle="{
color: '#0076F6' color: '#0076F6'
}"></u-tabs> }"></u-tabs>
</view> </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" --> <!-- v-for="(item,index) in taskList" :key="index" -->
<view class="taskItem"> <view class="taskItem">
<!-- <view class="title">机器编号{{item.name}}</view> --> <!-- <view class="title">机器编号{{item.name}}</view> -->

Loading…
Cancel
Save