From 8ac3ba535fed979a0411332a6e2c28cbecf2fa0c Mon Sep 17 00:00:00 2001 From: liuye Date: Tue, 27 Jun 2023 15:03:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E9=83=A8=E9=97=A8/=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppCooperationPropaganda/selectDeptUser.vue | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/project/qianxinan/AppCooperationPropaganda/selectDeptUser.vue b/src/project/qianxinan/AppCooperationPropaganda/selectDeptUser.vue index 2ca26295..c0b282dc 100644 --- a/src/project/qianxinan/AppCooperationPropaganda/selectDeptUser.vue +++ b/src/project/qianxinan/AppCooperationPropaganda/selectDeptUser.vue @@ -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('请选择审核人员') + 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.$emit("pagePicker:custom", [this.selected].flat()) - // uni.setStorageSync('selectDeptUser', [this.selected].flat()) uni.navigateBack() }, }