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