|
@@ -164,7 +164,7 @@
|
|
|
if (!user.owners){
|
|
if (!user.owners){
|
|
|
window.tempTip.postBasicRequest("{{url('maintenance/user/getOwners')}}", {id:user.id},res=>{
|
|
window.tempTip.postBasicRequest("{{url('maintenance/user/getOwners')}}", {id:user.id},res=>{
|
|
|
this.user.owners = res;
|
|
this.user.owners = res;
|
|
|
- this.switchOwner = res;
|
|
|
|
|
|
|
+ this.switchOwner = res ? res : [];
|
|
|
});
|
|
});
|
|
|
}else{
|
|
}else{
|
|
|
this.switchOwner = user.owners;
|
|
this.switchOwner = user.owners;
|
|
@@ -176,7 +176,7 @@
|
|
|
this._updateOwnerShow(!this.switchStatus);
|
|
this._updateOwnerShow(!this.switchStatus);
|
|
|
}else{
|
|
}else{
|
|
|
this.owners.forEach(owner=>{
|
|
this.owners.forEach(owner=>{
|
|
|
- owner.hide = this.isExist(this.user.owners,owner.name) && this.switchStatus;
|
|
|
|
|
|
|
+ owner.hide = !(this.isExist(this.user.owners,owner.name) && this.switchStatus);
|
|
|
});
|
|
});
|
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
|
}
|
|
}
|
|
@@ -191,7 +191,7 @@
|
|
|
let val = e.target.value;
|
|
let val = e.target.value;
|
|
|
this.owners.forEach(owner=>{
|
|
this.owners.forEach(owner=>{
|
|
|
if (owner.value.indexOf(val) > -1){
|
|
if (owner.value.indexOf(val) > -1){
|
|
|
- owner.hide = !((this.switchStatus && !this.isExist(this.user.owners,owner.name)) || !this.switchStatus);
|
|
|
|
|
|
|
+ owner.hide = (this.switchStatus && !this.isExist(this.user.owners,owner.name)) || !this.switchStatus;
|
|
|
}else{
|
|
}else{
|
|
|
owner.hide = true;
|
|
owner.hide = true;
|
|
|
}
|
|
}
|
|
@@ -209,6 +209,12 @@
|
|
|
return val == tar;
|
|
return val == tar;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ cloneTarget(){
|
|
|
|
|
+ let val = $("#seek-owner").val();
|
|
|
|
|
+ window.tempTip.postBasicRequest("{{url('maintenance/user/cloneBindOwner')}}", {id:this.user.id,target:val},()=>{
|
|
|
|
|
+ return "克隆成功";
|
|
|
|
|
+ },true);
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|