选择部门
This commit is contained in:
@@ -59,10 +59,9 @@
|
||||
<div class="examine_person" v-if="enableExamine == true">
|
||||
<div><span class="color_red">*</span><span class="title">审批人</span></div>
|
||||
<div @click="getDeptUser">
|
||||
<span v-if="!userList.length" class="color_gray">请选择人员<u-icon name="arrow-right" color="#CCD0D3"></u-icon></span>
|
||||
<div v-if="userList.length">
|
||||
<AiOpenData type="departmentName" :openid="departmentId"/>
|
||||
</div>
|
||||
<span v-if="!form.examines.length" class="color_gray">请选择<u-icon name="arrow-right" color="#CCD0D3"></u-icon></span>
|
||||
<span v-else>已选择{{ form.examines.length }}名人员</span>
|
||||
<!-- <AiOpenData type="departmentName" :openid="departmentId"/> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="examineChange">
|
||||
@@ -449,15 +448,15 @@ export default {
|
||||
if(!this.form.examines.length) {
|
||||
return this.$u.toast("请选择审批人")
|
||||
} else {
|
||||
this.form.examineList = this.form.examineList
|
||||
this.forms.examines = this.form.examines
|
||||
}
|
||||
this.form.enableExamine = 1
|
||||
this.forms.enableExamine = 1
|
||||
} else {
|
||||
this.form.enableExamine = 0
|
||||
this.forms.enableExamine = 0
|
||||
this.form.examineList = []
|
||||
this.form.examineList = []
|
||||
this.form.examines = []
|
||||
this.form.examines = []
|
||||
}
|
||||
|
||||
if(this.isTimedTask) { // 发送类型,0:立即发送、1:定时发送
|
||||
@@ -534,14 +533,16 @@ export default {
|
||||
fromDepartmentId: 0,
|
||||
mode: "multi",
|
||||
type: ["user"],
|
||||
selectedUserIds: this.form.examineList?.map(e => e.id)
|
||||
selectedUserIds: this.form.examines?.map(e => e.id)
|
||||
}).then((res)=>{
|
||||
if(res?.userList) {
|
||||
this.form.examineList = res.userList
|
||||
if (res.err_msg == "selectEnterpriseContact:ok") {
|
||||
if(typeof res.result == 'string') {
|
||||
res.result = JSON.parse(res.result)
|
||||
}
|
||||
this.form.examines = res.result.userList
|
||||
}
|
||||
).catch((err) => {
|
||||
console.log(err);
|
||||
}).catch((err) => {
|
||||
this.$u.toast(err)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -98,12 +98,15 @@ export default {
|
||||
type: ["department"], // 选部门
|
||||
selectedDepartmentIds: this.deptListArr?.map(e => e.id) // 已选部门ID列表。用于多次选人时可重入
|
||||
}).then((res)=>{
|
||||
if(res?.userList) {
|
||||
console.log(res,'企微通讯录');
|
||||
this.deptListArr = res.userList
|
||||
if(res.err_msg == "selectEnterpriseContact:ok") {
|
||||
if(typeof res.result == 'string') {
|
||||
res.result = JSON.parse(res.result)
|
||||
//由于目前各个终端尚未完全兼容,需要开发者额外判断result类型以保证在各个终端的兼容性
|
||||
}
|
||||
this.deptListArr = res.result.departmentList
|
||||
}
|
||||
).catch((err) => {
|
||||
}).catch((err) => {
|
||||
this.$u.toast(err)
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user