|
@@ -130,8 +130,8 @@
|
|
|
return {
|
|
|
id:info.id,
|
|
|
name:info.name,
|
|
|
- tagFor:info.questionList[0].type+'',
|
|
|
- selectedTags:info.questionList,
|
|
|
+ tagFor:info.questionList?info.questionList[0].type+'':'',
|
|
|
+ selectedTags:info.questionList||[],
|
|
|
prags:detail
|
|
|
};
|
|
|
},
|
|
@@ -185,7 +185,7 @@
|
|
|
if(!goOn){
|
|
|
return;
|
|
|
}
|
|
|
- if(this.form.selectedTags.length==0){
|
|
|
+ if(!this.form.selectedTags||this.form.selectedTags.length==0){
|
|
|
this.warning('请选择关联标签!');
|
|
|
return;
|
|
|
}
|
|
@@ -205,7 +205,7 @@
|
|
|
return arr;
|
|
|
},
|
|
|
parseTagsForSubmit(data){
|
|
|
- return data.map((it)=>{
|
|
|
+ return data&&data.map((it)=>{
|
|
|
return {questionId:it.id,introduceId:'',type:it.type};
|
|
|
});
|
|
|
},
|