From c424f8256ac9b8283190e074230452de96b08ebc Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Thu, 2 Mar 2023 13:48:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0loading=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppCooperationPropaganda/addPropaganda.vue | 16 ++++++++++------ .../AppCooperationPropaganda/scopedSelect.vue | 6 +++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/project/huizhili/AppCooperationPropaganda/addPropaganda.vue b/src/project/huizhili/AppCooperationPropaganda/addPropaganda.vue index 43f59874..02a9e4fa 100644 --- a/src/project/huizhili/AppCooperationPropaganda/addPropaganda.vue +++ b/src/project/huizhili/AppCooperationPropaganda/addPropaganda.vue @@ -529,18 +529,22 @@ export default { }, getDeptUser() { + uni.showLoading({title: '加载中'}) this.selectEnterpriseContact({ fromDepartmentId: 0, mode: "multi", type: ["user"], selectedUserIds: this.form.examines?.map(e => e.id) }).then((res)=>{ - this.form.examines = res.userList.map(e=> { - return { - ...e, - examineUserId: e.id - } - }) + if(res?.userList) { + this.form.examines = res.userList.map(e=> { + return { + ...e, + examineUserId: e.id + } + }) + uni.hideLoading() + } }).catch((err) => { this.$u.toast(err) }) diff --git a/src/project/huizhili/AppCooperationPropaganda/scopedSelect.vue b/src/project/huizhili/AppCooperationPropaganda/scopedSelect.vue index c2928807..0d47763e 100644 --- a/src/project/huizhili/AppCooperationPropaganda/scopedSelect.vue +++ b/src/project/huizhili/AppCooperationPropaganda/scopedSelect.vue @@ -92,13 +92,17 @@ export default { }, getDeptUser() { + uni.showLoading({title: '加载中'}) this.selectEnterpriseContact({ fromDepartmentId: 0, // 从最上层开始 mode: "multi", // 多选 type: ["department"], selectedDepartmentIds: this.deptListArr?.map(e => e.id) // 已选部门ID列表 }).then((res)=>{ - this.deptListArr = res.departmentList + if(res?.departmentList) { + this.deptListArr = res.departmentList + } + uni.hideLoading() }).catch((err) => { this.$u.toast(err) })