|
|
@@ -67,7 +67,7 @@
|
|
|
style="margin-bottom: 15px"
|
|
|
>
|
|
|
<p style="margin: 0">{{ item.name }}</p>
|
|
|
- <p style="margin: 0">{{ item.id }}</p>
|
|
|
+ <p style="margin: 0">{{ item.mobile }}</p>
|
|
|
</el-radio>
|
|
|
</div>
|
|
|
</el-radio-group>
|
|
|
@@ -197,7 +197,9 @@ function treeClick(node: any) {
|
|
|
function submit(){
|
|
|
|
|
|
if(props.title=='设置负责人'){
|
|
|
+ console.log(111)
|
|
|
if(userId.value){
|
|
|
+ console.log(222)
|
|
|
const obj = options.value.find(a => a.value === userId.value)
|
|
|
api.institutionApi.setDeptLeader({
|
|
|
deptId:props.deptIds,
|
|
|
@@ -214,17 +216,18 @@ function submit(){
|
|
|
|
|
|
|
|
|
}else{
|
|
|
- let flag={}
|
|
|
- userList.value.some((item:any)=>{
|
|
|
-
|
|
|
- if( item.id==treeReId.value){
|
|
|
- flag={...item}
|
|
|
- return true
|
|
|
- }
|
|
|
- return false
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
+ console.log(333)
|
|
|
+ // let flag={}
|
|
|
+ // userList.value.some((item:any)=>{
|
|
|
+ //
|
|
|
+ // if( item.mobile==treeReId.value){
|
|
|
+ // flag={...item}
|
|
|
+ // return true
|
|
|
+ // }
|
|
|
+ // return false
|
|
|
+ //
|
|
|
+ // })
|
|
|
+ let flag = userList.value.find(a => a.userId == treeReId.value)
|
|
|
api.institutionApi.setDeptLeader({
|
|
|
deptId:props.deptIds,
|
|
|
leaderId:flag.userId
|
|
|
@@ -237,7 +240,9 @@ function submit(){
|
|
|
// emits('closeDialog',flag)
|
|
|
}
|
|
|
}else{
|
|
|
+ console.log(444)
|
|
|
if(userId.value){
|
|
|
+ console.log(555)
|
|
|
const obj=options.value.map((item:any)=>{
|
|
|
if(item.value==userId.value){
|
|
|
return {
|
|
|
@@ -250,16 +255,18 @@ function submit(){
|
|
|
|
|
|
emits('closeDialog',obj[0])
|
|
|
}else{
|
|
|
- let flag={}
|
|
|
- userList.value.some((item:any)=>{
|
|
|
-
|
|
|
- if( item.id==treeReId.value){
|
|
|
- flag={...item}
|
|
|
- return true
|
|
|
- }
|
|
|
- return false
|
|
|
-
|
|
|
- })
|
|
|
+ console.log(666)
|
|
|
+ // let flag={}
|
|
|
+ // userList.value.some((item:any)=>{
|
|
|
+ //
|
|
|
+ // if( item.mobile==treeReId.value){
|
|
|
+ // flag={...item}
|
|
|
+ // return true
|
|
|
+ // }
|
|
|
+ // return false
|
|
|
+ //
|
|
|
+ // })
|
|
|
+ let flag = userList.value.find(a => a.userId == treeReId.value)
|
|
|
emits('closeDialog',flag)
|
|
|
}
|
|
|
}
|