|
@@ -45,18 +45,26 @@ Page({
|
|
|
let answerstr='';
|
|
|
for(let t=0;t<this.data.servantlist[i].subjectList[j].answer.length;t++){
|
|
|
if(this.data.servantlist[i].subjectList[j].answer[t].isChoose){
|
|
|
- answerstr += this.data.servantlist[i].subjectList[j].answer[t].answer+',';
|
|
|
+ answerstr += this.data.servantlist[i].subjectList[j].answer[t].answer +',';
|
|
|
}
|
|
|
}
|
|
|
//console.log(answerstr);
|
|
|
- servantselectedlist.push({answer: [answerstr],customAnswer: this.data.servantlist[i].subjectList[j].subject,subjectId: this.data.servantlist[i].subjectList[j].subjectId});
|
|
|
+ if(answerstr.length>0||this.data.servantlist[i].subjectList[j].customAnswer.length>0){
|
|
|
+ answerstr=answerstr.substring(0,answerstr.length - 1);
|
|
|
+ servantselectedlist.push({answer: [answerstr],customAnswer: this.data.servantlist[i].subjectList[j].customAnswer,subjectId: this.data.servantlist[i].subjectList[j].subjectId});
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//console.log(servantselectedlist);
|
|
|
request.httpServicePost(apiUrl.insertNewservantappletservicePath,{employRelationNo:employRelationNo,subjectList:servantselectedlist,subjectType:"SN000002"}).then(data=>{
|
|
|
my.alert({
|
|
|
- title: data,
|
|
|
- });
|
|
|
+ title: '提示',
|
|
|
+ content: '设置完成',
|
|
|
+ buttonText: '确定',
|
|
|
+ success: () => {
|
|
|
+ my.navigateBack();
|
|
|
+ }
|
|
|
+ } );
|
|
|
});
|
|
|
},
|
|
|
//选择问题 多选
|