|
@@ -26,7 +26,8 @@ export default {
|
|
|
return {
|
|
|
dialogVisible:false,
|
|
|
personIds:[],
|
|
|
- persons:[]
|
|
|
+ persons:[],
|
|
|
+ submit:false
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
@@ -39,17 +40,32 @@ export default {
|
|
|
//关闭弹窗
|
|
|
handleClose(){
|
|
|
this.dialogVisible = false
|
|
|
- this.$emit('getPersonIds',{personIds:this.personIds,persons:this.persons})
|
|
|
+ if(this.submit){
|
|
|
+ this.$emit('getPersonIds',{personIds:this.personIds,persons:this.persons})
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
//打开弹窗
|
|
|
open(personIds,persons){
|
|
|
- this.personIds = personIds || []
|
|
|
- this.persons = persons || []
|
|
|
+ if(personIds){
|
|
|
+ this.personIds = JSON.parse(JSON.stringify(personIds))
|
|
|
+ }else{
|
|
|
+ this.personIds = []
|
|
|
+ }
|
|
|
+ if(persons){
|
|
|
+ this.persons = JSON.parse(JSON.stringify(persons))
|
|
|
+ }else{
|
|
|
+ this.persons = []
|
|
|
+ }
|
|
|
+ this.submit= false
|
|
|
+ // this.personIds = personIds || []
|
|
|
+ // this.persons = persons || []
|
|
|
this.dialogVisible = true
|
|
|
},
|
|
|
- getPersonIds({personIds,persons}){
|
|
|
+ getPersonIds({personIds,persons,submit}){
|
|
|
this.personIds = personIds
|
|
|
this.persons = persons
|
|
|
+ this.submit = submit
|
|
|
this.handleClose()
|
|
|
}
|
|
|
},
|