Browse Source

Merge remote-tracking branch 'origin/dev' into dev

guq 7 years ago
parent
commit
b6c2b3c3db

+ 9 - 7
frontend/wechat-web/src/configs/api.config.js

@@ -89,8 +89,6 @@ export const API = {
 
 
     //TODO 接口修改后的
-    // 获取抄送老师
-    getAllTeacher: _baseURL + '/wxSchool/user/getAllTeacher',
     //创建会议
     createMeeting: _baseURL + '/wxSchool/meeting/createMeeting',
     //会议列表
@@ -102,17 +100,21 @@ export const API = {
     //会议签到
     MEETING_SIGN: _baseURL + '/wxSchool/meeting/meetingSign',
     //删除会议
-    deleteMeeting:_baseURL + '/wxSchool/meeting/deleteMeeting',
+    deleteMeeting: _baseURL + '/wxSchool/meeting/deleteMeeting',
     //通过验证码修改手机号
     updatePhone: _baseURL + '/wxSchool/user/updatePhone',
     //成绩通知
     getScoreByStu: _baseURL + '/wxSchool/stuScore/getScoreByStu',
-    //获取家长和老师所有对象
-    getClazzByTeacherId:_baseURL + '/wxSchool/user/getClazzByTeacherId',
     //学生端  学生所在班级的课表  按星期的每天分map
-    curriculumListByTeacherId:_baseURL + '/wxSchool/clazzCurriculum/curriculumListByTeacherId',
+    curriculumListByTeacherId: _baseURL + '/wxSchool/clazzCurriculum/curriculumListByTeacherId',
     //创建校长信箱
-    PRINCIPAL_MAILBOX:_baseURL + '/wxSchool/principalMailbox/mailboxString',
+    PRINCIPAL_MAILBOX: _baseURL + '/wxSchool/principalMailbox/mailboxString',
+    //获取学生和老师所有对象
+    getClazzByTeacherId: _baseURL + '/wxSchool/user/getClazzByTeacherId',
+    // 获取抄送老师
+    getAllTeacher: _baseURL + '/wxSchool/user/getAllTeacher',
+    //获取家长
+    GET_ALL_PARENT: _baseURL + '/wxSchool/user/getParentsByTeacherId',
     //学生请假
     leaveCreate: _baseURL + "/wxSchool/oaLeave/leaveCreate",
     //家长端请假单列表

+ 4 - 0
frontend/wechat-web/src/modules/album/ClassAlbum.jsx

@@ -64,6 +64,10 @@ class ClassAlbum extends Component {
         }
     }
 
+    componentWillUnmount() {
+        Toast.hide()
+    }
+
     render() {
         const {albumList, classList, classValue} = this.state
 

+ 10 - 10
frontend/wechat-web/src/modules/hiPages/send-vote/SendVote.js

@@ -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,

+ 3 - 4
frontend/wechat-web/src/modules/homework/ReleaseAssignmentPage.js

@@ -188,7 +188,7 @@ class ReleaseAssignmentPage extends React.Component {
         }).then((response) => {
             Toast.hide();
             if (response.success) {
-                Toast.success("发布成功!",1)
+                Toast.success("发布成功!", 1)
                 this.initPageData()
 
                 this.backTask = setTimeout(() => {
@@ -305,9 +305,8 @@ class ReleaseAssignmentPage extends React.Component {
     getOrganization = () => {
         Toast.loading('', 0)
 
-        fetchGet(API.USER_GETOBJECT, {
-            userId: this.props.userInfo.userId,
-            stuId: this.props.userInfo.userId
+        fetchGet(API.getClazzByTeacherId, {
+            teacherId: this.props.userInfo.user.userId
         }).then(response => {
             Toast.hide()
             const {targetData} = this.state

+ 2 - 2
frontend/wechat-web/src/modules/message/SystemMessage.jsx

@@ -10,7 +10,7 @@ import 'css/message.css'
 import SystemMsgItem from 'components/SystemMsgItem'
 import {Toast} from 'antd-mobile'
 import LoadingMore from 'components/LoadingMore'
-import {fetchGet} from "../../utils/fetchRequest";
+import {fetchGet, fetchPost} from "../../utils/fetchRequest";
 import {API} from "../../configs/api.config";
 import {getStrValue, isObjEmpty} from "../../utils/common";
 
@@ -59,7 +59,7 @@ export default class SystemMessage extends Component {
         if (!this.dataLoading) {
             const {systemMsgs} = this.state
 
-            fetchGet(API.SYSTEM_MESSAGE, {
+            fetchPost(API.SYSTEM_MESSAGE, {
                 notifyType: 1,
                 pageIndex: index,
                 pageSize: mPageSize

+ 1 - 1
frontend/wechat-web/src/modules/message/UseHelp.jsx

@@ -60,7 +60,7 @@ export default class UseHelp extends Component {
             const {helpList} = this.state
             this.dataLoading = true
 
-            fetchGet(API.SYSTEM_MESSAGE, {
+            fetchPost(API.SYSTEM_MESSAGE, {
                 notifyType: 2,
                 pageIndex: index,
                 pageSize: mPageSize

+ 2 - 2
frontend/wechat-web/src/modules/vote/VoteListParent.jsx

@@ -6,7 +6,7 @@
 import React, {Component} from 'react'
 import {connect} from 'react-redux'
 import ReactDOM from 'react-dom'
-import {fetchGet} from "../../utils/fetchRequest";
+import {fetchGet, fetchPost} from "../../utils/fetchRequest";
 import {API} from "../../configs/api.config";
 import RefreshLayout from "../../components/RefreshLayout";
 import {Toast} from 'antd-mobile'
@@ -91,7 +91,7 @@ class VoteListParent extends Component {
             voteList.length = 0
         }
 
-        fetchGet(API.voteList, {
+        fetchPost(API.voteList, {
             userId: this.props.userInfo.user.userFunId,
             pageIndex: mPageIndex,
             pageSize: mPageSize,

+ 2 - 2
frontend/wechat-web/src/modules/vote/VoteListTeacher.jsx

@@ -161,7 +161,7 @@ class VoteListTeacher extends Component {
             releaseList.length = 0
         }
 
-        fetchGet(API.voteListTeacher, {
+        fetchPost(API.voteListTeacher, {
             userId: this.props.userInfo.user.userFunId,
             voteType: '1',
             pageIndex: mReleaseIndex,
@@ -231,7 +231,7 @@ class VoteListTeacher extends Component {
             receiveList.length = 0
         }
 
-        fetchGet(API.voteListTeacher, {
+        fetchPost(API.voteListTeacher, {
             userId: this.props.userInfo.user.userFunId,
             voteType: '1',
             pageIndex: mReceiveIndex,