体检app 优化
This commit is contained in:
parent
0740d80f15
commit
aa5784f946
|
|
@ -61,7 +61,7 @@ export default {
|
|||
show: false,
|
||||
columns: [
|
||||
[
|
||||
{ label: '全部', value: 4 },
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '已取消', value: 1 },
|
||||
{ label: '待体检', value: 2 },
|
||||
{ label: '已体检', value: 3 }
|
||||
|
|
@ -69,7 +69,7 @@ export default {
|
|||
],
|
||||
// 体检状态
|
||||
makeStatus: '',
|
||||
makeStatusValue: 4,
|
||||
makeStatusValue: '',
|
||||
// 列表
|
||||
makeList: [],
|
||||
// 全部列表
|
||||
|
|
@ -105,23 +105,19 @@ export default {
|
|||
this.show = false
|
||||
},
|
||||
handleQuery(){
|
||||
if (this.makeStatusValue == 4) {
|
||||
this.makeList = this.allList
|
||||
} else if (this.makeStatusValue == 1) {
|
||||
this.makeList = this.canceledList
|
||||
} else if (this.makeStatusValue == 2) {
|
||||
this.makeList = this.readyList
|
||||
} else if (this.makeStatusValue == 3) {
|
||||
this.makeList = this.examList
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表 getpersonappointInfo
|
||||
getList() {
|
||||
console.log('🚀 ~ 列表 ~ this.token:', this.token)
|
||||
const params = {
|
||||
token: this.token,
|
||||
ifCancel: this.makeStatusValue
|
||||
}
|
||||
console.log('🚀 ~ 列表 ~ params:', params)
|
||||
uni.request({
|
||||
url: config.tjBaseUrl + '/app/getpersonappointInfo',
|
||||
method: 'post',
|
||||
data: this.token,
|
||||
data: params,
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
token: this.token
|
||||
|
|
@ -130,14 +126,22 @@ export default {
|
|||
res = res.data
|
||||
console.log('🚀 ~ 列表 ~ res:', res)
|
||||
if (res.res == 1 && res.obj != 'isnull') {
|
||||
this.makeList = this.allList = res.obj
|
||||
this.canceledList = res.obj.filter(item => item.ifCancel == 1)
|
||||
this.readyList = res.obj.filter(item => item.ifCancel == 2)
|
||||
this.examList = res.obj.filter(item => item.ifCancel == 3)
|
||||
this.makeList = res.obj
|
||||
} else if (res.res == 1 && res.obj == 'isnull') {
|
||||
this.makeList = []
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '系统异常,请联系管理员',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log('🚀 ~ 列表 ~ err:', err)
|
||||
uni.showToast({
|
||||
title: '系统异常,请联系管理员',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue