选择部门/审批人
This commit is contained in:
@@ -59,13 +59,15 @@ export default {
|
||||
...mapState(['user'])
|
||||
},
|
||||
onLoad(o) {
|
||||
this.selected = uni.getStorageSync('selectDeptUser') || []
|
||||
|
||||
this.type = o.selectTtype.split('?')[0]
|
||||
|
||||
if(this.type == 1) { //选择发送范围部门
|
||||
this.getAllDepts()
|
||||
this.selected = uni.getStorageSync('deptList') || []
|
||||
}else { //选择审批人
|
||||
this.getListAll()
|
||||
this.selected = uni.getStorageSync('selectDeptUser') || []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -146,11 +148,18 @@ export default {
|
||||
},
|
||||
submit() {
|
||||
console.log([this.selected].flat())
|
||||
if(this.type == 1) { //选择部门
|
||||
if(![this.selected].flat().length) {
|
||||
return this.$u.toast('请选择部门')
|
||||
}
|
||||
uni.setStorageSync('deptList', [this.selected].flat())
|
||||
}else { //选择人
|
||||
if(![this.selected].flat().length) {
|
||||
return this.$u.toast('请选择审核人员')
|
||||
}
|
||||
uni.$emit("pagePicker:custom", [this.selected].flat())
|
||||
// uni.setStorageSync('selectDeptUser', [this.selected].flat())
|
||||
}
|
||||
uni.navigateBack()
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user