|
|
@@ -35,31 +35,31 @@ class SendVote extends Component {
|
|
|
Toast.loading('', 0)
|
|
|
|
|
|
fetchGet(API.getClazzByTeacherId, {
|
|
|
- teacherId: this.props.userInfo.userId,
|
|
|
+ teacherId: this.props.userInfo.user.userFunId,
|
|
|
}).then(response => {
|
|
|
Toast.hide()
|
|
|
const {targetData} = this.state
|
|
|
targetData.length = 0
|
|
|
if (response && response.data) {
|
|
|
response.data.forEach((dataObj,data_index) =>{
|
|
|
- const parentsDOSArray = dataObj.parentsDOS
|
|
|
+ const stusDOSArray = dataObj.studentDOS
|
|
|
const teacherDOSArray = dataObj.teacherDOS
|
|
|
- if (!isObjEmpty(parentsDOSArray)) {
|
|
|
+ if (!isObjEmpty(stusDOSArray)) {
|
|
|
const classData = []
|
|
|
- parentsDOSArray.forEach((parentObj, index) => {
|
|
|
- if (parentObj) {
|
|
|
+ stusDOSArray.forEach((stuObj, index) => {
|
|
|
+ if (stuObj) {
|
|
|
classData.push({
|
|
|
- title: getStrValue(parentObj, 'parentsName'),
|
|
|
- userId: getIntValue(parentObj, 'parentId'),
|
|
|
- userPhone: getStrValue(parentObj, 'userPhone'),
|
|
|
- value: getStrValue(parentObj, 'parentsName') + `-${data_index}-0-${index}`,
|
|
|
+ title: getStrValue(stuObj, 'stuName'),
|
|
|
+ userId: getIntValue(stuObj, 'stuId'),
|
|
|
+ userPhone: getStrValue(stuObj, 'userPhone'),
|
|
|
+ value: getStrValue(stuObj, 'stuName') + `-${data_index}-0-${index}`,
|
|
|
key: `${data_index}-0-${index}`,
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
|
|
|
targetData.push({
|
|
|
- title: dataObj.gradeName+dataObj.clazzName + '全部家长',
|
|
|
+ title: dataObj.gradeName+dataObj.clazzName + '全部学生',
|
|
|
value: `${data_index}-0`,
|
|
|
key: `${data_index}-0`,
|
|
|
children: classData,
|