import request from '../../../util/http' import apiUrl from '../../../util/apiUrl1' import util from '../../../util/util' import moment from 'moment' var app = getApp(); Page({ data: { tips:true, servanteditlist:[], }, onLoad(subtypeNo) { this.loadpage(subtypeNo); }, loadpage(subtypeNo){ let employRelationNo = app.globalData.employRelationNo; let params = {employRelationNo:employRelationNo} request.httpServiceGet(apiUrl.getSubjectWhenEdit, params).then(data => { if (data.length > 0) { //加载全部的类别 let subjectList={}; for(let i=0;i { console.log(e); }) }, //提交数据 dailytasksdeit(){ let employRelationNo = app.globalData.employRelationNo; let servantselectedlist=[]; for(let j=0;j0||this.data.servanteditlist.subjectList[j].customAnswer.length>0){ answerstr=answerstr.substring(0,answerstr.length - 1); servantselectedlist.push({answer: [answerstr],customAnswer: this.data.servanteditlist.subjectList[j].customAnswer,subjectId: this.data.servanteditlist.subjectList[j].subjectId}); } } //console.log(servantselectedlist); request.httpServicePost(apiUrl.updateServantLove,{employRelationNo:employRelationNo,subjectList:servantselectedlist,subjectType:"SN000002"}).then(data=>{ my.alert({ title: '提示', content: '设置完成', buttonText: '确定', success: () => { my.navigateBack(); } } ); }); }, //选择问题 多选 answerselected(e){ let checkedlist=e.detail.value; let servanteditlist=this.data.servanteditlist; //先做清除 for(let j=0;j