添加loading效果

This commit is contained in:
shijingjing
2023-03-02 13:48:03 +08:00
parent 1476dd08f1
commit c424f8256a
2 changed files with 15 additions and 7 deletions

View File

@@ -529,18 +529,22 @@ export default {
}, },
getDeptUser() { getDeptUser() {
uni.showLoading({title: '加载中'})
this.selectEnterpriseContact({ this.selectEnterpriseContact({
fromDepartmentId: 0, fromDepartmentId: 0,
mode: "multi", mode: "multi",
type: ["user"], type: ["user"],
selectedUserIds: this.form.examines?.map(e => e.id) selectedUserIds: this.form.examines?.map(e => e.id)
}).then((res)=>{ }).then((res)=>{
this.form.examines = res.userList.map(e=> { if(res?.userList) {
return { this.form.examines = res.userList.map(e=> {
...e, return {
examineUserId: e.id ...e,
} examineUserId: e.id
}) }
})
uni.hideLoading()
}
}).catch((err) => { }).catch((err) => {
this.$u.toast(err) this.$u.toast(err)
}) })

View File

@@ -92,13 +92,17 @@ export default {
}, },
getDeptUser() { getDeptUser() {
uni.showLoading({title: '加载中'})
this.selectEnterpriseContact({ this.selectEnterpriseContact({
fromDepartmentId: 0, // 从最上层开始 fromDepartmentId: 0, // 从最上层开始
mode: "multi", // 多选 mode: "multi", // 多选
type: ["department"], type: ["department"],
selectedDepartmentIds: this.deptListArr?.map(e => e.id) // 已选部门ID列表 selectedDepartmentIds: this.deptListArr?.map(e => e.id) // 已选部门ID列表
}).then((res)=>{ }).then((res)=>{
this.deptListArr = res.departmentList if(res?.departmentList) {
this.deptListArr = res.departmentList
}
uni.hideLoading()
}).catch((err) => { }).catch((err) => {
this.$u.toast(err) this.$u.toast(err)
}) })