|
@@ -67,6 +67,8 @@
|
|
|
remote
|
|
|
clearable
|
|
|
reserve-keyword
|
|
|
+ multiple
|
|
|
+ collapse-tags
|
|
|
@change="positionSelectClick"
|
|
|
@clear="positionClearClick"
|
|
|
placeholder="请选择身份"
|
|
@@ -359,6 +361,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
|
+ let self = this;
|
|
|
if(this.propsData.userId){
|
|
|
if(this.propsData.avatar){
|
|
|
this.form.avatar = this.propsData.avatar;
|
|
@@ -450,6 +453,14 @@ export default {
|
|
|
}else{
|
|
|
this.form.signature = '';
|
|
|
}
|
|
|
+ if(this.propsData.position){
|
|
|
+ this.form.position = this.propsData.position.split(',');
|
|
|
+ for(let i=0;i<self.form.position.length;i++){
|
|
|
+ self.form.position[i] = parseInt(self.form.position[i]);//字符串转数字
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.form.position = [];
|
|
|
+ }
|
|
|
this.getSelect();
|
|
|
}else{
|
|
|
this.getAll();
|
|
@@ -473,10 +484,12 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.form));
|
|
|
+ obj.position = obj.position+'';
|
|
|
if(this.propsData.userId){
|
|
|
//编辑
|
|
|
- this.form.userId = this.propsData.userId
|
|
|
- putUserStudent(this.form).then(response => {
|
|
|
+ obj.userId = this.propsData.userId
|
|
|
+ putUserStudent(obj).then(response => {
|
|
|
if(response.code==200){
|
|
|
this.msgSuccess(response.msg)
|
|
|
this.outPageButton()
|
|
@@ -497,7 +510,7 @@ export default {
|
|
|
});
|
|
|
}else{
|
|
|
//新增
|
|
|
- addUserStudent(this.form).then(response => {
|
|
|
+ addUserStudent(obj).then(response => {
|
|
|
if(response.code==200){
|
|
|
this.msgSuccess(response.msg)
|
|
|
this.outPageButton()
|